Re: [patch] testsuite enable PIE tests on FreeBSD

2015-05-28 Thread Thomas Schwinge
Hi!

On Wed, 20 May 2015 14:30:38 -0600, Jeff Law  wrote:
> On 05/20/2015 11:04 AM, Andreas Tobler wrote:
> > the attached patch enables some PIE tests on FreeBSD.

> Wouldn't it be better to remove the target selector and instead add:
> 
> /* { dg-require-effective-target pie } */
> 
> In each of those tests?

(Got committed to trunk in r223498.)  Thanks!  I wanted to suggest
something along the same lines, because:

> While the net effect is the same today, it means there's only one place 
> to change if another x86 target gains PIE support in the future.

GNU Hurd got it, too.  :-)


Grüße,
 Thomas


signature.asc
Description: PGP signature


Re: [patch] testsuite enable PIE tests on FreeBSD

2015-05-26 Thread Jeff Law

On 05/25/2015 01:52 PM, Andreas Tobler wrote:

On 25.05.15 14:42, Dominique Dhumieres wrote:

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.


Ok. As written on #irc I can exclude *-*-darwin* from the tests with
this one:

/* { dg-do compile { target { ! { *-*-darwin* } } } } */

Let me know what you prefer.
That should be our fallback depending on Dominique's response to my 
message.


We need to figure out if the expected output needs tweaking or if 
there's some capability these tests expect that isn't available on Darwin.


Sorry you got sucked into the Darwin black hole...  I'll do what I can 
to minimize its effects.



Jeff


Re: [patch] testsuite enable PIE tests on FreeBSD

2015-05-26 Thread Jeff Law

On 05/25/2015 06:42 AM, Dominique Dhumieres wrote:

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.
Can you dig a little bit deeper -- is it the case that we just need a 
more general pattern to match whatever assembler is necessary for Darwin?


Or is it the case that Darwin doesn't have some particular capability in 
its assembler/linker that these tests depend on (and thus we need 
another check-effective-target-whatever)


I'm happy to iterate with Andreas to get this addressed for Darwin, but 
neither Andreas nor myself really know much about that platform.


jeff


Re: [patch] testsuite enable PIE tests on FreeBSD

2015-05-25 Thread Andreas Tobler

On 25.05.15 14:42, Dominique Dhumieres wrote:

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.


Ok. As written on #irc I can exclude *-*-darwin* from the tests with 
this one:


/* { dg-do compile { target { ! { *-*-darwin* } } } } */

Let me know what you prefer.

Andreas



Re: [patch] testsuite enable PIE tests on FreeBSD

2015-05-25 Thread Dominique Dhumieres
> 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


Re: [patch] testsuite enable PIE tests on FreeBSD

2015-05-25 Thread Andreas Tobler

On 22.05.15 23:47, Jeff Law wrote:

On 05/21/2015 02:01 PM, Andreas Tobler wrote:

On 21.05.15 20:14, Andreas Tobler wrote:

On 20.05.15 22:30, Jeff Law wrote:

On 05/20/2015 11:04 AM, Andreas Tobler wrote:

Hi,

the attached patch enables some PIE tests on FreeBSD.

Ok for trunk?

Thanks,
Andreas

2015-05-20  Andreas Tobler  

* 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.

Wouldn't it be better to remove the target selector and instead add:

/* { dg-require-effective-target pie } */

In each of those tests?

While the net effect is the same today, it means there's only one place
to change if another x86 target gains PIE support in the future.

Pre-approved using that style.


Thanks!

Tested on amd64-freebsd and CentOS.

Andreas


This is what I committed:

2015-05-21  Andreas Tobler  

 * gcc.target/i386/pr32219-1.c: Use 'dg-require-effective-target pie'
 instead of listing several targets on its own.



 * gcc.target/i386/pr64317.c: Likewise.


Yes, I know. The comment and the content for this test case do not match.

Is this ok:

Index: gcc.target/i386/pr64317.c
===
--- gcc.target/i386/pr64317.c(revision 223498)
+++ gcc.target/i386/pr64317.c(working copy)
@@ -1,4 +1,5 @@
-/* { dg-do compile { target { { *-*-freebsd* *-*-linux* } && ia32 } } } */
+/* { dg-do compile { target ia32 } } */
+/* { dg-require-effective-target pie } */
   /* { dg-options "-O2 -fpie" } */
   /* { dg-final { scan-assembler "addl\[
\\t\]+\[$\]_GLOBAL_OFFSET_TABLE_, %ebx" } } */
   /* { dg-final { scan-assembler "movl\[ \\t\]+c@GOTOFF\[(\]%ebx\[)\]" }
} */


or do you prefer instead of

/* { dg-do compile { target ia32 } } */

this one:

/* { dg-do compile } */
/* { dg-require-effective-target ia32 } */


Btw, all three variants run on i386.

It looks like the dg-require-effective-target is typically on a line by
itself.  So let's stick with the last version.


So, finally committed. Thanks!
Andreas



Re: [patch] testsuite enable PIE tests on FreeBSD

2015-05-22 Thread Jeff Law

On 05/21/2015 02:01 PM, Andreas Tobler wrote:

On 21.05.15 20:14, Andreas Tobler wrote:

On 20.05.15 22:30, Jeff Law wrote:

On 05/20/2015 11:04 AM, Andreas Tobler wrote:

Hi,

the attached patch enables some PIE tests on FreeBSD.

Ok for trunk?

Thanks,
Andreas

2015-05-20  Andreas Tobler  

   * 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.

Wouldn't it be better to remove the target selector and instead add:

/* { dg-require-effective-target pie } */

In each of those tests?

While the net effect is the same today, it means there's only one place
to change if another x86 target gains PIE support in the future.

Pre-approved using that style.


Thanks!

Tested on amd64-freebsd and CentOS.

Andreas


This is what I committed:

2015-05-21  Andreas Tobler  

* gcc.target/i386/pr32219-1.c: Use 'dg-require-effective-target pie'
instead of listing several targets on its own.



* gcc.target/i386/pr64317.c: Likewise.


Yes, I know. The comment and the content for this test case do not match.

Is this ok:

Index: gcc.target/i386/pr64317.c
===
--- gcc.target/i386/pr64317.c(revision 223498)
+++ gcc.target/i386/pr64317.c(working copy)
@@ -1,4 +1,5 @@
-/* { dg-do compile { target { { *-*-freebsd* *-*-linux* } && ia32 } } } */
+/* { dg-do compile { target ia32 } } */
+/* { dg-require-effective-target pie } */
  /* { dg-options "-O2 -fpie" } */
  /* { dg-final { scan-assembler "addl\[
\\t\]+\[$\]_GLOBAL_OFFSET_TABLE_, %ebx" } } */
  /* { dg-final { scan-assembler "movl\[ \\t\]+c@GOTOFF\[(\]%ebx\[)\]" }
} */


or do you prefer instead of

/* { dg-do compile { target ia32 } } */

this one:

/* { dg-do compile } */
/* { dg-require-effective-target ia32 } */


Btw, all three variants run on i386.
It looks like the dg-require-effective-target is typically on a line by 
itself.  So let's stick with the last version.


jeff



Re: [patch] testsuite enable PIE tests on FreeBSD

2015-05-21 Thread Andreas Tobler

On 21.05.15 20:14, Andreas Tobler wrote:

On 20.05.15 22:30, Jeff Law wrote:

On 05/20/2015 11:04 AM, Andreas Tobler wrote:

Hi,

the attached patch enables some PIE tests on FreeBSD.

Ok for trunk?

Thanks,
Andreas

2015-05-20  Andreas Tobler  

   * 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.

Wouldn't it be better to remove the target selector and instead add:

/* { dg-require-effective-target pie } */

In each of those tests?

While the net effect is the same today, it means there's only one place
to change if another x86 target gains PIE support in the future.

Pre-approved using that style.


Thanks!

Tested on amd64-freebsd and CentOS.

Andreas


This is what I committed:

2015-05-21  Andreas Tobler  

* gcc.target/i386/pr32219-1.c: Use 'dg-require-effective-target pie'
instead of listing several targets on its own.



* gcc.target/i386/pr64317.c: Likewise.


Yes, I know. The comment and the content for this test case do not match.

Is this ok:

Index: gcc.target/i386/pr64317.c
===
--- gcc.target/i386/pr64317.c   (revision 223498)
+++ gcc.target/i386/pr64317.c   (working copy)
@@ -1,4 +1,5 @@
-/* { dg-do compile { target { { *-*-freebsd* *-*-linux* } && ia32 } } } */
+/* { dg-do compile { target ia32 } } */
+/* { dg-require-effective-target pie } */
 /* { dg-options "-O2 -fpie" } */
 /* { dg-final { scan-assembler "addl\[ 
\\t\]+\[$\]_GLOBAL_OFFSET_TABLE_, %ebx" } } */
 /* { dg-final { scan-assembler "movl\[ \\t\]+c@GOTOFF\[(\]%ebx\[)\]" } 
} */



or do you prefer instead of

/* { dg-do compile { target ia32 } } */

this one:

/* { dg-do compile } */
/* { dg-require-effective-target ia32 } */


Btw, all three variants run on i386.

Thanks,
Andreas



Re: [patch] testsuite enable PIE tests on FreeBSD

2015-05-21 Thread Andreas Tobler

On 20.05.15 22:30, Jeff Law wrote:

On 05/20/2015 11:04 AM, Andreas Tobler wrote:

Hi,

the attached patch enables some PIE tests on FreeBSD.

Ok for trunk?

Thanks,
Andreas

2015-05-20  Andreas Tobler  

  * 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.

Wouldn't it be better to remove the target selector and instead add:

/* { dg-require-effective-target pie } */

In each of those tests?

While the net effect is the same today, it means there's only one place
to change if another x86 target gains PIE support in the future.

Pre-approved using that style.


Thanks!

Tested on amd64-freebsd and CentOS.

Andreas


This is what I committed:

2015-05-21  Andreas Tobler  

* gcc.target/i386/pr32219-1.c: Use 'dg-require-effective-target pie'
instead of listing several targets on its own.
* 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.




Index: pr32219-1.c
===
--- pr32219-1.c (revision 223448)
+++ pr32219-1.c (working copy)
@@ -1,4 +1,5 @@
-/* { dg-do compile { target *-*-linux* } } */
+/* { dg-do compile } */
+/* { dg-require-effective-target pie } */
 /* { dg-options "-O2 -fpie" } */
 
 /* Initialized common symbol with -fpie.  */
Index: pr32219-2.c
===
--- pr32219-2.c (revision 223448)
+++ pr32219-2.c (working copy)
@@ -1,4 +1,5 @@
-/* { dg-do compile { target *-*-linux* } } */
+/* { dg-do compile } */
+/* { dg-require-effective-target pie } */
 /* { dg-options "-O2 -fpic" } */
 
 /* Common symbol with -fpic.  */
Index: pr32219-3.c
===
--- pr32219-3.c (revision 223448)
+++ pr32219-3.c (working copy)
@@ -1,4 +1,5 @@
-/* { dg-do compile { target *-*-linux* } } */
+/* { dg-do compile } */
+/* { dg-require-effective-target pie } */
 /* { dg-options "-O2 -fpie" } */
 
 /* Weak common symbol with -fpie.  */
Index: pr32219-4.c
===
--- pr32219-4.c (revision 223448)
+++ pr32219-4.c (working copy)
@@ -1,4 +1,5 @@
-/* { dg-do compile { target *-*-linux* } } */
+/* { dg-do compile } */
+/* { dg-require-effective-target pie } */
 /* { dg-options "-O2 -fpic" } */
 
 /* Weak common symbol with -fpic.  */
Index: pr32219-5.c
===
--- pr32219-5.c (revision 223448)
+++ pr32219-5.c (working copy)
@@ -1,4 +1,5 @@
-/* { dg-do compile { target *-*-linux* } } */
+/* { dg-do compile } */
+/* { dg-require-effective-target pie } */
 /* { dg-options "-O2 -fpie" } */
 
 /* Initialized symbol with -fpie.  */
Index: pr32219-6.c
===
--- pr32219-6.c (revision 223448)
+++ pr32219-6.c (working copy)
@@ -1,4 +1,5 @@
-/* { dg-do compile { target *-*-linux* } } */
+/* { dg-do compile } */
+/* { dg-require-effective-target pie } */
 /* { dg-options "-O2 -fpic" } */
 
 /* Initialized symbol with -fpic.  */
Index: pr32219-7.c
===
--- pr32219-7.c (revision 223448)
+++ pr32219-7.c (working copy)
@@ -1,4 +1,5 @@
-/* { dg-do compile { target *-*-linux* } } */
+/* { dg-do compile } */
+/* { dg-require-effective-target pie } */
 /* { dg-options "-O2 -fpie" } */
 
 /* Weak initialized symbol with -fpie.  */
Index: pr32219-8.c
===
--- pr32219-8.c (revision 223448)
+++ pr32219-8.c (working copy)
@@ -1,4 +1,5 @@
-/* { dg-do compile { target *-*-linux* } } */
+/* { dg-do compile } */
+/* { dg-require-effective-target pie } */
 /* { dg-options "-O2 -fpic" } */
 
 /* Weak initialized symbol with -fpic.  */
Index: pr39013-1.c
===
--- pr39013-1.c (revision 223448)
+++ pr39013-1.c (working copy)
@@ -1,5 +1,6 @@
 /* PR target/39013 */
-/* { dg-do compile { target *-*-linux* *-*-gnu* } } */
+/* { dg-do compile } */
+/* { dg-require-effective-target pie } */
 /* { dg-options "-O2 -fpie 

Re: [patch] testsuite enable PIE tests on FreeBSD

2015-05-20 Thread Jeff Law

On 05/20/2015 11:04 AM, Andreas Tobler wrote:

Hi,

the attached patch enables some PIE tests on FreeBSD.

Ok for trunk?

Thanks,
Andreas

2015-05-20  Andreas Tobler  

 * 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.

Wouldn't it be better to remove the target selector and instead add:

/* { dg-require-effective-target pie } */

In each of those tests?

While the net effect is the same today, it means there's only one place 
to change if another x86 target gains PIE support in the future.


Pre-approved using that style.
jeff



[patch] testsuite enable PIE tests on FreeBSD

2015-05-20 Thread Andreas Tobler

Hi,

the attached patch enables some PIE tests on FreeBSD.

Ok for trunk?

Thanks,
Andreas

2015-05-20  Andreas Tobler  

* 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.
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)
@@