On Mon, 2012-11-05 at 13:40 -0800, Steve Ellcey wrote:

> Hm, I configured GCC with '--enable-languages=c,c++', I think this might
> set ENABLE_LTO to '0' and cause check_effective_target_lto to return
> FALSE and cause the -ffat-lto-objects flag to not be added.  Of course
> this raises the question of why it is trying to do lto testing if I
> didn't configure it in.  I will add 'lto' to my configure line and see
> if that fixes the problem.
> 
> Steve Ellcey
> sell...@mips.com

OK, that was a red herring.  The problem isn't
check_effective_target_lto but check_linker_plugin_available.
This is returning false because my compile can't find crt0.o.

% /local/home/sellcey/nightly/obj-mips-mti-elf/gcc/final/gcc/xgcc
-B/local/home/sellcey/nightly/obj-mips-mti-elf/gcc/final/gcc/ -v x.c
-Tmti32.ld  -o x

 /local/home/sellcey/nightly/obj-mips-mti-elf/gcc/final/gcc/collect2 -EB
-mips32r2 -melf32btsmip -o
x /local/home/sellcey/nightly/obj-mips-mti-elf/gcc/final/gcc/crti.o 
/local/home/sellcey/nightly/obj-mips-mti-elf/gcc/final/gcc/crtbegin.o 
-L/local/home/sellcey/nightly/obj-mips-mti-elf/gcc/final/gcc /tmp/ccgdsofE.o 
-lgcc -lgcc /local/home/sellcey/nightly/obj-mips-mti-elf/gcc/final/gcc/crtend.o 
/local/home/sellcey/nightly/obj-mips-mti-elf/gcc/final/gcc/crtn.o -T mti32.ld
/local/home/sellcey/nightly/install-mips-mti-elf/mips-mti-elf/bin/ld:
cannot find crt0.o
collect2: error: ld returned 1 exit status



If I run the compiler from the installed location, everything is fine:


% install-mips-mti-elf/bin/mips-mti-elf-gcc -v x.c -Tmti32.ld -o x

 
/local/home/sellcey/nightly/install-mips-mti-elf/libexec/gcc/mips-mti-elf/4.8.0/collect2
 -EB -mips32r2 -melf32btsmip -o x 
/local/home/sellcey/nightly/install-mips-mti-elf/lib/gcc/mips-mti-elf/4.8.0/crti.o
 
/local/home/sellcey/nightly/install-mips-mti-elf/lib/gcc/mips-mti-elf/4.8.0/crtbegin.o
 -L/local/home/sellcey/nightly/install-mips-mti-elf/lib/gcc/mips-mti-elf/4.8.0 
-L/local/home/sellcey/nightly/install-mips-mti-elf/lib/gcc/mips-mti-elf/4.8.0/../../../../mips-mti-elf/lib
 /tmp/cczngIXe.o -lgcc -lgcc 
/local/home/sellcey/nightly/install-mips-mti-elf/lib/gcc/mips-mti-elf/4.8.0/crtend.o
 
/local/home/sellcey/nightly/install-mips-mti-elf/lib/gcc/mips-mti-elf/4.8.0/crtn.o
 -T mti32.ld


I am not sure how ld is supposed to find crt0.o in the uninstalled
setup, it exists in obj-mips-mti-elf/newlib/mips-mti-elf/libgloss/mips.
Maybe it should find it in the installed location, it is there because I
have made and installed newlib before building and testing GCC.

Steve Ellcey
sell...@mips.com

Reply via email to