diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index b1f50acfb89eeee49522c2f9cf3d125e58ccaa74..ebd8d39a5ae6187ea361d8205c032c1db5ca99ed 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1666,15 +1666,13 @@ 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 && + ++ (if platformOS (targetPlatform dflags) == OSDarwin && platformArch (targetPlatform dflags) == ArchX86_64 - then ["-Wl,-no_pie", "-Wl,-no_compact_unwind"] + then ["-Wl,-no_compact_unwind"] else []) ++ o_files