[Git][ghc/ghc][ghc-8.8] Add a flag to indicate that gcc supports -no-pie
Ben Gamari
gitlab at gitlab.haskell.org
Mon Oct 19 15:14:37 UTC 2020
Ben Gamari pushed to branch ghc-8.8 at Glasgow Haskell Compiler / GHC
Commits:
597df8cd by Krzysztof Gogolewski at 2020-10-19T11:40:42+02:00
Add a flag to indicate that gcc supports -no-pie
Fixes #17919.
- - - - -
2 changed files:
- compiler/main/DynFlags.hs
- docs/users_guide/phases.rst
Changes:
=====================================
compiler/main/DynFlags.hs
=====================================
@@ -3011,6 +3011,8 @@ dynamic_flags_deps = [
-- Don't pass -no-pie with -pgmc
-- (see Trac #15319)
sGccSupportsNoPie = False})))
+ , make_ord_flag defFlag "pgmc-supports-no-pie"
+ (noArg $ alterSettings $ \s -> s { sGccSupportsNoPie = True })
, make_ord_flag defFlag "pgms"
(hasArg (\f -> alterSettings (\s -> s { sPgm_s = (f,[])})))
, make_ord_flag defFlag "pgma"
=====================================
docs/users_guide/phases.rst
=====================================
@@ -172,6 +172,20 @@ the following flags:
Pass ⟨option⟩ to the C compiler.
+.. ghc-flag:: -pgmc-supports-no-pie
+ :shortdesc: Indicate that the C compiler supports ``-no-pie``
+ :type: dynamic
+ :category: phase-options
+
+ When ``-pgmc`` is used, GHC by default will never pass the ``-no-pie``
+ command line flag. The rationale is that it is not known whether the
+ specified compiler will support it. This flag can be used to indicate
+ that ``-no-pie`` is supported. It has to be passed after ``-pgmc``.
+
+ This flag is not neccessary when ``-pgmc`` is not used, since GHC
+ remembers whether the default C compiler supports ``-no-pie`` in
+ an internal settings file.
+
.. ghc-flag:: -optlo ⟨option⟩
:shortdesc: pass ⟨option⟩ to the LLVM optimiser
:type: dynamic
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/597df8cd2ed72889c41049488e5b62168fef13f9
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/597df8cd2ed72889c41049488e5b62168fef13f9
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20201019/c818744a/attachment-0001.html>
More information about the ghc-commits
mailing list