I got curious and looked around for a mingw build environment for a cross compiler that would lend itself to building ghdl.
It turns out Debian has mingw Linux hosted build environments using gcc-4.6.3 and -4.7.2. You'd expect a 4.8.2 based mingw soon. Looking a little further shows Drangon Zhou on SourceForge has built (as of 9 December 2013) a mingw-w64 cross compiler using gcc-4.8.2. All the scripts he used to build are here: https://sourceforge.net/p/mingw-w64-dgn/code/HEAD/tree/trunk/ (r272), you can download a snapshot, around 57KB, no real documentation otherwise. An as Brian points out trying to find recent documentation seems hard. Commercial support for mingw appears to be stalled at a gcc release version still under the GPLv2, although I found someone distributing 4.7.0. I found one company sponsored by Microsoft who doesn't even distribute a copy of the GPL with binaries. There's also an Arch Linux mingw-w64-gcc 4.8.2-4 (https://www.archlinux.org/packages/community/x86_64/mingw-w64-gcc/) On 18 Dec 2013, at 10:59 pm, Brian Drummond <br...@shapes.demon.co.uk> wrote: > On Wed, 2013-12-18 at 05:20 +0100, tging...@free.fr 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 > Ghdl-discuss@gna.org > https://mail.gna.org/listinfo/ghdl-discuss _______________________________________________ Ghdl-discuss mailing list Ghdl-discuss@gna.org https://mail.gna.org/listinfo/ghdl-discuss