summaryrefslogtreecommitdiffstats
path: root/rules/cross-gcc.make
diff options
context:
space:
mode:
Diffstat (limited to 'rules/cross-gcc.make')
-rw-r--r--rules/cross-gcc.make10
1 files changed, 10 insertions, 0 deletions
diff --git a/rules/cross-gcc.make b/rules/cross-gcc.make
index 9cb6b01..7be17bc 100644
--- a/rules/cross-gcc.make
+++ b/rules/cross-gcc.make
@@ -100,6 +100,16 @@ CROSS_GCC_AUTOCONF_COMMON := \
$(call ptx/ifdef,PTXCONF_HOST_CLOOG,--with-cloog) \
$(call ptx/ifdef,PTXCONF_HOST_ISL,--with-isl)
+ifndef PTXCONF_TOOLCHAIN_DEBUG
+CROSS_GCC_AUTOCONF_COMMON += \
+ --with-debug-prefix-map="$(TOOLCHAIN_CROSS_DEBUG_MAP)" \
+ --enable-libstdcxx-debug-flags="-gdwarf-4 -O0 $(TOOLCHAIN_CROSS_DEBUG_FLAGS)"
+
+CROSS_GCC_CONF_ENV += \
+ CFLAGS_FOR_TARGET="$(TOOLCHAIN_CROSS_DEBUG_FLAGS)" \
+ CXXFLAGS_FOR_TARGET="$(TOOLCHAIN_CROSS_DEBUG_FLAGS)"
+endif
+
# --enable-tls enable or disable generation of tls code
# overriding the assembler check for tls support
# --enable-initfini-array use .init_array/.fini_array sections