mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] Congrats - short question.


From: Jos De Laender
Subject: Re: [Mingw-cross-env-list] Congrats - short question.
Date: Sun, 31 Jan 2016 11:23:33 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1



Op 31/01/2016 om 10:42 schreef Nagaev Boris:
On Sun, Jan 31, 2016 at 11:20 AM, Jos De Laender <address@hidden> wrote:
Thanks Tony and team !

Does that analysis match with the x86_64 targets working as expected ? Can I
rely reasonably on such build ?

Can I address also a totally different minor point but which I believe is
nevertheless very confusing for people like me who are just using your
toolchain without being familiar with all the stuff behind it. It was only
by trial and error I found out that x86_64 generates* Windows64 (PE32+)
executables and that i686* generates Windows32 (PE32) executables. My
initial understanding based on Google searches was that the first element of
the triplet indicates the platform on which the compiler is running (and you
could imagine generating PE32/PE32+ as well on i686 as on x86_64). So that's
where I got pretty confused. I would like to suggest you getting a table in
the documentation that clearly indicates what is the meaning of all the
triplet stuff you are using and what's the practical use. (I guess that your
users either are running on i686 either on x86_64 and want to generate
either PE32 or PE32+. In both cases static or shared. So the list shouldn't
be longer than 8 entries ?)
Actually, there are 3 triplets in MXE:

  * BUILD, e.g. x86_64-unknown-linux-gnu.
  * HOST, e.g. x86_64-unknown-linux-gnu.
  * TARGET, e.g., i686-w64-mingw32.static

All of them are in form of cpu-vendor-os.

BUILD describes the machine which builds the cross-compiler, HOST is
the machine on which the cross-compiler works (in case of MXE
BUILD=HOST). TARGET describes where the result of cross-compilation is
supposed to run.

See also 
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Specifying-Target-Triplets.html



Actually I seem to understand that.
The point is however this 'i686-w64-mingw32' stuff is on your documentation described as 'Host Triplet'. In the Makefile again it is described as MXE_TARGETS, consistent with your explanation.
Is BUILD/HOST somewhere relevant anyway ?
And then there's this w64-mingw32, I understand meanwhile where it is coming from, but which add to my confusion. It appears to me that unless clearly and explicitly documented with an end user in mind, this is going to stay confusing for newbies just wanting to use.
Probably it could be as simple as documenting:

<start suggestion>

- You want a 64 bit Windows executable , statically linked into one big executable : use MXE_TARGET x86_64-w64-mingw32.static - You want a 64 bit Windows executable , splitted in an executable and dependant dlls : use MXE_TARGET x86_64-w64-mingw32.shared - You want a 32 bit Windows executable , statically linked into one big executable : use MXE_TARGET i686-w64-mingw32.static - You want a 32 bit Windows executable , splitted in an executable and dependant dlls : use MXE_TARGET i686-w64-mingw32.shared

Remark 1 : the 'w64-mingw32' in those names are left-overs from historical evolutions in the open source cross-compilation world and refer in no way to the result being 64 or 32 bit windows.

Remark 2 : unless you are developing GPL open source you will want to use the shared build in order to avoid (L)GPL violations. Having said that, licensing is complex business and a static build can violate licenses even if you are releasing under the GPL. The same goes for shared builds, but your odds are better.

<end suggestion>

Many thanks,


--
Jos De Laender

http://www.jodela.be
https://www.de-laender.be:9961


---
Dit e-mailbericht is gecontroleerd op virussen met Avast antivirussoftware.
https://www.avast.com/antivirus




reply via email to

[Prev in Thread] Current Thread [Next in Thread]