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.ac | |
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.ac')
-rw-r--r-- | libctf/configure.ac | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/libctf/configure.ac b/libctf/configure.ac index 3c57e65..bbdfd63 100644 --- a/libctf/configure.ac +++ b/libctf/configure.ac @@ -170,10 +170,9 @@ if test $ac_cv_libctf_macro_O_CLOEXEC = yes; then 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 @@ -187,38 +186,19 @@ changequote(,)dnl x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` changequote([,])dnl 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 AC_SUBST(SHARED_LDFLAGS) -AC_SUBST(SHARED_LIBADD) -AC_SUBST(BFD_LIBADD) -AC_SUBST(BFD_DEPENDENCIES) +AC_SUBST(CTF_LIBADD) # Use a version script, if possible, or an -export-symbols-regex otherwise. VERSION_FLAGS='-export-symbols-regex ctf_.*' |