|From:||Domingo Alvarez Duarte|
|Subject:||Re: [Tinycc-devel] Is --enable-cross of any use in its current form?|
|Date:||Sun, 30 Mar 2014 13:43:23 +0100|
TL;DR: remove --enable-cross and use build arch != target arch to detect the cross-compiling case
When packaging tinycc 0.9.27 for Debian I want to create a separate package with tinycc cross compilers. However, the current mechanism to build the cross compilers, --enable-cross in the configure switch, is not adapted because it builds all the cross compilers at once and thus apply the same configuration for all of them. This is a problem in the multiarch world because the library path would be different for each compiler. It would be include in the path i386-linux-gnu for i386, x86_64-linux-gnu for x86-64, arm-linux-gnueabi for arm softfloat, arm-linux-gnueabihf for ARM hardfloat, etc… So for arm hardfloat you'd have /usr/lib/arm-linux-gnueabihf then /usr/lib then /lib/arm-linux-gnueabihf, then /lib, then /usr/local/lib/arm-linux-gnueabihf and to finish /usr/local/lib.
Right now this is detected in the native build case and you'd have to set it for cross-building. But since cross-building builds all compiler, this is not practical. Therefore I was thinking about removing --enable-cross and instead decide whether we are building a cross-compiler or not by comparing what's in $cpu with what's coming from uname -m and decide based on that. Agreed, I'm conflating host arch and build arch together but I'm not sure we support the case of build != host arch well right now anyway.
Is there any people relying on --enable-cross? If yes we could still keep it and also add the detection mechanism which would allow to either build all cross-compilers or just one. Has anyone an objection to that?
For information, that's one of the last of the blocker for me to start the call for testing of tcc 0.9.27. The other blocker is the testsuite to work on all arch without error (not the case on i386 right now).
Tinycc-devel mailing list
|[Prev in Thread]||Current Thread||[Next in Thread]|