This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug driver/46712] New: exec-tool.in doesn't work with -fuse-linker-plugin in a gcc+binutils combined tree


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46712

           Summary: exec-tool.in doesn't work with -fuse-linker-plugin in
                    a gcc+binutils combined tree
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hjl.tools@gmail.com
                CC: bonzini@gnu.org


Created attachment 22570
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22570
A testcase

exec-tool.in has

      # libtool has not relinked ld-new yet, but we cannot just use the
      # previous stage (because then the relinking would just never happen!).
      # So we take extra care to use prev-ld/ld-new *on recursive calls*.
      test x"$LT_RCU" = x"1" && exec $scriptdir/../prev-$dir/$prog ${1+"$@"}

      LT_RCU=1; export LT_RCU
      $scriptdir/../$dir/$prog ${1+"$@"}
      result=$?
      exit $result

But -fuse-linker-plugin may call ld, which sets LT_RCU and calls
as. When as is called the first time by ld with LT_RCU to 1, I get

[hjl@gnu-6 pr12245-1]$ make
/export/build/gnu/tools-lto/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/tools-lto/build-x86_64-linux/gcc/ -m32 -O2 -fwhole-program
-flto=jobserver -fuse-linker-plugin   -c -o x.o x.c
/export/build/gnu/tools-lto/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/tools-lto/build-x86_64-linux/gcc/ -m32 -O2 -fwhole-program
-flto=jobserver -fuse-linker-plugin   -c -o y.o y.c
/export/build/gnu/tools-lto/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/tools-lto/build-x86_64-linux/gcc/ -m32 -B./ -o foo -O2
-fwhole-program -flto=jobserver -fuse-linker-plugin x.o y.o
/export/build/gnu/tools-lto/build-x86_64-linux/gcc/as: line 73:
/export/build/gnu/tools-lto/build-x86_64-linux/gcc/../prev-gas/as-new: No such
file or directory
/export/build/gnu/tools-lto/build-x86_64-linux/gcc/as: line 73: exec:
/export/build/gnu/tools-lto/build-x86_64-linux/gcc/../prev-gas/as-new: cannot
execute: No such file or directory
make[1]: *** [/tmp/cc4haeCj.ltrans0.ltrans.o] Error 1
lto-wrapper: make returned 2 exit status
lto-wrapper failedcollect2: ld returned 1 exit status
make: *** [foo] Error 1
[hjl@gnu-6 pr12245-1]$ 

[hjl@gnu-6 pr12245-1]$ /export/build/gnu/tools-lto/build-x86_64-linux/gcc/xgcc
-v
Using built-in specs.
COLLECT_GCC=/export/build/gnu/tools-lto/build-x86_64-linux/gcc/xgcc
Target: x86_64-unknown-linux-gnu
Configured with: /export/gnu/src/tools-lto/tools/configure --enable-languages=c
--disable-bootstrap --prefix=/usr/gcc-4.6-lto --with-local-prefix=/usr/local
Thread model: posix
gcc version 4.6.0 20101129 (experimental) (GCC) 
[hjl@gnu-6 pr12245-1]$


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]