git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/5] config.mak.uname: supporting 64-bit MSys2

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 13, 2016, 13:31 UTC
Message-ID
<a54e0357d8f274c7ffa49daa2c91ba371fa501ab.1452691805.git.johannes.schindelin@gmx.de>
In-Reply-To
<cover.1452691805.git.johannes.schindelin@gmx.de>

This just makes things compile, the test suite needs extra tender loving care in addition to this change. We will address these issues in later commits.

While at it, also allow building MSys2 Git (i.e. a Git that uses MSys2's POSIX emulation layer).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 config.mak.uname | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/config.mak.uname b/config.mak.uname
index b0592c1..4b2e1b8 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -518,13 +518,12 @@ ifneq (,$(findstring MINGW,$(uname_S)))
 	NO_INET_NTOP = YesPlease
 	NO_POSIX_GOODIES = UnfortunatelyYes
 	DEFAULT_HELP_FORMAT = html
-	COMPAT_CFLAGS += -D_USE_32BIT_TIME_T -DNOGDI -Icompat -Icompat/win32
+	COMPAT_CFLAGS += -DNOGDI -Icompat -Icompat/win32
 	COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
 	COMPAT_OBJS += compat/mingw.o compat/winansi.o \
 		compat/win32/pthread.o compat/win32/syslog.o \
 		compat/win32/dirent.o
 	BASIC_CFLAGS += -DPROTECT_NTFS_DEFAULT=1
-	BASIC_LDFLAGS += -Wl,--large-address-aware
 	EXTLIBS += -lws2_32
 	GITLIBS += git.res
 	PTHREAD_LIBS =
@@ -545,8 +544,17 @@ ifneq (,$(wildcard ../THIS_IS_MSYSGIT))
 else
 	ifeq ($(shell expr "$(uname_R)" : '2\.'),2)
 		# MSys2
+		prefix = /usr/
+		ifeq (MINGW32,$(MSYSTEM))
+			prefix = /mingw32
+		endif
+		ifeq (MINGW64,$(MSYSTEM))
+			prefix = /mingw64
+		else
+			COMPAT_CFLAGS += -D_USE_32BIT_TIME_T
+			BASIC_LDFLAGS += -Wl,--large-address-aware
+		endif
 		CC = gcc
-		prefix = /mingw32
 		COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO=0
 		INSTALL = /bin/install
 		NO_R_TO_GCC_LINKER = YesPlease
-- 
2.6.3.windows.1.300.g1c25e49
Previous: Dennis KaarsemakerNext: SZEDER Gábor
Message 6 of 23 in “Fix compile errors with MSys2”
  1. 0/5 Fix compile errors with MSys2Johannes Schindelin, Jan 13, 2016
  2. 1/5 config.mak.uname: support MSys2Johannes Schindelin, Jan 13, 2016
  3. Jeff KingJan 13, 2016
  4. Johannes SchindelinJan 13, 2016
  5. Dennis KaarsemakerJan 13, 2016
  6. 2/5 config.mak.uname: supporting 64-bit MSys2Johannes Schindelin, Jan 13, 2016
  7. SZEDER GáborJan 21, 2016
  8. Johannes SchindelinJan 21, 2016
  9. 3/5 nedmalloc: allow compiling with MSys2's compilerJohannes Schindelin, Jan 13, 2016
  10. Junio C HamanoJan 13, 2016
  11. 4/5 compat/mingw: support MSys2-based MinGW buildJohannes Schindelin, Jan 13, 2016
  12. 5/5 compat/winansi: support compiling with MSys2Johannes Schindelin, Jan 13, 2016
  13. Junio C HamanoJan 13, 2016
  14. Johannes SchindelinJan 14, 2016
  15. 0/5 Fix compile errors with MSys2Johannes Schindelin, Jan 14, 2016
  16. 1/5 config.mak.uname: support MSys2Johannes Schindelin, Jan 14, 2016
  17. Johannes SixtJan 14, 2016
  18. 2/5 config.mak.uname: supporting 64-bit MSys2Johannes Schindelin, Jan 14, 2016
  19. 3/5 nedmalloc: allow compiling with MSys2's compilerJohannes Schindelin, Jan 14, 2016
  20. 4/5 compat/mingw: support MSys2-based MinGW buildJohannes Schindelin, Jan 14, 2016
  21. 5/5 compat/winansi: support compiling with MSys2Johannes Schindelin, Jan 14, 2016
  22. Junio C HamanoJan 14, 2016
  23. Johannes SixtJan 14, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.