Message ID | 8035A572-9078-46F4-9172-8CB269E1E854@comcast.net |
---|---|
State | New |
Headers | show |
On Sat, Jun 18, 2011 at 08:11:43AM -0700, Mike Stump wrote: > On Jun 17, 2011, at 7:49 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 with PR added to comment as requested? > > Jack > > ps This change also works for gcc-4_6-branch in concert with a backport of > > r175089 and r175108. > > > > 2011-06-17 Jack Howarth <howarth@bromo.med.uc.edu> > > > > PR target/49461 > > * libjava/configure.ac (SYSTEMSPEC): Pass -no_pie for darwin11. > > * libjava/configure: Regenerate. > > Checked in r175182, with one additional comment. We still welcome tracking down what exactly doesn't work and a bug report and fix for that, until then, I think life is too short to have java be broken for too long. > Mike, Also note Ian's comments on -fPIE/-pie in http://gcc.gnu.org/ml/gcc/2011-06/msg00215.html. Jack > 2011-06-17 Jack Howarth <howarth@bromo.med.uc.edu> > > PR target/49461 > * libjava/configure.ac (SYSTEMSPEC): Pass -no_pie for darwin11. > * libjava/configure: Regenerate. > > Index: configure.ac > =================================================================== > --- configure.ac (revision 175181) > +++ configure.ac (revision 175182) > @@ -898,9 +898,14 @@ case "${host}" in > SYSTEMSPEC="-lunicows $SYSTEMSPEC" > fi > ;; > - *-*-darwin[[912]]*) > + *-*-darwin9*) > SYSTEMSPEC="%{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}" > ;; > + *-*-darwin[[12]]*) > + # Something is incompatible with pie, would be nice to fix it and > + # remove -no_pie. PR49461 > + SYSTEMSPEC="-no_pie %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}" > + ;; > *) > SYSTEMSPEC= > ;;
On Jun 18, 2011, at 8:11 AM, Mike Stump wrote: > On Jun 17, 2011, at 7:49 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 with PR added to comment as requested? >> Jack >> ps This change also works for gcc-4_6-branch in concert with a backport of >> r175089 and r175108. >> >> 2011-06-17 Jack Howarth <howarth@bromo.med.uc.edu> >> >> PR target/49461 >> * libjava/configure.ac (SYSTEMSPEC): Pass -no_pie for darwin11. >> * libjava/configure: Regenerate. > > Checked in r175182, with one additional comment. We still welcome tracking down what exactly doesn't work and a bug report and fix for that, until then, I think life is too short to have java be broken for too long. Also backported for 4.6.1.
On Sun, Jun 19, 2011 at 11:15:11AM -0700, Mike Stump wrote: > On Jun 18, 2011, at 8:11 AM, Mike Stump wrote: > > On Jun 17, 2011, at 7:49 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 with PR added to comment as requested? > >> Jack > >> ps This change also works for gcc-4_6-branch in concert with a backport of > >> r175089 and r175108. > >> > >> 2011-06-17 Jack Howarth <howarth@bromo.med.uc.edu> > >> > >> PR target/49461 > >> * libjava/configure.ac (SYSTEMSPEC): Pass -no_pie for darwin11. > >> * libjava/configure: Regenerate. > > > > Checked in r175182, with one additional comment. We still welcome tracking down what exactly doesn't work and a bug report and fix for that, until then, I think life is too short to have java be broken for too long. > > Also backported for 4.6.1. Thanks. Can we get this on gcc 4.5.4 as well? Jack
On Jun 19, 2011, at 12:43 PM, Jack Howarth wrote:
> Thanks. Can we get this on gcc 4.5.4 as well?
As commented in the PR, I'd have to see a confirmation that the bug exists in gcc-4.5.x _and_ that the patch fixes it (with no regressions). That had been previously stated for gcc-4.6.x, which is why the backport to 4.6.x. Sorry in advance if it has already been stated, I might have missed it.
On Sun, Jun 19, 2011 at 02:40:59PM -0700, Mike Stump wrote: > On Jun 19, 2011, at 12:43 PM, Jack Howarth wrote: > > Thanks. Can we get this on gcc 4.5.4 as well? > > As commented in the PR, I'd have to see a confirmation that the bug exists in gcc-4.5.x _and_ that the patch fixes it (with no regressions). That had been previously stated for gcc-4.6.x, which is why the backport to 4.6.x. Sorry in advance if it has already been stated, I might have missed it. This is definitely a problem in current gcc-4_5-branch without the backport of the SYSTEMSPEC fix... [MacPro:~] howarth% gcj-fsf-4.5 --main=testme -O testme.java gcj-fsf-4.5: Internal error: Abort trap: 6 (program ecj1) Please submit a full bug report. See <http://gcc.gnu.org/bugs.html> for instructions. Jack
Index: configure.ac =================================================================== --- configure.ac (revision 175181) +++ configure.ac (revision 175182) @@ -898,9 +898,14 @@ case "${host}" in SYSTEMSPEC="-lunicows $SYSTEMSPEC" fi ;; - *-*-darwin[[912]]*) + *-*-darwin9*) SYSTEMSPEC="%{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}" ;; + *-*-darwin[[12]]*) + # Something is incompatible with pie, would be nice to fix it and + # remove -no_pie. PR49461 + SYSTEMSPEC="-no_pie %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}" + ;; *) SYSTEMSPEC= ;;