aboutsummaryrefslogtreecommitdiff
path: root/ld/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'ld/configure.in')
-rw-r--r--ld/configure.in19
1 files changed, 11 insertions, 8 deletions
diff --git a/ld/configure.in b/ld/configure.in
index 63936f2..a5df0fa 100644
--- a/ld/configure.in
+++ b/ld/configure.in
@@ -75,7 +75,7 @@ dnl "install_as_default" is set to false if gold is the default linker.
dnl "installed_linker" is the installed BFD linker name.
AC_ARG_ENABLE(gold,
[[ --enable-gold[=ARG] build gold [ARG={default,yes,no}]]],
-[case "${enableval}" in
+[case "${enableval}" in
default)
install_as_default=no
installed_linker=ld.bfd
@@ -210,7 +210,7 @@ if test $ld_cv_decl_getopt_unistd_h = yes; then
AC_DEFINE([HAVE_DECL_GETOPT], 1,
[Is the prototype for getopt in <unistd.h> in the expected format?])
fi
-
+
BFD_BINARY_FOPEN
AC_CHECK_DECLS([strstr, free, sbrk, getenv, environ])
@@ -252,6 +252,15 @@ dnl not permit literal newlines in an AC_SUBST variables. So we use a
dnl file.
rm -f tdirs
+# If the host is 64-bit, then we enable 64-bit targets by default.
+# This is consistent with what ../bfd/configure.in 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
+
for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
do
if test "$targ_alias" = "all"; then
@@ -322,12 +331,6 @@ TDIRS=tdirs
AC_SUBST_FILE(TDIRS)
if test x${all_targets} = xtrue; then
- 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
EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
else