summaryrefslogtreecommitdiff
path: root/opcodes/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'opcodes/configure.in')
-rw-r--r--opcodes/configure.in80
1 files changed, 17 insertions, 63 deletions
diff --git a/opcodes/configure.in b/opcodes/configure.in
index 75414d799a6..345a7787db5 100644
--- a/opcodes/configure.in
+++ b/opcodes/configure.in
@@ -40,6 +40,13 @@ 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
@@ -91,85 +98,36 @@ AC_SUBST(cgendir)
using_cgen=no
-# Check if linker supports --as-needed and --no-as-needed options
-AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed,
- [bfd_cv_ld_as_needed=no
- if $LD --help 2>/dev/null | grep as-needed > /dev/null; then
- bfd_cv_ld_as_needed=yes
- fi
- ])
-
-LT_LIB_M
-
-#Libs for generator progs
-if test "x$cross_compiling" = "xno"; then
- BUILD_LIBS=../libiberty/libiberty.a
- BUILD_LIB_DEPS=$BUILD_LIBS
-else
- # if cross-compiling, assume that the system provides -liberty
- # and that the version is compatible with new headers.
- BUILD_LIBS=-liberty
- BUILD_LIB_DEPS=
-fi
-BUILD_LIBS="$BUILD_LIBS $LIBINTL"
-BUILD_LIB_DEPS="$BUILD_LIB_DEPS $LIBINTL_DEP"
-
-AC_SUBST(BUILD_LIBS)
-AC_SUBST(BUILD_LIB_DEPS)
-
# Horrible hacks to build DLLs on Windows and a shared library elsewhere.
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}"
+ SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.dylib"
SHARED_DEPENDENCIES="../bfd/libbfd.la"
;;
*)
case "$host_vendor" in
hp)
- SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.sl ${SHARED_LIBADD}"
+ SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.sl"
;;
*)
- SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.so ${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"
;;
esac
SHARED_DEPENDENCIES="../bfd/libbfd.la"
;;
esac
-
- if test -n "$SHARED_LIBADD"; then
- if test -n "$LIBM"; then
- if test x"$bfd_cv_ld_as_needed" = xyes; then
- # Link against libm only when needed. Put -lc, -lm inside -Wl
- # to stop libtool reordering these options.
- SHARED_LIBADD="$SHARED_LIBADD -Wl,-lc,--as-needed,`echo $LIBM | sed 's/ /,/g'`,--no-as-needed"
- else
- SHARED_LIBADD="$SHARED_LIBADD $LIBM"
- fi
- fi
- fi
fi
AC_SUBST(SHARED_LDFLAGS)
AC_SUBST(SHARED_LIBADD)
@@ -220,7 +178,7 @@ if test x${all_targets} = xfalse ; then
archdefs="$archdefs -DARCH_$ad"
case "$arch" in
bfd_alpha_arch) ta="$ta alpha-dis.lo alpha-opc.lo" ;;
- bfd_arc_arch) ta="$ta arc-dis.lo arc-opc.lo arc-ext.lo" ;;
+ bfd_arc_arch) ta="$ta arc-asm.lo arcompact-dis.lo arc-ext.lo arc-desc.lo arc-dis.lo arc-dis-cgen.lo arc-ibld.lo arc-opc.lo arc-opc-cgen.lo arc-opinst.lo" using_cgen=yes ;;
bfd_arm_arch) ta="$ta arm-dis.lo" ;;
bfd_avr_arch) ta="$ta avr-dis.lo" ;;
bfd_bfin_arch) ta="$ta bfin-dis.lo" ;;
@@ -232,19 +190,16 @@ if test x${all_targets} = xfalse ; then
bfd_dlx_arch) ta="$ta dlx-dis.lo" ;;
bfd_fr30_arch) ta="$ta fr30-asm.lo fr30-desc.lo fr30-dis.lo fr30-ibld.lo fr30-opc.lo" using_cgen=yes ;;
bfd_frv_arch) ta="$ta frv-asm.lo frv-desc.lo frv-dis.lo frv-ibld.lo frv-opc.lo" using_cgen=yes ;;
- bfd_moxie_arch) ta="$ta moxie-dis.lo moxie-opc.lo" ;;
bfd_h8300_arch) ta="$ta h8300-dis.lo" ;;
bfd_h8500_arch) ta="$ta h8500-dis.lo" ;;
bfd_hppa_arch) ta="$ta hppa-dis.lo" ;;
bfd_i370_arch) ta="$ta i370-dis.lo i370-opc.lo" ;;
- bfd_i386_arch|bfd_l1om_arch)
- ta="$ta i386-dis.lo i386-opc.lo" ;;
+ bfd_i386_arch) ta="$ta i386-dis.lo i386-opc.lo" ;;
bfd_i860_arch) ta="$ta i860-dis.lo" ;;
bfd_i960_arch) ta="$ta i960-dis.lo" ;;
bfd_ia64_arch) ta="$ta ia64-dis.lo ia64-opc.lo" ;;
bfd_ip2k_arch) ta="$ta ip2k-asm.lo ip2k-desc.lo ip2k-dis.lo ip2k-ibld.lo ip2k-opc.lo" using_cgen=yes ;;
bfd_iq2000_arch) ta="$ta iq2000-asm.lo iq2000-desc.lo iq2000-dis.lo iq2000-ibld.lo iq2000-opc.lo" using_cgen=yes ;;
- bfd_lm32_arch) ta="$ta lm32-asm.lo lm32-desc.lo lm32-dis.lo lm32-ibld.lo lm32-opc.lo lm32-opinst.lo" using_cgen=yes ;;
bfd_m32c_arch) ta="$ta m32c-asm.lo m32c-desc.lo m32c-dis.lo m32c-ibld.lo m32c-opc.lo" using_cgen=yes ;;
bfd_m32r_arch) ta="$ta m32r-asm.lo m32r-desc.lo m32r-dis.lo m32r-ibld.lo m32r-opc.lo m32r-opinst.lo" using_cgen=yes ;;
bfd_m68hc11_arch) ta="$ta m68hc11-dis.lo m68hc11-opc.lo" ;;
@@ -254,7 +209,6 @@ if test x${all_targets} = xfalse ; then
bfd_maxq_arch) ta="$ta maxq-dis.lo" ;;
bfd_mcore_arch) ta="$ta mcore-dis.lo" ;;
bfd_mep_arch) ta="$ta mep-asm.lo mep-desc.lo mep-dis.lo mep-ibld.lo mep-opc.lo" using_cgen=yes ;;
- bfd_microblaze_arch) ta="$ta microblaze-dis.lo" ;;
bfd_mips_arch) ta="$ta mips-dis.lo mips-opc.lo mips16-opc.lo" ;;
bfd_mmix_arch) ta="$ta mmix-dis.lo mmix-opc.lo" ;;
bfd_mn10200_arch) ta="$ta m10200-dis.lo m10200-opc.lo" ;;
@@ -272,7 +226,7 @@ if test x${all_targets} = xfalse ; then
bfd_romp_arch) ;;
bfd_rs6000_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
bfd_s390_arch) ta="$ta s390-dis.lo s390-opc.lo" ;;
- bfd_score_arch) ta="$ta score-dis.lo score7-dis.lo" ;;
+ bfd_score_arch) ta="$ta score-dis.lo" ;;
bfd_sh_arch)
# We can't decide what we want just from the CPU family.
# We want SH5 support unless a specific version of sh is