Michal Ostrowski
2005-Mar-21 12:15 UTC
[Xen-devel] RFC/Patch: Build changes for cross-compilation
Attached is a number of changes to the build system that I''ve been using to enable cross-compilation. The biggest change is the introduction of a "Config.mk" file that is included by all Rules.mk files. Config.mk is intended to define things common to all aspects of the build. This can reduce duplication of definitions across various makefiles throughout the tree and provides a convenient, single location to define the toolchains to be used. This is by no means a complete answer to cross-compilation issues (e.g. python still assumes "gcc" is the compiler to be used). Comments/suggestions appreciated. -- Michal Ostrowski <mostrows@watson.ibm.com>
Michal Ostrowski
2005-Mar-21 15:44 UTC
[Xen-devel] RFC/Patch: Build changes for cross-compilation
Attached is a number of changes to the build system that I''ve been using to enable cross-compilation. The biggest change is the introduction of a "Config.mk" file that is included by all Rules.mk files. Config.mk is intended to define things common to all aspects of the build. This can reduce duplication of definitions across various makefiles throughout the tree and provides a convenient, single location to define the toolchains to be used. This is by no means a complete answer to cross-compilation issues (e.g. python still assumes "gcc" is the compiler to be used). Comments/suggestions appreciated. -- Michal Ostrowski <mostrows@watson.ibm.com>
Keir Fraser
2005-Mar-21 17:58 UTC
Re: [Xen-devel] RFC/Patch: Build changes for cross-compilation
On 21 Mar 2005, at 15:44, Michal Ostrowski wrote:> > Attached is a number of changes to the build system that I''ve been > using > to enable cross-compilation. The biggest change is the introduction of > a "Config.mk" file that is included by all Rules.mk files.The attachment was missing. In any case, it''s not clear to me that any big changes are needed to the build system to support cross compilation -- could we just prepend a $(CROSS_COMPILE) variable to the name of each toolchain binary used to build images to be run on the target architecture? This is all that Linux provides. -- Keir ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Michal Ostrowski
2005-Mar-21 19:30 UTC
Re: [Xen-devel] RFC/Patch: Build changes for cross-compilation
Patch attached. (I mean it this time.) Prepending CROSS_COMPILE is most of the solution. However, there are some Makefile that need to be more careful about using CC vs HOSTCC. I also think it is a bad idea for so many Makefiles to be setting "CC:=gcc". Something like this should IMO be set in one place only, and hence my Config.mk suggestion. On Mon, 2005-03-21 at 17:58 +0000, Keir Fraser wrote:> On 21 Mar 2005, at 15:44, Michal Ostrowski wrote: > > > > > Attached is a number of changes to the build system that I''ve been > > using > > to enable cross-compilation. The biggest change is the introduction of > > a "Config.mk" file that is included by all Rules.mk files. > > The attachment was missing. In any case, it''s not clear to me that any > big changes are needed to the build system to support cross compilation > -- could we just prepend a $(CROSS_COMPILE) variable to the name of > each toolchain binary used to build images to be run on the target > architecture? This is all that Linux provides. > > -- Keir > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/xen-devel-- Michal Ostrowski <mostrows@watson.ibm.com>
Keir Fraser
2005-Mar-22 09:02 UTC
Re: [Xen-devel] RFC/Patch: Build changes for cross-compilation
On 21 Mar 2005, at 19:30, Michal Ostrowski wrote:> Prepending CROSS_COMPILE is most of the solution. However, there are > some Makefile that need to be more careful about using CC vs HOSTCC. I > also think it is a bad idea for so many Makefiles to be setting > "CC:=gcc". Something like this should IMO be set in one place only, > and hence my Config.mk suggestion.Yes, it does look neater. I''ve checked it into the unstable tree. It''s not so important in this case since the patch is fairly trivial, but in future please add a ''signed-off-by'' line to your email when submitting a patch. Cheers, Keir ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel