Re: [RFC/PATCH v1] Towards MinGW(-W64) cross-compilation

2014-04-28 Thread Erik Faye-Lund
On Mon, Apr 28, 2014 at 3:51 PM, Marat Radchenko  wrote:
> This patch series fixes building on modern MinGW and (32bit only yet) 
> MinGW-W64.
>
> *Compilation* tested on:
>  - MSVC (via WinGit environment)
>  - msysGit environment
>  - Linux cross-toolchain i686-pc-mingw32 (4.8.2) with mingw-runtime-3.20.2
>  - Linux cross-toolchain i686-w64-mingw32 (4.8.2) with mingw64-runtime-3.1.0
>
> Stuff still required to make Git build with x86_64 MinGW-W64 toolchain:
>
> 1. Drop -D_USE_32BIT_TIME_T that was added in fa93bb to config.mak.uname
> because time_t cannot be 32bit on x86_64. I haven't yet figured out what
> should break if this define is removed (pointers are welcome) and why it was
> added in the first place.
>
> 2. Stop passing --large-address-aware to linker. I wonder if it does anything
> for 32bit MinGW builds.
>
> 3. Fix several places with mismatched pointer size casts.
>
> Building it from Gentoo Linux:
>
> MinGW:
>
>   crossdev -t i686-pc-mingw32
>   ARCH=x86 emerge-i686-pc-mingw32 -u dev-libs/libiconv sys-libs/zlib 
> net-misc/curl sys-devel/gettext expat
>   cd 
>   make CROSS_COMPILE=i686-pc-mingw32- CC=i686-pc-mingw32-gcc NO_OPENSSL=1 
> MINGW=1 CURLDIR=/usr/i686-pc-mingw32/usr
>
> MinGW-W64 (32 bit):
>
>   crossdev -t i686-w64-mingw32
>   ARCH=x86 emerge-i686-w64-mingw32 -u dev-libs/libiconv sys-libs/zlib 
> net-misc/curl sys-devel/gettext expat
>   cd 
>   make CROSS_COMPILE=i686-w64-mingw32- CC=i686-w64-mingw32-gcc NO_OPENSSL=1 
> MINGW=1 CURLDIR=/usr/i686-w64-mingw32/usr
>
> Debian/Ubuntu build instructions are WIP (xdeb is non-trivial at all).

Apart from some minor nits, this looks good to me. Thanks a lot for
spending the time, and I look forward to a second iteration!
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC/PATCH v1] Towards MinGW(-W64) cross-compilation

2014-04-28 Thread Marat Radchenko
This patch series fixes building on modern MinGW and (32bit only yet) MinGW-W64.

*Compilation* tested on:
 - MSVC (via WinGit environment)
 - msysGit environment
 - Linux cross-toolchain i686-pc-mingw32 (4.8.2) with mingw-runtime-3.20.2
 - Linux cross-toolchain i686-w64-mingw32 (4.8.2) with mingw64-runtime-3.1.0

Stuff still required to make Git build with x86_64 MinGW-W64 toolchain:

1. Drop -D_USE_32BIT_TIME_T that was added in fa93bb to config.mak.uname
because time_t cannot be 32bit on x86_64. I haven't yet figured out what
should break if this define is removed (pointers are welcome) and why it was
added in the first place.

2. Stop passing --large-address-aware to linker. I wonder if it does anything
for 32bit MinGW builds.

3. Fix several places with mismatched pointer size casts.

Building it from Gentoo Linux:

MinGW:

  crossdev -t i686-pc-mingw32
  ARCH=x86 emerge-i686-pc-mingw32 -u dev-libs/libiconv sys-libs/zlib 
net-misc/curl sys-devel/gettext expat
  cd 
  make CROSS_COMPILE=i686-pc-mingw32- CC=i686-pc-mingw32-gcc NO_OPENSSL=1 
MINGW=1 CURLDIR=/usr/i686-pc-mingw32/usr

MinGW-W64 (32 bit):

  crossdev -t i686-w64-mingw32
  ARCH=x86 emerge-i686-w64-mingw32 -u dev-libs/libiconv sys-libs/zlib 
net-misc/curl sys-devel/gettext expat
  cd 
  make CROSS_COMPILE=i686-w64-mingw32- CC=i686-w64-mingw32-gcc NO_OPENSSL=1 
MINGW=1 CURLDIR=/usr/i686-w64-mingw32/usr

Debian/Ubuntu build instructions are WIP (xdeb is non-trivial at all).

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html