Skip to content

Commit 7b40ae8

Browse files
dschogitster
authored andcommitted
config.mak.uname: supporting 64-bit MSys2
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent df5218b commit 7b40ae8

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

config.mak.uname

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,13 +518,12 @@ ifneq (,$(findstring MINGW,$(uname_S)))
518518
NO_INET_NTOP = YesPlease
519519
NO_POSIX_GOODIES = UnfortunatelyYes
520520
DEFAULT_HELP_FORMAT = html
521-
COMPAT_CFLAGS += -D_USE_32BIT_TIME_T -DNOGDI -Icompat -Icompat/win32
521+
COMPAT_CFLAGS += -DNOGDI -Icompat -Icompat/win32
522522
COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
523523
COMPAT_OBJS += compat/mingw.o compat/winansi.o \
524524
compat/win32/pthread.o compat/win32/syslog.o \
525525
compat/win32/dirent.o
526526
BASIC_CFLAGS += -DPROTECT_NTFS_DEFAULT=1
527-
BASIC_LDFLAGS += -Wl,--large-address-aware
528527
EXTLIBS += -lws2_32
529528
GITLIBS += git.res
530529
PTHREAD_LIBS =
@@ -545,8 +544,17 @@ ifneq (,$(wildcard ../THIS_IS_MSYSGIT))
545544
else
546545
ifeq ($(shell expr "$(uname_R)" : '2\.'),2)
547546
# MSys2
547+
prefix = /usr/
548+
ifeq (MINGW32,$(MSYSTEM))
549+
prefix = /mingw32
550+
endif
551+
ifeq (MINGW64,$(MSYSTEM))
552+
prefix = /mingw64
553+
else
554+
COMPAT_CFLAGS += -D_USE_32BIT_TIME_T
555+
BASIC_LDFLAGS += -Wl,--large-address-aware
556+
endif
548557
CC = gcc
549-
prefix = /mingw32
550558
COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO=0
551559
INSTALL = /bin/install
552560
NO_R_TO_GCC_LINKER = YesPlease

0 commit comments

Comments
 (0)