Closed jgsun closed 4 years ago
but in buildroot, the cross compiling works well:
jgsun@VirtualBox:~/repo/buildroot-arm64/output/build/ply-2.1.1$ file src/ply/ply-ply.o src/ply/ply-ply.o: ELF 64-bit LSB relocatable, ARM aarch64, version 1 (SYSV), not stripped
That is not how you cross compile an autotools-based package:
https://www.gnu.org/software/automake/manual/html_node/Cross_002dCompilation.html
@wkz but I failed with this guide:
export PATH=$PATH:/home/jgsun/repo/buildroot-arm64/output/host/bin/ autoreconf -f -i ./configure --host=aarch64-buildroot-linux-gnu --build=x86_64-pc-linux-gnu
jgsun@VirtualBox:~/ply-cross$ file src/ply/ply-ply.o src/ply/ply-ply.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), with debug_info, not stripped
Would you kind please help tell me the trueth? Many thanks
BR Jgsun
If you've cloned the git repo the build process should just be:
./autogen.sh
./configure --host=aarch64-your-toolchain-prefix
make
If you're building from a tarball you can skip the call to autogen.sh
as configure
is shipped in the archive.
Look at the output from configure
to make sure that it properly locates your toolchain.
I try to do cross compiling for ply like below, but it seems that it doesn't take effect.
export PATH=$PATH:/home/jgsun/repo/buildroot-arm64/output/host/opt/ext-toolchain/bin export ARCH=arm64 export CROSS_COMPILE=aarch64-none-linux-gnu- make file src/ply/ply-ply.o src/ply/ply-ply.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), with debug_info, not stripped