aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2007-10-04 14:06:40 +0000
committerNick Clifton <nickc@redhat.com>2007-10-04 14:06:40 +0000
commit45d42143d489a6b7ee78fd118b573906c43ecb0b (patch)
tree7905dc353c24156363f215f768c013fd06af5301 /opcodes
parent8524166df4a01d692920721b0bfbb3df8d7f6a22 (diff)
downloadgdb-45d42143d489a6b7ee78fd118b573906c43ecb0b.zip
gdb-45d42143d489a6b7ee78fd118b573906c43ecb0b.tar.gz
gdb-45d42143d489a6b7ee78fd118b573906c43ecb0b.tar.bz2
* configure.in (WIN32LDFLAGS): Rename to SHARED_LDFLAGS.
(WIN32LIBADD): Rename to SHARED_LIBADD (SHARED_DEPENDENCIES): New exported variable. (enable_shared): Add dependency upon libbfd.la for non-cygwin based shared library builds. * Makefile.am (libopcodes_la_DEPENDENCIES): Append SHARED_DEPENDENCIES. (libopcodes_la_LIBADD): Rename WIN32LIBADD to SHARED_LIBADD. (libopcodes_la_LDFLAGS): Rename WIN32LDFLAGS to SHARED_LDFLAGS. * configure: Regenerate. * Makefile.in: Regenerate.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog12
-rw-r--r--opcodes/Makefile.am9
-rw-r--r--opcodes/Makefile.in32
-rwxr-xr-xopcodes/configure35
-rw-r--r--opcodes/configure.in32
5 files changed, 72 insertions, 48 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 1a8248d..b76d533 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,5 +1,17 @@
2007-10-04 Nick Clifton <nickc@redhat.com>
+ * configure.in (WIN32LDFLAGS): Rename to SHARED_LDFLAGS.
+ (WIN32LIBADD): Rename to SHARED_LIBADD
+ (SHARED_DEPENDENCIES): New exported variable.
+ (enable_shared): Add dependency upon libbfd.la for non-cygwin
+ based shared library builds.
+ * Makefile.am (libopcodes_la_DEPENDENCIES): Append
+ SHARED_DEPENDENCIES.
+ (libopcodes_la_LIBADD): Rename WIN32LIBADD to SHARED_LIBADD.
+ (libopcodes_la_LDFLAGS): Rename WIN32LDFLAGS to SHARED_LDFLAGS.
+ * configure: Regenerate.
+ * Makefile.in: Regenerate.
+
PR gas/5100
* arc-opc.c (insert_offset): Fix spelling mistake in error
message.
diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
index 5160257..c1defe0 100644
--- a/opcodes/Makefile.am
+++ b/opcodes/Makefile.am
@@ -367,10 +367,11 @@ libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c
# Unfortunately this causes libtool to add -L$(libdir), referring to the
# planned install directory of libbfd. This can cause us to pick up an
# old version of libbfd, or to pick up libbfd for the wrong architecture
-# if host != build.
-libopcodes_la_DEPENDENCIES = $(OFILES)
-libopcodes_la_LIBADD = $(OFILES) @WIN32LIBADD@
-libopcodes_la_LDFLAGS = -release `cat ../bfd/libtool-soversion` @WIN32LDFLAGS@
+# if host != build. So for building with shared libraries we use a
+# hardcoded path to libbfd.so instead of relying on the entries in libbfd.la.
+libopcodes_la_DEPENDENCIES = $(OFILES) @SHARED_DEPENDENCIES@
+libopcodes_la_LIBADD = $(OFILES) @SHARED_LIBADD@
+libopcodes_la_LDFLAGS = -release `cat ../bfd/libtool-soversion` @SHARED_LDFLAGS@
# libtool will build .libs/libopcodes.a. We create libopcodes.a in
# the build directory so that we don't have to convert all the
diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in
index b39b463..e421bd5 100644
--- a/opcodes/Makefile.in
+++ b/opcodes/Makefile.in
@@ -176,16 +176,20 @@ POSUB = @POSUB@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
+SHARED_DEPENDENCIES = @SHARED_DEPENDENCIES@
+SHARED_LDFLAGS = @SHARED_LDFLAGS@
+SHARED_LIBADD = @SHARED_LIBADD@
SHELL = @SHELL@
STRIP = @STRIP@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
-WIN32LDFLAGS = @WIN32LDFLAGS@
-WIN32LIBADD = @WIN32LIBADD@
XGETTEXT = @XGETTEXT@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
@@ -204,9 +208,6 @@ build_os = @build_os@
build_vendor = @build_vendor@
cgendir = @cgendir@
datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
@@ -214,22 +215,18 @@ host_cpu = @host_cpu@
host_noncanonical = @host_noncanonical@
host_os = @host_os@
host_vendor = @host_vendor@
-htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
-localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
-psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
@@ -590,10 +587,11 @@ libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c
# Unfortunately this causes libtool to add -L$(libdir), referring to the
# planned install directory of libbfd. This can cause us to pick up an
# old version of libbfd, or to pick up libbfd for the wrong architecture
-# if host != build.
-libopcodes_la_DEPENDENCIES = $(OFILES)
-libopcodes_la_LIBADD = $(OFILES) @WIN32LIBADD@
-libopcodes_la_LDFLAGS = -release `cat ../bfd/libtool-soversion` @WIN32LDFLAGS@
+# if host != build. So for building with shared libraries we use a
+# hardcoded path to libbfd.so instead of relying on the entries in libbfd.la.
+libopcodes_la_DEPENDENCIES = $(OFILES) @SHARED_DEPENDENCIES@
+libopcodes_la_LIBADD = $(OFILES) @SHARED_LIBADD@
+libopcodes_la_LDFLAGS = -release `cat ../bfd/libtool-soversion` @SHARED_LDFLAGS@
# libtool will build .libs/libopcodes.a. We create libopcodes.a in
# the build directory so that we don't have to convert all the
@@ -652,15 +650,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus '; \
- cd $(srcdir) && $(AUTOMAKE) --cygnus \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
+ cd $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --cygnus Makefile
+ $(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
diff --git a/opcodes/configure b/opcodes/configure
index 270bdae..6419862 100755
--- a/opcodes/configure
+++ b/opcodes/configure
@@ -458,7 +458,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE AR ac_ct_AR RANLIB ac_ct_RANLIB LIBTOOL SED EGREP FGREP GREP LD DUMPBIN ac_ct_DUMPBIN NM LN_S lt_ECHO CPP WARN_CFLAGS NO_WERROR MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT INSTALL_LIBBFD_TRUE INSTALL_LIBBFD_FALSE host_noncanonical target_noncanonical bfdlibdir bfdincludedir USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT MKINSTALLDIRS MSGFMT MSGMERGE CC_FOR_BUILD EXEEXT_FOR_BUILD HDEFINES CGEN_MAINT_TRUE CGEN_MAINT_FALSE cgendir WIN32LDFLAGS WIN32LIBADD archdefs BFD_MACHINES LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE AR ac_ct_AR RANLIB ac_ct_RANLIB LIBTOOL SED EGREP FGREP GREP LD DUMPBIN ac_ct_DUMPBIN NM LN_S lt_ECHO CPP WARN_CFLAGS NO_WERROR MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT INSTALL_LIBBFD_TRUE INSTALL_LIBBFD_FALSE host_noncanonical target_noncanonical bfdlibdir bfdincludedir USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT MKINSTALLDIRS MSGFMT MSGMERGE CC_FOR_BUILD EXEEXT_FOR_BUILD HDEFINES CGEN_MAINT_TRUE CGEN_MAINT_FALSE cgendir SHARED_LDFLAGS SHARED_LIBADD SHARED_DEPENDENCIES archdefs BFD_MACHINES LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -11433,17 +11433,23 @@ fi
using_cgen=no
-# 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`/../bfd -lbfd -L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin"
- fi
- ;;
-esac
+# Horrible hacks to build DLLs on Windows and a shared library elsewhere.
+SHARED_LDFLAGS=
+SHARED_LIBADD=
+SHARED_DEPENDENCIES=
+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="-Wl,`pwd`/../bfd/.libs/libbfd.so"
+ SHARED_DEPENDENCIES="`pwd`/../bfd/.libs/libbfd.la"
+ ;;
+ esac
+fi
+
@@ -12625,8 +12631,9 @@ s,@HDEFINES@,$HDEFINES,;t t
s,@CGEN_MAINT_TRUE@,$CGEN_MAINT_TRUE,;t t
s,@CGEN_MAINT_FALSE@,$CGEN_MAINT_FALSE,;t t
s,@cgendir@,$cgendir,;t t
-s,@WIN32LDFLAGS@,$WIN32LDFLAGS,;t t
-s,@WIN32LIBADD@,$WIN32LIBADD,;t t
+s,@SHARED_LDFLAGS@,$SHARED_LDFLAGS,;t t
+s,@SHARED_LIBADD@,$SHARED_LIBADD,;t t
+s,@SHARED_DEPENDENCIES@,$SHARED_DEPENDENCIES,;t t
s,@archdefs@,$archdefs,;t t
s,@BFD_MACHINES@,$BFD_MACHINES,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
diff --git a/opcodes/configure.in b/opcodes/configure.in
index c37a5f5..3ff2045 100644
--- a/opcodes/configure.in
+++ b/opcodes/configure.in
@@ -97,19 +97,25 @@ AC_SUBST(cgendir)
using_cgen=no
-# 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`/../bfd -lbfd -L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin"
- fi
- ;;
-esac
-AC_SUBST(WIN32LDFLAGS)
-AC_SUBST(WIN32LIBADD)
+# Horrible hacks to build DLLs on Windows and a shared library elsewhere.
+SHARED_LDFLAGS=
+SHARED_LIBADD=
+SHARED_DEPENDENCIES=
+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="-Wl,`pwd`/../bfd/.libs/libbfd.so"
+ SHARED_DEPENDENCIES="`pwd`/../bfd/.libs/libbfd.la"
+ ;;
+ esac
+fi
+AC_SUBST(SHARED_LDFLAGS)
+AC_SUBST(SHARED_LIBADD)
+AC_SUBST(SHARED_DEPENDENCIES)
# target-specific stuff: