[commit: ghc] master: On OS X x86_64, use "-Wl, -no_pie" and "-Wl, -no_compact_unwind" to avoid linker warnings (30ccc9f)
Manuel Chakravarty
chak at cse.unsw.edu.au
Wed Jul 27 15:38:17 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/30ccc9f39dd2cf1ad14e6116778aa1fd94526c19
>---------------------------------------------------------------
commit 30ccc9f39dd2cf1ad14e6116778aa1fd94526c19
Author: Manuel M T Chakravarty <chak at cse.unsw.edu.au>
Date: Wed Jul 27 23:05:01 2011 +1000
On OS X x86_64, use "-Wl,-no_pie" and "-Wl,-no_compact_unwind" to avoid linker warnings
- "-Wl,-no_pie" can be removed once GMP gets updated
>---------------------------------------------------------------
compiler/main/DriverPipeline.hs | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index b328c3f..b1f50ac 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1666,6 +1666,17 @@ linkBinary dflags o_files dep_packages = do
then ["-Wl,--enable-auto-import"]
else [])
+ -- '-no_pie' - On OS X, the linker otherwise complains that it cannot build
+ -- position independent code due to some offensive code in GMP.
+ -- '-no_compact_unwind'
+ -- - C++/Objective-C exceptions cannot use optimised stack
+ -- unwinding code (the optimised form is the default in Xcode 4 on
+ -- x86_64).
+ ++ (if platformOS (targetPlatform dflags) == OSDarwin &&
+ platformArch (targetPlatform dflags) == ArchX86_64
+ then ["-Wl,-no_pie", "-Wl,-no_compact_unwind"]
+ else [])
+
++ o_files
++ extra_ld_inputs
++ lib_path_opts
More information about the Cvs-ghc
mailing list