Difference between revisions of "Cross Compiling"
(→Configure Options) |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | |||
+ | == Setup PATH Example == | ||
+ | export ARCH=arm | ||
+ | export PATH=/home/demetres/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/:$PATH | ||
+ | export CROSS_COMPILE=arm-none-linux-gnueabi- | ||
+ | |||
+ | [https://stackoverflow.com/questions/22668565/how-to-add-cross-compiler-to-the-path Source] | ||
== MIPS == | == MIPS == | ||
− | Use to configure: | + | export PATH=/opt/imgtec/Toolchains/mips-img-linux-gnu/2017.10-05/bin/:$PATH |
− | ./configure --host=mipsel-linux | + | export CROSS_COMPILE=mips-img-linux-gnu- |
+ | |||
+ | == Configure Options == | ||
+ | Use to configure mips: | ||
+ | ./configure --host=mips-linux CC=mips-linux-gnu-gcc CXX=mips-linux-gnu-g++ --with-protoc=protoc | ||
+ | ./configure --host=mips-linux CC=mips-img-linux-gnu-gcc CXX=mips-img-linux-gnu-g++ --with-protoc=protoc | ||
+ | |||
+ | Use to configure mipsel: | ||
+ | ./configure --disable-shared --host=mips-linux CC=mipsel-linux-gnu-gcc CXX=mipsel-linux-gnu-g++ --with-protoc=protoc | ||
+ | |||
+ | To compile without shared libs: | ||
+ | ./configure --disable-shared --host=mips-linux CC=mips-linux-gnu-gcc CXX=mips-linux-gnu-g++ --with-protoc=protoc |
Latest revision as of 04:57, 2 July 2021
Setup PATH Example
export ARCH=arm export PATH=/home/demetres/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/:$PATH export CROSS_COMPILE=arm-none-linux-gnueabi-
MIPS
export PATH=/opt/imgtec/Toolchains/mips-img-linux-gnu/2017.10-05/bin/:$PATH export CROSS_COMPILE=mips-img-linux-gnu-
Configure Options
Use to configure mips:
./configure --host=mips-linux CC=mips-linux-gnu-gcc CXX=mips-linux-gnu-g++ --with-protoc=protoc ./configure --host=mips-linux CC=mips-img-linux-gnu-gcc CXX=mips-img-linux-gnu-g++ --with-protoc=protoc
Use to configure mipsel:
./configure --disable-shared --host=mips-linux CC=mipsel-linux-gnu-gcc CXX=mipsel-linux-gnu-g++ --with-protoc=protoc
To compile without shared libs:
./configure --disable-shared --host=mips-linux CC=mips-linux-gnu-gcc CXX=mips-linux-gnu-g++ --with-protoc=protoc