From patchwork Sun Sep 23 01:33:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: fix gcc.dg/torture/pr53922.c on darwin From: Jack Howarth X-Patchwork-Id: 186175 Message-Id: <20120923013309.GA11823@bromo.med.uc.edu> To: gcc-patches@gcc.gnu.org Cc: mikestump@comcast.net, rguenther@suse.de Date: Sat, 22 Sep 2012 21:33:09 -0400 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 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) {