]>
git.ipfire.org Git - thirdparty/gcc.git/commit
Re: [PATCH] gcc-ar: Handle response files properly [PR77576]
Problem: gcc-ar fails when a @file is passed to it:
$ cat rsp
--version
$ gcc-ar @rsp
/usr/bin/ar: invalid option -- '@'
This is because a dash '-' is prepended to the first
argument if it doesn't start with one, resulting in
the wrong call 'ar -@rsp'.
Fix: Expand argv to get rid of any @files and if any
expansions were made, pass everything through a
temporary response file.
$ gcc-ar @rsp
GNU ar (GNU Binutils for Debian) 2.35.2
...
gcc/
PR driver/77576
* gcc-ar.cc (main): Expand argv and use
temporary response file to call ar if any
expansions were made.