[Git][ghc/ghc][master] configure: Fix support check for response files.

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Wed May 24 16:44:38 UTC 2023



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
a320ca76 by Rodrigo Mesquita at 2023-05-24T12:44:20-04:00
configure: Fix support check for response files.

In failing to escape the '-o' in '-o\nconftest\nconftest.o\n' argument
to printf, the writing of the arguments response file always failed.

The fix is to pass the arguments after `--` so that they are treated
positional arguments rather than flags to printf.

Closes #23435

- - - - -


1 changed file:

- m4/fp_ld_supports_response_files.m4


Changes:

=====================================
m4/fp_ld_supports_response_files.m4
=====================================
@@ -5,7 +5,7 @@ AC_DEFUN([FP_LD_SUPPORTS_RESPONSE_FILES], [
     AC_MSG_CHECKING([whether $LD supports response files])
     echo 'int main(void) {return 0;}' > conftest.c
     "$CC" -c -o conftest.o conftest.c > /dev/null 2>&1
-    printf "-o\nconftest\nconftest.o\n" > args.txt
+    printf -- "-o\nconftest\nconftest.o\n" > args.txt
     if "$LD" -shared @args.txt > /dev/null 2>&1 || "$LD" -dylib @args.txt > /dev/null 2>&1
     then
         LdSupportsResponseFiles=YES



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a320ca761c47ea90f9083165f44537bc939cccf6
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/20230524/614f8064/attachment.html>


More information about the ghc-commits mailing list