diff options
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 663eba4..c3a8efa 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: |