Patchwork fix libgomp.c++/pr24455.C failures on darwin

login
register
mail settings
Submitter Jack Howarth
Date Nov. 5, 2012, 8:40 p.m.
Message ID <20121105204034.GA4020@bromo.med.uc.edu>
Download mbox | patch
Permalink /patch/197305/
State New
Headers show

Comments

Jack Howarth - Nov. 5, 2012, 8:40 p.m.
Currently the following testcases are failing on x86_64-apple-darwin11/12...

FAIL: libgomp.c++/pr24455.C  -O0  (test for excess errors)
WARNING: libgomp.c++/pr24455.C  -O0  compilation failed to produce executable
FAIL: libgomp.c++/pr24455.C  -O1  (test for excess errors)
WARNING: libgomp.c++/pr24455.C  -O1  compilation failed to produce executable
FAIL: libgomp.c++/pr24455.C  -O2  (test for excess errors)
WARNING: libgomp.c++/pr24455.C  -O2  compilation failed to produce executable
FAIL: libgomp.c++/pr24455.C  -O3 -fomit-frame-pointer  (test for excess errors)
WARNING: libgomp.c++/pr24455.C  -O3 -fomit-frame-pointer  compilation failed to produce executable
FAIL: libgomp.c++/pr24455.C  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
WARNING: libgomp.c++/pr24455.C  -O3 -fomit-frame-pointer -funroll-loops  compilation failed to produce executable
FAIL: libgomp.c++/pr24455.C  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)
WARNING: libgomp.c++/pr24455.C  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  compilation failed to produce executable
FAIL: libgomp.c++/pr24455.C  -O3 -g  (test for excess errors)
WARNING: libgomp.c++/pr24455.C  -O3 -g  compilation failed to produce executable
FAIL: libgomp.c++/pr24455.C  -Os  (test for excess errors)
WARNING: libgomp.c++/pr24455.C  -Os  compilation failed to produce executable
FAIL: libgomp.c++/tls-init1.C  -O  (test for excess errors)
WARNING: libgomp.c++/tls-init1.C  -O  compilation failed to produce executable

These can be fixed for darwin by passing -Wl,-undefined,dynamic_lookup on dg-options as has been
recommended by the darwin linker maintainer. Note that this should work for Xcode 3.2.6 and Xcode 4.4.1
and later. Between Xcode 4.2 and 4.4.0, radr://10466868, "-undefined dynamic_lookup linker bug", broke
weak symbol dynamic lookup in the linker. Tested on x86_64-apple-darwin12. Okay for gcc trunk?
                     Jack

libgomp/

2012-11-05  Jack Howarth <howarth@bromo.med.uc.edu>

	* testsuite/libgomp.c++/pr24455.C: Use -Wl,-undefined,dynamic_lookup on darwin.
Mike Stump - Nov. 6, 2012, 2:06 a.m.
On Nov 5, 2012, at 12:40 PM, Jack Howarth <howarth@bromo.med.uc.edu> wrote:
> These can be fixed for darwin by passing -Wl,-undefined,dynamic_lookup on dg-options as has been
> recommended by the darwin linker maintainer.

> Okay for gcc trunk?

Ok.

Patch

Index: libgomp/testsuite/libgomp.c++/pr24455.C
===================================================================
--- libgomp/testsuite/libgomp.c++/pr24455.C	(revision 193168)
+++ libgomp/testsuite/libgomp.c++/pr24455.C	(working copy)
@@ -1,6 +1,7 @@ 
 // { dg-do run }
 // { dg-additional-sources pr24455-1.C }
 // { dg-require-effective-target tls_runtime }
+// { dg-options "-Wl,-undefined,dynamic_lookup" { target *-*-darwin* } }
 
 extern "C" void abort (void);