ld: bad -plugin option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, I am running into this error from ld since I removed --disable-lto from the
configure.  I used --disable-lto some time because of problems with LTO.

Anyways, I'd like to build with LTO again and get this really not-very-specific
error

/home/georg/install/gcc-4.7/lib/gcc/avr/4.7.0/../../../../avr/bin/ld: bad
-plugin option
collect2: error: ld returned 1 exit status


Notice that binutils are configured --enable-plugins and not --enable-plugin

Thanks to Ian for spotting that typo.


== C Source (main.c) ==

int main()
{
    return 0;
}

 == Command line ==

> /home/georg/install/gcc-4.7/bin/avr-gcc main.c -mmcu=atmega128 -flto -v
-save-temps -Wl,-v


== Message ==

/home/georg/install/gcc-4.7/lib/gcc/avr/4.7.0/../../../../avr/bin/ld: bad
-plugin option
collect2: error: ld returned 1 exit status

Complete message attached as text file.


== GCC (trunk 181838) configure ==

../../gcc.gnu.org/trunk/configure --target=avr
--prefix=/home/georg/install/gcc-4.7 --disable-nls --enable-languages=c,c++
--with-dwarf2 --enable-checking=yes,rtl --enable-lto

also tried

../../gcc.gnu.org/trunk/configure --target=avr
--prefix=/home/georg/install/gcc-4.7 --disable-nls --enable-languages=c,c++
--with-dwarf2 --enable-checking=yes,rtl


== binutils 2.21 configure ==

../../source/binutils-2.21/configure --target=avr
--prefix=/home/georg/install/gcc-4.7 --disable-nls --enable-lto --enable-plugins

also tried:

../../source/binutils-2.21/configure --target=avr
--prefix=/home/georg/install/gcc-4.7 --disable-nls



== Environment ==

Build: i686-pc-linux-gnu
Host: i686-pc-linux-gnu
Target: avr-unknown-none
GCC 4.3.2 [gcc-4_3-branch revision 141291]
GMP  4.3.2
MPFR 2.4.2
MPC  0.8.2


Does LTO need some more configure options? I also tried --enable-lto or
--enable-plugins with binutils with no effect.

Does LD_LIBRARY_PATH needs to be set?
What if there are several toolchain installations in PATH, to what value(s)?

Similarly, I get the error when running the test suite on xgcc in incubator in
its build-directory as called with
> $BUILD/gcc/xgcc -B$BUILD/gcc/

Johann



Using built-in specs.
COLLECT_GCC=/home/georg/install/gcc-4.7/bin/avr-gcc
COLLECT_LTO_WRAPPER=/home/georg/install/gcc-4.7/libexec/gcc/avr/4.7.0/lto-wrapper
Target: avr
Configured with: ../../gcc.gnu.org/trunk/configure --target=avr --prefix=/home/georg/install/gcc-4.7 --disable-nls --enable-languages=c,c++ --with-dwarf2 --enable-checking=yes,rtl --enable-lto
Thread model: single
gcc version 4.7.0 20111130 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-mmcu=atmega128' '-save-temps' '-flto' '-v'
 /home/georg/install/gcc-4.7/libexec/gcc/avr/4.7.0/cc1 -E -quiet -v -imultilib avr51 main.c -mmcu=atmega128 -flto -fpch-preprocess -o main.i
ignoring nonexistent directory "/home/georg/install/gcc-4.7/lib/gcc/avr/4.7.0/../../../../avr/sys-include"
#include "..." search starts here:
#include <...> search starts here:
 /home/georg/install/gcc-4.7/lib/gcc/avr/4.7.0/include
 /home/georg/install/gcc-4.7/lib/gcc/avr/4.7.0/include-fixed
 /home/georg/install/gcc-4.7/lib/gcc/avr/4.7.0/../../../../avr/include
End of search list.
COLLECT_GCC_OPTIONS='-mmcu=atmega128' '-save-temps' '-flto' '-v'
 /home/georg/install/gcc-4.7/libexec/gcc/avr/4.7.0/cc1 -fpreprocessed main.i -quiet -dumpbase main.c -mmcu=atmega128 -auxbase main -version -flto -o main.s
GNU C (GCC) version 4.7.0 20111130 (experimental) (avr)
	compiled by GNU C version 4.3.2 [gcc-4_3-branch revision 141291], GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C (GCC) version 4.7.0 20111130 (experimental) (avr)
	compiled by GNU C version 4.3.2 [gcc-4_3-branch revision 141291], GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 48ae0967cbec6cf6205cb1ec281963de
COLLECT_GCC_OPTIONS='-mmcu=atmega128' '-save-temps' '-flto' '-v'
 /home/georg/install/gcc-4.7/lib/gcc/avr/4.7.0/../../../../avr/bin/as -mmcu=atmega128 -o main.o main.s
COMPILER_PATH=/home/georg/install/gcc-4.7/libexec/gcc/avr/4.7.0/:/home/georg/install/gcc-4.7/libexec/gcc/avr/4.7.0/:/home/georg/install/gcc-4.7/libexec/gcc/avr/:/home/georg/install/gcc-4.7/lib/gcc/avr/4.7.0/:/home/georg/install/gcc-4.7/lib/gcc/avr/:/home/georg/install/gcc-4.7/lib/gcc/avr/4.7.0/../../../../avr/bin/
LIBRARY_PATH=/home/georg/install/gcc-4.7/lib/gcc/avr/4.7.0/avr51/:/home/georg/install/gcc-4.7/lib/gcc/avr/4.7.0/../../../../avr/lib/avr51/:/home/georg/install/gcc-4.7/lib/gcc/avr/4.7.0/:/home/georg/install/gcc-4.7/lib/gcc/avr/4.7.0/../../../../avr/lib/
COLLECT_GCC_OPTIONS='-mmcu=atmega128' '-save-temps' '-flto' '-v'
 /home/georg/install/gcc-4.7/libexec/gcc/avr/4.7.0/collect2 -plugin /home/georg/install/gcc-4.7/libexec/gcc/avr/4.7.0/liblto_plugin.so -plugin-opt=/home/georg/install/gcc-4.7/libexec/gcc/avr/4.7.0/lto-wrapper -plugin-opt=-fresolution=main.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -flto -m avr51 -Tdata 0x800100 /home/georg/install/gcc-4.7/lib/gcc/avr/4.7.0/../../../../avr/lib/avr51/crtm128.o -L/home/georg/install/gcc-4.7/lib/gcc/avr/4.7.0/avr51 -L/home/georg/install/gcc-4.7/lib/gcc/avr/4.7.0/../../../../avr/lib/avr51 -L/home/georg/install/gcc-4.7/lib/gcc/avr/4.7.0 -L/home/georg/install/gcc-4.7/lib/gcc/avr/4.7.0/../../../../avr/lib main.o -v -lgcc -lc -lgcc
collect2 version 4.7.0 20111130 (experimental)
/home/georg/install/gcc-4.7/lib/gcc/avr/4.7.0/../../../../avr/bin/ld -plugin /home/georg/install/gcc-4.7/libexec/gcc/avr/4.7.0/liblto_plugin.so -plugin-opt=/home/georg/install/gcc-4.7/libexec/gcc/avr/4.7.0/lto-wrapper -plugin-opt=-fresolution=main.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -m avr51 -Tdata 0x800100 /home/georg/install/gcc-4.7/lib/gcc/avr/4.7.0/../../../../avr/lib/avr51/crtm128.o -L/home/georg/install/gcc-4.7/lib/gcc/avr/4.7.0/avr51 -L/home/georg/install/gcc-4.7/lib/gcc/avr/4.7.0/../../../../avr/lib/avr51 -L/home/georg/install/gcc-4.7/lib/gcc/avr/4.7.0 -L/home/georg/install/gcc-4.7/lib/gcc/avr/4.7.0/../../../../avr/lib main.o -v -lgcc -lc -lgcc
/home/georg/install/gcc-4.7/lib/gcc/avr/4.7.0/../../../../avr/bin/ld: bad -plugin option
collect2: error: ld returned 1 exit status

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux