From d02a1979d5c5eacd2c5daea7f5852a98988b4d97 Mon Sep 17 00:00:00 2001
From: Ian Lynagh <igloo@earth.li>
Date: Wed, 3 Aug 2011 20:25:52 +0100
Subject: [PATCH] Stop using -Wl,-no_pie on OS X

Now that the in-tree gmp has been upgraded, it should no longer be
necessary, according to #5293.
---
 compiler/main/DriverPipeline.hs | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index b1f50acfb89e..ebd8d39a5ae6 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
-- 
GitLab