Currently the gcc.dg/20020312-2.c testcase fails on darwin11 with... FAIL: gcc.dg/20020312-2.c (test for excess errors)
at -m32 due to the fact that the absolute addressing (-mdynamic-no-pic) is not allowed with the default -pie linkage of darwin11 and later which produces a warning. The attached patch solves this by passing -Wl,-no_pie for darwin10 and later. This form of the target match was selected because the linker in darwin9 and earlier doesn't understand -no_pie. Tested on x86_64-apple-darwin10/11. Okay for gcc trunk and gcc-4_6-branch/gcc-4_5-branch/gcc-4_4-branch? Jack 2011-07-08 Jack Howarth <howa...@bromo.med.uc.edu> * gcc.dg/20020312-2.c: Pass -Wl,-no_pie at -m32 for darwin10 and later. Index: gcc.dg/20020312-2.c =================================================================== --- gcc.dg/20020312-2.c (revision 176025) +++ gcc.dg/20020312-2.c (working copy) @@ -7,6 +7,7 @@ /* { dg-do run } */ /* { dg-options "-O -fno-pic" } */ +/* { dg-options "-O -fno-pic -Wl,-no_pie" { target { { i?86-*-darwin1* x86_64-*-darwin1* } && ilp32 } } } */ extern void abort (void);