Vonger wrote:Please paste the full log
There it is the log from. I am showing Makefile and the output from build.
I found -El in line 40, somwhere in middle of it.
Now got stuck ..... with
collect2
aas you can see at the end .... cannot find ld ....... what is happening ???
Thanks for your time Kris
Code:
kris@fx4 ~/opt/mips/programs $ less Makefile
INCLUDE_PATH=/home/kris/opt/mips/usr/include
SEARCH_DIR=/home/kris/opt/mips/bin
LD=$(SEARCH_DIR)/mips32-ld --verbose
CFLAGS=-g -Wall -Os -S -I$(INCLUDE_PATH)
CC=mips32-gcc
LDFLAGS=-Wl,-gc -Bstatic -L $(LD) -I. $(INCLUDE_PATH)
TARGET=test
OBJECT_FILES=test.o
all:$(TARGET)
test.o: test.c
%obj:$(OBJECT_FILES)
Code:
kris@fx4 ~/opt/mips/programs $ make
mips32-gcc -Wl,-gc -Bstatic -L /home/kris/opt/mips/bin/mips32-ld --verbose -I. /home/kris/opt/mips/usr/include test.o -o test
Using built-in specs.
COLLECT_GCC=mips32-gcc
COLLECT_LTO_WRAPPER=/home/kris/opt/mips/bin/../libexec/gcc/mipsisa32el-unknown-linux-gnu/4.9.4/lto-wrapper
Target: mipsisa32el-unknown-linux-gnu
Configured with: /home/kris/opt/gcc/embtoolkit-1.8.0/build/tools_build-mipsel-linux-mips32/gcc-4.9.3/configure --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --prefix=/home/kris/opt/gcc/embtoolkit-1.8.0/generated/tools-mipsel-linux-mips32 --with-sysroot=/home/kris/opt/gcc/embtoolkit-1.8.0/generated/sysroot-mipsel-linux-mips32 --target=mipsisa32el-unknown-linux-gnu --with-arch=mips32 --with-abi=32 --with-float=soft --disable-multilib --with-gmp=/home/kris/opt/gcc/embtoolkit-1.8.0/generated/host-tools-mips32/usr --with-mpfr=/home/kris/opt/gcc/embtoolkit-1.8.0/generated/host-tools-mips32/usr --with-mpc=/home/kris/opt/gcc/embtoolkit-1.8.0/generated/host-tools-mips32/usr --enable-target-optspace --disable-libssp --disable-libgomp --disable-libmudflap --disable-nls --disable-libquadmath --with-bugurl=http://bugs.embtoolkit.org/projects/embtoolkit --with-pkgversion=embtoolkit-1.8.0 --enable-languages=c,c++,fortran --enable-threads --enable-shared --enable-__cxa_atexit --disable-symvers
Thread model: posix
gcc version 4.9.4 20150727 (prerelease) (embtoolkit-1.8.0)
COMPILER_PATH=/home/kris/opt/mips/bin/../libexec/gcc/mipsisa32el-unknown-linux-gnu/4.9.4/:/home/kris/opt/mips/bin/../libexec/gcc/
LIBRARY_PATH=/home/kris/opt/mips/bin/../lib/gcc/mipsisa32el-unknown-linux-gnu/4.9.4/:/home/kris/opt/mips/bin/../lib/gcc/
COLLECT_GCC_OPTIONS='-B' 'static' '-L/home/kris/opt/mips/bin/mips32-ld' '-v' '-I' '.' '-o' 'test' '-march=mips32' '-mabi=32' '-msoft-float' '-mllsc' '-mno-shared'
/home/kris/opt/mips/bin/../libexec/gcc/mipsisa32el-unknown-linux-gnu/4.9.4/collect2 -plugin /home/kris/opt/mips/bin/../libexec/gcc/mipsisa32el-unknown-linux-gnu/4.9.4/liblto_plugin.so -plugin-opt=/home/kris/opt/mips/bin/../libexec/gcc/mipsisa32el-unknown-linux-gnu/4.9.4/lto-wrapper -plugin-opt=-fresolution=/tmp/ccJ21HCX.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/home/kris/opt/gcc/embtoolkit-1.8.0/generated/sysroot-mipsel-linux-mips32 --eh-frame-hdr -EL -dynamic-linker /lib/ld.so.1 -o test crt1.o crti.o /home/kris/opt/mips/bin/../lib/gcc/mipsisa32el-unknown-linux-gnu/4.9.4/crtbegin.o -L/home/kris/opt/mips/bin/mips32-ld -L/home/kris/opt/mips/bin/../lib/gcc/mipsisa32el-unknown-linux-gnu/4.9.4 -L/home/kris/opt/mips/bin/../lib/gcc -gc /home/kris/opt/mips/usr/include test.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /home/kris/opt/mips/bin/../lib/gcc/mipsisa32el-unknown-linux-gnu/4.9.4/crtend.o crtn.o
collect2: fatal error: cannot find 'ld'
compilation terminated.
<builtin>: recipe for target 'test' failed
make: *** [test] Error 1
kris@fx4 ~/opt/mips/programs $
trying to see what lto-wrapper is doing .... and I thing found the problem:
Code:
kris@fx4 ~/opt/mips/libexec/gcc/mipsisa32el-unknown-linux-gnu/4.9.4 $ ldd lto-wrapper
linux-vdso.so.1 (0x00007ffcc3930000)
libm.so.6 => /lib64/libm.so.6 (0x00007f38ac9a2000)
libc.so.6 => /lib64/libc.so.6 (0x00007f38ac606000)
/lib64/ld-linux-x86-64.so.2 (0x00007f38acc98000)