This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] testsuite: fix gcc.misc-tests/linkage.c for powerpc64
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 29 Oct 2004 13:32:28 -0700
- Subject: [patch] testsuite: fix gcc.misc-tests/linkage.c for powerpc64
Test gcc.misc-tests/linkage.exp checks that GCC can link code compiled
by the native C compiler. It fails for powerpc64-unknown-linux-gnu
with -m64 because by default a biarch compiler on a ppc64 GNU/Linux
system generates 32-bit code by default. This patch adds a check like
those of other biarch systems to pass -m64 to the native compiler if
needed, and allows the test to pass when tests are run with -m64.
Tested for powerpc64-unknown-linux-gnu with -m32 and -m64. OK for
mainline?
2004-10-29 Janis Johnson <janis187@us.ibm.com>
* gcc.misc-tests/linkage.exp: Handle biarch GCC for powerpc64.
Index: gcc.misc-tests/linkage.exp
===================================================================
RCS file: /opt/gcc-cvs/gcc/gcc/testsuite/gcc.misc-tests/linkage.exp,v
retrieving revision 1.13
diff -u -p -r1.13 linkage.exp
--- gcc.misc-tests/linkage.exp 22 Jun 2004 19:52:33 -0000 1.13
+++ gcc.misc-tests/linkage.exp 29 Oct 2004 20:13:38 -0000
@@ -63,6 +63,11 @@ if [isnative] then {
if [ string match "*ELF-64*" $file_string ] {
set native_cflags "+DD64"
}
+ } elseif [istarget "powerpc64*-*-linux*"] {
+ set file_string [exec file "linkage-x.o"]
+ if [ string match "*64-bit*" $file_string ] {
+ set native_cflags "-m64"
+ }
}
catch { exec rm -f linkage-y.o }