[Git][ghc/ghc][wip/ghc-toolchain-fixes] ghc-toolchain: Pass ld-override onto ghc-toolchain

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Thu Jul 27 17:19:30 UTC 2023



Matthew Pickering pushed to branch wip/ghc-toolchain-fixes at Glasgow Haskell Compiler / GHC


Commits:
b6723702 by Matthew Pickering at 2023-07-27T18:19:18+01:00
ghc-toolchain: Pass ld-override onto ghc-toolchain

- - - - -


2 changed files:

- m4/find_ld.m4
- m4/ghc_toolchain.m4


Changes:

=====================================
m4/find_ld.m4
=====================================
@@ -77,7 +77,7 @@ AC_DEFUN([FIND_LD],[
         dnl
         dnl See #21712.
         AC_CHECK_TARGET_TOOL([LD], [ld])
-    elif test "x$enable_ld_override" = "xyes"; then
+    elif test "x$enable_ld_override" = "xYES"; then
         find_ld
     else
         AC_CHECK_TARGET_TOOL([LD], [ld])


=====================================
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
 ])
 
@@ -114,6 +122,7 @@ AC_DEFUN([FIND_GHC_TOOLCHAIN],
     ENABLE_GHC_TOOLCHAIN_ARG([tables-next-to-code], [$TablesNextToCode])
     ENABLE_GHC_TOOLCHAIN_ARG([ld-override], [$enable_ld_override])
     ENABLE_GHC_TOOLCHAIN_ARG([libffi-adjustors], [$UseLibffiForAdjustors])
+    ENABLE_GHC_TOOLCHAIN_ARG([ld-override], [$enable_ld_override])
 
     dnl We store USER_* variants of all user-specified flags to pass them over to ghc-toolchain.
     ADD_GHC_TOOLCHAIN_ARG([cc-opt], [$USER_CFLAGS])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b6723702acd2888e63763cce87ade2cbde775b6e

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b6723702acd2888e63763cce87ade2cbde775b6e
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/59695cbc/attachment-0001.html>


More information about the ghc-commits mailing list