aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2016-12-28 21:59:34 +1030
committerAlan Modra <amodra@gmail.com>2016-12-28 22:12:11 +1030
commit0fa6f7cee7dedb600799234b1e2d52c5b0da8f96 (patch)
tree3240aac540f1492e5b36d2bb61fd9fa28c109972
parent9acc85a62eb76c270724bba15c889d2d05567b6a (diff)
downloadgdb-0fa6f7cee7dedb600799234b1e2d52c5b0da8f96.zip
gdb-0fa6f7cee7dedb600799234b1e2d52c5b0da8f96.tar.gz
gdb-0fa6f7cee7dedb600799234b1e2d52c5b0da8f96.tar.bz2
Check bfd support for bfd_mips_elf_get_abiflags in mips make rule
The previous scheme with a dependency in opcodes on libbfd.la broke "make distclean". * configure.ac: Revert 2016-12-23. * Makefile.am: Likewise. (MIPS_DEFS): Define. (mips-dis.lo): Add rule. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * config.in: Regenerate. * configure: Regenerate.
-rw-r--r--opcodes/ChangeLog11
-rw-r--r--opcodes/Makefile.am18
-rw-r--r--opcodes/Makefile.in18
-rw-r--r--opcodes/aclocal.m41
-rw-r--r--opcodes/config.in3
-rwxr-xr-xopcodes/configure100
-rw-r--r--opcodes/configure.ac19
7 files changed, 38 insertions, 132 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 4f336ce..3169dc0 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,14 @@
+2016-12-28 Alan Modra <amodra@gmail.com>
+
+ * configure.ac: Revert 2016-12-23.
+ * Makefile.am: Likewise.
+ (MIPS_DEFS): Define.
+ (mips-dis.lo): Add rule.
+ * Makefile.in: Regenerate.
+ * aclocal.m4: Regenerate.
+ * config.in: Regenerate.
+ * configure: Regenerate.
+
2016-12-23 Maciej W. Rozycki <macro@imgtec.com>
* mips16-opc.c (decode_mips16_operand): Add `0', `1', `2', `3',
diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
index 3e9dc54..a441feb 100644
--- a/opcodes/Makefile.am
+++ b/opcodes/Makefile.am
@@ -300,9 +300,8 @@ ALL_MACHINES = $(TARGET_LIBOPCODES_CFILES:.c=.lo)
OFILES = @BFD_MACHINES@
-# development.sh is used to determine -Werror default, libbfd.la is needed
-# for function availability checks.
-CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh ../bfd/libbfd.la
+# development.sh is used to determine -Werror default.
+CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh
AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ @INCINTL@
@@ -610,6 +609,19 @@ $(srcdir)/z8k-opc.h: @MAINT@ z8kgen$(EXEEXT_FOR_BUILD)
z8k-dis.lo: $(srcdir)/z8k-opc.h
+MIPS_DEFS=`case \`cat ../bfd/ofiles\` in *elfxx-mips*) echo "-DHAVE_BFD_MIPS_ELF_GET_ABIFLAGS=1";; esac`
+mips-dis.lo: mips-dis.c
+if am__fastdepCC
+ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(MIPS_DEFS) $<
+ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+else
+if AMDEP
+ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+endif
+ $(LTCOMPILE) -c -o $@ $(MIPS_DEFS) $<
+endif
+
sh-dis.lo: sh-dis.c
if am__fastdepCC
$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ @archdefs@ $(srcdir)/sh-dis.c
diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in
index 0d75cd6..763255b 100644
--- a/opcodes/Makefile.in
+++ b/opcodes/Makefile.in
@@ -80,9 +80,7 @@ DIST_COMMON = ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/po/Make-in $(srcdir)/../depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \
- $(top_srcdir)/../bfd/warning.m4 \
- $(top_srcdir)/../config/acinclude.m4 \
- $(top_srcdir)/../config/acx.m4 \
+ $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../config/acx.m4 \
$(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/../config/gettext-sister.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
@@ -189,8 +187,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BFDHDIR = @BFDHDIR@
-BFDLIB = @BFDLIB@
BFD_MACHINES = @BFD_MACHINES@
BUILD_LIBS = @BUILD_LIBS@
BUILD_LIB_DEPS = @BUILD_LIB_DEPS@
@@ -607,9 +603,8 @@ CFILES = \
ALL_MACHINES = $(TARGET_LIBOPCODES_CFILES:.c=.lo)
OFILES = @BFD_MACHINES@
-# development.sh is used to determine -Werror default, libbfd.la is needed
-# for function availability checks.
-CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh ../bfd/libbfd.la
+# development.sh is used to determine -Werror default.
+CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh
AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ @INCINTL@
libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c
# It's desirable to list ../bfd/libbfd.la in DEPENDENCIES and LIBADD.
@@ -691,6 +686,7 @@ MAINTAINERCLEANFILES = $(srcdir)/aarch64-asm-2.c $(srcdir)/aarch64-dis-2.c \
ia64_asmtab_deps = ia64-gen$(EXEEXT_FOR_BUILD) ia64-ic.tbl \
ia64-raw.tbl ia64-waw.tbl ia64-war.tbl
+MIPS_DEFS = `case \`cat ../bfd/ofiles\` in *elfxx-mips*) echo "-DHAVE_BFD_MIPS_ELF_GET_ABIFLAGS=1";; esac`
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -1515,6 +1511,12 @@ $(srcdir)/z8k-opc.h: @MAINT@ z8kgen$(EXEEXT_FOR_BUILD)
./z8kgen$(EXEEXT_FOR_BUILD) -a > $@
z8k-dis.lo: $(srcdir)/z8k-opc.h
+mips-dis.lo: mips-dis.c
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(MIPS_DEFS) $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $(MIPS_DEFS) $<
sh-dis.lo: sh-dis.c
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ @archdefs@ $(srcdir)/sh-dis.c
diff --git a/opcodes/aclocal.m4 b/opcodes/aclocal.m4
index 3c2c69d..7e5b3d2 100644
--- a/opcodes/aclocal.m4
+++ b/opcodes/aclocal.m4
@@ -990,7 +990,6 @@ AC_SUBST([am__untar])
m4_include([../bfd/acinclude.m4])
m4_include([../bfd/warning.m4])
-m4_include([../config/acinclude.m4])
m4_include([../config/acx.m4])
m4_include([../config/depstand.m4])
m4_include([../config/gettext-sister.m4])
diff --git a/opcodes/config.in b/opcodes/config.in
index 37b5d44..55a80fd 100644
--- a/opcodes/config.in
+++ b/opcodes/config.in
@@ -11,9 +11,6 @@
language is requested. */
#undef ENABLE_NLS
-/* Define to 1 if you have the `bfd_mips_elf_get_abiflags' function. */
-#undef HAVE_BFD_MIPS_ELF_GET_ABIFLAGS
-
/* Define to 1 if you have the declaration of `basename', and to 0 if you
don't. */
#undef HAVE_DECL_BASENAME
diff --git a/opcodes/configure b/opcodes/configure
index 386352e..c3aa76e 100755
--- a/opcodes/configure
+++ b/opcodes/configure
@@ -604,8 +604,6 @@ LTLIBOBJS
LIBOBJS
BFD_MACHINES
archdefs
-BFDLIB
-BFDHDIR
SHARED_DEPENDENCIES
SHARED_LIBADD
SHARED_LDFLAGS
@@ -11153,7 +11151,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11156 "configure"
+#line 11154 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11259,7 +11257,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11262 "configure"
+#line 11260 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12588,100 +12586,6 @@ fi
# target-specific stuff:
-# Check if `bfd_mips_elf_get_abiflags' is present in BFD, needed by
-# `mips-dis.c'. Avoid using AC_CHECK_LIB as it uses a cache variable
-# which could hold the wrong value if we are rerun due to the
-# `../bfd/libbfd.la' dependency for `config.status', so use a handcoded
-# sequence which is equivalent but does not use the cache.
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the bfd header in the build tree" >&5
-$as_echo_n "checking for the bfd header in the build tree... " >&6; }
-dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
-if test "${ac_cv_c_bfdh+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
-for i in $dirlist; do
- if test -f "$i/bfd/bfd.h" ; then
- ac_cv_c_bfdh=`(cd $i/bfd; ${PWDCMD-pwd})`
- break
- fi
-done
-
-fi
-
-if test x"${ac_cv_c_bfdh}" != x; then
- BFDHDIR="-I${ac_cv_c_bfdh}"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_bfdh}" >&5
-$as_echo "${ac_cv_c_bfdh}" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
-$as_echo "none" >&6; }
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the bfd library in the build tree" >&5
-$as_echo_n "checking for the bfd library in the build tree... " >&6; }
-if test "${ac_cv_c_bfdlib+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
-for i in $dirlist; do
- if test -f "$i/bfd/Makefile" ; then
- ac_cv_c_bfdlib=`(cd $i/bfd; ${PWDCMD-pwd})`
- fi
-done
-
-fi
-
-if test x"${ac_cv_c_bfdlib}" != x; then
- BFDLIB="-L${ac_cv_c_bfdlib} -L${ac_cv_c_bfdlib}/.libs"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_bfdlib}" >&5
-$as_echo "${ac_cv_c_bfdlib}" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
-$as_echo "none" >&6; }
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bfd_mips_elf_get_abiflags in -lbfd" >&5
-$as_echo_n "checking for bfd_mips_elf_get_abiflags in -lbfd... " >&6; }
-opcodes_save_LIBS=$LIBS
-LIBS="$BFDLIB -lbfd ../libiberty/libiberty.a `test -e ../bfd/libbfd.la && . ../bfd/libbfd.la; echo $dependency_libs`"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char bfd_mips_elf_get_abiflags ();
-int
-main ()
-{
-return bfd_mips_elf_get_abiflags ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- opcodes_lib_bfd_bfd_mips_elf_get_abiflags=yes
-else
- opcodes_lib_bfd_bfd_mips_elf_get_abiflags=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$opcodes_save_LIBS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $opcodes_lib_bfd_bfd_mips_elf_get_abiflags" >&5
-$as_echo "$opcodes_lib_bfd_bfd_mips_elf_get_abiflags" >&6; }
-if test x"$opcodes_lib_bfd_bfd_mips_elf_get_abiflags" = xyes; then
-
-$as_echo "#define HAVE_BFD_MIPS_ELF_GET_ABIFLAGS 1" >>confdefs.h
-
-fi
-
# Canonicalize the secondary target names.
if test -n "$enable_targets" ; then
for targ in `echo $enable_targets | sed 's/,/ /g'`
diff --git a/opcodes/configure.ac b/opcodes/configure.ac
index b0825be..3475d49 100644
--- a/opcodes/configure.ac
+++ b/opcodes/configure.ac
@@ -210,25 +210,6 @@ AC_SUBST(SHARED_DEPENDENCIES)
# target-specific stuff:
-# Check if `bfd_mips_elf_get_abiflags' is present in BFD, needed by
-# `mips-dis.c'. Avoid using AC_CHECK_LIB as it uses a cache variable
-# which could hold the wrong value if we are rerun due to the
-# `../bfd/libbfd.la' dependency for `config.status', so use a handcoded
-# sequence which is equivalent but does not use the cache.
-CYG_AC_PATH_BFD
-AC_MSG_CHECKING([for bfd_mips_elf_get_abiflags in -lbfd])
-opcodes_save_LIBS=$LIBS
-LIBS="$BFDLIB -lbfd ../libiberty/libiberty.a `test -e ../bfd/libbfd.la && . ../bfd/libbfd.la; echo $dependency_libs`"
-AC_LINK_IFELSE([AC_LANG_CALL([], [bfd_mips_elf_get_abiflags])],
- [opcodes_lib_bfd_bfd_mips_elf_get_abiflags=yes],
- [opcodes_lib_bfd_bfd_mips_elf_get_abiflags=no])
-LIBS=$opcodes_save_LIBS
-AC_MSG_RESULT([$opcodes_lib_bfd_bfd_mips_elf_get_abiflags])
-if test x"$opcodes_lib_bfd_bfd_mips_elf_get_abiflags" = xyes; then
- AC_DEFINE([HAVE_BFD_MIPS_ELF_GET_ABIFLAGS], [1],
- [Define to 1 if you have the `bfd_mips_elf_get_abiflags' function.])
-fi
-
# Canonicalize the secondary target names.
if test -n "$enable_targets" ; then
for targ in `echo $enable_targets | sed 's/,/ /g'`