config.mak.uname: provide a way to explicitely request MinGW build. This is required to perform Linux->MinGW crosscompilation. --- > Personally I don't see why ideally I shouldn't be able to build upstream Git > for Windows with mingw without leaving my Linux system. One day you might be able, but as of today... 1. Obtain x86_64-w64-mingw32 compiler for your *nix distro * [Gentoo] emerge crossdev && crossdev -t x86_64-w64-mingw32 * [Debian/Ubuntu] apt-get install mingw-w64 2. Apply patch from this email to Git sources (git/git or msysgit/git - doesn't matter) 3. `make CC=x86_64-w64-mingw32-gcc MINGW=1` 4. Observe errors [1] I would be happy to find out I'm doing something wrong -- Johannes says building mingw64 Git is dirt-easy. [1]: In file included from /usr/x86_64-w64-mingw32/usr/include/windows.h:9:0, from /usr/x86_64-w64-mingw32/usr/include/winsock2.h:23, from git-compat-util.h:93, from cache.h:4, from credential-store.c:1: /usr/x86_64-w64-mingw32/usr/include/_mingw.h:456:2: error: #error You cannot use 32-bit time_t (_USE_32BIT_TIME_T) with _WIN64 #error You cannot use 32-bit time_t (_USE_32BIT_TIME_T) with _WIN64 ^ In file included from git-compat-util.h:134:0, from cache.h:4, from credential-store.c:1: compat/mingw.h:8:13: error: conflicting types for 'pid_t' typedef int pid_t; ^ In file included from /usr/x86_64-w64-mingw32/usr/include/process.h:12:0, from /usr/x86_64-w64-mingw32/usr/include/unistd.h:11, from git-compat-util.h:98, from cache.h:4, from credential-store.c:1: /usr/x86_64-w64-mingw32/usr/include/sys/types.h:68:16: note: previous declaration of 'pid_t' was here typedef _pid_t pid_t; ^ config.mak.uname | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config.mak.uname b/config.mak.uname index 82b8dff..4f4d84f 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -13,6 +13,11 @@ ifdef MSVC uname_O := Windows endif +ifdef MINGW + uname_S := MINGW + uname_O := MINGW +endif + # We choose to avoid "if .. else if .. else .. endif endif" # because maintaining the nesting to match is a pain. If # we had "elif" things would have been much nicer... -- 1.8.3.2 -- 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