Closed Apteryks closed 2 years ago
Unfortunately, the configure script does not support cross-compilation. The expectation is to use --profile
for cross-compiling with your settings in a .build file. I would absolutely love patches though to fix this behavior but unfortunately, no cycles on my end and it's a lower priority issue.
Just for my info, would using a build system such as Autotools that already handles cross-compilation correctly be an acceptable solution to you?
Hi!
I've been trying to package this for Guix, and it's been brought during review that cross-compilation was not handled by the script (such as I've come to expect from a configure script, thanks to Autotools).
Instead, one has to define CC, AR and LD themselves as environment variables, then derive the machine in the format expected by the ck's configure script (e.g. arm-linux-gnuabihf --> arm or i586 --> x86) and provide it as the --profile option.
Finally, that doesn't seem to be enough, as LDFLAGS gets set according to the host platform and is not always overriden in the ck.build* override files such as the ck.build.arm one. E.g., building using
arm-linux-gnuabihf
as the target, on my x86_64-linux machine, the configure script reports:The -m64 in the LDFLAGS seems wrong, and SSE appears to be enabled.
Also, 'make all' doesn't actually build anything, because of this check in
configure
:Since the compiler is a cross-compiler, executing the compiled
.1
binary fails and COMPILER remains unset, which in turns makeALL_LIBS
unset as well, causing the build to not build any library.There's a reason build systems exist; I'd suggest to use one :-).
Thanks!