public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] gcc.dg/20020312-2.c: pass -Wl,-no_pie for darwin11
@ 2011-07-08 12:56 Jack Howarth
  0 siblings, 0 replies; only message in thread
From: Jack Howarth @ 2011-07-08 12:56 UTC (permalink / raw)
  To: gcc-patches; +Cc: mikestump, iains

   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);
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-07-08 12:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-08 12:56 [PATCH] gcc.dg/20020312-2.c: pass -Wl,-no_pie for darwin11 Jack Howarth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).