summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2016-11-15 02:52:09 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2016-11-15 02:52:09 +0100
commit2e83e8e94ca2958ccf169e4fbd5479cc45653f34 (patch)
tree75d07f74e91b43857f4608d59cbfb86a81441517 /configure.ac
parentbuild: fix some minor autoconf & automake breakage (diff)
downloadfrr-2e83e8e94ca2958ccf169e4fbd5479cc45653f34.tar.xz
frr-2e83e8e94ca2958ccf169e4fbd5479cc45653f34.zip
build: unconditionally try -rdynamic
-rdynamic is needed for useful backtraces and future plugin loading support. Try and enable it unconditionally. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac22
1 files changed, 14 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index 61b50d779..6d0598b88 100755
--- a/configure.ac
+++ b/configure.ac
@@ -188,6 +188,20 @@ if test x"${enable_werror}" = x"yes" ; then
fi
AC_SUBST(WERROR)
+dnl need link on this one, not compile
+AC_LANG_PUSH(C)
+ac_ld_flag_save="$LDFLAGS"
+LDFLAGS="$LDFLAGS -rdynamic"
+AC_MSG_CHECKING([[whether linker supports -rdynamic]])
+AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[]])],
+ [AC_MSG_RESULT([yes])],
+ [
+ LDFLAGS="$ac_ld_flag_save"
+ AC_MSG_RESULT([no])
+ ])
+AC_LANG_POP(C)
+
dnl --------------
dnl Check programs
dnl --------------
@@ -298,8 +312,6 @@ AC_ARG_ENABLE(gcc_ultra_verbose,
AS_HELP_STRING([--enable-gcc-ultra-verbose], [enable ultra verbose GCC warnings]))
AC_ARG_ENABLE(linux24_tcp_md5,
AS_HELP_STRING([--enable-linux24-tcp-md5], [enable support for old, Linux-2.4 RFC2385 patch]))
-AC_ARG_ENABLE(gcc-rdynamic,
- AS_HELP_STRING([--enable-gcc-rdynamic], [enable linking with -rdynamic for better backtraces (default if gcc)]))
AC_ARG_ENABLE(backtrace,
AS_HELP_STRING([--disable-backtrace,], [disable crash backtraces (default autodetect)]))
AC_ARG_ENABLE(time-check,
@@ -333,12 +345,6 @@ fi
AC_ARG_ENABLE([dev_build],
AS_HELP_STRING([--enable-dev-build], [build for development]))
-if test x"${enable_gcc_rdynamic}" != x"no" ; then
- if test x"${enable_gcc_rdynamic}" = x"yes" -o x"$COMPILER" = x"GCC"; then
- LDFLAGS="${LDFLAGS} -rdynamic"
- fi
-fi
-
if test x"${enable_time_check}" != x"no" ; then
if test x"${enable_time_check}" = x"yes" -o x"${enable_time_check}" = x ; then
AC_DEFINE(CONSUMED_TIME_CHECK,5000000,Consumed Time Check)