Subject: Re: [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64

From: Marat Radchenko <[email-masked]>
Date: Tue, 14 Oct 2014 11:08:22 +0400

On Thu, Oct 09, 2014 at 09:22:19PM +0200, Johannes Schindelin wrote:
> Hi,
> 
> On Wed, 8 Oct 2014, Marat Radchenko wrote:
> 
> > +CC_MACH := $(shell sh -c '$(CC) -dumpmachine 2>/dev/null || echo not')
> 
> There is a rather huge problem with that. The latest mingw-w64 release,
> 4.9.1, does not do what you expect here: while '.../mingw32/bin/gcc -m32
> -o 32.exe test.c' and '.../mingw32/bin/gcc -m64 -o 64.exe test.c' work
> fine, producing i686 and x86_64 executables respectively,
> '.../mingw32/bin/gcc -dumpmachine' prints i686-w64-mingw32 *always*, even
> when specifying the -m64 option.
> 
> So unfortunately, the test introduced by this patch (intended to figure
> out whether the build targets i686, and skip a compiler and a linker
> option otherwise) is incorrect.

According to [1], it is by design. For now, I suggest using separate
gcc binaries for 32/64, without messing with -m32. Of course we can
fallback to `./configure` that will determine bitness by compiling something.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52096#c1

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to [email-masked]
To unsubscribe from this group, send email to
[email-masked]
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email-masked].
For more options, visit https://groups.google.com/d/optout.