[RFA:] Configure out gcc version with buggy 64-bit support in bfd

Hans-Peter Nilsson hp@bitrange.com
Sun Jan 20 15:26:00 GMT 2002


As mentioned in
<URL:http://sources.redhat.com/ml/binutils/2001-12/msg00458.html>,
egcs-1.1.2 miscompiles bfd/elf-strtab.c:_bfd_elf_strtab_finalize
when bfd_vma is 64 bits, resulting in SEGV at assembly time for
ELF targets.  Since that release is two official GCC releases
back, excluding that version at configuration time was noted as
a reasonable way to avoid surprises.

Tested by configuring using egcs-1.1.2 and gcc-2.95.3:
- native on i686-pc-linux-gnu with --enable-64-bit-bfd
- mmix-knuth-mmixware (a 64-bit target).

Ok to commit?

bfd:
	* configure.in <64-bit configuration>: If using gcc, check and
	emit error for egcs-1.1.2.
	* configure: Regenerate.

Index: configure.in
===================================================================
RCS file: /cvs/src/src/bfd/configure.in,v
retrieving revision 1.77
diff -p -c -r1.77 configure.in
*** configure.in	2002/01/04 14:49:03	1.77
--- configure.in	2002/01/20 22:17:56
*************** case ${host64}-${target64}-${want64} in
*** 772,777 ****
--- 772,789 ----
        AC_MSG_WARN([You have requested a 64 bit BFD configuration, but])
        AC_MSG_WARN([your compiler may not have a 64 bit integral type])
      fi
+     if test -n "$GCC" ; then
+        bad_64bit_gcc=no;
+        AC_MSG_CHECKING([for gcc version with buggy 64-bit support])
+        # Add more tests for gcc versions with non-working 64-bit support here.
+        AC_EGREP_CPP([: 2 : 91 : 1 :],[:__GNUC__:__GNUC_MINOR__:__i386__:],
+ 		    bad_64bit_gcc=yes;
+ 		    AC_MSG_RESULT([yes: egcs-1.1.2 on ix86 spotted]),
+ 		    AC_MSG_RESULT(no))
+        if test $bad_64bit_gcc = yes ; then
+ 	 AC_ERROR([A newer version of gcc is needed for the requested 64-bit BFD configuration])
+        fi
+     fi
      ;;
    false-false-false)
      wordsize=32

brgds, H-P



More information about the Binutils mailing list