aboutsummaryrefslogtreecommitdiff
path: root/bfd/configure
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-12-04 00:28:14 -0500
committerMike Frysinger <vapier@gentoo.org>2022-01-01 12:49:07 -0500
commit1d5269c994bf4af088b1a9d0ed39825541623a99 (patch)
tree427712dedcd41fc7d1d0e8f837444ec8f6c6c762 /bfd/configure
parent3cc8ed6aaee33355a5d911a7401db3f1b05a2714 (diff)
downloadgdb-1d5269c994bf4af088b1a9d0ed39825541623a99.zip
gdb-1d5269c994bf4af088b1a9d0ed39825541623a99.tar.gz
gdb-1d5269c994bf4af088b1a9d0ed39825541623a99.tar.bz2
unify 64-bit bfd checks
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.
Diffstat (limited to 'bfd/configure')
-rwxr-xr-xbfd/configure77
1 files changed, 71 insertions, 6 deletions
diff --git a/bfd/configure b/bfd/configure
index d4aa217..b09702f 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -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
@@ -11847,12 +11849,71 @@ 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
+ 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