From: Ian Lance Taylor Date: Wed, 27 Aug 2003 17:43:39 +0000 (+0000) Subject: * configure.in: Define and substitute BFD_HOST_LONG_LONG. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ec317fb15734bd40e97f49c0f4718a5e316f5a22;p=binutils-gdb.git * configure.in: Define and substitute BFD_HOST_LONG_LONG. * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than __GNUC__ when deciding whether to use long long for BFD_HOST_64_BIT. * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 0e8eb9dee1c..101106504fb 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,11 @@ +2003-08-27 Ian Lance Taylor + + * configure.in: Define and substitute BFD_HOST_LONG_LONG. + * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than + __GNUC__ when deciding whether to use long long for + BFD_HOST_64_BIT. + * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate. + 2003-08-27 Christian Groessler * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc, diff --git a/bfd/Makefile.in b/bfd/Makefile.in index 58ba21d9fe7..5ca774a112d 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -68,6 +68,7 @@ AS = @AS@ BFD_HOST_64BIT_LONG = @BFD_HOST_64BIT_LONG@ BFD_HOST_64_BIT = @BFD_HOST_64_BIT@ BFD_HOST_64_BIT_DEFINED = @BFD_HOST_64_BIT_DEFINED@ +BFD_HOST_LONG_LONG = @BFD_HOST_LONG_LONG@ BFD_HOST_U_64_BIT = @BFD_HOST_U_64_BIT@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h index 63c86f7f91f..49ebee7237a 100644 --- a/bfd/bfd-in.h +++ b/bfd/bfd-in.h @@ -51,6 +51,7 @@ extern "C" { #define BFD_DEFAULT_TARGET_SIZE @bfd_default_target_size@ #define BFD_HOST_64BIT_LONG @BFD_HOST_64BIT_LONG@ +#define BFD_HOST_LONG_LONG @BFD_HOST_LONG_LONG@ #if @BFD_HOST_64_BIT_DEFINED@ #define BFD_HOST_64_BIT @BFD_HOST_64_BIT@ #define BFD_HOST_U_64_BIT @BFD_HOST_U_64_BIT@ @@ -96,21 +97,19 @@ typedef int bfd_boolean; /* Support for different sizes of target format ints and addresses. If the type `long' is at least 64 bits, BFD_HOST_64BIT_LONG will be - set to 1 above. Otherwise, if gcc is being used, this code will - use gcc's "long long" type. Otherwise, BFD_HOST_64_BIT must be - defined above. */ + set to 1 above. Otherwise, if the host compiler used during + configuration supports long long, this code will use it. + Otherwise, BFD_HOST_64_BIT must be defined above. */ #ifndef BFD_HOST_64_BIT # if BFD_HOST_64BIT_LONG # define BFD_HOST_64_BIT long # define BFD_HOST_U_64_BIT unsigned long # else -# ifdef __GNUC__ -# if __GNUC__ >= 2 +# if BFD_HOST_LONG_LONG # define BFD_HOST_64_BIT long long # define BFD_HOST_U_64_BIT unsigned long long -# endif /* __GNUC__ >= 2 */ -# endif /* ! defined (__GNUC__) */ +# endif /* ! BFD_HOST_LONG_LONG */ # endif /* ! BFD_HOST_64BIT_LONG */ #endif /* ! defined (BFD_HOST_64_BIT) */ diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index bab08097727..38cb316f7d2 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -58,6 +58,7 @@ extern "C" { #define BFD_DEFAULT_TARGET_SIZE @bfd_default_target_size@ #define BFD_HOST_64BIT_LONG @BFD_HOST_64BIT_LONG@ +#define BFD_HOST_LONG_LONG @BFD_HOST_LONG_LONG@ #if @BFD_HOST_64_BIT_DEFINED@ #define BFD_HOST_64_BIT @BFD_HOST_64_BIT@ #define BFD_HOST_U_64_BIT @BFD_HOST_U_64_BIT@ @@ -103,21 +104,19 @@ typedef int bfd_boolean; /* Support for different sizes of target format ints and addresses. If the type `long' is at least 64 bits, BFD_HOST_64BIT_LONG will be - set to 1 above. Otherwise, if gcc is being used, this code will - use gcc's "long long" type. Otherwise, BFD_HOST_64_BIT must be - defined above. */ + set to 1 above. Otherwise, if the host compiler used during + configuration supports long long, this code will use it. + Otherwise, BFD_HOST_64_BIT must be defined above. */ #ifndef BFD_HOST_64_BIT # if BFD_HOST_64BIT_LONG # define BFD_HOST_64_BIT long # define BFD_HOST_U_64_BIT unsigned long # else -# ifdef __GNUC__ -# if __GNUC__ >= 2 +# if BFD_HOST_LONG_LONG # define BFD_HOST_64_BIT long long # define BFD_HOST_U_64_BIT unsigned long long -# endif /* __GNUC__ >= 2 */ -# endif /* ! defined (__GNUC__) */ +# endif /* ! BFD_HOST_LONG_LONG */ # endif /* ! BFD_HOST_64BIT_LONG */ #endif /* ! defined (BFD_HOST_64_BIT) */ @@ -2324,6 +2323,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MIPS_RELGOT, BFD_RELOC_MIPS_JALR, + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -2335,6 +2335,7 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_FRV_GPRELHI, BFD_RELOC_FRV_GPRELLO, + /* This is a 24bit GOT-relative reloc for the mn10300. */ BFD_RELOC_MN10300_GOTOFF24, diff --git a/bfd/configure b/bfd/configure index 80225237b71..2af9ccf0c59 100755 --- a/bfd/configure +++ b/bfd/configure @@ -4497,6 +4497,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' BFD_HOST_64BIT_LONG=0 +BFD_HOST_LONG_LONG=0 BFD_HOST_64_BIT_DEFINED=0 BFD_HOST_64_BIT= BFD_HOST_U_64_BIT= @@ -4508,6 +4509,38 @@ elif test "x${HOST_64BIT_TYPE}" != "x"; then BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE} fi +echo $ac_n "checking for long long""... $ac_c" 1>&6 +echo "configure:4514: checking for long long" >&5 +if eval "test \"`echo '$''{'bfd_cv_has_long_long'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_has_long_long=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + bfd_cv_has_long_long=no +fi +rm -f conftest* +fi + +echo "$ac_t""$bfd_cv_has_long_long" 1>&6 +if test $bfd_cv_has_long_long = yes; then + BFD_HOST_LONG_LONG=1 +fi + + + @@ -4526,7 +4559,7 @@ if test "x$cross_compiling" = "xno"; then EXEEXT_FOR_BUILD='$(EXEEXT)' else echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6 -echo "configure:4530: checking for build system executable suffix" >&5 +echo "configure:4563: checking for build system executable suffix" >&5 if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4554,17 +4587,17 @@ for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4558: checking for $ac_hdr" >&5 +echo "configure:4591: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4594,17 +4627,17 @@ for ac_hdr in fcntl.h sys/file.h sys/time.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4598: checking for $ac_hdr" >&5 +echo "configure:4631: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4631,12 +4664,12 @@ fi done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4635: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:4668: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4645,7 +4678,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4670,12 +4703,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:4674: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4707: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -4683,7 +4716,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4708,7 +4741,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:4712: checking for opendir in -ldir" >&5 +echo "configure:4745: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4716,7 +4749,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4749,7 +4782,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4753: checking for opendir in -lx" >&5 +echo "configure:4786: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4757,7 +4790,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4793,12 +4826,12 @@ fi for ac_func in fcntl getpagesize setitimer sysconf fdopen getuid getgid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4797: checking for $ac_func" >&5 +echo "configure:4830: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4856,12 +4889,12 @@ EOF esac echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 -echo "configure:4860: checking whether strstr must be declared" >&5 +echo "configure:4893: checking whether strstr must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4882,7 +4915,7 @@ int main() { char *(*pfn) = (char *(*)) strstr ; return 0; } EOF -if { (eval echo configure:4886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_strstr=no else @@ -4903,12 +4936,12 @@ EOF fi echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 -echo "configure:4907: checking whether malloc must be declared" >&5 +echo "configure:4940: checking whether malloc must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4929,7 +4962,7 @@ int main() { char *(*pfn) = (char *(*)) malloc ; return 0; } EOF -if { (eval echo configure:4933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_malloc=no else @@ -4950,12 +4983,12 @@ EOF fi echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 -echo "configure:4954: checking whether realloc must be declared" >&5 +echo "configure:4987: checking whether realloc must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4976,7 +5009,7 @@ int main() { char *(*pfn) = (char *(*)) realloc ; return 0; } EOF -if { (eval echo configure:4980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_realloc=no else @@ -4997,12 +5030,12 @@ EOF fi echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 -echo "configure:5001: checking whether free must be declared" >&5 +echo "configure:5034: checking whether free must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5023,7 +5056,7 @@ int main() { char *(*pfn) = (char *(*)) free ; return 0; } EOF -if { (eval echo configure:5027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_free=no else @@ -5044,12 +5077,12 @@ EOF fi echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 -echo "configure:5048: checking whether getenv must be declared" >&5 +echo "configure:5081: checking whether getenv must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5070,7 +5103,7 @@ int main() { char *(*pfn) = (char *(*)) getenv ; return 0; } EOF -if { (eval echo configure:5074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_getenv=no else @@ -5257,16 +5290,16 @@ if test "${target}" = "${host}"; then # Not all versions of AIX with -DAIX_CORE_DUMPX_CORE # have c_impl as a member of struct core_dumpx echo $ac_n "checking for c_impl in struct core_dumpx""... $ac_c" 1>&6 -echo "configure:5261: checking for c_impl in struct core_dumpx" >&5 +echo "configure:5294: checking for c_impl in struct core_dumpx" >&5 cat > conftest.$ac_ext < int main() { struct core_dumpx c; c.c_impl = 0; ; return 0; } EOF -if { (eval echo configure:5270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_ST_C_IMPL 1 @@ -5336,17 +5369,17 @@ rm -f conftest* do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5340: checking for $ac_hdr" >&5 +echo "configure:5373: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5374,12 +5407,12 @@ done if test "$ac_cv_header_sys_procfs_h" = yes; then echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5378: checking for prstatus_t in sys/procfs.h" >&5 +echo "configure:5411: checking for prstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prstatus_t=yes else @@ -5410,12 +5443,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6 echo $ac_n "checking for prstatus32_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5414: checking for prstatus32_t in sys/procfs.h" >&5 +echo "configure:5447: checking for prstatus32_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prstatus32_t=yes else @@ -5446,12 +5479,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus32_t" 1>&6 echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5450: checking for prstatus_t.pr_who in sys/procfs.h" >&5 +echo "configure:5483: checking for prstatus_t.pr_who in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes else @@ -5482,12 +5515,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6 echo $ac_n "checking for prstatus32_t.pr_who in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5486: checking for prstatus32_t.pr_who in sys/procfs.h" >&5 +echo "configure:5519: checking for prstatus32_t.pr_who in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes else @@ -5518,12 +5551,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" 1>&6 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5522: checking for pstatus_t in sys/procfs.h" >&5 +echo "configure:5555: checking for pstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_pstatus_t=yes else @@ -5554,12 +5587,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 echo $ac_n "checking for pxstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5558: checking for pxstatus_t in sys/procfs.h" >&5 +echo "configure:5591: checking for pxstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pxstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_pxstatus_t=yes else @@ -5590,12 +5623,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_pxstatus_t" 1>&6 echo $ac_n "checking for pstatus32_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5594: checking for pstatus32_t in sys/procfs.h" >&5 +echo "configure:5627: checking for pstatus32_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_pstatus32_t=yes else @@ -5626,12 +5659,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus32_t" 1>&6 echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5630: checking for prpsinfo_t in sys/procfs.h" >&5 +echo "configure:5663: checking for prpsinfo_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prpsinfo_t=yes else @@ -5662,12 +5695,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6 echo $ac_n "checking for prpsinfo32_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5666: checking for prpsinfo32_t in sys/procfs.h" >&5 +echo "configure:5699: checking for prpsinfo32_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes else @@ -5698,12 +5731,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo32_t" 1>&6 echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5702: checking for psinfo_t in sys/procfs.h" >&5 +echo "configure:5735: checking for psinfo_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_psinfo_t=yes else @@ -5734,12 +5767,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6 echo $ac_n "checking for psinfo32_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5738: checking for psinfo32_t in sys/procfs.h" >&5 +echo "configure:5771: checking for psinfo32_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_psinfo32_t=yes else @@ -5770,12 +5803,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo32_t" 1>&6 echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5774: checking for lwpstatus_t in sys/procfs.h" >&5 +echo "configure:5807: checking for lwpstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_lwpstatus_t=yes else @@ -5806,12 +5839,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6 echo $ac_n "checking for lwpxstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5810: checking for lwpxstatus_t in sys/procfs.h" >&5 +echo "configure:5843: checking for lwpxstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpxstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes else @@ -5842,12 +5875,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpxstatus_t" 1>&6 echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5846: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5 +echo "configure:5879: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes else @@ -5878,12 +5911,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6 echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5882: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5 +echo "configure:5915: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes else @@ -5914,12 +5947,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6 echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5918: checking for win32_pstatus_t in sys/procfs.h" >&5 +echo "configure:5951: checking for win32_pstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_win32_pstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes else @@ -6397,10 +6430,10 @@ case ${host64}-${target64}-${want64} in if test -n "$GCC" ; then bad_64bit_gcc=no; echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6 -echo "configure:6401: checking for gcc version with buggy 64-bit support" >&5 +echo "configure:6434: checking for gcc version with buggy 64-bit support" >&5 # Add more tests for gcc versions with non-working 64-bit support here. cat > conftest.$ac_ext <&6 -echo "configure:6450: checking for $ac_hdr" >&5 +echo "configure:6483: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6485,12 +6518,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6489: checking for $ac_func" >&5 +echo "configure:6522: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6538,7 +6571,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:6542: checking for working mmap" >&5 +echo "configure:6575: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6546,7 +6579,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -6711,12 +6744,12 @@ fi for ac_func in madvise mprotect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6715: checking for $ac_func" >&5 +echo "configure:6748: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6972,6 +7005,7 @@ s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g s%@l@%$l%g s%@HDEFINES@%$HDEFINES%g s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g +s%@BFD_HOST_LONG_LONG@%$BFD_HOST_LONG_LONG%g s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g diff --git a/bfd/configure.in b/bfd/configure.in index 04ccf0ae6e7..f92ef8d8390 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -113,6 +113,7 @@ AC_SUBST(HDEFINES) AC_PROG_INSTALL BFD_HOST_64BIT_LONG=0 +BFD_HOST_LONG_LONG=0 BFD_HOST_64_BIT_DEFINED=0 BFD_HOST_64_BIT= BFD_HOST_U_64_BIT= @@ -123,7 +124,19 @@ elif test "x${HOST_64BIT_TYPE}" != "x"; then BFD_HOST_64_BIT=${HOST_64BIT_TYPE} BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE} fi + +AC_MSG_CHECKING([for long long]) +AC_CACHE_VAL(bfd_cv_has_long_long, +[AC_TRY_COMPILE(, +[unsigned long long ll = 18446744073709551615ULL;], +bfd_cv_has_long_long=yes, bfd_cv_has_long_long=no)]) +AC_MSG_RESULT($bfd_cv_has_long_long) +if test $bfd_cv_has_long_long = yes; then + BFD_HOST_LONG_LONG=1 +fi + AC_SUBST(BFD_HOST_64BIT_LONG) +AC_SUBST(BFD_HOST_LONG_LONG) AC_SUBST(BFD_HOST_64_BIT_DEFINED) AC_SUBST(BFD_HOST_64_BIT) AC_SUBST(BFD_HOST_U_64_BIT) diff --git a/bfd/doc/Makefile.in b/bfd/doc/Makefile.in index 667d6589dba..81db77e9b38 100644 --- a/bfd/doc/Makefile.in +++ b/bfd/doc/Makefile.in @@ -68,6 +68,7 @@ AS = @AS@ BFD_HOST_64BIT_LONG = @BFD_HOST_64BIT_LONG@ BFD_HOST_64_BIT = @BFD_HOST_64_BIT@ BFD_HOST_64_BIT_DEFINED = @BFD_HOST_64_BIT_DEFINED@ +BFD_HOST_LONG_LONG = @BFD_HOST_LONG_LONG@ BFD_HOST_U_64_BIT = @BFD_HOST_U_64_BIT@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@