diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 531e6cb5021..f0e4b72c353 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,11 @@ +2021-10-27 Maciej W. Rozycki + + * Makefile.am: Remove obsolete comment. + * configure.ac: Refer `libbfd.la' to link shared BFD library + except for Cygwin. + * Makefile.in: Regenerate. + * configure: Regenerate. + 2021-09-27 Nick Alcock * configure: Regenerate. diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am index c45fc295665..e07e360d842 100644 --- a/opcodes/Makefile.am +++ b/opcodes/Makefile.am @@ -321,12 +321,6 @@ endif endif libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c -# It's desirable to list ../bfd/libbfd.la in DEPENDENCIES and LIBADD. -# Unfortunately this causes libtool to add -L$(libdir), referring to the -# planned install directory of libbfd. This can cause us to pick up an -# old version of libbfd, or to pick up libbfd for the wrong architecture -# if host != build. So for building with shared libraries we use a -# hardcoded path to libbfd.so instead of relying on the entries in libbfd.la. libopcodes_la_DEPENDENCIES = $(OFILES) @SHARED_DEPENDENCIES@ libopcodes_la_LIBADD = $(OFILES) @SHARED_LIBADD@ libopcodes_la_LDFLAGS += -release `cat ../bfd/libtool-soversion` @SHARED_LDFLAGS@ diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in index 8ba01c9f8f9..942737106ab 100644 --- a/opcodes/Makefile.in +++ b/opcodes/Makefile.in @@ -699,12 +699,6 @@ OFILES = @BFD_MACHINES@ CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ @INCINTL@ libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c -# It's desirable to list ../bfd/libbfd.la in DEPENDENCIES and LIBADD. -# Unfortunately this causes libtool to add -L$(libdir), referring to the -# planned install directory of libbfd. This can cause us to pick up an -# old version of libbfd, or to pick up libbfd for the wrong architecture -# if host != build. So for building with shared libraries we use a -# hardcoded path to libbfd.so instead of relying on the entries in libbfd.la. libopcodes_la_DEPENDENCIES = $(OFILES) @SHARED_DEPENDENCIES@ libopcodes_la_LIBADD = $(OFILES) @SHARED_LIBADD@ # Allow dependency tracking to work on all the source files. diff --git a/opcodes/configure b/opcodes/configure index 22a9cf926ca..acfbdd6ec6f 100755 --- a/opcodes/configure +++ b/opcodes/configure @@ -12133,19 +12133,8 @@ if test "$enable_shared" = "yes"; then SHARED_LDFLAGS="-no-undefined" SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty $SHARED_LIBADD" ;; - *-*-darwin*) - SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.dylib ${SHARED_LIBADD}" - SHARED_DEPENDENCIES="../bfd/libbfd.la" - ;; *) - case "$host_vendor" in - hp) - SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.sl ${SHARED_LIBADD}" - ;; - *) - SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.so ${SHARED_LIBADD}" - ;; - esac + SHARED_LIBADD="../bfd/libbfd.la ${SHARED_LIBADD}" SHARED_DEPENDENCIES="../bfd/libbfd.la" ;; esac diff --git a/opcodes/configure.ac b/opcodes/configure.ac index 4853b9e32d7..757ce10fbe2 100644 --- a/opcodes/configure.ac +++ b/opcodes/configure.ac @@ -193,19 +193,8 @@ if test "$enable_shared" = "yes"; then SHARED_LDFLAGS="-no-undefined" SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty $SHARED_LIBADD" ;; - *-*-darwin*) - SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.dylib ${SHARED_LIBADD}" - SHARED_DEPENDENCIES="../bfd/libbfd.la" - ;; *) - case "$host_vendor" in - hp) - SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.sl ${SHARED_LIBADD}" - ;; - *) - SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.so ${SHARED_LIBADD}" - ;; - esac + SHARED_LIBADD="../bfd/libbfd.la ${SHARED_LIBADD}" SHARED_DEPENDENCIES="../bfd/libbfd.la" ;; esac