Hello, I have ubuntu-18.04 on my intel-i7 laptop and I want to cross compile a source code by following the steps in https://openwrt.org/docs/guide-developer/toolchain/crosscompile for orange-pi pc which has Allwinner-H3 on it.
In menuconfig, I selected glibc instead of musl. I built the toolchain by "make toolchain/install
"
I have the toolchain: toolchain-arm_cortex-a7+neon-vfpv4_gcc-11.2.0_glibc_eabi
I appended following lines to my ~/.bashrc
and sourced it.
export STAGING_DIR = /home/sukru/openwrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-11.2.0_glibc_eabi
export TOOLCHAIN_BIN_DIR = /home/sukru/openwrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-11.2.0_glibc_eabi/bin/
PATH=$PATH:$TOOLCHAIN_BIN_DIR
export PATH
According to the doc in the link, I should give --build and --host parameters to the ./configure.
Pass the host and build to the build system of the package to trigger cross-compile
For GNU configure, use
--build=architecture-unknown-linux-gnu --host=architecture-openwrt-linux-uclibc
(for example:./configure --build=x86_64-unknown-linux-gnu –host=mips-openwrt-linux-uclibc
)
Run
./config.guess
to get the--build=
option.Check the output and ensure that
'checking whether we are cross compiling… yes
' is yes.For GNU make, override the
CC
andLD
environment variables (usually not needed if GNU configure was used)
make CC=architecture-openwrt-linux-uclibc-gcc
LD=architecture-openwrt-linux-uclibc-ld
What will I write for those parameters according to my system?
./configure --build=??? --host=???
or
make CC=???
LD=???
Thanks in advance...