[Git][ghc/ghc][wip/ghc-toolchain-fixes] 2 commits: ghc-toolchain: Pass ld-override onto ghc-toolchain
Matthew Pickering (@mpickering)
gitlab at gitlab.haskell.org
Thu Jul 27 17:42:55 UTC 2023
Matthew Pickering pushed to branch wip/ghc-toolchain-fixes at Glasgow Haskell Compiler / GHC
Commits:
814f4c22 by Matthew Pickering at 2023-07-27T18:38:27+01:00
ghc-toolchain: Pass ld-override onto ghc-toolchain
- - - - -
f06e2993 by Matthew Pickering at 2023-07-27T18:42:31+01:00
ld override: Make whitelist override user given option
- - - - -
2 changed files:
- m4/ghc_toolchain.m4
- utils/ghc-toolchain/exe/Main.hs
Changes:
=====================================
m4/ghc_toolchain.m4
=====================================
@@ -12,8 +12,12 @@ AC_DEFUN([ENABLE_GHC_TOOLCHAIN_ARG],
[
if test "$2" = "YES"; then
echo "--enable-$1" >> acargs
+ elif test "$2" = "yes"; then
+ echo "--enable-$1" >> acargs
elif test "$2" = "NO"; then
echo "--disable-$1" >> acargs
+ elif test "$2" = "no"; then
+ echo "--disable-$1" >> acargs
fi
])
@@ -23,6 +27,10 @@ AC_DEFUN([ENABLE_GHC_TOOLCHAIN_NOT_ARG],
echo "--enable-$1" >> acargs
elif test "$2" = "YES"; then
echo "--disable-$1" >> acargs
+ elif test "$2" = "no"; then
+ echo "--enable-$1" >> acargs
+ elif test "$2" = "yes"; then
+ echo "--disable-$1" >> acargs
fi
])
=====================================
utils/ghc-toolchain/exe/Main.hs
=====================================
@@ -329,7 +329,7 @@ mkTarget opts = do
(archOs, tgtVendor) <- parseTriple cc0 (optTriple opts)
cc <- addPlatformDepCcFlags archOs cc0
readelf <- optional $ findReadelf (optReadelf opts)
- ccLink <- findCcLink tgtLlvmTarget (optCcLink opts) (fromMaybe (ldOverrideWhitelist archOs) (optLdOverride opts)) archOs cc readelf
+ ccLink <- findCcLink tgtLlvmTarget (optCcLink opts) (ldOverrideWhitelist archOs && fromMaybe True (optLdOverride opts)) archOs cc readelf
ar <- findAr tgtVendor (optAr opts)
-- TODO: We could have
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b6723702acd2888e63763cce87ade2cbde775b6e...f06e2993d54c67de0d1f011d54700703a32351ae
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b6723702acd2888e63763cce87ade2cbde775b6e...f06e2993d54c67de0d1f011d54700703a32351ae
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/20230727/b3443871/attachment-0001.html>
More information about the ghc-commits
mailing list