public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jack Howarth <howarth@bromo.med.uc.edu>
To: gcc-patches@gcc.gnu.org
Cc: mikestump@comcast.net, iains@gcc.gnu.org
Subject: [PATCH] gcc.dg/20020312-2.c: pass -Wl,-no_pie for darwin11
Date: Fri, 08 Jul 2011 12:56:00 -0000	[thread overview]
Message-ID: <20110708125445.GA31841@bromo.med.uc.edu> (raw)

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

                 reply	other threads:[~2011-07-08 12:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110708125445.GA31841@bromo.med.uc.edu \
    --to=howarth@bromo.med.uc.edu \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iains@gcc.gnu.org \
    --cc=mikestump@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).