On Mon, Mar 05, 2018 at 01:40:06PM +0000, Peter Maydell wrote: > On 5 March 2018 at 13:36, Andrew Jones <drjo...@redhat.com> wrote: > > IMO, the makefile is the right approach. I wouldn't like to see AArch64 > > added with a script and then converted, along with x86, to a makefile at > > some later time (probably never). > > I'm not really enthusiastic about this approach of picking a cross > compiler in the makefile rather than configure, though. The stuff > we have at the moment that tries to build the x86 ROMs with whatever > random host compiler we happen to be using is already a source > of occasional brokenness. If we're going to try to build target > code on a wider basis than just the x86 roms I'd like to see it > done in a cleaner manner...
Seems like for each arch that we need a cross compiler for, we ought to have configure args & a corresponding config.mak variable eg configure \ --cross-cc-aarch64=aarch64-redhat-linux-gcc \ --cross-cc-x86_64=x86_64-redhat-linux-gcc \ If the --cross-cc-$ARCH arg isn't given we can just autodetect one, if present. This would end up setting in config.mak CROSS_CC_X86_64=x86_64-redhat-linux-c++ CROSS_CC_AARCH64=aarch64-redhat-linux-c++ If the --cross-cc-$ARCH arg is not given, and we can't automatically find a suitable compiler for that arch, then CC_$ARCH make variable should be left undefined. Any rules using these cross-compilers should automatically disable themselves, to ensure we don't suddenly force all people building QEMU to install many cross compilers. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|