* [PATCH][Revised] Pass -no_pie on SYSTEMSPEC for darwin11
@ 2011-06-18 5:52 Jack Howarth
2011-06-18 14:53 ` Mike Stump
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Jack Howarth @ 2011-06-18 5:52 UTC (permalink / raw)
To: gcc-patches; +Cc: mikestump, iains
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.
Index: libjava/configure.ac
===================================================================
--- libjava/configure.ac (revision 175131)
+++ libjava/configure.ac (working copy)
@@ -898,9 +898,12 @@ case "${host}" in
SYSTEMSPEC="-lunicows $SYSTEMSPEC"
fi
;;
- *-*-darwin[[912]]*)
+ *-*-darwin9*)
SYSTEMSPEC="%{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
;;
+ *-*-darwin[[12]]*)
+ SYSTEMSPEC="-no_pie %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
+ ;;
*)
SYSTEMSPEC=
;;
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][Revised] Pass -no_pie on SYSTEMSPEC for darwin11
2011-06-18 5:52 [PATCH][Revised] Pass -no_pie on SYSTEMSPEC for darwin11 Jack Howarth
@ 2011-06-18 14:53 ` Mike Stump
2011-06-18 19:02 ` Jack Howarth
2011-06-18 15:28 ` Mike Stump
2011-06-18 15:32 ` Mike Stump
2 siblings, 1 reply; 11+ messages in thread
From: Mike Stump @ 2011-06-18 14:53 UTC (permalink / raw)
To: Jack Howarth; +Cc: gcc-patches, iains
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?
> ps This change also works for gcc-4_6-branch in concert with a backport of
> r175089 and r175108.
I've backported these two to the gcc-4_6-branch. I tried 4.5, but, they'd need to have mh-darwin backported, so I didn't bother.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][Revised] Pass -no_pie on SYSTEMSPEC for darwin11
2011-06-18 5:52 [PATCH][Revised] Pass -no_pie on SYSTEMSPEC for darwin11 Jack Howarth
2011-06-18 14:53 ` Mike Stump
@ 2011-06-18 15:28 ` Mike Stump
2011-06-18 15:32 ` Mike Stump
2 siblings, 0 replies; 11+ messages in thread
From: Mike Stump @ 2011-06-18 15:28 UTC (permalink / raw)
To: Jack Howarth; +Cc: gcc-patches, iains
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?
I've had a chance to review this more in-depth...
Ok.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][Revised] Pass -no_pie on SYSTEMSPEC for darwin11
2011-06-18 5:52 [PATCH][Revised] Pass -no_pie on SYSTEMSPEC for darwin11 Jack Howarth
2011-06-18 14:53 ` Mike Stump
2011-06-18 15:28 ` Mike Stump
@ 2011-06-18 15:32 ` Mike Stump
2011-06-18 15:33 ` Jack Howarth
2011-06-19 18:20 ` Mike Stump
2 siblings, 2 replies; 11+ messages in thread
From: Mike Stump @ 2011-06-18 15:32 UTC (permalink / raw)
To: Jack Howarth; +Cc: gcc-patches, iains
[-- Attachment #1: Type: text/plain, Size: 1008 bytes --]
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.
[-- Attachment #2: libjava.patch.txt --]
[-- Type: text/plain, Size: 801 bytes --]
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=
;;
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][Revised] Pass -no_pie on SYSTEMSPEC for darwin11
2011-06-18 15:32 ` Mike Stump
@ 2011-06-18 15:33 ` Jack Howarth
2011-06-19 18:20 ` Mike Stump
1 sibling, 0 replies; 11+ messages in thread
From: Jack Howarth @ 2011-06-18 15:33 UTC (permalink / raw)
To: Mike Stump; +Cc: gcc-patches, iains
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=
> ;;
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][Revised] Pass -no_pie on SYSTEMSPEC for darwin11
2011-06-18 14:53 ` Mike Stump
@ 2011-06-18 19:02 ` Jack Howarth
0 siblings, 0 replies; 11+ messages in thread
From: Jack Howarth @ 2011-06-18 19:02 UTC (permalink / raw)
To: Mike Stump; +Cc: gcc-patches, iains
On Sat, Jun 18, 2011 at 07:48:51AM -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?
>
> > ps This change also works for gcc-4_6-branch in concert with a backport of
> > r175089 and r175108.
>
> I've backported these two to the gcc-4_6-branch. I tried 4.5, but, they'd need to have mh-darwin backported, so I didn't bother.
Mike,
We might just create a mh-x86-darwin for gcc 4.5. Currently dragonegg only supports that FSF gcc release
so it would be nice to have a clean bootstrap on darwin11 to support that option.
Jack
ps FYI, I am only suggesting we populate mh-x86-darwin with...
# Ensure we don't try and use -pie, as it is incompatible with pch.
BOOT_LDFLAGS += `case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; esac;`
and skip the...
BOOT_CFLAGS += -mdynamic-no-pic
bit.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][Revised] Pass -no_pie on SYSTEMSPEC for darwin11
2011-06-18 15:32 ` Mike Stump
2011-06-18 15:33 ` Jack Howarth
@ 2011-06-19 18:20 ` Mike Stump
2011-06-19 20:18 ` Jack Howarth
1 sibling, 1 reply; 11+ messages in thread
From: Mike Stump @ 2011-06-19 18:20 UTC (permalink / raw)
To: gcc-patches@gcc.gnu.org List; +Cc: Jack Howarth, Iain Sandoe
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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][Revised] Pass -no_pie on SYSTEMSPEC for darwin11
2011-06-19 18:20 ` Mike Stump
@ 2011-06-19 20:18 ` Jack Howarth
2011-06-19 23:20 ` Mike Stump
0 siblings, 1 reply; 11+ messages in thread
From: Jack Howarth @ 2011-06-19 20:18 UTC (permalink / raw)
To: Mike Stump; +Cc: gcc-patches@gcc.gnu.org List, Iain Sandoe
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][Revised] Pass -no_pie on SYSTEMSPEC for darwin11
2011-06-19 20:18 ` Jack Howarth
@ 2011-06-19 23:20 ` Mike Stump
2011-06-19 23:33 ` Jack Howarth
0 siblings, 1 reply; 11+ messages in thread
From: Mike Stump @ 2011-06-19 23:20 UTC (permalink / raw)
To: Jack Howarth; +Cc: gcc-patches@gcc.gnu.org List, Iain Sandoe
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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][Revised] Pass -no_pie on SYSTEMSPEC for darwin11
2011-06-19 23:20 ` Mike Stump
@ 2011-06-19 23:33 ` Jack Howarth
[not found] ` <47DFC4C2-9E8E-40BD-BA97-2314A8263A68@comcast.net>
0 siblings, 1 reply; 11+ messages in thread
From: Jack Howarth @ 2011-06-19 23:33 UTC (permalink / raw)
To: Mike Stump; +Cc: gcc-patches@gcc.gnu.org List, Iain Sandoe
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][Revised] Pass -no_pie on SYSTEMSPEC for darwin11
[not found] ` <20110619235544.GA32119@bromo.med.uc.edu>
@ 2011-06-30 16:40 ` Mike Stump
0 siblings, 0 replies; 11+ messages in thread
From: Mike Stump @ 2011-06-30 16:40 UTC (permalink / raw)
To: Jack Howarth; +Cc: GCC Patches
[-- Attachment #1: Type: text/plain, Size: 505 bytes --]
On Jun 19, 2011, at 4:55 PM, Jack Howarth wrote:
>>> This is definitely a problem in current gcc-4_5-branch without the backport of the SYSTEMSPEC fix...
>>
>> Excellent... and does the patch fix it?
>
> Yes...
Ok, applied to the 4.5 branch. Scream loud and soon if for any reason you notice anything that isn't release quality. I think we have enough bake time on 4.6 and mainline to avoid any downsides, but, also nice to be careful with the release branches. Thanks for all your help.
[-- Attachment #2: libjava.patch.txt --]
[-- Type: text/plain, Size: 1706 bytes --]
Index: configure.ac
===================================================================
--- configure.ac (revision 175709)
+++ configure.ac (working copy)
@@ -882,8 +882,13 @@ case "${host}" in
SYSTEMSPEC="-lunicows $SYSTEMSPEC"
fi
;;
- *-*-darwin[[912]]*)
- SYSTEMSPEC="-allow_stack_execute"
+ *-*-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=
Index: ChangeLog
===================================================================
--- ChangeLog (revision 175709)
+++ ChangeLog (working copy)
@@ -1,3 +1,9 @@
+2011-06-30 Jack Howarth <howarth@bromo.med.uc.edu>
+
+ PR target/49461
+ * libjava/configure.ac (SYSTEMSPEC): Pass -no_pie for darwin11.
+ * libjava/configure: Regenerate.
+
2011-04-28 Release Manager
* GCC 4.5.3 released.
Index: configure
===================================================================
--- configure (revision 175709)
+++ configure (working copy)
@@ -19754,8 +19754,13 @@ case "${host}" in
SYSTEMSPEC="-lunicows $SYSTEMSPEC"
fi
;;
- *-*-darwin[912]*)
- SYSTEMSPEC="-allow_stack_execute"
+ *-*-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=
[-- Attachment #3: Type: text/plain, Size: 1 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-06-30 16:25 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-18 5:52 [PATCH][Revised] Pass -no_pie on SYSTEMSPEC for darwin11 Jack Howarth
2011-06-18 14:53 ` Mike Stump
2011-06-18 19:02 ` Jack Howarth
2011-06-18 15:28 ` Mike Stump
2011-06-18 15:32 ` Mike Stump
2011-06-18 15:33 ` Jack Howarth
2011-06-19 18:20 ` Mike Stump
2011-06-19 20:18 ` Jack Howarth
2011-06-19 23:20 ` Mike Stump
2011-06-19 23:33 ` Jack Howarth
[not found] ` <47DFC4C2-9E8E-40BD-BA97-2314A8263A68@comcast.net>
[not found] ` <20110619235544.GA32119@bromo.med.uc.edu>
2011-06-30 16:40 ` Mike Stump
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).