[Top][All Lists]

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

Re: [Mingw-cross-env-list] Build / Host / Target

From: Mark Brand
Subject: Re: [Mingw-cross-env-list] Build / Host / Target
Date: Fri, 21 May 2010 15:00:52 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100520 SUSE/3.1rc1-1.1 Thunderbird/3.1

I think the build / host / target are quite easy to understand:

     "Build" is where the program is compiled.
     "Host" is where the program will run.
     "Target" is where the program produces code for.

Thus, "target" makes only sense for compilers and similar stuff.
In Mingw-cross-env, we have the following situation:

     Normal packages:

         build = Unix
         host  = Windows

     Native packages (e.g. pkg-config):

         build  = Unix
         host   = Unix

     GCC, Binutils, NSIS:

         build  = Unix
         host   = Unix
         target = Windows

Here is the new and improved version:

Describe the platform we are building Qt *for* (MinGW aka "win32-g++"):
  -arch  CFG_ARCH
  -xplatform XPLATFORM
  -big-endian or -little-endian switch CFG_ENDIAN
I would still `think` that -arch and -*-endian are the buidling *on* platform.

Describe the platform we are building Qt *on* (some form of Unix):
-host-arch CFG_HOST_ARCH
-platform PLATFORM
-host-little-endian or -host-big-endian switch CFG_HOST_ENDIAN
These definitions of host* seem to contradict Volker's definition.
Host can be unix or windows, but arch is always unix.
I would also think that "-arch" and "-host-arch" should be switched
in that summary, as well as "-*-endian" and "-host-*-endian". Mark,
are you sure that your summary is correct?

Well, even "sure" admits of degree and, but I still have confidence in my summary. :) Here are two randomly selected pieces of evidence that seem strong to me:

1. Consider how the word "host" is used in the warning in the configure script about pkg-config when cross-compiling.

2. Consider the endian tests in the configure script at line 5586. Notice how the "host" endian tests are coupled with the plain QMAKESPEC when the "plain" endian test are coupled with XQMAKESPEC.

Perhaps this fits into your "build / host / target" exposition if we consider "host" in the configure script to describe the compiler used to build the Qt libraries. The "host" of the compiler is unix and the "target" is mingw. The "X" indicates a "target" that is different from the "host". As your exposition make clear, the terms "build / host / target" describe specific programs, not complex systems like "the Qt build system".

This is starting to sound like literary theory, but my conjecture is that the "host" and "X" elements appeared later in this history of this script as cross-compiling capabilities where added.



reply via email to

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