toolchain/ghs: Fix green hills toolchain build Vela warnings
ccarm: Warning: Option "-fomit-frame-pointer" not supported in this product ccarm: Warning: Unknown option "-Wno-cpp" ignored. Did you mean "--nocpp"? ccarm: Warning: Unknown option "-pipe" passed to linker ccarm: Warning: Unknown option "-Wno-psabi" ignored. Did you mean "-Wno-convert64"? ccarm: Warning: Option "-fomit-frame-pointer" not supported in this product ccarm: Warning: Unknown option "-Wno-cpp" ignored. Did you mean "--nocpp"? ccarm: Warning: Unknown option "-pipe" passed to linker [asarm] (warning #2073) unknown option: -mimplicit-it=always Warning: Unknown option "-pipe" passed to linker [asarm] (warning #2073) unknown option: -mthumb [asarm] (warning #2073) unknown option: -mimplicit-it=always [asarm] (warning #2073) unknown option: -mthumb [asarm] (warning #2073) unknown option: -mimplicit-it=always [asarm] (warning #2073) unknown option: -mthumb [asarm] (warning #2073) unknown option: -mimplicit-it=always [asarm] (warning #2073) unknown option: -mthumb [asarm] (warning #2073) unknown option: -mimplicit-it=always [asarm] (warning #2073) unknown option: -mthumb [asarm] (warning #2073) unknown option: -mimplicit-it=always Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
This commit is contained in:
parent
3bb30231a9
commit
33ddf1a297
|
@ -1,5 +1,7 @@
|
||||||
*.a
|
*.a
|
||||||
*.adb
|
*.adb
|
||||||
|
*.dba
|
||||||
|
*.dbo
|
||||||
*.asm
|
*.asm
|
||||||
*.bin
|
*.bin
|
||||||
*.d
|
*.d
|
||||||
|
|
|
@ -117,7 +117,7 @@ ifeq ($(CONFIG_ARM_TOOLCHAIN_ARMCLANG),)
|
||||||
LDENDGROUP ?= -Wl,--end-group
|
LDENDGROUP ?= -Wl,--end-group
|
||||||
LDFLAGS := $(addprefix -Xlinker ,$(LDFLAGS))
|
LDFLAGS := $(addprefix -Xlinker ,$(LDFLAGS))
|
||||||
LDFLAGS += $(filter-out $(STRIPCFLAGS),$(CFLAGS))
|
LDFLAGS += $(filter-out $(STRIPCFLAGS),$(CFLAGS))
|
||||||
else
|
else ifneq ($(CONFIG_ARM_TOOLCHAIN_GHS),y)
|
||||||
LDSTARTGROUP ?= --start-group
|
LDSTARTGROUP ?= --start-group
|
||||||
LDENDGROUP ?= --end-group
|
LDENDGROUP ?= --end-group
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -47,7 +47,11 @@ endif
|
||||||
ifeq ($(CONFIG_FRAME_POINTER),y)
|
ifeq ($(CONFIG_FRAME_POINTER),y)
|
||||||
ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls
|
ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls
|
||||||
else
|
else
|
||||||
ARCHOPTIMIZATION += -fomit-frame-pointer
|
ifeq ($(CONFIG_ARM_TOOLCHAIN_GHS),y)
|
||||||
|
ARCHOPTIMIZATION += -noga
|
||||||
|
else
|
||||||
|
ARCHOPTIMIZATION += -fomit-frame-pointer
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_STACK_CANARIES),y)
|
ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||||
|
@ -150,20 +154,24 @@ endif
|
||||||
ARCHCPUFLAGS += $(TOOLCHAIN_MARCH) $(TOOLCHAIN_MTUNE) $(TOOLCHAIN_MFLOAT)
|
ARCHCPUFLAGS += $(TOOLCHAIN_MARCH) $(TOOLCHAIN_MTUNE) $(TOOLCHAIN_MFLOAT)
|
||||||
|
|
||||||
ifeq ($(CONFIG_ARM_THUMB),y)
|
ifeq ($(CONFIG_ARM_THUMB),y)
|
||||||
ARCHCPUFLAGS += -mthumb
|
ifeq ($(CONFIG_ARM_TOOLCHAIN_GHS),y)
|
||||||
|
ARCHCPUFLAGS += -thumb
|
||||||
|
else
|
||||||
|
ARCHCPUFLAGS += -mthumb
|
||||||
|
|
||||||
# GCC Manual:
|
# GCC Manual:
|
||||||
# -mthumb
|
# -mthumb
|
||||||
# ... If you want to force assembler files to be interpreted as Thumb
|
# ... If you want to force assembler files to be interpreted as Thumb
|
||||||
# code, either add a `.thumb' directive to the source or pass the
|
# code, either add a `.thumb' directive to the source or pass the
|
||||||
# -mthumb option directly to the assembler by prefixing it with -Wa.
|
# -mthumb option directly to the assembler by prefixing it with -Wa.
|
||||||
|
|
||||||
ARCHCPUFLAGS += -Wa,-mthumb
|
ARCHCPUFLAGS += -Wa,-mthumb
|
||||||
|
|
||||||
# Outputs an implicit IT block when there is a conditional instruction
|
# Outputs an implicit IT block when there is a conditional instruction
|
||||||
# without an enclosing IT block.
|
# without an enclosing IT block.
|
||||||
|
|
||||||
ARCHCPUFLAGS += -Wa,-mimplicit-it=always
|
ARCHCPUFLAGS += -Wa,-mimplicit-it=always
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Clang toolchain
|
# Clang toolchain
|
||||||
|
@ -312,8 +320,13 @@ endif
|
||||||
|
|
||||||
# Architecture flags
|
# Architecture flags
|
||||||
|
|
||||||
ARCHCFLAGS += -Wstrict-prototypes -Wno-attributes -Wno-unknown-pragmas
|
ifeq ($(CONFIG_ARM_TOOLCHAIN_GHS),y)
|
||||||
ARCHCXXFLAGS += -Wno-attributes -Wno-unknown-pragmas
|
ARCHCFLAGS += -gcc -gnu99 -preprocess_assembly_files --diag_suppress=68,111,174,222,236,257,826,1143,1721
|
||||||
|
ARCHCXXFLAGS += --gnu_asm --diag_suppress=540,826
|
||||||
|
else
|
||||||
|
ARCHCFLAGS += -Wstrict-prototypes -Wno-attributes -Wno-unknown-pragmas
|
||||||
|
ARCHCXXFLAGS += -Wno-attributes -Wno-unknown-pragmas
|
||||||
|
endif
|
||||||
|
|
||||||
# When all C++ code is built using GCC 7.1 or a higher version,
|
# When all C++ code is built using GCC 7.1 or a higher version,
|
||||||
# we can safely disregard warnings of the type "parameter passing for X changed in GCC 7.1."
|
# we can safely disregard warnings of the type "parameter passing for X changed in GCC 7.1."
|
||||||
|
@ -324,23 +337,37 @@ ifneq ($(CONFIG_LIBCXXTOOLCHAIN),y)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_ARCH_TOOLCHAIN_CLANG),y)
|
ifneq ($(CONFIG_ARCH_TOOLCHAIN_CLANG),y)
|
||||||
ARCHCFLAGS += -Wno-psabi
|
ifneq ($(CONFIG_ARM_TOOLCHAIN_GHS),y)
|
||||||
ARCHCXXFLAGS += -Wno-psabi
|
ARCHCFLAGS += -Wno-psabi
|
||||||
|
ARCHCXXFLAGS += -Wno-psabi
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_CXX_STANDARD),)
|
ifneq ($(CONFIG_CXX_STANDARD),)
|
||||||
ARCHCXXFLAGS += -std=$(CONFIG_CXX_STANDARD)
|
ifeq ($(CONFIG_ARM_TOOLCHAIN_GHS),y)
|
||||||
|
ARCHCXXFLAGS += --$(CONFIG_CXX_STANDARD)
|
||||||
|
else
|
||||||
|
ARCHCXXFLAGS += -std=$(CONFIG_CXX_STANDARD)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_CXX_EXCEPTION),y)
|
ifneq ($(CONFIG_CXX_EXCEPTION),y)
|
||||||
ARCHCXXFLAGS += -fno-exceptions -fcheck-new
|
ifeq ($(CONFIG_ARM_TOOLCHAIN_GHS),y)
|
||||||
|
ARCHCXXFLAGS += --no_exceptions -check=alloc
|
||||||
|
else
|
||||||
|
ARCHCXXFLAGS += -fno-exceptions -fcheck-new
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_CXX_RTTI),y)
|
ifneq ($(CONFIG_CXX_RTTI),y)
|
||||||
ARCHCXXFLAGS += -fno-rtti
|
ARCHCXXFLAGS += -fno-rtti
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(CONFIG_ARM_TOOLCHAIN_GHS),y)
|
||||||
ARCHOPTIMIZATION += -fno-common -Wall -Wshadow -Wundef
|
ARCHOPTIMIZATION += --no_commons
|
||||||
|
else
|
||||||
|
ARCHOPTIMIZATION += -fno-common
|
||||||
|
endif
|
||||||
|
ARCHOPTIMIZATION += -Wall -Wshadow -Wundef
|
||||||
|
|
||||||
ifeq ($(CONFIG_ARM_TOOLCHAIN_ARMCLANG),y)
|
ifeq ($(CONFIG_ARM_TOOLCHAIN_ARMCLANG),y)
|
||||||
ARCHOPTIMIZATION += -nostdlib
|
ARCHOPTIMIZATION += -nostdlib
|
||||||
|
|
Loading…
Reference in New Issue