mirror of
https://github.com/apache/nuttx.git
synced 2026-05-18 00:34:10 +08:00
ghs: replace the "-Wall" build option with the "-ghstd=last"
According to the Greenhills documentation, the "-Wall" option is deprecated for use. Instead, the "-ghstd=last" option is recommended. Compared with "-Wall", the "-ghstd=last" option can capture more warnings and has stricter rules. Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
@@ -60,7 +60,7 @@ endif()
|
||||
# Architecture flags
|
||||
|
||||
add_link_options(-entry=__start)
|
||||
add_compile_options(--no_commons -Wall -Wshadow -Wundef -nostdlib)
|
||||
add_compile_options(--no_commons --ghstd=last -Wshadow -Wundef -nostdlib)
|
||||
add_compile_options(--option=305)
|
||||
|
||||
if(CONFIG_DEBUG_CUSTOMOPT)
|
||||
|
||||
@@ -410,7 +410,14 @@ ARCHOPTIMIZATION += --no_commons
|
||||
else
|
||||
ARCHOPTIMIZATION += -fno-common
|
||||
endif
|
||||
ARCHOPTIMIZATION += -Wall -Wshadow -Wundef
|
||||
|
||||
ifeq ($(CONFIG_ARM_TOOLCHAIN_GHS),y)
|
||||
ARCHOPTIMIZATION += --ghstd=last
|
||||
else
|
||||
ARCHOPTIMIZATION += -Wall
|
||||
endif
|
||||
|
||||
ARCHOPTIMIZATION += -Wshadow -Wundef
|
||||
|
||||
ifeq ($(CONFIG_ARM_TOOLCHAIN_ARMCLANG),y)
|
||||
ARCHOPTIMIZATION += -nostdlib
|
||||
|
||||
Reference in New Issue
Block a user