Re: [hatari-devel] mingw-w64

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


On 26/09/2013 11:06, Christer Solskogen wrote:
On Thu, Sep 26, 2013 at 12:07 AM, Nicolas Pomarède
<npomarede@xxxxxxxxxxxx> wrote:

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


Cool, but I think you only need to set one variable. The system should
be able to figure out the rest it self.
I mean, the setting over is meaningless since it will use a 64bit
compiler with a sysroot that contains 32bit libraries.


I don't see how the system can find MINGW_ROOT_PATH ; in my case and in most distribs it's "mingws", in your case it's i686-w64-mingw32. We can maintain a list of all possible directory variations that go under "sysroot/". Patch welcome if you have one.

Then the distributions are wrong. You only need that mingw symlink
when building the cross compiler, not for using it.
The i686-w64-mingw32 (and x86_64-w64-mingw32) are very standard when
using i686-w64-mingw32 or x86_64-w64-mingw32 as a target for binutils
and gcc.
Note that they are only standard for mingw-w64, they are not standard
for building other targets.

I don't say the distributions are needing a symlink, I say that I looked at Fedora, suse, mandriva, mageia and a few other and they all use something like :

/usr/i586-pc-mingw32/sys-root/mingw/
or /usr/i686-w64-mingw32/sys-root/mingw
or /usr/x86_64-w64-mingw32/sys-root/mingw

I wouldn't go as far as to say that all distribs are wrong :)

I don't see the point of having "mingw/" named as "i686-w64-mingw32/" for example, since this directory is already under "/usr/i686-w64-mingw32/", so it's redundant.

So I would say that if all library specific (bin/, lib/, include/) are always under "sys-root/mingw", then we can indeed have only one variable for the toolchain file to choose the mingw version. If like in your case the dir name under sys-root is not mingw, then we need another variable to select it.

Also, Hatari build system should try to accomodate to what most distribs provide to ease compilation and inclusion of Hatari in such distribs (especially when they all provide the same directory hierarchy in that case). More advanced users who use their own tools will have no problem adjusting their settings.

Nicolas




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