Patchwork fix gcc.dg/torture/pr53922.c on darwin

login
register
mail settings
Submitter Jack Howarth
Date Sept. 23, 2012, 1:33 a.m.
Message ID <20120923013309.GA11823@bromo.med.uc.edu>
Download mbox | patch
Permalink /patch/186175/
State New
Headers show

Comments

Jack Howarth - Sept. 23, 2012, 1:33 a.m.
The attached patch eliminates the failures in linkage of the new
gcc.dg/torture/pr53922.c testcase on darwin by passing -Wl,-undefined,dynamic_lookup
to the linker as recommended by the darwin linker developer...

http://gcc.gnu.org/ml/gcc-bugs/2012-09/msg01802.html

Tested on x86_64-apple-darwin11. Okay for gcc trunk and 4.7?
                Jack

2012-09-22  Jack Howarth <howarth@bromo.med.uc.edu>

	gcc.dg/torture/pr53922.c: Use -Wl,-undefined,dynamic_lookup on darwin.
Richard Guenther - Sept. 24, 2012, 9 a.m.
On Sat, 22 Sep 2012, Jack Howarth wrote:

>    The attached patch eliminates the failures in linkage of the new
> gcc.dg/torture/pr53922.c testcase on darwin by passing -Wl,-undefined,dynamic_lookup
> to the linker as recommended by the darwin linker developer...
> 
> http://gcc.gnu.org/ml/gcc-bugs/2012-09/msg01802.html
> 
> Tested on x86_64-apple-darwin11. Okay for gcc trunk and 4.7?

Ok.

Thanks,
Richard.

>                 Jack
> 
> 2012-09-22  Jack Howarth <howarth@bromo.med.uc.edu>
> 
> 	gcc.dg/torture/pr53922.c: Use -Wl,-undefined,dynamic_lookup on darwin.
> 
> Index: gcc/testsuite/gcc.dg/torture/pr53922.c
> ===================================================================
> --- gcc/testsuite/gcc.dg/torture/pr53922.c	(revision 191648)
> +++ gcc/testsuite/gcc.dg/torture/pr53922.c	(working copy)
> @@ -1,5 +1,6 @@
>  /* { dg-do run } */
>  /* { dg-require-weak "" } */
> +/* { dg-options "-Wl,-undefined,dynamic_lookup" { target *-*-darwin* } } */
>  
>  int x(int a)
>  {
>

Patch

Index: gcc/testsuite/gcc.dg/torture/pr53922.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/pr53922.c	(revision 191648)
+++ gcc/testsuite/gcc.dg/torture/pr53922.c	(working copy)
@@ -1,5 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-require-weak "" } */
+/* { dg-options "-Wl,-undefined,dynamic_lookup" { target *-*-darwin* } } */
 
 int x(int a)
 {