summaryrefslogtreecommitdiff
path: root/opcodes/configure.in
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2009-01-16 08:02:29 +0000
committerAlan Modra <amodra@bigpond.net.au>2009-01-16 08:02:29 +0000
commitc2716a3a61c6f2095b2c3ae32f8644452fcb1016 (patch)
treeee70f892f616539f5dae6ee48822dce3012394a4 /opcodes/configure.in
parentc09150d0e9a2d01df5a847120d065b7a92ecf758 (diff)
downloadbinutils-redhat-c2716a3a61c6f2095b2c3ae32f8644452fcb1016.tar.gz
bfd/
* Makefile.am (libbfd_la_LIBADD, libbfd_la_LDFLAGS): Substitute SHARED_LIBADD and SHARED_LDFLAGS rather than WIN32LIBADD, WIN32LDFLAGS. * configure.in (commonbfdlib): Delete. (SHARED_LDFLAGS): Rename from WIN32LDFLAGS/ (SHARED_LIBADD): Rename from WIN32LIBADD. Add pic libiberty if such is available, not just for linux. * po/SRC-POTFILES.in: Regenerate. * Makefile.in: Regenerate. * configure: Regenerate. opcodes/ * configure.in (commonbfdlib): Delete. (SHARED_LIBADD): Add pic libiberty if such is available. * configure: Regenerate. * po/POTFILES.in: Regenerate. binutils/ * configure.in (commonbfdlib): Delete. * configure: Regenerate. gas/ * configure.in (commonbfdlib): Delete. * configure: Regenerate. * po/POTFILES.in: Regenerate.
Diffstat (limited to 'opcodes/configure.in')
-rw-r--r--opcodes/configure.in32
1 files changed, 18 insertions, 14 deletions
diff --git a/opcodes/configure.in b/opcodes/configure.in
index 721c239689..60149adc10 100644
--- a/opcodes/configure.in
+++ b/opcodes/configure.in
@@ -40,13 +40,6 @@ AC_ARG_ENABLE(targets,
no) enable_targets= ;;
*) enable_targets=$enableval ;;
esac])dnl
-AC_ARG_ENABLE(commonbfdlib,
-[ --enable-commonbfdlib build shared BFD/opcodes/libiberty library],
-[case "${enableval}" in
- yes) commonbfdlib=true ;;
- no) commonbfdlib=false ;;
- *) AC_MSG_ERROR([bad value ${enableval} for opcodes commonbfdlib option]) ;;
-esac])dnl
AM_BINUTILS_WARNINGS
@@ -103,26 +96,37 @@ SHARED_LDFLAGS=
SHARED_LIBADD=
SHARED_DEPENDENCIES=
if test "$enable_shared" = "yes"; then
+# When building a shared libopcodes, link against the pic version of libiberty
+# so that apps that use libopcodes won't need libiberty just to satisfy any
+# libopcodes references.
+# We can't do that if a pic libiberty is unavailable since including non-pic
+# code would insert text relocations into libopcodes.
+# 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.
+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
+
case "${host}" in
*-*-cygwin*)
SHARED_LDFLAGS="-no-undefined"
SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin"
;;
*-*-darwin*)
- SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.dylib"
+ 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="-Wl,`pwd`/../bfd/.libs/libbfd.sl ${SHARED_LIBADD}"
;;
*)
- # It is tempting to include libiberty here as well, but
- # that library is only built as a static version.
- # Including it here would insert text relocations into
- # the opcodes library, which is undesirable.
- SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.so"
+ SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.so ${SHARED_LIBADD}"
;;
esac
SHARED_DEPENDENCIES="../bfd/libbfd.la"