aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2021-02-03 18:42:06 +0000
committerNick Alcock <nick.alcock@oracle.com>2021-02-10 15:26:57 +0000
commit95148614026da7353721411dd020d024667e3482 (patch)
tree39af646d728d6f1c7a7e78d592bb9c56dbed99cb /bfd
parentaee224d6434c08a1404a4357cf0a664a4c2f02eb (diff)
downloadgdb-95148614026da7353721411dd020d024667e3482.zip
gdb-95148614026da7353721411dd020d024667e3482.tar.gz
gdb-95148614026da7353721411dd020d024667e3482.tar.bz2
bfd, opcodes, libctf: support --with-included-gettext
Right now, these libraries hardwire -L../intl -lintl on a few fixed platforms, which works fine on those platforms but on other platforms leads to shared libraries that lack libintl_* symbols when configured --with-included-gettext, and/or static libraries that contain libintl as *another* static library. If we instead use the LIBINTL variable defined in ../intl/config.intl, this gives us the right thing on all three classes of platform (gettext in libc, gettext in system libintl, gettext in ../intl/libintl.a).. This also means we can rip out some Darwin-specific machinery from configure.ac and also simplify the Cygwin side. This also means that the libctf testsuite (and other places that include libbfd, libopcodes or libctf) don't need to grow libintl dependencies just on account of those libraries (though they still need such dependencies if they themselves use gettext machinery). bfd/ChangeLog 2021-02-03 Nick Alcock <nick.alcock@oracle.com> * configure.ac (SHARED_LIBADD): Remove explicit -lintl population in favour of LIBINTL. * configure: Regenerated. libctf/ChangeLog 2021-02-02 Nick Alcock <nick.alcock@oracle.com> * configure.ac (CTF_LIBADD): Remove explicit -lintl population in favour of LIBINTL. * Makefile.am (libctf_nobfd_la_LIBADD): No longer explicitly include $(LIBINTL). (check-DEJAGNU): Pass down to tests as well. * configure: Regenerated. * Makefile.in: Likewise. opcodes/ChangeLog 2021-02-04 Nick Alcock <nick.alcock@oracle.com> * configure.ac (SHARED_LIBADD): Remove explicit -lintl population in favour of LIBINTL. * configure: Regenerated.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rwxr-xr-xbfd/configure11
-rw-r--r--bfd/configure.ac11
3 files changed, 16 insertions, 12 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 08e6790..ebe2b58 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2021-02-03 Nick Alcock <nick.alcock@oracle.com>
+
+ * configure.ac (SHARED_LIBADD): Remove explicit -lintl population in
+ favour of LIBINTL.
+ * configure: Regenerated.
+
2021-02-09 Alan Modra <amodra@gmail.com>
* config.bfd (arm*-*-symbianelf*): Move from obsolete to removed.
diff --git a/bfd/configure b/bfd/configure
index 5a7e88e..accd39c 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -14632,17 +14632,16 @@ if test "$enable_shared" = "yes"; then
if test -n "$x"; then
SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
fi
+fi
+
+SHARED_LIBADD="$SHARED_LIBADD $LIBINTL"
+if test "$enable_shared" = "yes"; then
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 -lkernel32"
- ;;
-
- # Use built-in libintl on macOS, since it is not provided by libc.
- *-*-darwin*)
- SHARED_LIBADD="-L`pwd`/../libiberty/pic -L`pwd`/../intl -liberty -lintl"
+ SHARED_LIBADD="-L`pwd`/../libiberty -liberty $SHARED_LIBADD -lcygwin -lkernel32"
;;
esac
diff --git a/bfd/configure.ac b/bfd/configure.ac
index fae4ea2..e9a07b8 100644
--- a/bfd/configure.ac
+++ b/bfd/configure.ac
@@ -317,17 +317,16 @@ changequote([,])dnl
if test -n "$x"; then
SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
fi
+fi
+
+SHARED_LIBADD="$SHARED_LIBADD $LIBINTL"
+if test "$enable_shared" = "yes"; then
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 -lkernel32"
- ;;
-
- # Use built-in libintl on macOS, since it is not provided by libc.
- *-*-darwin*)
- SHARED_LIBADD="-L`pwd`/../libiberty/pic -L`pwd`/../intl -liberty -lintl"
+ SHARED_LIBADD="-L`pwd`/../libiberty -liberty $SHARED_LIBADD -lcygwin -lkernel32"
;;
esac