I have installed the "mipsel tuxbox" compile suite for crosscompile
Host system is x86_64 slackware
destination is mipsel32bit "vuduo+"
For example,I want to compile a program, I use this script
Code :
make clean
export TOOLCHAIN=/opt/mipsel-tuxbox-linux-gnu
export PATH="$TOOLCHAIN/bin:$PATH"
export CC=/opt/mipsel-tuxbox-linux-gnu/mipsel-tuxbox-linux-gnu/bin/gcc
export RANLIB=/opt/mipsel-tuxbox-linux-gnu/mipsel-tuxbox-linux-gnu/bin/ranlib
make
Compile works but executable is..x86_64!
If I use this line give me a lot of error about includes not found
Code :
make CC=/opt/mipsel-tuxbox-linux-gnu/mipsel-tuxbox-linux-gnu/bin/gcc STRIP=/opt/mipsel-tuxbox-linux-gnu/mipsel-tuxbox-linux-gnu/bin/strip CPPFLAGS="-I/opt/mipsel-tuxbox-linux-gnu/mipsel-tuxbox-linux-gnu/sysroot/usr/include/linux/ -I/opt/mipsel-tuxbox-linux-gnu/mipsel-tuxbox-linux-gnu/sysroot/usr/include/sys/"
What's wrong?
So I try this script and..doesn't work,executable is still x86_64
Code :
make clean
export TOOLCHAIN=/opt/mipsel-tuxbox-linux-gnu
export PATH=$PATH:/opt/mipsel-tuxbox-linux-gnu/libexec/gcc/mipsel-tuxbox-linux-gnu/4.8.1/
CROSS_COMPILE=/opt/mipsel-tuxbox-linux-gnu/bin/mipsel-tuxbox-linux-gnu- make all
Of course cross_compile is present in makefile.
---------- Post updated at 02:23 PM ---------- Previous update was at 02:13 PM ----------
Solution found
A script like this works fine
Code :
make clean
export TOOLCHAIN=/opt/mipsel-tuxbox-linux-gnu
export PATH=$PATH:/opt/mipsel-tuxbox-linux-gnu/libexec/gcc/mipsel-tuxbox-linux-gnu/4.8.1/:/opt/mipsel-tuxbox-linux-gnu/bin
export LDCFLAGS=/opt/mipsel-tuxbox-linux-gnu/lib
export LD_LIBRARY_PATH=/opt/mipsel-tuxbox-linux-gnu/lib
make CC=mipsel-tuxbox-linux-gnu-gcc LD=mipsel-tuxbox-linux-gnu-ld