[Patch Ada/build] deal with some cross/native cross issues

Iain Sandoe iain@codesourcery.com
Sun Nov 3 21:35:00 GMT 2013


Hi,

I've been trying to improve the building and testing of Darwin for crosses and native crosses.

This has thrown up a few small glitches in the Ada build stuff (that would seem to apply to any build-host-nativeX scenario, not just darwin).  I would imagine it would be beneficial to resolve these, since Ada requires Ada - a native cross seems like the only realistic way onto a new target.

Having said that, I am not fully conversant with the build permutations you need to achieve - so the fixes proposed here might not be the best solutions;  comments and suggestions welcome.

===

1. xgnatugn needs to be run on the build system, so needs to be built with the build system's gnatmake. 
I haven't put a canonical prefix on this since this doesn't appear to be done elsewhere.  
Defined as GNATMAKE_FOR_BUILD and passed to sub-processes.

2. Some builds might need to pass LDFLAGS to the gnat* builds.  Appended LDFLAGS to GCC_LINK.  Passed on in gnattools/Make.

3. In gnattools, the RTS dir must be for the host and not for the build;  This actually only showed up when I tried a cross from a 64bit pointer machine to a 32bit pointer one (i.e it is easy for it to go unnoticed).  

With these changes I can build working crosses and native crosses at least on Darwin between machines of different pointer size and endianess.

OK for trunk?
Iain

gcc/ada:

	* gcc-interface/Make-lang.in (GNATMAKE_FOR_BUILD): New, pass
	to subordinate builds.
	(xgnatugn): Build with GNATMAKE_FOR_BUILD.
	* gcc-interface/Makefile.in (GCC_LINK): Append LDFLAGS.

gnattools:

	* Makefile.in (TOOLS_FLAGS_TO_PASS_RE): Pass LDFLAGS.
	(RTS_DIR): Use $(host)-gnatls when the host differs from build.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ada-x-build-diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20131103/ff14b8a2/attachment.txt>
-------------- next part --------------




More information about the Gcc-patches mailing list