diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2021-02-03 18:42:06 +0000 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2021-02-10 15:26:57 +0000 |
commit | 95148614026da7353721411dd020d024667e3482 (patch) | |
tree | 39af646d728d6f1c7a7e78d592bb9c56dbed99cb /libctf/configure | |
parent | aee224d6434c08a1404a4357cf0a664a4c2f02eb (diff) | |
download | gdb-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 'libctf/configure')
-rwxr-xr-x | libctf/configure | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/libctf/configure b/libctf/configure index 544bca2..bef55bb 100755 --- a/libctf/configure +++ b/libctf/configure @@ -13357,29 +13357,34 @@ $as_echo "#define HAVE_O_CLOEXEC 1" >>confdefs.h fi -# Horrible hacks to build DLLs on Windows and a shared library elsewhere. - CTF_LIBADD="-L`pwd`/../libiberty -liberty" SHARED_LDFLAGS= + +# Horrible hacks to build DLLs on Windows and a shared library elsewhere. 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 -# libctf references. -# We can't do that if a pic libiberty is unavailable since including non-pic -# code would insert text relocations into libctf. +# libctf references. We can't do that if a pic libiberty is unavailable +# since including non-pic # code would insert text relocations into libctf. # Note that linking against libbfd as we do here, which is itself linked # against libiberty, may not satisfy all the libctf libiberty references # since libbfd may not pull in the entirety of libiberty. +# Also, jam libintl into the right place in all of this: after libiberty, +# which uses it, but before -lcygwin, which it uses. x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` if test -n "$x"; then CTF_LIBADD="-L`pwd`/../libiberty/pic -liberty" fi +fi + +CTF_LIBADD="$CTF_LIBADD $LIBINTL" +if test "$enable_shared" = "yes"; then case "${host}" in # More hacks to build DLLs on Windows. *-*-cygwin*) SHARED_LDFLAGS="-no-undefined" - CTF_LIBADD="$CTF_LIBADD -L`pwd`/../intl -lintl -lcygwin" + CTF_LIBADD="$CTF_LIBADD -lcygwin" ;; esac fi |