Open edmorley opened 10 months ago
Checking an ARM64 Ubuntu 22.04 image with musl-tools
installed, I see that aarch64-linux-musl-gcc
does exist, and that it does differ from aarch64-linux-gnu-gcc
- which confirms my belief that we should be using the former instead.
The gnu
variant is simply a symlink to standard GCC:
root@5d2e9841af3b:/# ls -al /usr/bin/aarch64-linux-gnu-gcc
lrwxrwxrwx 1 root root 6 Aug 5 2021 /usr/bin/aarch64-linux-gnu-gcc -> gcc-11
Whereas the musl
variant is this wrapper script:
root@5d2e9841af3b:/# cat /usr/bin/aarch64-linux-musl-gcc
#!/bin/sh
exec "${REALGCC:-aarch64-linux-gnu-gcc}" "$@" -specs "/usr/lib/aarch64-linux-musl/musl-gcc.specs"
In #577 support was added for Linux aarch64, however, the GCC binary name used was
aarch64-linux-gnu-gcc
rather than the MUSL variant (in this caseaarch64-linux-musl-gcc
) used by all of the other target/host combinations: https://github.com/heroku/libcnb.rs/blob/4ec39b6fdf171f4f241f2d1fb3c3443b3cec53e6/libcnb-package/src/cross_compile.rs#L64I believe this is an unintentional bug. (If instead there is a reason for it, it needs to have a comment added.)