New comment by ericonr on void-packages repository https://github.com/void-linux/void-packages/pull/28396#issuecomment-771174763 Comment: About cross, when trying a build for armv7l-musl: ``` TARGET = Some("x86_64-unknown-linux-musl") HOST = Some("x86_64-unknown-linux-musl") CC_x86_64-unknown-linux-musl = None CC_x86_64_unknown_linux_musl = None HOST_CC = None CC = Some("armv7l-linux-musleabihf-gcc") CFLAGS_x86_64-unknown-linux-musl = None CFLAGS_x86_64_unknown_linux_musl = None HOST_CFLAGS = None CFLAGS = Some("-fstack-clash-protection -D_FORTIFY_SOURCE=2 -O2 -pipe -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard -I/usr/armv7l-linux-musleabihf/usr/include") CRATE_CC_NO_DEFAULTS = None DEBUG = Some("true") CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2") running: "armv7l-linux-musleabihf-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-fstack-clash-protection" "-D_FORTIFY_SOURCE=2" "-O2" "-pipe" "-march=armv7-a" "-mfpu=vfpv3" "-mfloat-abi=hard" "-I/usr/armv7l-linux-musleabihf/usr/include" "-I" "/usr/armv7l-linux-musleabihf/usr/include" "-E" "build/expando.c" ``` What this means: maturin isn't passing target to cargo correctly; since `TARGET` is incorrect, together with `CARGO_CFG_TARGET_FEATURE`. Also, `cargo` unconditionally adds `"-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64"` to the compiler command line.