Subject: Re: [PATCH 01/12] MINGW: config.mak.uname: add explicit way to request MinGW-build

From: Jonathan Nieder <[email-masked]>
Date: Mon, 28 Apr 2014 09:12:37 -0700

Hi,

Marat Radchenko wrote:

> When crosscompiling, one cannot rely on `uname` from host system.
> Thus, add an option to use `make MINGW=1` for building MinGW build
> from non-MinGW host (Linux, for example).

The same also applies when cross-compiling for any other platform, no?
The consistent thing to do would be to add an ifdef block like this
for every other platform,version,cpuarch triplet we care about, which
doesn't seem like a great change.

Can't the caller pass in uname_S=MINGW uname_M=x86_64 uname_O=MINGW
uname_R= uname_P= uname_V= (or a single uname_A variable that the
makefile could decompose if that is more convenient)?

Of course that is fussy.  It would be better to infer everything from
CC, since the caller has to specify CC anyway.  Does the output from
"$(CC) -dumpmachine" have the information you need?

Curious,
Jonathan