diff --git a/compat/win32/fscache.c b/compat/win32/fscache.c index 7f6214cc0a92e2..cbd90ececf6b37 100644 --- a/compat/win32/fscache.c +++ b/compat/win32/fscache.c @@ -78,12 +78,17 @@ struct fsentry { }; #pragma GCC diagnostic pop +#pragma GCC diagnostic push +#ifdef __clang__ +#pragma GCC diagnostic ignored "-Wflexible-array-extensions" +#endif struct heap_fsentry { union { struct fsentry ent; char dummy[sizeof(struct fsentry) + MAX_LONG_PATH]; } u; }; +#pragma GCC diagnostic pop /* * Compares the paths of two fsentry structures for equality. @@ -596,7 +601,12 @@ void fscache_flush(void) int fscache_lstat(const char *filename, struct stat *st) { int dirlen, base, len; +#pragma GCC diagnostic push +#ifdef __clang__ +#pragma GCC diagnostic ignored "-Wflexible-array-extensions" +#endif struct heap_fsentry key[2]; +#pragma GCC diagnostic pop struct fsentry *fse; struct fscache *cache = fscache_getcache(); @@ -659,7 +669,12 @@ int fscache_lstat(const char *filename, struct stat *st) int fscache_is_mount_point(struct strbuf *path) { int dirlen, base, len; +#pragma GCC diagnostic push +#ifdef __clang__ +#pragma GCC diagnostic ignored "-Wflexible-array-extensions" +#endif struct heap_fsentry key[2]; +#pragma GCC diagnostic pop struct fsentry *fse; struct fscache *cache = fscache_getcache(); diff --git a/config.mak.uname b/config.mak.uname index c1355eff9d6bd8..c161ddeeeade94 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -432,7 +432,11 @@ ifeq ($(uname_S),Windows) ifeq (MINGW32,$(MSYSTEM)) prefix = /mingw32 else - prefix = /mingw64 + ifeq (CLANGARM64,$(MSYSTEM)) + prefix = /clangarm64 + else + prefix = /mingw64 + endif endif # Prepend MSVC 64-bit tool-chain to PATH. # @@ -486,7 +490,7 @@ ifeq ($(uname_S),Windows) NATIVE_CRLF = YesPlease DEFAULT_HELP_FORMAT = html SKIP_DASHED_BUILT_INS = YabbaDabbaDoo -ifeq (/mingw64,$(subst 32,64,$(prefix))) +ifeq (/mingw64,$(subst 32,64,$(subst clangarm,mingw,$(prefix)))) # Move system config into top-level /etc/ ETC_GITCONFIG = ../etc/gitconfig ETC_GITATTRIBUTES = ../etc/gitattributes @@ -724,8 +728,7 @@ ifeq ($(uname_S),MINGW) prefix = /mingw32 HOST_CPU = i686 BASIC_LDFLAGS += -Wl,--pic-executable,-e,_mainCRTStartup - endif - ifeq (MINGW64,$(MSYSTEM)) + else ifeq (MINGW64,$(MSYSTEM)) prefix = /mingw64 HOST_CPU = x86_64 BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup @@ -749,17 +752,12 @@ ifeq ($(uname_S),MINGW) USE_LIBPCRE = YesPlease USE_MIMALLOC = YesPlease NO_PYTHON = - ifeq (/mingw64,$(subst 32,64,$(prefix))) + ifeq (/mingw64,$(subst 32,64,$(subst clangarm,mingw,$(prefix)))) # Move system config into top-level /etc/ ETC_GITCONFIG = ../etc/gitconfig ETC_GITATTRIBUTES = ../etc/gitattributes endif -ifeq (i686,$(uname_M)) - MINGW_PREFIX := mingw32 -endif -ifeq (x86_64,$(uname_M)) - MINGW_PREFIX := mingw64 -endif + MINGW_PREFIX := $(subst /,,$(prefix)) DESTDIR_WINDOWS = $(shell cygpath -aw '$(DESTDIR_SQ)') DESTDIR_MIXED = $(shell cygpath -am '$(DESTDIR_SQ)')