New comment by CyberShadow on void-packages repository https://github.com/void-linux/void-packages/pull/42148#issuecomment-1438591357 Comment: > I have specified ldc2 as the compiler but there still seems to be a call to `gcc` at the linking stage with the troublesome `-m64` flag. OK, this is still better: - Since we're cross-compiling, we need to specify the architecture when building the D package. Dub has a `--arch` switch, though I did not try this method. - I don't know how the LDC runtime libraries are packaged in Void for cross compiling. The upstream method is to [invoke a script which will rebuild the libraries for the specified target](https://wiki.dlang.org/Building_LDC_runtime_libraries#Usage_for_cross-compilation). I think a more distro-aligned method would be to build and package the libraries built that way? - Still not sure where `-m64` is coming from, maybe it's due to the architecture mismatch or something void-specific like https://github.com/void-linux/void-packages/blob/master/common/wrappers/cross-cc ? - Possibly cross compiling is going to get a bit more hairy and may require D support from Void's toolchain. - FWIW 32-bit support should be fixed in btdu master.