public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [patch] testsuite enable PIE tests on FreeBSD
@ 2015-05-25 14:00 Dominique Dhumieres
  2015-05-25 20:14 ` Andreas Tobler
  2015-05-26 14:14 ` Jeff Law
  0 siblings, 2 replies; 11+ messages in thread
From: Dominique Dhumieres @ 2015-05-25 14:00 UTC (permalink / raw)
  To: andreast-list; +Cc: gcc-patches, law

> Wouldn't it be better to remove the target selector and instead add:
>
> /* { dg-require-effective-target pie } */
> ...

This allows the tests to be run on Darwin and fail because the code generated does not
match the scan-assembler:

FAIL: gcc.target/i386/iinline-attr-2.c scan-assembler p2align
FAIL: gcc.target/i386/pr32219-1.c scan-assembler movl[ \\t]xxx\\\\(%rip\\\\), %eax
FAIL: gcc.target/i386/pr32219-3.c scan-assembler movl[ \\t]xxx\\\\(%rip\\\\), %eax
FAIL: gcc.target/i386/pr32219-3.c scan-assembler-not xxx@GOTPCREL
FAIL: gcc.target/i386/pr32219-5.c scan-assembler movl[ \\t]xxx\\\\(%rip\\\\), %eax
FAIL: gcc.target/i386/pr32219-6.c scan-assembler xxx@GOTPCREL
FAIL: gcc.target/i386/pr32219-7.c scan-assembler movl[ \\t]xxx\\\\(%rip\\\\), %eax
FAIL: gcc.target/i386/pr32219-7.c scan-assembler-not xxx@GOTPCREL
FAIL: gcc.target/i386/pr39013-1.c scan-assembler bar@PLT
FAIL: gcc.target/i386/pr39013-1.c scan-assembler foo@PLT
FAIL: gcc.target/i386/pr39013-2.c scan-assembler bar@PLT
FAIL: gcc.target/i386/pr39013-2.c scan-assembler foo@PLT

I suspect that this will also be the case for gcc.target/i386/pr64317.c.

TIA

Dominique

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [patch] testsuite enable PIE tests on FreeBSD
@ 2015-05-20 17:11 Andreas Tobler
  2015-05-20 20:40 ` Jeff Law
  0 siblings, 1 reply; 11+ messages in thread
From: Andreas Tobler @ 2015-05-20 17:11 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 617 bytes --]

Hi,

the attached patch enables some PIE tests on FreeBSD.

Ok for trunk?

Thanks,
Andreas

2015-05-20  Andreas Tobler  <andreast@gcc.gnu.org>

	* gcc.target/i386/pr32219-1.c: Enable test on FreeBSD.
	* gcc.target/i386/pr32219-2.c: Likewise.
	* gcc.target/i386/pr32219-3.c: Likewise.
	* gcc.target/i386/pr32219-4.c: Likewise.
	* gcc.target/i386/pr32219-5.c: Likewise.
	* gcc.target/i386/pr32219-6.c: Likewise
	* gcc.target/i386/pr32219-7.c: Likewise.
	* gcc.target/i386/pr32219-8.c: Likewise.
	* gcc.target/i386/pr39013-1.c: Likewise.
	* gcc.target/i386/pr39013-2.c: Likewise.
	* gcc.target/i386/pr64317.c: Likewise.

[-- Attachment #2: fbsd_pie_tests.diff --]
[-- Type: text/plain, Size: 4660 bytes --]

Index: gcc.target/i386/pr32219-1.c
===================================================================
--- gcc.target/i386/pr32219-1.c	(revision 223412)
+++ gcc.target/i386/pr32219-1.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target *-*-linux* } } */
+/* { dg-do compile { target *-*-freebsd* *-*-linux* } } */
 /* { dg-options "-O2 -fpie" } */
 
 /* Initialized common symbol with -fpie.  */
Index: gcc.target/i386/pr32219-2.c
===================================================================
--- gcc.target/i386/pr32219-2.c	(revision 223412)
+++ gcc.target/i386/pr32219-2.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target *-*-linux* } } */
+/* { dg-do compile { target *-*-freebsd* *-*-linux* } } */
 /* { dg-options "-O2 -fpic" } */
 
 /* Common symbol with -fpic.  */
Index: gcc.target/i386/pr32219-3.c
===================================================================
--- gcc.target/i386/pr32219-3.c	(revision 223412)
+++ gcc.target/i386/pr32219-3.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target *-*-linux* } } */
+/* { dg-do compile { target *-*-freebsd* *-*-linux* } } */
 /* { dg-options "-O2 -fpie" } */
 
 /* Weak common symbol with -fpie.  */
Index: gcc.target/i386/pr32219-4.c
===================================================================
--- gcc.target/i386/pr32219-4.c	(revision 223412)
+++ gcc.target/i386/pr32219-4.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target *-*-linux* } } */
+/* { dg-do compile { target *-*-freebsd* *-*-linux* } } */
 /* { dg-options "-O2 -fpic" } */
 
 /* Weak common symbol with -fpic.  */
Index: gcc.target/i386/pr32219-5.c
===================================================================
--- gcc.target/i386/pr32219-5.c	(revision 223412)
+++ gcc.target/i386/pr32219-5.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target *-*-linux* } } */
+/* { dg-do compile { target *-*-freebsd* *-*-linux* } } */
 /* { dg-options "-O2 -fpie" } */
 
 /* Initialized symbol with -fpie.  */
Index: gcc.target/i386/pr32219-6.c
===================================================================
--- gcc.target/i386/pr32219-6.c	(revision 223412)
+++ gcc.target/i386/pr32219-6.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target *-*-linux* } } */
+/* { dg-do compile { target *-*-freebsd* *-*-linux* } } */
 /* { dg-options "-O2 -fpic" } */
 
 /* Initialized symbol with -fpic.  */
Index: gcc.target/i386/pr32219-7.c
===================================================================
--- gcc.target/i386/pr32219-7.c	(revision 223412)
+++ gcc.target/i386/pr32219-7.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target *-*-linux* } } */
+/* { dg-do compile { target *-*-freebsd* *-*-linux* } } */
 /* { dg-options "-O2 -fpie" } */
 
 /* Weak initialized symbol with -fpie.  */
Index: gcc.target/i386/pr32219-8.c
===================================================================
--- gcc.target/i386/pr32219-8.c	(revision 223412)
+++ gcc.target/i386/pr32219-8.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target *-*-linux* } } */
+/* { dg-do compile { target *-*-freebsd* *-*-linux* } } */
 /* { dg-options "-O2 -fpic" } */
 
 /* Weak initialized symbol with -fpic.  */
Index: gcc.target/i386/pr39013-1.c
===================================================================
--- gcc.target/i386/pr39013-1.c	(revision 223412)
+++ gcc.target/i386/pr39013-1.c	(working copy)
@@ -1,5 +1,5 @@
 /* PR target/39013 */
-/* { dg-do compile { target *-*-linux* *-*-gnu* } } */
+/* { dg-do compile { target *-*-freebsd* *-*-linux* *-*-gnu* } } */
 /* { dg-options "-O2 -fpie -std=gnu89" } */
 
 inline int foo (void);
Index: gcc.target/i386/pr39013-2.c
===================================================================
--- gcc.target/i386/pr39013-2.c	(revision 223412)
+++ gcc.target/i386/pr39013-2.c	(working copy)
@@ -1,5 +1,5 @@
 /* PR target/39013 */
-/* { dg-do compile { target *-*-linux* *-*-gnu* } } */
+/* { dg-do compile { target *-*-freebsd* *-*-linux* *-*-gnu* } } */
 /* { dg-options "-O2 -fpie -std=gnu99" } */
 
 inline int foo (void);		/* { dg-warning "declared but never defined" } */
Index: gcc.target/i386/pr64317.c
===================================================================
--- gcc.target/i386/pr64317.c	(revision 223412)
+++ gcc.target/i386/pr64317.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { *-*-linux* && ia32 } } } */
+/* { dg-do compile { target { { *-*-freebsd* *-*-linux* } && ia32 } } } */
 /* { dg-options "-O2 -fpie" } */
 /* { dg-final { scan-assembler "addl\[ \\t\]+\[$\]_GLOBAL_OFFSET_TABLE_, %ebx" } } */
 /* { dg-final { scan-assembler "movl\[ \\t\]+c@GOTOFF\[(\]%ebx\[)\]" } } */

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-05-28 11:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-25 14:00 [patch] testsuite enable PIE tests on FreeBSD Dominique Dhumieres
2015-05-25 20:14 ` Andreas Tobler
2015-05-26 14:18   ` Jeff Law
2015-05-26 14:14 ` Jeff Law
  -- strict thread matches above, loose matches on Subject: below --
2015-05-20 17:11 Andreas Tobler
2015-05-20 20:40 ` Jeff Law
2015-05-21 18:23   ` Andreas Tobler
2015-05-21 20:44     ` Andreas Tobler
2015-05-22 22:54       ` Jeff Law
2015-05-25 10:29         ` Andreas Tobler
2015-05-28 11:49   ` Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).