summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2018-06-14 05:59:39 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2018-06-14 05:59:39 +0200
commitc0c6ccec7881c92e0a96fa9114af553c4434d83b (patch)
tree40151ac0761d2b19998768c915904a034cc64a39 /mk
parent71c4b08ed6e9f52c4078d27574ed8440fd945ac1 (diff)
add option for special CFLAGS/CXXFLAGS
Do not disable exception handling and unwinding options by default, as this breaks exception handling in C++ applications using libstdc++. Reported-by: Tom Deblauwe
Diffstat (limited to 'mk')
-rw-r--r--mk/vars.mk9
1 files changed, 7 insertions, 2 deletions
diff --git a/mk/vars.mk b/mk/vars.mk
index 2fabd7160..eaa8c5333 100644
--- a/mk/vars.mk
+++ b/mk/vars.mk
@@ -283,14 +283,19 @@ else
TARGET_CPPFLAGS+= -DNDEBUG
TARGET_CFLAGS+= -fomit-frame-pointer
TARGET_CXXFLAGS+= -fomit-frame-pointer
-# stop generating eh_frame stuff
+endif
+
+# stop generating eh_frame stuff, do not use it for C++
+ifeq ($(ADK_TARGET_CFLAGS_DISABLE_EH),y)
TARGET_CFLAGS+= -fno-unwind-tables -fno-asynchronous-unwind-tables
TARGET_CXXFLAGS+= -fno-unwind-tables -fno-asynchronous-unwind-tables
+endif
+
+# workaround gcc bug for m68k/coldfire
ifeq ($(ADK_TARGET_CPU_CF),y)
TARGET_CFLAGS+= -fno-dwarf2-cfi-asm
TARGET_CXXFLAGS+= -fno-dwarf2-cfi-asm
endif
-endif
ifeq ($(ADK_TARGET_ARCH_ARM),y)
ifeq ($(ADK_TARGET_ARCH_ARM_WITH_NEON),y)