diff options
author | Costas Argyris <costas.argyris@gmail.com> | 2023-07-31 10:56:20 -0600 |
---|---|---|
committer | Jeff Law <jlaw@ventanamicro.com> | 2023-07-31 10:57:50 -0600 |
commit | c6523ae786e36dccd64589682140e9221628bb5b (patch) | |
tree | 80f6e8078bfa4e5e402e879b665ff54bc83daf0a /gcc/c | |
parent | b769811e7c1b3dff2fa0ec2c37b52859d7bceed4 (diff) | |
download | gcc-c6523ae786e36dccd64589682140e9221628bb5b.zip gcc-c6523ae786e36dccd64589682140e9221628bb5b.tar.gz gcc-c6523ae786e36dccd64589682140e9221628bb5b.tar.bz2 |
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.
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions