From patchwork Thu Dec 8 15:38:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jack Howarth X-Patchwork-Id: 130187 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 CD2701007D1 for ; Fri, 9 Dec 2011 02:39:28 +1100 (EST) Received: (qmail 17252 invoked by alias); 8 Dec 2011 15:39:22 -0000 Received: (qmail 16858 invoked by uid 22791); 8 Dec 2011 15:39:19 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL, BAYES_00, 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; Thu, 08 Dec 2011 15:38:57 +0000 Received: from bromo.med.uc.edu (localhost.localdomain [127.0.0.1]) by bromo.med.uc.edu (Postfix) with ESMTP id 3E817B005D; Thu, 8 Dec 2011 10:38:56 -0500 (EST) Received: (from howarth@localhost) by bromo.med.uc.edu (8.14.3/8.14.3/Submit) id pB8FctXW008680; Thu, 8 Dec 2011 10:38:55 -0500 Date: Thu, 8 Dec 2011 10:38:55 -0500 From: Jack Howarth To: gcc-patches@gcc.gnu.org Cc: mikestump@comcast.net, iains@gcc.gnu.org, hboehm@gcc.gnu.org Subject: [PATCH] use -fno-pie on darwin in boehm-gc.exp Message-ID: <20111208153855.GA8678@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 boehm-gc testsuite fails... FAIL: boehm-gc.c/gctest.c -O2 execution test FAIL: boehm-gc.c/leak_test.c -O2 execution test FAIL: boehm-gc.c/thread_leak_test.c -O2 execution test FAIL: boehm-gc.lib/staticrootstest.c -O2 execution test on x86_64-apple-darwin11 due to the -pie linker default. The attached patch uses -fno-pie on darwin to insure that -no_pie is passed to the linker when targeting darwin11 or later. This approach is used because istarget doesn't support complex regex to allow -Wl,-no_pie to be passed for darwin11 and later only (since only recent Xcode releases understand the -no_pie linker option). Also, -fno_pie has the advantage of supporting -mmacosx-version-min usage. Regression tested on x86_64-apple-darwin11... http://gcc.gnu.org/ml/gcc-testresults/2011-12/msg00856.html Okay for gcc trunk? Jack boehm-gc/ 2011-12-08 Jack Howarth * testsuite/lib/boehm-gc.exp: Use -fno-pie on darwin. Index: boehm-gc/testsuite/lib/boehm-gc.exp =================================================================== --- boehm-gc/testsuite/lib/boehm-gc.exp (revision 182117) +++ boehm-gc/testsuite/lib/boehm-gc.exp (working copy) @@ -214,6 +214,11 @@ proc boehm-gc_target_compile { source de lappend options "additional_flags=-I${gc_include} -I${srcdir}/../include" lappend options "additional_flags=${threadcflags}" + # Disable -pie linker default for darwin11 and later using -fno-pie. + if { [istarget *-*-darwin*] } { + lappend options "additional_flags=-fno-pie" + } + lappend options "libs=-Wc,-shared-libgcc" if { [file extension $dest] == ".la" } {