From: Ulrich Weigand Date: Thu, 27 Aug 2015 14:08:19 +0000 (+0000) Subject: configure.ac: Remove [disable-shared] argument to LT_INIT. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7e5c75472136ea01f63c10c7aab8a4888eaea6d0;p=gcc.git configure.ac: Remove [disable-shared] argument to LT_INIT. * configure.ac: Remove [disable-shared] argument to LT_INIT. Remove setting PIC_FLAG when building as target library. * configure: Regenerate. From-SVN: r227261 --- diff --git a/libbacktrace/ChangeLog b/libbacktrace/ChangeLog index 8961199e36d..48d402901f9 100644 --- a/libbacktrace/ChangeLog +++ b/libbacktrace/ChangeLog @@ -1,3 +1,9 @@ +2015-08-27 Ulrich Weigand + + * configure.ac: Remove [disable-shared] argument to LT_INIT. + Remove setting PIC_FLAG when building as target library. + * configure: Regenerate. + 2015-08-26 Hans-Peter Nilsson * configure.ac: Only compile with -fPIC if the target diff --git a/libbacktrace/configure b/libbacktrace/configure index 72832d529e1..d34a6bfe61e 100755 --- a/libbacktrace/configure +++ b/libbacktrace/configure @@ -1366,7 +1366,7 @@ Optional Features: --enable-multilib build many library versions (default) --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer - --enable-shared[=PKGS] build shared libraries [default=no] + --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] @@ -7658,7 +7658,16 @@ done # Set options -# Check whether --enable-shared was given. + + + + enable_dlopen=no + + + enable_win32_dll=no + + + # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in @@ -7678,7 +7687,7 @@ if test "${enable_shared+set}" = set; then : ;; esac else - enable_shared=no + enable_shared=yes fi @@ -7689,14 +7698,6 @@ fi - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} @@ -11130,7 +11131,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11133 "configure" +#line 11134 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11236,7 +11237,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11239 "configure" +#line 11240 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11708,35 +11709,12 @@ $as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h fi fi -# When building as a target library, shared libraries may want to link -# this in. We don't want to provide another shared library to -# complicate dependencies. Instead, we just compile with -fPIC, if -# the target supports compiling with that option. -PIC_FLAG= -if test -n "${with_target_subdir}"; then - ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fPIC" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - PIC_FLAG=-fPIC -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$ac_save_CFLAGS" -fi -# Similarly, use -fPIC with --enable-host-shared: +# Enable --enable-host-shared. # Check whether --enable-host-shared was given. if test "${enable_host_shared+set}" = set; then : enableval=$enable_host_shared; PIC_FLAG=-fPIC +else + PIC_FLAG= fi diff --git a/libbacktrace/configure.ac b/libbacktrace/configure.ac index feca006974b..01284bd82cb 100644 --- a/libbacktrace/configure.ac +++ b/libbacktrace/configure.ac @@ -79,7 +79,7 @@ case "$AWK" in "") AC_MSG_ERROR([can't build without awk]) ;; esac -LT_INIT([disable-shared]) +LT_INIT AM_PROG_LIBTOOL backtrace_supported=yes @@ -161,22 +161,11 @@ else fi fi -# When building as a target library, shared libraries may want to link -# this in. We don't want to provide another shared library to -# complicate dependencies. Instead, we just compile with -fPIC, if -# the target supports compiling with that option. -PIC_FLAG= -if test -n "${with_target_subdir}"; then - ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fPIC" - AC_TRY_COMPILE([], [], [PIC_FLAG=-fPIC]) - CFLAGS="$ac_save_CFLAGS" -fi -# Similarly, use -fPIC with --enable-host-shared: +# Enable --enable-host-shared. AC_ARG_ENABLE(host-shared, [AS_HELP_STRING([--enable-host-shared], [build host code as shared libraries])], -[PIC_FLAG=-fPIC], []) +[PIC_FLAG=-fPIC], [PIC_FLAG=]) AC_SUBST(PIC_FLAG) # Test for __sync support.