Hi jow!, you're right, but i haven't move my toolchain after the (loooooong) compilation. Maybe the problem is due to that i'm trying to compile source files that resides in a different folder. The first problem i got was:
../mipsel-openwrt-linux-uclibc/bin/ld: cannot find -lgcc_s
And i solved it with an LDFLAG:
-lgcc_s -L/home/juanjo/openwrt-xburst/build_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.32/gcc-4.3.3-final/mipsel-openwrt-linux-uclibc/libgcc
.
Now what i get is:
/home/juanjo/openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.32/usr/bin/../lib/gcc/mipsel-openwrt-linux-uclibc/4.3.3/../../../../mipsel-openwrt-linux-uclibc/bin/ld: warning: ld-uClibc.so.0, needed by /home/juanjo/openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.32/usr/bin/../lib/gcc/mipsel-openwrt-linux-uclibc/4.3.3/../../../../mipsel-openwrt-linux-uclibc/lib/libc.so, not found (try using -rpath or -rpath-link)
So i don't know where the linker is looking for ld-uClibc.so.0 because i have many copies of that file in the whole toolchain. When i try to put -rpath-link "/home/juanjo/NanoNote/openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.32/lib/" whether in LDFLAGS or CCFLAGS (in this case it make not effect), i get this:
mipsel-openwrt-linux-gcc: unrecognized option '-rpath-link'
this is the makefile i have:
CC = mipsel-openwrt-linux-gcc
all: ram_test
DEBUG = -O3 -g0
COMMON_SOURCES = ram_test.c jz47xx_gpio.c jz47xx_mmap.c
H_SOURCES = jz47xx_gpio.h jz47xx_mmap.h
INCLUDE = -I.
WARNINGS= -Wcast-align -Wpacked -Wpadded -Wall
CCFLAGS = ${INCLUDE} ${DEBUG} ${WARNINGS}
LDFLAGS = -lgcc_s -L/home/juanjo/NanoNote/openwrt-xburst/build_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.32/gcc-4.3.3-final/mipsel-openwrt-linux-uclibc/libgcc
COMMON_OBJECTS = $(COMMON_SOURCES:.cpp=.o)
ADCw : $(COMMON_OBJECTS) ram_test.o
$(CC) $(LDFLAGS) $(COMMON_OBJECTS) ram_test.o -o ram_test
.c.o:
$(CC) -c $(CCFLAGS) $< -o $@
clean:
rm -f *.o ram_test ${EXEC} *~ ram_test
indent:
indent -bad -bap -nbc -bl -nce -i2 --no-tabs --line-length120 $(COMMON_SOURCES) $(H_SOURCES)
Thanks!