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

            Bug ID: 64740
           Summary: ld called with
                    -plugin-opt=-fresolution=-plugin-opt=-debug.res
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vries at gcc dot gnu.org

I.

When doing lto using a single gcc invocation:
...
$install/bin/gcc $src/libgomp/testsuite/libgomp.c/target-9.c \
  -Wl,-rpath=$install/lib64 \
  -flto -ftree-parallelize-loops=0 -fopenmp \
  -o ./a.out \
  $verboseflags
...

for different verboseflags, we get the following plugin-opt args for ld:

1. -v -Wl,-v -Wl,-plugin-opt=-debug

-plugin-opt=-fresolution=/tmp/cc3WBKNB.res -plugin-opt=-debug

2. -v -Wl,-v -save-temps 

-plugin-opt=-fresolution=target-9.res

3. -v -Wl,-v -Wl,-plugin-opt=-debug -save-temps

-plugin-opt=-fresolution=target-9.res -plugin-opt=-debug

Those results look as expected.


II.

When doing lto using a two gcc invocations:
...
$install/bin/gcc $src/libgomp/testsuite/libgomp.c/target-9.c \
  -Wl,-rpath=$install/lib64 \
  -flto -ftree-parallelize-loops=0 -fopenmp \
  -c -o obj.o
$install/bin/gcc obj.o -Wl,-rpath=$install/lib64 \
  -flto -ftree-parallelize-loops=0 \
  -o ./a.out \
  $verboseflags

for different verboseflags, we get the following plugin-opt args for ld:

1. -v -Wl,-v -Wl,-plugin-opt=-debug

-plugin-opt=-fresolution=/tmp/ccCYQEcq.res -plugin-opt=-debug

2. -v -Wl,-v -save-temps 

-plugin-opt=-fresolution=-v.res

3. -v -Wl,-v -Wl,-plugin-opt=-debug -save-temps

-plugin-opt=-fresolution=-plugin-opt=-debug.res -plugin-opt=-debug

The last two don't seem intentional to me. We're using an intermediate file
starting with an option name.

Still the compilation succeeds without any problems.

Reply via email to