Skip to content
Snippets Groups Projects
Commit a320ca76 authored by Rodrigo Mesquita's avatar Rodrigo Mesquita :seedling: Committed by Marge Bot
Browse files

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
parent eac4420a
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment