[Git][ghc/ghc][master] Use a simpler and more portable construct in ld.ldd check

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Thu May 18 19:20:26 UTC 2023



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


Commits:
b53a9086 by Greg Steuck at 2023-05-18T15:20:08-04:00
Use a simpler and more portable construct in ld.ldd check

printf '%q\n' is a bash extension which led to incorrectly
failing an ld.lld test on OpenBSD which uses pdksh as /bin/sh

- - - - -


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 '%q\n' -o conftest conftest.o > 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/b53a908674bbcddf35545f63701d4f902202eb69

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b53a908674bbcddf35545f63701d4f902202eb69
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/20230518/a042e02d/attachment.html>


More information about the ghc-commits mailing list