This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH TESTSUITE]: gcc.target/powerpc/ppc-sdata-[12].c failures on ppc with -fpic/-fPIC
- From: "Kaveh R. GHAZI" <ghazi at caip dot rutgers dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Cc: janis187 at us dot ibm dot com
- Date: Sun, 21 Mar 2010 12:45:27 -0400 (EDT)
- Subject: [PATCH TESTSUITE]: gcc.target/powerpc/ppc-sdata-[12].c failures on ppc with -fpic/-fPIC
When running the testsuite on powerpc with -fPIC/-fpic I get:
ppc-sdata-1.c:1: error: -fPIC and -msdata=eabi are incompatible
ppc-sdata-2.c:1: error: -fPIC and -msdata=sysv are incompatible
ppc-sdata-1.c:1: error: -fpic and -msdata=eabi are incompatible
ppc-sdata-2.c:1: error: -fpic and -msdata=sysv are incompatible
Fixed with the patch below to bypass these tests with pic code. Tested on
powerpc-unknown-linux-gnu on trunk via c-only "make check" with extra
-fPIC/-fpic passes.
Okay everywhere?
Thanks,
--Kaveh
2010-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.target/powerpc/ppc-sdata-1.c: Require nonpic.
* gcc.target/powerpc/ppc-sdata-2.c: Likewise.
diff -rup orig/egcc-SVN20100321/gcc/testsuite/gcc.target/powerpc/ppc-sdata-1.c egcc-SVN20100321/gcc/testsuite/gcc.target/powerpc/ppc-sdata-1.c
--- orig/egcc-SVN20100321/gcc/testsuite/gcc.target/powerpc/ppc-sdata-1.c 2008-06-08 02:00:07.000000000 +0200
+++ egcc-SVN20100321/gcc/testsuite/gcc.target/powerpc/ppc-sdata-1.c 2010-03-21 04:56:09.000000000 +0100
@@ -1,5 +1,6 @@
/* { dg-do compile { target { { powerpc*-*-linux* && ilp32 } || { powerpc-*-eabi* } } } } */
/* { dg-options "-O2 -fno-common -G 8 -meabi -msdata=eabi" } */
+/* { dg-require-effective-target nonpic } */
/* { dg-final { scan-assembler "\\.section\[ \t\]\\.sdata," } } */
/* { dg-final { scan-assembler "\\.section\[ \t\]\\.sdata2," } } */
/* { dg-final { scan-assembler "sdat@sda21\\((13|0)\\)" } } */
diff -rup orig/egcc-SVN20100321/gcc/testsuite/gcc.target/powerpc/ppc-sdata-2.c egcc-SVN20100321/gcc/testsuite/gcc.target/powerpc/ppc-sdata-2.c
--- orig/egcc-SVN20100321/gcc/testsuite/gcc.target/powerpc/ppc-sdata-2.c 2008-06-08 02:00:07.000000000 +0200
+++ egcc-SVN20100321/gcc/testsuite/gcc.target/powerpc/ppc-sdata-2.c 2010-03-21 04:56:17.000000000 +0100
@@ -1,5 +1,6 @@
/* { dg-do compile { target { { powerpc*-*-linux* && ilp32 } || { powerpc-*-eabi* } } } } */
/* { dg-options "-O2 -fno-common -G 8 -msdata=sysv" } */
+/* { dg-require-effective-target nonpic } */
/* { dg-final { scan-assembler "\\.section\[ \t\]\\.sdata," } } */
/* { dg-final { scan-assembler-not "\\.section\[ \t\]\\.sdata2," } } */
/* { dg-final { scan-assembler "sdat@sdarel\\(13\\)" } } */