]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
unify 64-bit bfd checks
authorMike Frysinger <vapier@gentoo.org>
Sat, 4 Dec 2021 05:28:14 +0000 (00:28 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sat, 1 Jan 2022 17:49:07 +0000 (12:49 -0500)
Move the 64-bit bfd logic out of bfd/configure.ac and into bfd64.m4
under config so it can be shared between all the other subdirs.

This replaces want64 with enable_64_bit_bfd which was already being
declared, but not used directly.

19 files changed:
bfd/Makefile.in
bfd/aclocal.m4
bfd/configure
bfd/configure.ac
bfd/doc/Makefile.in
config/bfd64.m4 [new file with mode: 0644]
gdb/aclocal.m4
gdb/config.in
gdb/configure
gdb/configure.ac
ld/Makefile.in
ld/aclocal.m4
ld/configure
ld/configure.ac
opcodes/Makefile.in
opcodes/aclocal.m4
opcodes/config.in
opcodes/configure
opcodes/configure.ac

index a838262bc78eab58388a35e0c7035f73ce7d0817..69a8848a6dbf7890492c08fe797c6c58798d7f06 100644 (file)
@@ -114,6 +114,7 @@ target_triplet = @target@
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
+       $(top_srcdir)/../config/bfd64.m4 \
        $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/../config/gettext-sister.m4 \
        $(top_srcdir)/../config/jobserver.m4 \
index a62ee4dea661b177e654454fb2baab63bf89856e..0f8aa1d4518b629810c44de0a549f2c62c554ae1 100644 (file)
@@ -1168,6 +1168,7 @@ AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
 m4_include([../config/acx.m4])
+m4_include([../config/bfd64.m4])
 m4_include([../config/depstand.m4])
 m4_include([../config/gettext-sister.m4])
 m4_include([../config/jobserver.m4])
index d4aa2178b29260e763215d8f506f81ce7ca3946b..b09702f26e12d215118eccba4b53750775709c6b 100755 (executable)
@@ -697,6 +697,8 @@ REPORT_BUGS_TEXI
 REPORT_BUGS_TO
 PKGVERSION
 DEBUGDIR
+ENABLE_BFD_64_BIT_FALSE
+ENABLE_BFD_64_BIT_TRUE
 PLUGINS_FALSE
 PLUGINS_TRUE
 LARGEFILE_CPPFLAGS
@@ -11084,7 +11086,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11087 "configure"
+#line 11089 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11190,7 +11192,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11193 "configure"
+#line 11195 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
 
 # Check whether --enable-64-bit-bfd was given.
 if test "${enable_64_bit_bfd+set}" = set; then :
-  enableval=$enable_64_bit_bfd; case "${enableval}" in
-  yes)  want64=true  ;;
-  no)   want64=false ;;
-  *)    as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
+  enableval=$enable_64_bit_bfd; case $enableval in #(
+  yes|no) :
+     ;; #(
+  *) :
+    as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; #(
+  *) :
+     ;;
 esac
+else
+  enable_64_bit_bfd=no
+fi
+
+
+if test "x$enable_64_bit_bfd" = "xno"; then :
+    # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
+$as_echo_n "checking size of void *... " >&6; }
+if ${ac_cv_sizeof_void_p+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
+
+else
+  if test "$ac_cv_type_void_p" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (void *)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_void_p=0
+   fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
+$as_echo "$ac_cv_sizeof_void_p" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
+_ACEOF
+
+
+  if test "x$ac_cv_sizeof_void_p" = "x8"; then :
+  enable_64_bit_bfd=yes
+fi
+
+fi
+
+ if test "x$enable_64_bit_bfd" = "xyes"; then
+  ENABLE_BFD_64_BIT_TRUE=
+  ENABLE_BFD_64_BIT_FALSE='#'
+else
+  ENABLE_BFD_64_BIT_TRUE='#'
+  ENABLE_BFD_64_BIT_FALSE=
+fi
+
+
+if test $enable_64_bit_bfd = yes ; then
+  want64=true
 else
   want64=false
 fi
@@ -15182,6 +15243,10 @@ if test -z "${PLUGINS_TRUE}" && test -z "${PLUGINS_FALSE}"; then
   as_fn_error $? "conditional \"PLUGINS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${ENABLE_BFD_64_BIT_TRUE}" && test -z "${ENABLE_BFD_64_BIT_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_BFD_64_BIT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
   as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
index a578c3a019e5354f08f4151c20eecb63abc7e778..bdc2fc41527a27d628c4937e9501c9818ba23d2a 100644 (file)
@@ -82,13 +82,12 @@ if test x$ac_checking != x ; then
   AC_DEFINE(ENABLE_CHECKING, 1, [Define if you want run-time sanity checks.])
 fi
 
-AC_ARG_ENABLE(64-bit-bfd,
-[  --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)],
-[case "${enableval}" in
-  yes)  want64=true  ;;
-  no)   want64=false ;;
-  *)    AC_MSG_ERROR(bad value ${enableval} for 64-bit-bfd option) ;;
-esac],[want64=false])dnl
+BFD_64_BIT
+if test $enable_64_bit_bfd = yes ; then
+  want64=true
+else
+  want64=false
+fi
 
 AC_ARG_ENABLE(targets,
 [  --enable-targets        alternative target configurations],
index c070dd8c458c4b465bfc570e5b1d908d0e3c11b7..f4d1ba7d2b42e91e0d88b9d824c7dd046882cc62 100644 (file)
@@ -109,6 +109,7 @@ target_triplet = @target@
 subdir = doc
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
+       $(top_srcdir)/../config/bfd64.m4 \
        $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/../config/gettext-sister.m4 \
        $(top_srcdir)/../config/jobserver.m4 \
diff --git a/config/bfd64.m4 b/config/bfd64.m4
new file mode 100644 (file)
index 0000000..d134f1a
--- /dev/null
@@ -0,0 +1,36 @@
+dnl
+dnl   Copyright (C) 2012-2022 Free Software Foundation, Inc.
+dnl
+dnl This file is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 3 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; see the file COPYING3.  If not see
+dnl <http://www.gnu.org/licenses/>.
+dnl
+
+dnl See whether 64-bit bfd lib has been enabled.
+AC_DEFUN([BFD_64_BIT], [dnl
+AC_ARG_ENABLE(64-bit-bfd,
+  AS_HELP_STRING([--enable-64-bit-bfd],
+                [64-bit support (on hosts with narrower word sizes)]),
+  [AS_CASE([$enableval],
+          [yes|no], [],
+          [*], [AC_MSG_ERROR(bad value ${enableval} for 64-bit-bfd option)])],
+  [enable_64_bit_bfd=no])
+
+dnl If the host is 64-bit, then 64-bit bfd is enabled automatically.
+AS_IF([test "x$enable_64_bit_bfd" = "xno"], [dnl
+  AC_CHECK_SIZEOF(void *)
+  AS_IF([test "x$ac_cv_sizeof_void_p" = "x8"], [enable_64_bit_bfd=yes])
+])
+
+AM_CONDITIONAL([ENABLE_BFD_64_BIT], [test "x$enable_64_bit_bfd" = "xyes"])
+])
index 8c7562542f6ff45ab6c52c0d7bf4f46051f977e1..3ed4a58d39f72a438be06050757b0db0cd1baa7a 100644 (file)
@@ -201,6 +201,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 m4_include([../config/acx.m4])
 m4_include([../config/ax_pthread.m4])
+m4_include([../config/bfd64.m4])
 m4_include([../config/debuginfod.m4])
 m4_include([../config/depstand.m4])
 m4_include([../config/enable.m4])
index 4b8f1f7e1c6588cf1d8ded4ceb9cf01e8cb1ed62..cd9f252eba176e384c7f6ae45917473db5642e0a 100644 (file)
 /* Define to 1 if the `setpgrp' function takes no argument. */
 #undef SETPGRP_VOID
 
-/* The size of `long', as computed by sizeof. */
-#undef SIZEOF_LONG
-
 /* The size of `long long', as computed by sizeof. */
 #undef SIZEOF_LONG_LONG
 
 /* The size of `unsigned __int128', as computed by sizeof. */
 #undef SIZEOF_UNSIGNED___INT128
 
+/* The size of `void *', as computed by sizeof. */
+#undef SIZEOF_VOID_P
+
 /* If using the C implementation of alloca, define if you know the
    direction of stack growth for your system; otherwise it will be
    automatically deduced at runtime.
index d13ab37405020ce10284caf49fefe587eaa34754..429eaebe5688a4b798a496f100f4dfe6e41c454d 100755 (executable)
@@ -772,6 +772,8 @@ PKG_CONFIG_PATH
 PKG_CONFIG
 HAVE_NATIVE_GCORE_TARGET
 TARGET_OBS
+ENABLE_BFD_64_BIT_FALSE
+ENABLE_BFD_64_BIT_TRUE
 subdirs
 GDB_DATADIR
 DEBUGDIR
@@ -6649,17 +6651,70 @@ esac
 fi
 
 
-# Check whether to enable 64-bit support on 32-bit hosts
 # Check whether --enable-64-bit-bfd was given.
 if test "${enable_64_bit_bfd+set}" = set; then :
-  enableval=$enable_64_bit_bfd; case "${enableval}" in
-  yes)  want64=true  ;;
-  no)   want64=false ;;
-  *)    as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
+  enableval=$enable_64_bit_bfd; case $enableval in #(
+  yes|no) :
+     ;; #(
+  *) :
+    as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; #(
+  *) :
+     ;;
 esac
 else
-  want64=false
+  enable_64_bit_bfd=no
+fi
+
+
+if test "x$enable_64_bit_bfd" = "xno"; then :
+    # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
+$as_echo_n "checking size of void *... " >&6; }
+if ${ac_cv_sizeof_void_p+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
+
+else
+  if test "$ac_cv_type_void_p" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (void *)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_void_p=0
+   fi
+fi
+
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
+$as_echo "$ac_cv_sizeof_void_p" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
+_ACEOF
+
+
+  if test "x$ac_cv_sizeof_void_p" = "x8"; then :
+  enable_64_bit_bfd=yes
+fi
+
+fi
+
+ if test "x$enable_64_bit_bfd" = "xyes"; then
+  ENABLE_BFD_64_BIT_TRUE=
+  ENABLE_BFD_64_BIT_FALSE='#'
+else
+  ENABLE_BFD_64_BIT_TRUE='#'
+  ENABLE_BFD_64_BIT_FALSE=
+fi
+
+
 
 # Provide defaults for some variables set by the per-host and per-target
 # configuration.
@@ -6709,7 +6764,7 @@ fi
     done
 
     # Check whether this target needs 64-bit CORE_ADDR
-    if test x${want64} = xfalse; then
+    if test x${enable_64_bit_bfd} = xno; then
       . ${srcdir}/../bfd/config.bfd
     fi
 
@@ -6722,55 +6777,7 @@ fi
 done
 
 if test x${all_targets} = xtrue; then
-
-  # We want all 64-bit targets if we either:
-  #  - run on a 64-bit host  or
-  #  - already require 64-bit support for some other target  or
-  #  - the --enable-64-bit-bfd option was supplied
-  # Otherwise we only support all 32-bit targets.
-  #
-  # NOTE: This test must be in sync with the corresponding
-  #       tests in BFD!
-
-  if test x${want64} = xfalse; then
-    # The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
-$as_echo_n "checking size of long... " >&6; }
-if ${ac_cv_sizeof_long+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_long" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (long)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_long=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
-$as_echo "$ac_cv_sizeof_long" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
-
-
-    if test "x${ac_cv_sizeof_long}" = "x8"; then
-      want64=true
-    fi
-  fi
-  if test x${want64} = xtrue; then
+  if test x${enable_64_bit_bfd} = xyes; then
     TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
   else
     TARGET_OBS='$(ALL_TARGET_OBS)'
@@ -20126,6 +20133,10 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
   as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${ENABLE_BFD_64_BIT_TRUE}" && test -z "${ENABLE_BFD_64_BIT_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_BFD_64_BIT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
   as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
index bee78d7b61b0f419036519288c7bc030f77e4cb4..13e880d59a99cf3b1f8b4b2dbb4ab3a6ba5263c7 100644 (file)
@@ -165,14 +165,7 @@ AS_HELP_STRING([--enable-targets=TARGETS], [alternative target configurations]),
   *)        enable_targets=$enableval ;;
 esac])
 
-# Check whether to enable 64-bit support on 32-bit hosts
-AC_ARG_ENABLE(64-bit-bfd,
-AS_HELP_STRING([--enable-64-bit-bfd], [64-bit support (on hosts with narrower word sizes)]),
-[case "${enableval}" in
-  yes)  want64=true  ;;
-  no)   want64=false ;;
-  *)    AC_MSG_ERROR(bad value ${enableval} for 64-bit-bfd option) ;;
-esac],[want64=false])dnl
+BFD_64_BIT
 
 # Provide defaults for some variables set by the per-host and per-target
 # configuration.
@@ -221,7 +214,7 @@ do
     done
 
     # Check whether this target needs 64-bit CORE_ADDR
-    if test x${want64} = xfalse; then
+    if test x${enable_64_bit_bfd} = xno; then
       . ${srcdir}/../bfd/config.bfd
     fi
 
@@ -234,23 +227,7 @@ do
 done
 
 if test x${all_targets} = xtrue; then
-
-  # We want all 64-bit targets if we either:
-  #  - run on a 64-bit host  or
-  #  - already require 64-bit support for some other target  or
-  #  - the --enable-64-bit-bfd option was supplied
-  # Otherwise we only support all 32-bit targets.
-  #
-  # NOTE: This test must be in sync with the corresponding
-  #       tests in BFD!
-
-  if test x${want64} = xfalse; then
-    AC_CHECK_SIZEOF(long)
-    if test "x${ac_cv_sizeof_long}" = "x8"; then
-      want64=true
-    fi
-  fi
-  if test x${want64} = xtrue; then
+  if test x${enable_64_bit_bfd} = xyes; then
     TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
   else
     TARGET_OBS='$(ALL_TARGET_OBS)'
index d159f14823f4bc2ff2c60951c7ecf8f0219f3612..51c62a0da7fd13cc6ba24ad8c0c06da9446020fe 100644 (file)
@@ -112,6 +112,7 @@ subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \
        $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../config/acx.m4 \
+       $(top_srcdir)/../config/bfd64.m4 \
        $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/../config/enable.m4 \
        $(top_srcdir)/../config/gettext-sister.m4 \
index d1823c15d063f7d84d4e7fe917cd010c892dbf5d..631ead7b2cab1a66c8856fb4ec071988d7957250 100644 (file)
@@ -1188,6 +1188,7 @@ AC_SUBST([am__untar])
 m4_include([../bfd/acinclude.m4])
 m4_include([../bfd/warning.m4])
 m4_include([../config/acx.m4])
+m4_include([../config/bfd64.m4])
 m4_include([../config/depstand.m4])
 m4_include([../config/enable.m4])
 m4_include([../config/gettext-sister.m4])
index c4ba49082cde0032f3345ae7642abb78cf9ca818..f5c329c1f12af6deafb3096f2f11a8d56f3e733b 100755 (executable)
@@ -686,6 +686,8 @@ install_as_default
 TARGET_SYSTEM_ROOT_DEFINE
 TARGET_SYSTEM_ROOT
 use_sysroot
+ENABLE_BFD_64_BIT_FALSE
+ENABLE_BFD_64_BIT_TRUE
 LARGEFILE_CPPFLAGS
 CXXCPP
 OTOOL64
@@ -2097,52 +2099,6 @@ fi
 
 } # ac_fn_cxx_try_link
 
-# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
-# ---------------------------------------------
-# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
-# accordingly.
-ac_fn_c_check_decl ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  as_decl_name=`echo $2|sed 's/ *(.*//'`
-  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
-$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-#ifndef $as_decl_name
-#ifdef __cplusplus
-  (void) $as_decl_use;
-#else
-  (void) $as_decl_name;
-#endif
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_decl
-
 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
 # --------------------------------------------
 # Tries to find the compile-time value of EXPR in a program that includes
@@ -2325,6 +2281,52 @@ rm -f conftest.val
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_compute_int
+
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  as_decl_name=`echo $2|sed 's/ *(.*//'`
+  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+  (void) $as_decl_use;
+#else
+  (void) $as_decl_name;
+#endif
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_decl
 cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
@@ -11452,7 +11454,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11455 "configure"
+#line 11457 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11558,7 +11560,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11561 "configure"
+#line 11563 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15200,17 +15202,72 @@ if test "${enable_targets+set}" = set; then :
   *)        enable_targets=$enableval ;;
 esac
 fi
+
 # Check whether --enable-64-bit-bfd was given.
 if test "${enable_64_bit_bfd+set}" = set; then :
-  enableval=$enable_64_bit_bfd; case "${enableval}" in
-  yes)  want64=true  ;;
-  no)   want64=false ;;
-  *)    as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
+  enableval=$enable_64_bit_bfd; case $enableval in #(
+  yes|no) :
+     ;; #(
+  *) :
+    as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; #(
+  *) :
+     ;;
 esac
 else
-  want64=false
+  enable_64_bit_bfd=no
+fi
+
+
+if test "x$enable_64_bit_bfd" = "xno"; then :
+    # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
+$as_echo_n "checking size of void *... " >&6; }
+if ${ac_cv_sizeof_void_p+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
+
+else
+  if test "$ac_cv_type_void_p" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (void *)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_void_p=0
+   fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
+$as_echo "$ac_cv_sizeof_void_p" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
+_ACEOF
+
+
+  if test "x$ac_cv_sizeof_void_p" = "x8"; then :
+  enable_64_bit_bfd=yes
 fi
 
+fi
+
+ if test "x$enable_64_bit_bfd" = "xyes"; then
+  ENABLE_BFD_64_BIT_TRUE=
+  ENABLE_BFD_64_BIT_FALSE='#'
+else
+  ENABLE_BFD_64_BIT_TRUE='#'
+  ENABLE_BFD_64_BIT_FALSE=
+fi
+
+
+
 
 # Check whether --with-sysroot was given.
 if test "${with_sysroot+set}" = set; then :
@@ -16739,47 +16796,6 @@ all_emul_extras=
 all_libpath=
 TDIRS=
 
-# If the host is 64-bit, then we enable 64-bit targets by default.
-# This is consistent with what ../bfd/configure.ac does.
-if test x${want64} = xfalse; then
-  # The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
-$as_echo_n "checking size of void *... " >&6; }
-if ${ac_cv_sizeof_void_p+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_void_p" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (void *)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_void_p=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
-$as_echo "$ac_cv_sizeof_void_p" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
-_ACEOF
-
-
-  if test "x${ac_cv_sizeof_void_p}" = "x8"; then
-    want64=true
-  fi
-fi
-
 elf_list_options=false
 elf_shlib_list_options=false
 elf_plt_unwind_list_options=false
       EMUL=$targ_emul
     fi
 
-    if test x${want64} = xfalse; then
+    if test x${enable_64_bit_bfd} = xno; then
       . ${srcdir}/../bfd/config.bfd
     fi
 
-    if test x${want64} = xtrue; then
+    if test x${enable_64_bit_bfd} = xyes; then
       targ_extra_emuls="$targ_extra_emuls $targ64_extra_emuls"
       targ_extra_libpath="$targ_extra_libpath $targ64_extra_libpath"
     fi
@@ -16962,7 +16978,7 @@ _ACEOF
 
 
 if test x${all_targets} = xtrue; then
-  if test x${want64} = xtrue; then
+  if test x${enable_64_bit_bfd} = xyes; then
     EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
     EMUL_EXTRA_OFILES='$(ALL_EMUL_EXTRA_OFILES) $(ALL_64_EMUL_EXTRA_OFILES)'
   else
@@ -17162,6 +17178,10 @@ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
   as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${ENABLE_BFD_64_BIT_TRUE}" && test -z "${ENABLE_BFD_64_BIT_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_BFD_64_BIT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${ENABLE_LIBCTF_TRUE}" && test -z "${ENABLE_LIBCTF_FALSE}"; then
   as_fn_error $? "conditional \"ENABLE_LIBCTF\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
index 2b4c108749a0cec26166e0c1989a4973046a70b1..5e930ab6d3bc0096f88d14f7cf9720b8b7bce183 100644 (file)
@@ -60,13 +60,8 @@ AC_ARG_ENABLE(targets,
   no)       enable_targets= ;;
   *)        enable_targets=$enableval ;;
 esac])dnl
-AC_ARG_ENABLE(64-bit-bfd,
-[  --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)],
-[case "${enableval}" in
-  yes)  want64=true  ;;
-  no)   want64=false ;;
-  *)    AC_MSG_ERROR(bad value ${enableval} for 64-bit-bfd option) ;;
-esac],[want64=false])dnl
+
+BFD_64_BIT
 
 AC_ARG_WITH(sysroot,
 [  --with-sysroot[=DIR] Search for usr/lib et al within DIR.],
@@ -366,15 +361,6 @@ all_emul_extras=
 all_libpath=
 TDIRS=
 
-# If the host is 64-bit, then we enable 64-bit targets by default.
-# This is consistent with what ../bfd/configure.ac does.
-if test x${want64} = xfalse; then
-  AC_CHECK_SIZEOF(void *)
-  if test "x${ac_cv_sizeof_void_p}" = "x8"; then
-    want64=true
-  fi
-fi
-
 elf_list_options=false
 elf_shlib_list_options=false
 elf_plt_unwind_list_options=false
@@ -400,11 +386,11 @@ do
       EMUL=$targ_emul
     fi
 
-    if test x${want64} = xfalse; then
+    if test x${enable_64_bit_bfd} = xno; then
       . ${srcdir}/../bfd/config.bfd
     fi
 
-    if test x${want64} = xtrue; then
+    if test x${enable_64_bit_bfd} = xyes; then
       targ_extra_emuls="$targ_extra_emuls $targ64_extra_emuls"
       targ_extra_libpath="$targ_extra_libpath $targ64_extra_libpath"
     fi
@@ -539,7 +525,7 @@ AC_SUBST(TDIRS)
 AM_SUBST_NOTMAKE(TDIRS)
 
 if test x${all_targets} = xtrue; then
-  if test x${want64} = xtrue; then
+  if test x${enable_64_bit_bfd} = xyes; then
     EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
     EMUL_EXTRA_OFILES='$(ALL_EMUL_EXTRA_OFILES) $(ALL_64_EMUL_EXTRA_OFILES)'
   else
index eb5306eaf1604d62a0b5b067af9cf03137913e51..5d1704872f581535ecdfbd71510ef300ed525ad1 100644 (file)
@@ -114,6 +114,7 @@ subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \
        $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../config/acx.m4 \
+       $(top_srcdir)/../config/bfd64.m4 \
        $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/../config/gettext-sister.m4 \
        $(top_srcdir)/../config/jobserver.m4 \
index 5ab3cf3ab6f97d8595302e6c0b6b6ac67ac6721f..ac0d92925faa9ab71886e766a5411e51a782106d 100644 (file)
@@ -1170,6 +1170,7 @@ AC_SUBST([am__untar])
 m4_include([../bfd/acinclude.m4])
 m4_include([../bfd/warning.m4])
 m4_include([../config/acx.m4])
+m4_include([../config/bfd64.m4])
 m4_include([../config/depstand.m4])
 m4_include([../config/gettext-sister.m4])
 m4_include([../config/jobserver.m4])
index 392cda5d0d90ea1bade1690fd027cca94cd37ac7..4cd636e52edd5d872b302bc59702f9934b491335 100644 (file)
@@ -80,6 +80,9 @@
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
+/* The size of `void *', as computed by sizeof. */
+#undef SIZEOF_VOID_P
+
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
index 6708a193c20f0b07e1c62d1ca630210267930803..d3cef604c85a7f0cbf0fa0ca645c9f859e943169 100755 (executable)
@@ -645,6 +645,8 @@ cgendir
 CGEN_MAINT_FALSE
 CGEN_MAINT_TRUE
 HDEFINES
+ENABLE_BFD_64_BIT_FALSE
+ENABLE_BFD_64_BIT_TRUE
 EXEEXT_FOR_BUILD
 CC_FOR_BUILD
 MSGMERGE
@@ -806,6 +808,7 @@ enable_build_warnings
 enable_maintainer_mode
 enable_install_libbfd
 enable_nls
+enable_64_bit_bfd
 enable_cgen_maint
 '
       ac_precious_vars='build_alias
@@ -1456,6 +1459,7 @@ Optional Features:
                           sometimes confusing) to the casual installer
   --enable-install-libbfd controls installation of libbfd and related headers
   --disable-nls           do not use Native Language Support
+  --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)
   --enable-cgen-maint=dir    build cgen generated files
 
 Optional Packages:
@@ -1903,6 +1907,189 @@ $as_echo "$ac_res" >&6; }
 
 } # ac_fn_c_check_func
 
+# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
+# --------------------------------------------
+# Tries to find the compile-time value of EXPR in a program that includes
+# INCLUDES, setting VAR accordingly. Returns whether the value could be
+# computed
+ac_fn_c_compute_int ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if test "$cross_compiling" = yes; then
+    # Depending upon the size, compute the lo and hi bounds.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= 0)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=$ac_mid; break
+else
+  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+                       if test $ac_lo -le $ac_mid; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) < 0)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_lo=$ac_mid; break
+else
+  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+                       if test $ac_mid -le $ac_hi; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  ac_lo= ac_hi=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=$ac_mid
+else
+  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in #((
+?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
+'') ac_retval=1 ;;
+esac
+  else
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+static long int longval () { return $2; }
+static unsigned long int ulongval () { return $2; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    return 1;
+  if (($2) < 0)
+    {
+      long int i = longval ();
+      if (i != ($2))
+       return 1;
+      fprintf (f, "%ld", i);
+    }
+  else
+    {
+      unsigned long int i = ulongval ();
+      if (i != ($2))
+       return 1;
+      fprintf (f, "%lu", i);
+    }
+  /* Do not output a trailing newline, as this causes \r\n confusion
+     on some platforms.  */
+  return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
+else
+  ac_retval=1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest.val
+
+  fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_compute_int
+
 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
 # ---------------------------------------------
 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
@@ -10848,7 +11035,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10851 "configure"
+#line 11038 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10954,7 +11141,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10957 "configure"
+#line 11144 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11883,6 +12070,70 @@ $as_echo "$bfd_cv_build_exeext" >&6; }
   test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
 fi
 
+# Check whether --enable-64-bit-bfd was given.
+if test "${enable_64_bit_bfd+set}" = set; then :
+  enableval=$enable_64_bit_bfd; case $enableval in #(
+  yes|no) :
+     ;; #(
+  *) :
+    as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; #(
+  *) :
+     ;;
+esac
+else
+  enable_64_bit_bfd=no
+fi
+
+
+if test "x$enable_64_bit_bfd" = "xno"; then :
+    # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
+$as_echo_n "checking size of void *... " >&6; }
+if ${ac_cv_sizeof_void_p+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
+
+else
+  if test "$ac_cv_type_void_p" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (void *)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_void_p=0
+   fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
+$as_echo "$ac_cv_sizeof_void_p" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
+_ACEOF
+
+
+  if test "x$ac_cv_sizeof_void_p" = "x8"; then :
+  enable_64_bit_bfd=yes
+fi
+
+fi
+
+ if test "x$enable_64_bit_bfd" = "xyes"; then
+  ENABLE_BFD_64_BIT_TRUE=
+  ENABLE_BFD_64_BIT_FALSE='#'
+else
+  ENABLE_BFD_64_BIT_TRUE='#'
+  ENABLE_BFD_64_BIT_FALSE=
+fi
+
+
 
 
 
@@ -12358,7 +12609,7 @@ if test x${all_targets} = xfalse ; then
 
 else   # all_targets is true
     archdefs=-DARCH_all
-    if grep '#define BFD_ARCH_SIZE 64' ../bfd/bfd-in3.h > /dev/null; then
+    if test "$enable_64_bit_bfd" = "yes" ; then
        BFD_MACHINES='$(ALL32_MACHINES) $(ALL64_MACHINES)'
     else
        BFD_MACHINES='$(ALL32_MACHINES)'
@@ -12511,6 +12762,10 @@ if test -z "${INSTALL_LIBBFD_TRUE}" && test -z "${INSTALL_LIBBFD_FALSE}"; then
   as_fn_error $? "conditional \"INSTALL_LIBBFD\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${ENABLE_BFD_64_BIT_TRUE}" && test -z "${ENABLE_BFD_64_BIT_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_BFD_64_BIT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${CGEN_MAINT_TRUE}" && test -z "${CGEN_MAINT_FALSE}"; then
   as_fn_error $? "conditional \"CGEN_MAINT\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
index 3e83588a25638ac1ec70dc97f5da0237d4bfad1b..ccf4926678e43dc74bedc9e99c58f2dd05665935 100644 (file)
@@ -93,6 +93,7 @@ AM_PO_SUBDIRS
 . ${srcdir}/../bfd/configure.host
 
 BFD_CC_FOR_BUILD
+BFD_64_BIT
 
 AC_SUBST(HDEFINES)
 AC_PROG_INSTALL
@@ -380,7 +381,7 @@ if test x${all_targets} = xfalse ; then
 
 else   # all_targets is true
     archdefs=-DARCH_all
-    if grep '#define BFD_ARCH_SIZE 64' ../bfd/bfd-in3.h > /dev/null; then
+    if test "$enable_64_bit_bfd" = "yes" ; then
        BFD_MACHINES='$(ALL32_MACHINES) $(ALL64_MACHINES)'
     else
        BFD_MACHINES='$(ALL32_MACHINES)'