Closed snobu closed 6 years ago
Oh wait you're right, let me try to link it statically, hopefully I can do this for ARM with current tool chain.
$ ldd target/armv7-unknown-linux-gnueabihf/release/hello-arm
not a dynamic executable
$ file target/armv7-unknown-linux-gnueabihf/release/hello-arm
target/armv7-unknown-linux-gnueabihf/release/hello-arm: ELF 32-bit LSB shared object,
ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3,
for GNU/Linux 3.2.0, BuildID[sha1]=6cc5316eeeccdf66b24decb00515988194be4036, not stripped
Well, this is a little strage or i don't understand it enough. Shouldn't ldd
say it's dynamic as well? Maybe i should do this on the Pi, not on my Mac, could ldd
lie to me given it's not executing on the same target platform as the binary passed to it?
LATER EDIT: Ok, i got it, i had the wrong target, i need the ARM musl target not the GNU one to get static binaries. Will fix and send PR. New result:
target/armv7-unknown-linux-musleabihf/release$ file hello-arm
hello-arm: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, ...
This PR adds ARMhf (think Raspberry Pi) target and compiler.
Tested OK on Raspberry Pi 2.
Feel free to reject in case ARM doesn't fit the purpose of this image. No hard feelings. Pun intended :)