Home Man
Search
Today's Posts
Register

RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

Please: a litte help to crosscompile.

Tags
crosscompiler, linux, solved

Login to Reply

 
Thread Tools Search this Thread
# 1  
Old 05-16-2018
Please: a litte help to crosscompile.

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

The Following User Says Thank You to Linusolaradm1 For This Useful Post:
Corona688 (05-16-2018)
Login to Reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to enable ping?a litte complex Linusolaradm1 Solaris 13 04-10-2018 02:42 PM


All times are GMT -4. The time now is 08:50 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password