Re: [hatari-devel] mingw-w64

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


On 22/09/2013 13:45, Nicolas Pomarède wrote:
On 22/09/2013 12:45, Christer Solskogen wrote:
On Sat, Sep 21, 2013 at 11:42 PM, Nicolas Pomarède
<npomarede@xxxxxxxxxxxx> wrote:

Anyway, I added the "get_filename_component" to the toolchain file.
Hopefully it should not break anyone's cross compilation.


Goodie! How about the toolchain files for x86_64-w64-mingw32 and
i686-w64-mingw32? :-)



I'm not sure it's "useful" to add them. Every distro will have its
name/variation for the mingw cross compiler (i586/i686/x86_64, 32/64, ....).

If we add these 2 ones, then other people might tell "why not adding
mine", which we can't do for every distrib.

Ideal solution would be that all distrib use some alias for mingw in
/etc/alternative or some external config script that could be ran by
cmake to have Toolchain-mingw32.cmake as distro agnostic as possible.

As I don't think this will happen, I think Toolchain-mingw32.cmake
should be considered more like a template than like a definitive
solution for all cases.
If user want to add more toolchain, duplicate Toolchain-mingw32.cmake as
another filename and add your own values ; it won't be overwritten by
"hg pull".

For now, as some values must be fixed in Toolchain-mingw32.cmake , it's
tailored to my distrib ;-)

Nicolas


I changed Toolchain-mingw32.cmake a little to allow changing the mingw's values using cmake -D parameters, instead of editing the file.

In your case, you would use for example : -DMINGW_EXE_PREFIX=x86_64-w64-mingw32 -DMINGW_ROOT_PATH=i686-w64-mingw32

I also added 2 new targets to "configure" to build 32 or 64 bit versions of the Windows hatari.exe using mingw-w64.

Note that your "i686-w64-mingw32/" under sysroot is not "standard" ; I looked at a few distributions providing mingw and they all use "sysroot/mingw". If you want to use "configure" as it is, you might need to create a symlink between "i686-w64-mingw32/" and "mingw/"

Nicolas




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/