On Wed, 2013-12-18 at 05:20 +0100, [email protected] wrote: > Hello, > > > > So the question is whether or not specifying linkers and assemblers > > > belongs in these, and I'd be inclined to think not. The > > > commentary at the beginning of Makefile.in tells the story. > > > (There's also this process model of asking yourself the question > > > as to why Tristan doesn't have the facility for doing so already > > > expressed).
> > The LD and AS spec to ghdl_gcc I hacked in should definitely be > > revisited. But it appeared to me that, since cross-compiling support > > was > > not in there, they were hardcoded in translate/ghdldrv/ghdldrv.adb to > > 'as' and 'gcc'. For the proper cross ghdl, it would make sense to use > > the machine prefixes for as/gcc. > > Clearly, I have never thought about cross compilation for ghdl. > > Initially, I thought there were no case for that, but in fact there are > a few ones, as you mentioned. > > GCC handles cross compilation, so you have to modify Makefiles using > other front-end examples. And yes, because ghdl doesn't use gcc to > assemble, and invoke it to link, you have to modify that. For what it's worth, I have built gcc as a cross compiler. Building gcc is frighteningly fragile at best; doing something outside the mainstream considerably more so, and building cross with Ada enabled is a more lonely path. There is a lot of information out there; much of it obsolete and (for that reason) mutually contradictory. Just to add to the confusion, here is some more (with Ada, but for a different target...) http://sourceforge.net/projects/msp430ada/files/doc/MSP430-Ada.pdf/download And actually this needs updating in two respects : (a) building for 4.8.2 and using the config/download_prerequisites script instead of messing around with gmp, mpc, mpfr. The basic approach should still be valid : script it for repeatability, separate builddir so it can be deleted if you need to start over build native first, then build binutils cross then build compiler cross then build RTS, any other libs cross Also the AVR-Ada project has quite a comprehensive script as part of its source dist, that automates the process (for their purposes!) https://sourceforge.net/projects/avr-ada/files/avr-ada/Source%20Dist/ which may be a useful starting point. Any other useful resources? - Brian _______________________________________________ Ghdl-discuss mailing list [email protected] https://mail.gna.org/listinfo/ghdl-discuss
