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] i386: Compile pr82699-5.c and pr82699-6.c with -fno-pic


Compile pr82699-5.c and pr82699-6.c with -fno-pic to avoid

FAIL: gcc.target/i386/pr82699-5.c (test for excess errors)
Excess errors:
cc1: sorry, unimplemented: -mfentry isn't supported for 32-bit in combination with -fpic
FAIL: gcc.target/i386/pr82699-6.c (test for excess errors)
Excess errors:
cc1: error: -mnop-mcount is not implemented for -fPIC
cc1: sorry, unimplemented: -mfentry isn't supported for 32-bit in combination with -fpic

when running GCC testsuite with --target_board='unix{-fpic\ -m32,-fpic}'.

	PR target/82699
	* gcc.target/i386/pr82699-5.c: Add -fno-pic for ia32.
	* gcc.target/i386/pr82699-6.c: Add -fno-pic.
---
 gcc/testsuite/ChangeLog                   | 6 ++++++
 gcc/testsuite/gcc.target/i386/pr82699-5.c | 1 +
 gcc/testsuite/gcc.target/i386/pr82699-6.c | 2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index af269f425fc..ebc6ab6bc2d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2018-09-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR target/82699
+	* gcc.target/i386/pr82699-5.c: Add -fno-pic for ia32.
+	* gcc.target/i386/pr82699-6.c: Add -fno-pic.
+
 2018-09-25  H.J. Lu  <hongjiu.lu@intel.com>
 
 	PR testsuite/70150
diff --git a/gcc/testsuite/gcc.target/i386/pr82699-5.c b/gcc/testsuite/gcc.target/i386/pr82699-5.c
index e0fe0188d56..0c547e25f03 100644
--- a/gcc/testsuite/gcc.target/i386/pr82699-5.c
+++ b/gcc/testsuite/gcc.target/i386/pr82699-5.c
@@ -1,5 +1,6 @@
 /* { dg-do compile { target *-*-linux* } } */
 /* { dg-options "-O2 -fcf-protection -mfentry -fasynchronous-unwind-tables" } */
+/* { dg-additional-options "-fno-pic" { target ia32 } } */
 /* { dg-final { scan-assembler-times {\t\.cfi_startproc\n\tendbr} 1 } } */
 
 extern int bar (int);
diff --git a/gcc/testsuite/gcc.target/i386/pr82699-6.c b/gcc/testsuite/gcc.target/i386/pr82699-6.c
index cacf0ab3db2..ff6bae7d1ea 100644
--- a/gcc/testsuite/gcc.target/i386/pr82699-6.c
+++ b/gcc/testsuite/gcc.target/i386/pr82699-6.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target *-*-linux* } } */
-/* { dg-options "-O2 -fcf-protection -pg -mfentry -mrecord-mcount -mnop-mcount -fasynchronous-unwind-tables" } */
+/* { dg-options "-fno-pic -O2 -fcf-protection -pg -mfentry -mrecord-mcount -mnop-mcount -fasynchronous-unwind-tables" } */
 /* { dg-final { scan-assembler-times {\t\.cfi_startproc\n\tendbr} 1 } } */
 
 extern int bar (int);
-- 
2.17.1


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