Hi Jack,

On 18 Jun 2011, at 03:57, Jack Howarth wrote:

On Fri, Jun 17, 2011 at 12:04:34PM +0100, IainS wrote:
Hi Jack,
===
****
kludge to suppress pie for for dylibs (use in place of the darwin9.h
hunk from the attachment on PR49371).

Iain,
This change should be unncessary since -pie on the linker only operates
on executables (hence the name PIE).

On darwin < 11 .. which don't default to linking pie:

As stated, it's a kludge to allow fpie to be put as a test-suite option... ... since the options are passed verbatim to library builds, all the dylib builds fail otherwise ...

if there is an alternate way of filtering 'fpie/fPIE' out of dylib builds, that could be more globally applied the to the test suite, that would be a good fix to make.

(the kludge is expedient to test the hypothesis that pie works with libjava on darwin 9 & 10 -- FAOD: I am not suggesting it for trunk)...

Iain

Index: gcc/config/darwin9.h
===================================================================
--- gcc/config/darwin9.h        (revision 175110)
+++ gcc/config/darwin9.h        (working copy)
@@ -35,6 +35,12 @@ along with GCC; see the file COPYING3.  If not see
/* Tell collect2 to run dsymutil for us as necessary.  */
#define COLLECT_RUN_DSYMUTIL 1

+#undef PIE_SPEC
+#define PIE_SPEC \
+  "%{fpie|pie|fPIE:  %{!Zdynamiclib: \
+ %{mdynamic-no-pic: %n'-mdynamic-no-pic' overrides '-pie', '- fpie'
or '-fPIE'; \
+      :-pie}}}"
+
#undef  ASM_OUTPUT_ALIGNED_COMMON
#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ do { \

Reply via email to