Skip to content

Commit 35bd8f9

Browse files
dschonalla
authored andcommitted
Start supporting 64-bit MSys2
This just makes things compile, the test suite most likely needs extra tender loving care in addition to this change. 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 55f0555 commit 35bd8f9

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
@@ -511,13 +511,12 @@ ifneq (,$(findstring MINGW,$(uname_S)))
511511
NO_POSIX_GOODIES = UnfortunatelyYes
512512
DEFAULT_HELP_FORMAT = html
513513
NO_D_INO_IN_DIRENT = YesPlease
514-
COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -D_USE_32BIT_TIME_T -DNOGDI -Icompat -Icompat/win32
514+
COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/win32
515515
COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
516516
COMPAT_OBJS += compat/mingw.o compat/winansi.o \
517517
compat/win32/pthread.o compat/win32/syslog.o \
518518
compat/win32/dirent.o
519519
BASIC_CFLAGS += -DPROTECT_NTFS_DEFAULT=1
520-
BASIC_LDFLAGS += -Wl,--large-address-aware
521520
EXTLIBS += -lws2_32
522521
GITLIBS += git.res
523522
PTHREAD_LIBS =
@@ -537,9 +536,18 @@ ifneq (,$(wildcard ../THIS_IS_MSYSGIT))
537536
else
538537
ifeq ($(shell expr "$(uname_R)" : '2\.'),2)
539538
# MSys2
539+
prefix = /usr/
540+
ifeq (MINGW32,$(MSYSTEM))
541+
prefix = /mingw32/
542+
endif
543+
ifeq (MINGW64,$(MSYSTEM))
544+
prefix = /mingw64/
545+
else
546+
COMPAT_CFLAGS += -D_USE_32BIT_TIME_T
547+
BASIC_LDFLAGS += -Wl,--large-address-aware
548+
endif
540549
CC = gcc
541550
htmldir = share/doc/git/$(firstword $(subst -, ,$(GIT_VERSION)))/html
542-
prefix = /mingw32/
543551
INSTALL = /bin/install
544552
NO_R_TO_GCC_LINKER = YesPlease
545553
INTERNAL_QSORT = YesPlease

0 commit comments

Comments
 (0)