This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Fix gcc.misc-tests/linkage.c on 64-bit Solaris/x86


The gcc.misc-tests/linkage.c test was failing on 64-bit Solaris/x86:

FAIL: gcc.misc-tests/linkage.c link

gcc.log shows

ld: fatal: file linkage-y.o: wrong ELF class: ELFCLASS32
ld: fatal: File processing errors. No output written to linkage.exe
collect2: ld returned 1 exit status

Obviously, gcc.misc-tests/linkage.exp lacks support for 64-bit
Solaris/x86.  The following patch implements this and allows the test
to pass for both 32 and 64-bit.

At the same time, I noticed that the file still contains support for the
long obsolete mips-sgi-irix6*o32 target, which I've removed.

Installed.
	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2010-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* gcc.misc-tests/linkage.exp: Remove mips-sgi-irix6*o32 support.
	Add i?86-*-solaris2* support.

diff -r 639f1353c2b9 gcc/testsuite/gcc.misc-tests/linkage.exp
--- a/gcc/testsuite/gcc.misc-tests/linkage.exp	Mon Jan 25 10:22:04 2010 +0000
+++ b/gcc/testsuite/gcc.misc-tests/linkage.exp	Thu Jan 28 13:53:26 2010 +0100
@@ -40,15 +40,18 @@
 		set native_cflags "-n32"
 	    }
 	}
-	if  [istarget "mips-sgi-iris6*o32" ] {
-	    set native_cflags "-32"
-	}
 	if  [istarget "sparc*-sun-solaris2*"] {
 	    set file_string [exec file "linkage-x.o"]
 	    if [ string match "*64*" $file_string ] {
 		set native_cflags "-xarch=v9"
 	    }
 	}
+	if  [istarget "i?86*-*-solaris2*"] {
+	    set file_string [exec file "linkage-x.o"]
+	    if [ string match "*64*" $file_string ] {
+		set native_cflags "-xarch=amd64"
+	    }
+	}
 	if [istarget "s390*-*-linux*"] {
 	    set file_string [exec file "linkage-x.o"]
 	    if [ string match "*32-bit*" $file_string ] {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]