xtensa|risc-v: Make CXX exception and RTTI depend on Kconfig options
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
parent
a0617177e8
commit
06d0a9f1ad
|
@ -59,6 +59,17 @@ else
|
|||
MAXOPTIMIZATION += -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
ARCHCFLAGS =
|
||||
ARCHCXXFLAGS =
|
||||
|
||||
ifneq ($(CONFIG_CXX_EXCEPTION),y)
|
||||
ARCHCXXFLAGS += -fno-exceptions -fcheck-new
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_CXX_RTTI),y)
|
||||
ARCHCXXFLAGS += -fno-rtti
|
||||
endif
|
||||
|
||||
# Generic GNU RVG toolchain
|
||||
|
||||
ifeq ($(CONFIG_RISCV_TOOLCHAIN),GNU_RVG)
|
||||
|
|
|
@ -41,7 +41,11 @@ ifeq ($(CONFIG_XTENSA_TOOLCHAIN_ESP), y)
|
|||
CROSSDEV = xtensa-esp32-elf-
|
||||
endif
|
||||
|
||||
ARCHCPUFLAGS =
|
||||
ARCHCPUFLAGS = -mlongcalls
|
||||
|
||||
ifeq ($(CONFIG_MM_KASAN),y)
|
||||
ARCHCPUFLAGS += -fsanitize=kernel-address
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
|
||||
MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL)
|
||||
|
@ -55,8 +59,15 @@ else
|
|||
MAXOPTIMIZATION += -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_MM_KASAN),y)
|
||||
ARCHCPUFLAGS += -fsanitize=kernel-address
|
||||
ARCHCFLAGS =
|
||||
ARCHCXXFLAGS =
|
||||
|
||||
ifneq ($(CONFIG_CXX_EXCEPTION),y)
|
||||
ARCHCXXFLAGS += -fno-exceptions -fcheck-new
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_CXX_RTTI),y)
|
||||
ARCHCXXFLAGS += -fno-rtti
|
||||
endif
|
||||
|
||||
# Default toolchain
|
||||
|
|
|
@ -41,7 +41,11 @@ ifeq ($(CONFIG_XTENSA_TOOLCHAIN_ESP), y)
|
|||
CROSSDEV = xtensa-$(CONFIG_ARCH_CHIP)-elf-
|
||||
endif
|
||||
|
||||
ARCHCPUFLAGS =
|
||||
ARCHCPUFLAGS = -mlongcalls
|
||||
|
||||
ifeq ($(CONFIG_MM_KASAN),y)
|
||||
ARCHCPUFLAGS += -fsanitize=kernel-address
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
|
||||
MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL)
|
||||
|
@ -55,8 +59,15 @@ else
|
|||
MAXOPTIMIZATION += -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_MM_KASAN),y)
|
||||
ARCHCPUFLAGS += -fsanitize=kernel-address
|
||||
ARCHCFLAGS =
|
||||
ARCHCXXFLAGS =
|
||||
|
||||
ifneq ($(CONFIG_CXX_EXCEPTION),y)
|
||||
ARCHCXXFLAGS += -fno-exceptions -fcheck-new
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_CXX_RTTI),y)
|
||||
ARCHCXXFLAGS += -fno-rtti
|
||||
endif
|
||||
|
||||
# Default toolchain
|
||||
|
|
|
@ -41,8 +41,8 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
|||
endif
|
||||
|
||||
ARCHCPUFLAGS += -mno-relax
|
||||
ARCHCFLAGS = -fno-common -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS = -fno-common -ffunction-sections -fdata-sections -fno-exceptions -fcheck-new -std=c++17 -pipe -nostdinc++
|
||||
ARCHCFLAGS += -fno-common -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS += -fno-common -ffunction-sections -fdata-sections -std=c++17 -pipe
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||
|
|
|
@ -48,8 +48,8 @@ endif
|
|||
|
||||
ARCHCPUFLAGS += -mcmodel=medany
|
||||
|
||||
ARCHCFLAGS = -fno-common -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS = -fno-common -fno-exceptions -fcheck-new -fno-rtti
|
||||
ARCHCFLAGS += -fno-common -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS += -fno-common
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
|
||||
|
|
|
@ -41,8 +41,8 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
|||
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing
|
||||
endif
|
||||
|
||||
ARCHCFLAGS = -fno-common -ffunction-sections -fdata-sections -msmall-data-limit=0
|
||||
ARCHCXXFLAGS = $(ARCHCFLAGS) -fno-exceptions -fcheck-new -fno-rtti
|
||||
ARCHCFLAGS += -fno-common -ffunction-sections -fdata-sections -msmall-data-limit=0
|
||||
ARCHCXXFLAGS += -fno-common -ffunction-sections -fdata-sections -msmall-data-limit=0 -std=c++17
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
ARCHPICFLAGS = -fpic
|
||||
|
|
|
@ -41,8 +41,8 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
|||
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing
|
||||
endif
|
||||
|
||||
ARCHCFLAGS = -fno-common -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS = -fno-common -fno-exceptions -fcheck-new -fno-rtti
|
||||
ARCHCFLAGS += -fno-common -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS += -fno-common
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||
|
|
|
@ -38,8 +38,8 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
|||
endif
|
||||
|
||||
ARCHCPUFLAGS += -mcmodel=medany -mstrict-align
|
||||
ARCHCFLAGS = -fno-common -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS = -fno-common -fno-exceptions -fcheck-new -fno-rtti
|
||||
ARCHCFLAGS += -fno-common -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS += -fno-common
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
|||
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing
|
||||
endif
|
||||
|
||||
ARCHCFLAGS = -fno-common -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS = -fno-common -fno-exceptions -fcheck-new -fno-rtti
|
||||
ARCHCFLAGS += -fno-common -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS += -fno-common
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||
|
|
|
@ -63,8 +63,8 @@ endif
|
|||
|
||||
ARCHCPUFLAGS += -mcmodel=medany
|
||||
|
||||
ARCHCFLAGS = -fno-common -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS = -fno-common -fno-exceptions -fcheck-new -fno-rtti
|
||||
ARCHCFLAGS += -fno-common -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS += -fno-common
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
|
||||
|
|
|
@ -48,8 +48,8 @@ endif
|
|||
|
||||
ARCHCPUFLAGS += -mcmodel=medany
|
||||
|
||||
ARCHCFLAGS = -fno-common -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS = -fno-common -fno-exceptions -fcheck-new -fno-rtti
|
||||
ARCHCFLAGS += -fno-common -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS += -fno-common
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
|
||||
|
|
|
@ -40,8 +40,8 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
|||
endif
|
||||
|
||||
ARCHCPUFLAGS += -mcmodel=medany
|
||||
ARCHCFLAGS = -fno-common -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS = -fno-common -fno-exceptions -fcheck-new -fno-rtti
|
||||
ARCHCFLAGS += -fno-common -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS += -fno-common
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
ARCHPICFLAGS = -fpic -msingle-pic-base
|
||||
|
|
|
@ -53,8 +53,8 @@ ifeq ($(CONFIG_RV32M1_OPENISA_TOOLCHAIN),y)
|
|||
endif
|
||||
endif
|
||||
|
||||
ARCHCFLAGS = -fno-common -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS = -fno-common -fno-exceptions -fcheck-new -fno-rtti
|
||||
ARCHCFLAGS += -fno-common -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS += -fno-common
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||
|
|
|
@ -65,8 +65,8 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
|||
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing
|
||||
endif
|
||||
|
||||
ARCHCFLAGS = -fno-common -ffunction-sections -fdata-sections -mlongcalls
|
||||
ARCHCXXFLAGS = $(ARCHCFLAGS) -fno-exceptions -fcheck-new -fno-rtti
|
||||
ARCHCFLAGS += -fno-common -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS += -fno-common -ffunction-sections -fdata-sections -std=c++17
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
ARCHPICFLAGS = -fpic
|
||||
|
|
|
@ -65,8 +65,8 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
|||
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing
|
||||
endif
|
||||
|
||||
ARCHCFLAGS = -fno-common -ffunction-sections -fdata-sections -mlongcalls
|
||||
ARCHCXXFLAGS = $(ARCHCFLAGS) -fno-exceptions -fcheck-new -fno-rtti
|
||||
ARCHCFLAGS += -fno-common -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS += -fno-common -ffunction-sections -fdata-sections -std=c++17
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
ARCHPICFLAGS = -fpic
|
||||
|
|
|
@ -65,8 +65,8 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
|||
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing
|
||||
endif
|
||||
|
||||
ARCHCFLAGS = -fno-common -ffunction-sections -fdata-sections -mlongcalls
|
||||
ARCHCXXFLAGS = $(ARCHCFLAGS) -fno-exceptions -fcheck-new -fno-rtti
|
||||
ARCHCFLAGS += -fno-common -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS += -fno-common -ffunction-sections -fdata-sections -std=c++17
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
ARCHPICFLAGS = -fpic
|
||||
|
|
|
@ -65,8 +65,8 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
|||
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing
|
||||
endif
|
||||
|
||||
ARCHCFLAGS = -fno-common -ffunction-sections -fdata-sections -mlongcalls
|
||||
ARCHCXXFLAGS = $(ARCHCFLAGS) -fno-exceptions -fcheck-new -fno-rtti
|
||||
ARCHCFLAGS += -fno-common -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS += -fno-common -ffunction-sections -fdata-sections -std=c++17
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
ARCHPICFLAGS = -fpic
|
||||
|
|
|
@ -46,8 +46,8 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
|||
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing
|
||||
endif
|
||||
|
||||
ARCHCFLAGS = -fno-common -ffunction-sections -fdata-sections -mlongcalls
|
||||
ARCHCXXFLAGS = $(ARCHCFLAGS) -fno-exceptions -fcheck-new -fno-rtti
|
||||
ARCHCFLAGS += -fno-common -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS += -fno-common -ffunction-sections -fdata-sections -std=c++17
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
ARCHPICFLAGS = -fpic
|
||||
|
|
|
@ -36,8 +36,8 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
|||
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce
|
||||
endif
|
||||
|
||||
ARCHCFLAGS = -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls
|
||||
ARCHCXXFLAGS = $(ARCHCFLAGS) -fno-exceptions -fcheck-new -fno-rtti
|
||||
ARCHCFLAGS += -fno-common -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS += -fno-common -ffunction-sections -fdata-sections -std=c++17
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
ARCHPICFLAGS = -fpic
|
||||
|
|
Loading…
Reference in New Issue