This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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?


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


	(RTS_DIR): Use $(host)-gnatls when the host differs from build.

Attachment: ada-x-build-diff.txt
Description: Text document

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]