[PATCH v2] MinGW(-W64) cross-compilation

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

 



Differences with v1:
 - Dropped "MINGW: compat/bswap.h: include stdint.h", it isn't needed after
   "MINGW: git-compat-util.h: use inttypes.h for printf macros"
 - Split "MINGW: config.mak.uname allow using CURL for non-msysGit builds"
   into "MINGW: config.mak.uname: allow using cURL for non-msysGit builds"
   and "MINGW: fix main() signature in http-fetch.c and remote-curl.c"
 - Reworded "MINGW: git-compat-util.h: use inttypes.h for printf macros"
 - Reworded "MINGW: config.mak.uname: reorganize MINGW settings"
 - Rewrote "MINGW: config.mak.uname: drop -DNOGDI" into
   "MINGW: compat/poll/poll.c: undef NOGDI"
 - Rewrote "MINGW: config.mak.uname: drop USE_NED_ALLOCATOR" into
   "compat/nedmalloc/malloc.c.h: fix compilation under MinGW-W64"
 - Reworded "Makefile: introduce CROSS_COMPILE variable"
 - Reordeder commits (1-5 are Acked by: Eric Faye-Lund <kusmabite@xxxxxxxxx>)

=====================================

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 <git>
  make CROSS_COMPILE=i686-pc-mingw32- 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 <git>
  make CROSS_COMPILE=i686-w64-mingw32- NO_OPENSSL=1 MINGW=1 CURLDIR=/usr/i686-w64-mingw32/usr

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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]