From patchwork Fri Jul 8 12:54:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jack Howarth X-Patchwork-Id: 103834 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 59576B6F68 for ; Fri, 8 Jul 2011 22:55:08 +1000 (EST) Received: (qmail 15711 invoked by alias); 8 Jul 2011 12:55:06 -0000 Received: (qmail 15698 invoked by uid 22791); 8 Jul 2011 12:55:04 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from bromo.med.uc.edu (HELO bromo.med.uc.edu) (129.137.3.146) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Fri, 08 Jul 2011 12:54:46 +0000 Received: from bromo.med.uc.edu (localhost.localdomain [127.0.0.1]) by bromo.med.uc.edu (Postfix) with ESMTP id BB5C6B004B; Fri, 8 Jul 2011 08:54:45 -0400 (EDT) Received: (from howarth@localhost) by bromo.med.uc.edu (8.14.3/8.14.3/Submit) id p68Csjp3031843; Fri, 8 Jul 2011 08:54:45 -0400 Date: Fri, 8 Jul 2011 08:54:45 -0400 From: Jack Howarth 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 Message-ID: <20110708125445.GA31841@bromo.med.uc.edu> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 * 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);