diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2021-01-05 13:25:56 +0000 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2021-01-05 14:53:40 +0000 |
commit | 1038406a8f6609ad0a449746da70393b0835f699 (patch) | |
tree | 633a10646d1fff39581ac6008535f43f9393ebf0 /libctf/configure | |
parent | 37002871ac2111eb3c88f44659c3c67d2fde1997 (diff) | |
download | gdb-1038406a8f6609ad0a449746da70393b0835f699.zip gdb-1038406a8f6609ad0a449746da70393b0835f699.tar.gz gdb-1038406a8f6609ad0a449746da70393b0835f699.tar.bz2 |
libctf: rip out BFD_DEPENDENCIES / BFD_LIBADD
This complex morass inherited from libopcodes, which endeavours to
implement the effect of specifying ../bfd/libbfd.la in _LIBADD without
actually doing so, appears to be working around a libtool bug which as
far as I can see is no longer present (i.e., the install directory no
longer appears in -L arguments in libtool link-mode invocations, so
there is no danger of picking up old libbfds or other dependent
libraries).
Replaced with a simple reference to libbfd.la in the appropriate place.
Also adjusted things a little more so that libctf.la and libctf-nobfd.la
are self-contained, even when linking statically. This opens up the
possibility of running libtool to link against libctf from inside the
(upcoming) testsuite.
libctf/ChangeLog
2021-01-05 Nick Alcock <nick.alcock@oracle.com>
* configure.ac (BFD_LIBADD): Remove.
(BFD_DEPENDENCIES): Likewise. Remove associated cases.
(SHARED_LIBADD): Rename to...
(CTF_LIBADD): ... this. Stick in a suitable libiberty even when
linking statically.
* Makefile.am (libctf_nobfd_la_LIBADD): Adjust accordingly.
libctf uses libintl.
(libctf_la_LIBADD): Reference libbfd.la directly, not via
BFD_LIBADD.
(libctf_la_DEPENDENCIES): Remove.
* Makefile.in: Regenerate.
* configure: Likewise.
Diffstat (limited to 'libctf/configure')
-rwxr-xr-x | libctf/configure | 36 |
1 files changed, 7 insertions, 29 deletions
diff --git a/libctf/configure b/libctf/configure index fb77403..0a09b35 100755 --- a/libctf/configure +++ b/libctf/configure @@ -636,9 +636,7 @@ am__EXEEXT_TRUE LTLIBOBJS LIBOBJS VERSION_FLAGS -BFD_DEPENDENCIES -BFD_LIBADD -SHARED_LIBADD +CTF_LIBADD SHARED_LDFLAGS NEED_CTF_QSORT_R_FALSE NEED_CTF_QSORT_R_TRUE @@ -11520,7 +11518,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11523 "configure" +#line 11521 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11626,7 +11624,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11629 "configure" +#line 11627 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -13339,10 +13337,9 @@ $as_echo "#define HAVE_O_CLOEXEC 1" >>confdefs.h fi # Horrible hacks to build DLLs on Windows and a shared library elsewhere. -SHARED_LIBADD= + +CTF_LIBADD="-L`pwd`/../libiberty -liberty" SHARED_LDFLAGS= -BFD_LIBADD= -BFD_DEPENDENCIES= if test "$enable_shared" = "yes"; then # When building a shared libctf, link against the pic version of libiberty # so that apps that use libctf won't need libiberty just to satisfy any @@ -13354,39 +13351,20 @@ if test "$enable_shared" = "yes"; then # since libbfd may not pull in the entirety of libiberty. x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` if test -n "$x"; then - SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" + CTF_LIBADD="-L`pwd`/../libiberty/pic -liberty" fi case "${host}" in # More hacks to build DLLs on Windows. *-*-cygwin*) SHARED_LDFLAGS="-no-undefined" - SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin" - BFD_LIBADD="-L`pwd`/../bfd -lbfd" - ;; - - *-*-darwin*) - BFD_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.dylib" - BFD_DEPENDENCIES="../bfd/libbfd.la" - ;; - *) - case "$host_vendor" in - hp) - BFD_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.sl" - ;; - *) - BFD_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.so" - ;; - esac - BFD_DEPENDENCIES="../bfd/libbfd.la" + CTF_LIBADD="$CTF_LIBADD -L`pwd`/../intl -lintl -lcygwin" ;; esac fi - - # Use a version script, if possible, or an -export-symbols-regex otherwise. VERSION_FLAGS='-export-symbols-regex ctf_.*' if $LD --help 2>&1 | grep -- --version-script >/dev/null; then |