From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22124 invoked by alias); 18 Jun 2011 07:51:19 -0000 Received: (qmail 22108 invoked by uid 22791); 18 Jun 2011 07:51:18 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_40,RCVD_IN_DNSWL_NONE,TW_GC,TW_IB X-Spam-Check-By: sourceware.org Received: from c2bthomr10.btconnect.com (HELO mail.btconnect.com) (213.123.20.128) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 18 Jun 2011 07:51:03 +0000 Received: from host81-138-1-83.in-addr.btopenworld.com (EHLO thor.office) ([81.138.1.83]) by c2bthomr10.btconnect.com with ESMTP id DHU64319; Sat, 18 Jun 2011 08:51:01 +0100 (BST) Cc: Jack Howarth , gcc-patches List , Java Patches Message-Id: <9E917AE9-4F43-44E0-9599-C85AC4F284D9@sandoe-acoustics.co.uk> From: IainS To: Mike Stump In-Reply-To: <20110617192406.GA27136@bromo.med.uc.edu> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: [PATCH]: Pass -no_pie on SYSTEMSPEC for darwin11 Date: Sat, 18 Jun 2011 07:51:00 -0000 References: <20110617022132.GA18745@bromo.med.uc.edu> <197F8B25-DAB9-467F-A916-089A6EA5FC10@comcast.net> <20110617192406.GA27136@bromo.med.uc.edu> X-Mirapoint-IP-Reputation: reputation=Fair-1, source=Queried, refid=tid=0001.0A0B0303.4DFC58E4.001C, actions=tag X-Junkmail-Premium-Raw: score=7/50, refid=2.7.2:2011.6.18.63315:17:7.763, ip=81.138.1.83, rules=__HAS_MSGID, __SANE_MSGID, __MSGID_APPLEMAIL, FROM_NAME_ONE_WORD, __TO_MALFORMED_2, __CT, __CT_TEXT_PLAIN, __CTE, __MIME_VERSION, __MIME_VERSION_APPLEMAIL, __BOUNCE_CHALLENGE_SUBJ, __BOUNCE_NDR_SUBJ_EXEMPT, __SUBJ_ALPHA_END, __HAS_X_MAILER, __X_MAILER_APPLEMAIL, __ANY_URI, __URI_NO_MAILTO, __URI_NO_WWW, __URI_NO_PATH, BODY_SIZE_3000_3999, __MIME_TEXT_ONLY, RDNS_GENERIC_POOLED, BODY_SIZE_5000_LESS, RDNS_SUSP_GENERIC, __USER_AGENT_APPLEMAIL, RDNS_SUSP, BODY_SIZE_7000_LESS X-Junkmail-Signature-Raw: score=unknown, refid=str=0001.0A0B0207.4DFC58E5.0063,ss=1,fgs=0, ip=0.0.0.0, so=2010-07-22 22:03:31, dmn=2009-09-10 00:05:08, mode=multiengine Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org X-SW-Source: 2011-q2/txt/msg00078.txt.bz2 Hi Mike, Jack, On 17 Jun 2011, at 20:24, Jack Howarth wrote: > On Fri, Jun 17, 2011 at 10:43:07AM -0700, Mike Stump wrote: >> On Jun 16, 2011, at 7:21 PM, Jack Howarth wrote: >>> The gcj compiler needs to pass -no_pie for linkage on darwin11 due >>> to the new -pie >>> default of the linker. The attached patch accomplishes this by >>> passing -no_pie on SYSTEMSPEC >>> for *-*-darwin[12]*. Since Darwin10 supports -no_pie in its >>> linker, I included it in the >>> triplet match to simplify the syntax. Bootstrap and tested on >>> x86_64-apple-darwin11. >>> Okay for gcc trunk? >> >> The darwin aspects of this seem right to me. I'm less familiar >> with the SYSTEMSPEC bit in libjava, someone want to give a quick >> comment on if this is the right knob to twist? > > Since SYSTEMSPEC in configure.ac is setting system specific > options for libgcj.spec.in, it seemed > the most rational place to append -no_pie to (and we already had a > darwin entry in the case statement). > FYI, I also tried a different approach of not appending -no_pie > SYSTEMSPEC on darwin but instead using... maybe I need more coffee .. and the gcc gathering was very sociable... but... ... It seems to me that switching pie off in libjava spec == switching pie off for every java program. (i.e. it doesn't seem equivalent to BOOT_CFLAGS, but maybe I'm still missing something). >> Roughly, there are unresolved issues with position independent code >> with the garbage collector (or was it a problem with some unknown >> bit in the compiler), and this just turns off a new OS default for >> java to work around the issue. I hope that's an at least half way >> accurate description. We're aiming to have the default for C be - >> fpie, but for java, no pie. For the C compiler, we must build the >> compiler without -pie in order for PCH to work. It is reasonable >> to turn off pie in the java compiler as well. >> >> Jack, do we have a PR number for this? If so, please include in >> the changelog in the usual spot. > > I plan on opening a PR shortly, but I was hoping to be able to > reproduce the same failures under linux > using a bootstrap with the compiler defaulted to -fPIC code > generation and the inverse change applied > to linux of... The thing that is not clear is this. libjava (and boehm-gc) with pie passes on d9 and d10 (modulo a test- suite related kludge); so it doesn't seem that there's a fundamental problem. (c.f. PCH, which won't work with pie, by definition from its design). AFAIR ecj1 is not involved in the libjava tests - because they don't actually compile from .java. (I'm not debating that there is a problem with ecj1 - but maybe that needs to be solved in the explicit build instructions for that executable). ---- So is this 'fix' a work-around for a tool bug... or is there really a lurking problem in boehm-gc/libjava that is uncovered by darwin11? we seem to be switching off pie without actually pointing at the reason for doing so... Iain