Skip to content

Commit 53f2952

Browse files
committed
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]>
1 parent 8bcc0f2 commit 53f2952

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
@@ -516,13 +516,12 @@ ifneq (,$(findstring MINGW,$(uname_S)))
516516
NO_POSIX_GOODIES = UnfortunatelyYes
517517
DEFAULT_HELP_FORMAT = html
518518
NO_D_INO_IN_DIRENT = YesPlease
519-
COMPAT_CFLAGS += -D_USE_32BIT_TIME_T -DNOGDI -Icompat -Icompat/win32
519+
COMPAT_CFLAGS += -DNOGDI -Icompat -Icompat/win32
520520
COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
521521
COMPAT_OBJS += compat/mingw.o compat/winansi.o \
522522
compat/win32/pthread.o compat/win32/syslog.o \
523523
compat/win32/dirent.o compat/win32/fscache.o
524524
BASIC_CFLAGS += -DPROTECT_NTFS_DEFAULT=1
525-
BASIC_LDFLAGS += -Wl,--large-address-aware
526525
EXTLIBS += -lws2_32
527526
GITLIBS += git.res
528527
PTHREAD_LIBS =
@@ -543,8 +542,17 @@ ifneq (,$(wildcard ../THIS_IS_MSYSGIT))
543542
else
544543
ifeq ($(shell expr "$(uname_R)" : '2\.'),2)
545544
# MSys2
545+
prefix = /usr/
546+
ifeq (MINGW32,$(MSYSTEM))
547+
prefix = /mingw32
548+
endif
549+
ifeq (MINGW64,$(MSYSTEM))
550+
prefix = /mingw64
551+
else
552+
COMPAT_CFLAGS += -D_USE_32BIT_TIME_T
553+
BASIC_LDFLAGS += -Wl,--large-address-aware
554+
endif
546555
CC = gcc
547-
prefix = /mingw32
548556
COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO=0
549557
INSTALL = /bin/install
550558
NO_R_TO_GCC_LINKER = YesPlease

0 commit comments

Comments
 (0)