git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] MinGW(-W64) cross-compilation
@ 2014-04-29  9:11 Marat Radchenko
  2014-04-29  9:11 ` [PATCH 01/12] MINGW: compat/mingw.h: do not attempt to redefine lseek on mingw-w64 Marat Radchenko
                   ` (11 more replies)
  0 siblings, 12 replies; 29+ messages in thread
From: Marat Radchenko @ 2014-04-29  9:11 UTC (permalink / raw)
  To: GIT Mailing-list; +Cc: marat, Felipe Contreras, Erik Faye-Lund

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@gmail.com>)

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

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

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2014-05-06 17:41 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-29  9:11 [PATCH v2] MinGW(-W64) cross-compilation Marat Radchenko
2014-04-29  9:11 ` [PATCH 01/12] MINGW: compat/mingw.h: do not attempt to redefine lseek on mingw-w64 Marat Radchenko
2014-04-29  9:11 ` [PATCH 02/12] MSVC: config.mak.uname: drop -D__USE_MINGW_ACCESS from CFLAGS Marat Radchenko
2014-04-29  9:11 ` [PATCH 03/12] MINGW: compat/mingw.h: drop fork() definition Marat Radchenko
2014-04-29  9:11 ` [PATCH 04/12] MINGW: do not fail at redefining pid_t on MinGW-W64 Marat Radchenko
2014-04-29  9:11 ` [PATCH 05/12] MINGW: config.mak.uname: allow using cURL for non-msysGit builds Marat Radchenko
2014-04-29  9:12 ` [PATCH 06/12] MINGW: git-compat-util.h: use inttypes.h for printf macros Marat Radchenko
2014-04-29  9:12 ` [PATCH 07/12] MINGW: config.mak.uname: reorganize MINGW settings Marat Radchenko
2014-04-29  9:12 ` [PATCH 08/12] MINGW: fix main() signature in http-fetch.c and remote-curl.c Marat Radchenko
2014-04-30  8:35   ` Karsten Blees
2014-04-30  8:56     ` Erik Faye-Lund
2014-04-30 12:31       ` Johannes Schindelin
2014-04-30 16:38         ` Felipe Contreras
2014-04-30 22:17     ` Stepan Kasal
2014-04-30 22:28       ` [PATCH] Win32: move main macro to a function Stepan Kasal
2014-05-03  7:43     ` [PATCH 08/12] MINGW: fix main() signature in http-fetch.c and remote-curl.c Marat Radchenko
2014-04-29  9:12 ` [PATCH 09/12] Makefile: introduce CROSS_COMPILE variable Marat Radchenko
2014-04-29  9:12 ` [PATCH 10/12] MINGW: compat/poll/poll.c: undef NOGDI Marat Radchenko
2014-04-30 11:41   ` Stepan Kasal
2014-05-03  7:00     ` Marat Radchenko
2014-05-04 18:52       ` Stepan Kasal
2014-05-04 20:55         ` Marat Radchenko
2014-05-04 21:46           ` '502304919' via msysGit
2014-05-05  7:35           ` Stepan Kasal
2014-05-05  7:32             ` Felipe Contreras
2014-05-05 12:15               ` [msysGit] " Stepan Kasal
2014-05-04 20:14       ` Felipe Contreras
2014-04-29  9:12 ` [PATCH 11/12] compat/nedmalloc/malloc.c.h: fix compilation under MinGW-W64 Marat Radchenko
2014-04-29  9:12 ` [PATCH 12/12] MINGW: config.mak.uname: add explicit way to request MinGW-build Marat Radchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).