This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] gcc.dg/20020312-2.c: pass -Wl,-no_pie for darwin11
- From: Jack Howarth <howarth at bromo dot med dot uc dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Cc: mikestump at comcast dot net, iains at gcc dot gnu dot org
- Date: Fri, 8 Jul 2011 08:54:45 -0400
- Subject: [PATCH] gcc.dg/20020312-2.c: pass -Wl,-no_pie for darwin11
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 <howarth@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);