From patchwork Sun Dec 4 19:00:20 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jack Howarth X-Patchwork-Id: 129190 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 A4C431007D5 for ; Mon, 5 Dec 2011 06:00:41 +1100 (EST) Received: (qmail 27973 invoked by alias); 4 Dec 2011 19:00:39 -0000 Received: (qmail 27957 invoked by uid 22791); 4 Dec 2011 19:00:38 -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; Sun, 04 Dec 2011 19:00:22 +0000 Received: from bromo.med.uc.edu (localhost.localdomain [127.0.0.1]) by bromo.med.uc.edu (Postfix) with ESMTP id 2242BB005D; Sun, 4 Dec 2011 14:00:21 -0500 (EST) Received: (from howarth@localhost) by bromo.med.uc.edu (8.14.3/8.14.3/Submit) id pB4J0KCC004904; Sun, 4 Dec 2011 14:00:20 -0500 Date: Sun, 4 Dec 2011 14:00:20 -0500 From: Jack Howarth To: Mike Stump Cc: "gcc-patches@gcc.gnu.org" , "iains@gcc.gnu.org" Subject: Re: [PATCH] pass -no_pie to LINK_GCC_C_SEQUENCE_SPEC on darwin Message-ID: <20111204190020.GA4873@bromo.med.uc.edu> References: <20111203152523.GA9331@bromo.med.uc.edu> <263C7904-6444-4674-97C7-0E9F88445C7F@comcast.net> <20111204170906.GA4362@bromo.med.uc.edu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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 On Sun, Dec 04, 2011 at 09:28:55AM -0800, Mike Stump wrote: > On Dec 4, 2011, at 9:09 AM, Jack Howarth wrote: > > On Sat, Dec 03, 2011 at 10:45:18PM -0800, Mike Stump wrote: > >> On Dec 3, 2011, at 7:25 AM, Jack Howarth wrote: > >>> FSF gcc currently doesn't handle -fno-pie and friends properly under Lion. > >>> The darwin11 linker now defaults to -pie > >> > >>> Okay for gcc trunk and backports to gcc-4_5-branch/gcc-4_6-branch? > >> > >> Ok. > > > > Mike, > > Thanks for the commit. This leaves us with the boehm-gc testsuite failures... > > > > 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 > > > > at -m32/-m64 on x86_64-apple-darwin11 due to the -pie linker default. Iain had wanted > > to leave these in place to encourage boehm-gc to be fixed but I doubt that is a realistic > > goal in the near/middle term. Perhaps we could patch boehm-gc/testsuite/lib/boehm-gc.exp > > to pass -fno-pie on darwin (now that it is functional)? > > I think we should just find a way to add -fno-pie... Are there any flags that are added because we are doing gc that we can key off of? Mike, The simple approach would be... which yields... === boehm-gc tests === Schedule of variations: unix/-m32 unix/-m64 Running target unix/-m32 Using /sw/share/dejagnu/baseboards/unix.exp as board description file for target. Using /sw/share/dejagnu/config/unix.exp as generic interface file for target. Using /sw/src/fink.build/gcc47-4.7.0-1/gcc-4.7-20111202/boehm-gc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /sw/src/fink.build/gcc47-4.7.0-1/gcc-4.7-20111202/boehm-gc/testsuite/boehm-gc.c/c.exp ... Running /sw/src/fink.build/gcc47-4.7.0-1/gcc-4.7-20111202/boehm-gc/testsuite/boehm-gc.lib/lib.exp ... === boehm-gc Summary for unix/-m32 === # of expected passes 12 # of unsupported tests 1 Running target unix/-m64 Using /sw/share/dejagnu/baseboards/unix.exp as board description file for target. Using /sw/share/dejagnu/config/unix.exp as generic interface file for target. Using /sw/src/fink.build/gcc47-4.7.0-1/gcc-4.7-20111202/boehm-gc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /sw/src/fink.build/gcc47-4.7.0-1/gcc-4.7-20111202/boehm-gc/testsuite/boehm-gc.c/c.exp ... Running /sw/src/fink.build/gcc47-4.7.0-1/gcc-4.7-20111202/boehm-gc/testsuite/boehm-gc.lib/lib.exp ... === boehm-gc Summary for unix/-m64 === # of expected passes 12 # of unsupported tests 1 === boehm-gc Summary === # of expected passes 24 # of unsupported tests 2 I would argue that this is useful in that it reminds the developers that boehm-gc isn't PIE friendly and needs to be fixed. Jack Index: boehm-gc/testsuite/boehm-gc.c/c.exp =================================================================== --- boehm-gc/testsuite/boehm-gc.c/c.exp (revision 181993) +++ boehm-gc/testsuite/boehm-gc.c/c.exp (working copy) @@ -17,6 +17,6 @@ dg-init boehm-gc-init -boehm-gc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c]] "-O2" "" +boehm-gc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c]] "-O2 -fno-pie" "" dg-finish Index: boehm-gc/testsuite/boehm-gc.lib/lib.exp =================================================================== --- boehm-gc/testsuite/boehm-gc.lib/lib.exp (revision 181993) +++ boehm-gc/testsuite/boehm-gc.lib/lib.exp (working copy) @@ -21,6 +21,6 @@ boehm-gc-init set tests [lsort [glob -nocomplain $srcdir/$subdir/*.c]] set tests [prune $tests $srcdir/$subdir/*lib.c] -boehm-gc-dg-runtest $tests "-O2" "" +boehm-gc-dg-runtest $tests "-O2 -fno-pie" "" dg-finish