diff mbox

Turn on -pie on darwin11 and later

Message ID D4EDAB57-D4EA-49C4-B95D-8903918F4550@comcast.net
State New
Headers show

Commit Message

Mike Stump June 16, 2011, 7:22 p.m. UTC
On Jun 16, 2011, at 5:01 AM, Pedro Alves wrote:
> On Thursday 16 June 2011 02:33:50, Mike Stump wrote:
>> BOOT_CFLAGS += -mdynamic-no-pic
>> +
>> +# 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;`
> 
> Shouldn't this use += like BOOT_CFLAGS?

Yes, fixed.  Thanks for the review.

Comments

Mike Stump June 19, 2011, 6:20 p.m. UTC | #1
On Jun 16, 2011, at 12:22 PM, Mike Stump wrote:
> On Jun 16, 2011, at 5:01 AM, Pedro Alves wrote:
>> On Thursday 16 June 2011 02:33:50, Mike Stump wrote:
>>> BOOT_CFLAGS += -mdynamic-no-pic
>>> +
>>> +# 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;`
>> 
>> Shouldn't this use += like BOOT_CFLAGS?
> 
> Yes, fixed.  Thanks for the review.

Also backported for gcc 4.5.4 and 4.6.1.

> Index: config/mh-darwin
> ===================================================================
> --- config/mh-darwin	(revision 175089)
> +++ config/mh-darwin	(working copy)
> @@ -4,4 +4,4 @@
> BOOT_CFLAGS += -mdynamic-no-pic
> 
> # 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;`
> +BOOT_LDFLAGS += `case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; esac;`
diff mbox

Patch

Index: config/mh-darwin
===================================================================
--- config/mh-darwin	(revision 175089)
+++ config/mh-darwin	(working copy)
@@ -4,4 +4,4 @@ 
 BOOT_CFLAGS += -mdynamic-no-pic
 
 # 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;`
+BOOT_LDFLAGS += `case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; esac;`