Don't pass -no-pie when -pgmc is supplied
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>
Thu, 22 Nov 2018 19:46:27 +0000 (14:46 -0500)
committerBen Gamari <ben@smart-cactus.org>
Thu, 22 Nov 2018 21:08:47 +0000 (16:08 -0500)
Test Plan: validate

Reviewers: bgamari

Reviewed By: bgamari

Subscribers: rwbarton, carter

GHC Trac Issues: #15319

Differential Revision: https://phabricator.haskell.org/D5317

compiler/main/DynFlags.hs

index 2b19922..654c347 100644 (file)
@@ -2935,7 +2935,10 @@ dynamic_flags_deps = [
   , make_ord_flag defFlag "pgmF"
       (hasArg (\f -> alterSettings (\s -> s { sPgm_F   = f})))
   , make_ord_flag defFlag "pgmc"
-      (hasArg (\f -> alterSettings (\s -> s { sPgm_c   = (f,[])})))
+      (hasArg (\f -> alterSettings (\s -> s { sPgm_c   = (f,[]),
+                                              -- Don't pass -no-pie with -pgmc
+                                              -- (see Trac #15319)
+                                              sGccSupportsNoPie = False})))
   , make_ord_flag defFlag "pgms"
       (hasArg (\f -> alterSettings (\s -> s { sPgm_s   = (f,[])})))
   , make_ord_flag defFlag "pgma"