diff options
author | Alan Modra <amodra@bigpond.net.au> | 2009-01-16 08:02:22 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2009-01-16 08:02:22 +0000 |
commit | d438502cf4d0f80282a5b84ab8e7425acd1a53c1 (patch) | |
tree | f90bb28ec5157583480caa7dce24c89079a1e9b5 /bfd/configure.in | |
parent | c0ec56f7f57d5d83ad589fb16255de691561f997 (diff) | |
download | gdb-d438502cf4d0f80282a5b84ab8e7425acd1a53c1.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 'bfd/configure.in')
-rw-r--r-- | bfd/configure.in | 44 |
1 files changed, 19 insertions, 25 deletions
diff --git a/bfd/configure.in b/bfd/configure.in index 663eba44490..c3a8efa58f4 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -60,14 +60,6 @@ AC_ARG_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 BFD commonbfdlib option]) ;; -esac])dnl - AC_ARG_WITH(mmap, [ --with-mmap try using mmap for BFD input files if available], [case "${withval}" in @@ -502,29 +494,31 @@ if test -n "$TRAD_HEADER"; then [Name of host specific header file to include in trad-core.c.]) fi -# Horrible hacks to build DLLs on Windows. -WIN32LDFLAGS= -WIN32LIBADD= -case "${host}" in -*-*-cygwin*) - if test "$enable_shared" = "yes"; then - WIN32LDFLAGS="-no-undefined" - WIN32LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32" - fi - ;; -*-*-linux*) - # We borrow WIN32LIBADD so that the shared libbfd won't depend on - # libiberty.a. +# When building a shared libbfd, link against the pic version of libiberty +# so that apps that use libbfd won't need libiberty just to satisfy any +# libbfd references. +# We can't do that if a pic libiberty is unavailable since including non-pic +# code would insert text relocations into libbfd. +SHARED_LIBADD= +SHARED_LDFLAGS= +if test "$enable_shared" = "yes"; then changequote(,)dnl x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` changequote([,])dnl if test -n "$x"; then - WIN32LIBADD="-L../libiberty/pic -liberty" + SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" fi + +# More hacks to build DLLs on Windows. + case "${host}" in + *-*-cygwin*) + SHARED_LDFLAGS="-no-undefined" + SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32" ;; -esac -AC_SUBST(WIN32LDFLAGS) -AC_SUBST(WIN32LIBADD) + esac +fi +AC_SUBST(SHARED_LDFLAGS) +AC_SUBST(SHARED_LIBADD) # target stuff: |