From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9193 invoked by alias); 17 Jun 2011 17:43:29 -0000 Received: (qmail 9165 invoked by uid 22791); 17 Jun 2011 17:43:26 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RFC_ABUSE_POST,TW_GC,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from qmta07.emeryville.ca.mail.comcast.net (HELO qmta07.emeryville.ca.mail.comcast.net) (76.96.30.64) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 17 Jun 2011 17:43:09 +0000 Received: from omta17.emeryville.ca.mail.comcast.net ([76.96.30.73]) by qmta07.emeryville.ca.mail.comcast.net with comcast id x5Jt1g0011afHeLA75j78Z; Fri, 17 Jun 2011 17:43:07 +0000 Received: from up.mrs.kithrup.com ([24.4.193.8]) by omta17.emeryville.ca.mail.comcast.net with comcast id x5lX1g01M0BKwT48d5lY0c; Fri, 17 Jun 2011 17:45:33 +0000 Subject: Re: [PATCH]: Pass -no_pie on SYSTEMSPEC for darwin11 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Mike Stump In-Reply-To: <20110617022132.GA18745@bromo.med.uc.edu> Date: Fri, 17 Jun 2011 17:43:00 -0000 Cc: gcc-patches List , Iain Sandoe , Java Patches Content-Transfer-Encoding: quoted-printable Message-Id: <197F8B25-DAB9-467F-A916-089A6EA5FC10@comcast.net> References: <20110617022132.GA18745@bromo.med.uc.edu> To: Jack Howarth 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/msg00075.txt.bz2 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 th= e new -pie > default of the linker. The attached patch accomplishes this by passing -n= o_pie on SYSTEMSPEC > for *-*-darwin[12]*. Since Darwin10 supports -no_pie in its linker, I inc= luded it in the > triplet match to simplify the syntax. Bootstrap and tested on x86_64-appl= e-darwin11. > Okay for gcc trunk? The darwin aspects of this seem right to me. I'm less familiar with the SY= STEMSPEC bit in libjava, someone want to give a quick comment on if this is= the right knob to twist? Roughly, there are unresolved issues with position independent code with th= e garbage collector (or was it a problem with some unknown bit in the compi= ler), 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 aim= ing to have the default for C be -fpie, but for java, no pie. For the C co= mpiler, 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 change= log in the usual spot. > 2011-06-16 Jack Howarth >=20 > * libjava/configure.ac (SYSTEMSPEC): Pass -no_pie for darwin11. > * libjava/configure: Regenerate. >=20 >=20 > Index: libjava/configure.ac > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- libjava/configure.ac (revision 175131) > +++ libjava/configure.ac (working copy) > @@ -898,9 +898,12 @@ case "${host}" in > SYSTEMSPEC=3D"-lunicows $SYSTEMSPEC" > fi > ;; > - *-*-darwin[[912]]*) > + *-*-darwin9*) > SYSTEMSPEC=3D"%{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}" > ;; > + *-*-darwin[[12]]*) > + SYSTEMSPEC=3D"-no_pie %{!Zdynamiclib:%{!Zbundle:-allow_stack_execu= te}}" > + ;; > *) > SYSTEMSPEC=3D > ;;