aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-30 18:22:35 +0100
committerMax Kellermann <max@duempel.org>2013-10-30 18:22:35 +0100
commit84ff1a680aa7652bb37e11f4ed1325be8f242700 (patch)
tree9d75a50adc6919f30fb99070be2b2f6caa7cd8bf
parent90c899407afce9d6d8370586e7bdbac0d1415563 (diff)
downloadmpd-84ff1a680aa7652bb37e11f4ed1325be8f242700.tar.gz
mpd-84ff1a680aa7652bb37e11f4ed1325be8f242700.tar.xz
mpd-84ff1a680aa7652bb37e11f4ed1325be8f242700.zip
configure.ac: enable some gcc options even in debug mode
Most importantly: always disable C++ exceptions. It was surprising to see MPD terminate due to an unexpected exception.
Diffstat (limited to '')
-rw-r--r--configure.ac16
1 files changed, 10 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index a16d80e87..fd2d884a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1459,22 +1459,26 @@ dnl ---------------------------------------------------------------------------
dnl CFLAGS
dnl ---------------------------------------------------------------------------
+AX_APPEND_COMPILE_FLAGS([-fvisibility=hidden])
+
+AC_LANG_PUSH([C++])
+AX_APPEND_COMPILE_FLAGS([-fvisibility=hidden])
+AX_APPEND_COMPILE_FLAGS([-fno-threadsafe-statics])
+AX_APPEND_COMPILE_FLAGS([-fmerge-all-constants])
+AX_APPEND_COMPILE_FLAGS([-fno-exceptions])
+AX_APPEND_COMPILE_FLAGS([-fno-rtti])
+AC_LANG_POP
+
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])
- AX_APPEND_COMPILE_FLAGS([-fvisibility=hidden])
AC_LANG_PUSH([C++])
AX_APPEND_COMPILE_FLAGS([-ffunction-sections])
AX_APPEND_COMPILE_FLAGS([-fdata-sections])
- AX_APPEND_COMPILE_FLAGS([-fvisibility=hidden])
- AX_APPEND_COMPILE_FLAGS([-fno-threadsafe-statics])
- AX_APPEND_COMPILE_FLAGS([-fmerge-all-constants])
- AX_APPEND_COMPILE_FLAGS([-fno-exceptions])
- AX_APPEND_COMPILE_FLAGS([-fno-rtti])
AC_LANG_POP
AX_APPEND_LINK_FLAGS([-Wl,--gc-sections])