https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86030

Tamar Christina <tnfchris at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |NEW
   Last reconfirmed|                            |2018-07-02
         Resolution|FIXED                       |---
     Ever confirmed|0                           |1

--- Comment #2 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
It seems that this is not fully fixed yet.

There are a number of other issues here.

Given a simple response file

   /d/t/temp cat foo
   test.c
   -L/tmp/temp
   -L/bar/temp/rr
   -ldata_boo


and calling

   gcc @foo -save-temps -###

shows a few problems.

At first glance it looks like the correct thing was done, the options are split
into two new response files and passed along to collect2 and the commandline
for collect2 no longer has the paths expanded in them.

   /d/t/temp cat /tmp/ccIP9us9
   test.o
   -ldata_boo

   /d/t/temp cat /tmp/ccSls8Kg
   -L/tmp/temp
   -L/bar/temp/rr

However, annoyingly, they have been expanded and placed into the
`COLLECT_GCC_OPTIONS` environment variable

   COLLECT_GCC_OPTIONS='-L/tmp/temp' '-L/bar/temp/rr' '-save-temps'
'-mlittle-endian' '-mabi=lp64'

Which means they're getting passed twice..

And finally it seems that when collect2 makes the call to ld, it places
everything on one giant commandline, undoing all the work
of creating the response files and exploding the path. collect2 should honor
the response files in it's output!

Reply via email to