aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 351356282..3c3add129 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1485,6 +1485,16 @@ dnl ---------------------------------------------------------------------------
dnl ---------------------------------- debug ----------------------------------
if test "x$enable_debug" = xno; then
AM_CPPFLAGS="$AM_CPPFLAGS -DNDEBUG"
+
+ AX_APPEND_COMPILE_FLAGS([-ffunction-sections])
+ AX_APPEND_COMPILE_FLAGS([-fdata-sections])
+
+ AC_LANG_PUSH([C++])
+ AX_APPEND_COMPILE_FLAGS([-ffunction-sections])
+ AX_APPEND_COMPILE_FLAGS([-fdata-sections])
+ AC_LANG_POP
+
+ AX_APPEND_LINK_FLAGS([-Wl,--gc-sections])
fi
dnl ----------------------------------- GCC -----------------------------------