mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-12 18:36:10 +08:00
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.
This commit is contained in:
@ -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.
|
||||
|
11
bfd/configure
vendored
11
bfd/configure
vendored
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,3 +1,13 @@
|
||||
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.
|
||||
|
||||
2021-01-27 Nick Alcock <nick.alcock@oracle.com>
|
||||
|
||||
* ctf-string.c (ctf_str_add): Treat adding a NULL as adding "".
|
||||
|
@ -41,7 +41,7 @@ include_HEADERS =
|
||||
noinst_LTLIBRARIES = libctf.la libctf-nobfd.la
|
||||
endif
|
||||
|
||||
libctf_nobfd_la_LIBADD = @CTF_LIBADD@ $(LIBINTL) $(ZLIB)
|
||||
libctf_nobfd_la_LIBADD = @CTF_LIBADD@ $(ZLIB)
|
||||
libctf_nobfd_la_LDFLAGS = -version-info 0:0:0 @SHARED_LDFLAGS@ @VERSION_FLAGS@
|
||||
libctf_nobfd_la_CPPFLAGS = $(AM_CPPFLAGS) -DNOBFD=1
|
||||
libctf_nobfd_la_SOURCES = ctf-archive.c ctf-dump.c ctf-create.c ctf-decl.c ctf-error.c \
|
||||
@ -86,7 +86,7 @@ check-DEJAGNU: site.exp development.exp
|
||||
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
|
||||
$$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
|
||||
CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS) -I$(INCDIR) -I$(srcdir) -I$(builddir) -I$(builddir)/../bfd $(ZLIBINC)" \
|
||||
CC_FOR_HOST="$(CC)" LIBS="$(LIBS)" $(RUNTESTFLAGS); \
|
||||
CC_FOR_HOST="$(CC)" LIBS="$(libctf_nobfd_la_LIBADD) $(LIBS)" $(RUNTESTFLAGS); \
|
||||
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
|
||||
fi
|
||||
|
||||
|
@ -164,8 +164,7 @@ am__uninstall_files_from_dir = { \
|
||||
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
|
||||
am__DEPENDENCIES_1 =
|
||||
libctf_nobfd_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
|
||||
$(am__DEPENDENCIES_1)
|
||||
libctf_nobfd_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
am__libctf_nobfd_la_SOURCES_DIST = ctf-archive.c ctf-dump.c \
|
||||
ctf-create.c ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c \
|
||||
ctf-dedup.c ctf-link.c ctf-lookup.c ctf-open.c ctf-sha1.c \
|
||||
@ -191,7 +190,7 @@ libctf_nobfd_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
|
||||
-o $@
|
||||
@INSTALL_LIBBFD_FALSE@am_libctf_nobfd_la_rpath =
|
||||
@INSTALL_LIBBFD_TRUE@am_libctf_nobfd_la_rpath = -rpath $(libdir)
|
||||
am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
|
||||
am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
|
||||
libctf_la_DEPENDENCIES = ../bfd/libbfd.la $(am__DEPENDENCIES_2)
|
||||
am__libctf_la_SOURCES_DIST = ctf-archive.c ctf-dump.c ctf-create.c \
|
||||
ctf-decl.c ctf-error.c ctf-hash.c ctf-labels.c ctf-dedup.c \
|
||||
@ -458,7 +457,7 @@ AM_CFLAGS = -std=gnu99 @ac_libctf_warn_cflags@ @warn@ @c_warn@ @WARN_PEDANTIC@ @
|
||||
@INSTALL_LIBBFD_FALSE@include_HEADERS =
|
||||
@INSTALL_LIBBFD_TRUE@include_HEADERS = $(INCDIR)/ctf.h $(INCDIR)/ctf-api.h
|
||||
@INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libctf.la libctf-nobfd.la
|
||||
libctf_nobfd_la_LIBADD = @CTF_LIBADD@ $(LIBINTL) $(ZLIB)
|
||||
libctf_nobfd_la_LIBADD = @CTF_LIBADD@ $(ZLIB)
|
||||
libctf_nobfd_la_LDFLAGS = -version-info 0:0:0 @SHARED_LDFLAGS@ @VERSION_FLAGS@
|
||||
libctf_nobfd_la_CPPFLAGS = $(AM_CPPFLAGS) -DNOBFD=1
|
||||
libctf_nobfd_la_SOURCES = ctf-archive.c ctf-dump.c ctf-create.c \
|
||||
@ -1337,7 +1336,7 @@ check-DEJAGNU: site.exp development.exp
|
||||
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
|
||||
$$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
|
||||
CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS) -I$(INCDIR) -I$(srcdir) -I$(builddir) -I$(builddir)/../bfd $(ZLIBINC)" \
|
||||
CC_FOR_HOST="$(CC)" LIBS="$(LIBS)" $(RUNTESTFLAGS); \
|
||||
CC_FOR_HOST="$(CC)" LIBS="$(libctf_nobfd_la_LIBADD) $(LIBS)" $(RUNTESTFLAGS); \
|
||||
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
|
||||
fi
|
||||
|
||||
|
17
libctf/configure
vendored
17
libctf/configure
vendored
@ -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
|
||||
|
@ -169,31 +169,36 @@ if test $ac_cv_libctf_macro_O_CLOEXEC = yes; then
|
||||
[Whether the platform has a definition of O_CLOEXEC.])
|
||||
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.
|
||||
changequote(,)dnl
|
||||
x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'`
|
||||
changequote([,])dnl
|
||||
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
|
||||
|
@ -1,3 +1,9 @@
|
||||
2021-02-04 Nick Alcock <nick.alcock@oracle.com>
|
||||
|
||||
* configure.ac (SHARED_LIBADD): Remove explicit -lintl population in
|
||||
favour of LIBINTL.
|
||||
* configure: Regenerated.
|
||||
|
||||
2021-02-08 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* tic54x-dis.c (sprint_mmr): Change to tic54x_mmregs.
|
||||
|
8
opcodes/configure
vendored
8
opcodes/configure
vendored
@ -12798,15 +12798,21 @@ if test "$enable_shared" = "yes"; then
|
||||
# Note that linking against libbfd as we do here, which is itself linked
|
||||
# against libiberty, may not satisfy all the libopcodes 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
|
||||
SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
|
||||
fi
|
||||
fi
|
||||
|
||||
SHARED_LIBADD="$SHARED_LIBADD $LIBINTL"
|
||||
|
||||
if test "$enable_shared" = "yes"; then
|
||||
case "${host}" in
|
||||
*-*-cygwin*)
|
||||
SHARED_LDFLAGS="-no-undefined"
|
||||
SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin"
|
||||
SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty $SHARED_LIBADD"
|
||||
;;
|
||||
*-*-darwin*)
|
||||
SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.dylib ${SHARED_LIBADD}"
|
||||
|
@ -166,17 +166,23 @@ if test "$enable_shared" = "yes"; then
|
||||
# Note that linking against libbfd as we do here, which is itself linked
|
||||
# against libiberty, may not satisfy all the libopcodes 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.
|
||||
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"
|
||||
fi
|
||||
fi
|
||||
|
||||
SHARED_LIBADD="$SHARED_LIBADD $LIBINTL"
|
||||
|
||||
if test "$enable_shared" = "yes"; then
|
||||
case "${host}" in
|
||||
*-*-cygwin*)
|
||||
SHARED_LDFLAGS="-no-undefined"
|
||||
SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin"
|
||||
SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty $SHARED_LIBADD"
|
||||
;;
|
||||
*-*-darwin*)
|
||||
SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.dylib ${SHARED_LIBADD}"
|
||||
|
Reference in New Issue
Block a user