From f90cf2b9203e81e3a2b70b15480628e9189b7e60 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sun, 31 May 2009 18:15:15 +0200 Subject: MinGW: GCC >= 4 does not need SNPRINTF_SIZE_CORR anymore Signed-off-by: Johannes Schindelin Signed-off-by: Steffen Prohaska Signed-off-by: Junio C Hamano --- Makefile | 1 - 1 file changed, 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 0ab1cff30d..f63eaeae4f 100644 --- a/Makefile +++ b/Makefile @@ -847,7 +847,6 @@ ifneq (,$(findstring MINGW,$(uname_S))) UNRELIABLE_FSTAT = UnfortunatelyYes OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/regex -Icompat/fnmatch - COMPAT_CFLAGS += -DSNPRINTF_SIZE_CORR=1 COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\" COMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/regex/regex.o compat/winansi.o EXTLIBS += -lws2_32 -- cgit v1.2.3 From 900a5d075e8b48025439966dc3863189874bae3b Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sun, 31 May 2009 18:15:16 +0200 Subject: Quiet make: do not leave Windows behind On Windows, we have to check whether there are scripts which would override .exe files, but this check missed the "quietification". Make now prints 'BUILTIN all' instead of a long chain of 'test || rm' commands. [spr: added clarification what make will print. ] Signed-off-by: Johannes Schindelin Signed-off-by: Steffen Prohaska Signed-off-by: Junio C Hamano --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index f63eaeae4f..107015a598 100644 --- a/Makefile +++ b/Makefile @@ -1204,7 +1204,7 @@ SHELL = $(SHELL_PATH) all:: shell_compatibility_test $(ALL_PROGRAMS) $(BUILT_INS) $(OTHER_PROGRAMS) GIT-BUILD-OPTIONS ifneq (,$X) - $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), test '$p' -ef '$p$X' || $(RM) '$p';) + $(QUIET_BUILT_IN)$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), test '$p' -ef '$p$X' || $(RM) '$p';) endif all:: -- cgit v1.2.3 From f0ed8226c9c65f2a324610258418258229e77fbe Mon Sep 17 00:00:00 2001 From: Marius Storm-Olsen Date: Sun, 31 May 2009 18:15:23 +0200 Subject: Add custom memory allocator to MinGW and MacOS builds The standard allocator on Windows is pretty bad prior to Windows Vista, and nedmalloc is better than the modified dlmalloc provided with newer versions of the MinGW libc. NedMalloc stats in Git ---------------------- All results are the best result out of 3 runs. The benchmarks have been done on different hardware, so the repack times are not comparable. These benchmarks are all based on 'git repack -adf' on the Linux kernel. XP ----------------------------------------------- MinGW Threads Total Time Speed ----------------------------------------------- 3.4.2 (1T) 00:12:28.422 3.4.2 + nedmalloc (1T) 00:07:25.437 1.68x 3.4.5 (1T) 00:12:20.718 3.4.5 + nedmalloc (1T) 00:07:24.809 1.67x 4.3.3-tdm (1T) 00:12:01.843 4.3.3-tdm + nedmalloc (1T) 00:07:16.468 1.65x 4.3.3-tdm (2T) 00:07:35.062 4.3.3-tdm + nedmalloc (2T) 00:04:57.874 1.54x Vista ----------------------------------------------- MinGW Threads Total Time Speed ----------------------------------------------- 4.3.3-tdm (1T) 00:07:40.844 4.3.3-tdm + nedmalloc (1T) 00:07:17.548 1.05x 4.3.3-tdm (2T) 00:05:33.746 4.3.3-tdm + nedmalloc (2T) 00:05:27.334 1.02x Mac Mini ----------------------------------------------- GCC Threads Total Time Speed ----------------------------------------------- i686-darwin9-4.0.1 (2T) 00:09:57.346 i686-darwin9-4.0.1+ned (2T) 00:08:51.072 1.12x Signed-off-by: Marius Storm-Olsen Signed-off-by: Steffen Prohaska Signed-off-by: Junio C Hamano --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 107015a598..c718ec7af2 100644 --- a/Makefile +++ b/Makefile @@ -178,6 +178,9 @@ all:: # # Define NO_CROSS_DIRECTORY_HARDLINKS if you plan to distribute the installed # programs as a tar, where bin/ and libexec/ might be on different file systems. +# +# Define USE_NED_ALLOCATOR if you want to replace the platforms default +# memory allocators with the nedmalloc allocator written by Niall Douglas. GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE @$(SHELL_PATH) ./GIT-VERSION-GEN @@ -844,6 +847,7 @@ ifneq (,$(findstring MINGW,$(uname_S))) NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease NO_NSEC = YesPlease USE_WIN32_MMAP = YesPlease + USE_NED_ALLOCATOR = YesPlease UNRELIABLE_FSTAT = UnfortunatelyYes OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/regex -Icompat/fnmatch @@ -1130,6 +1134,11 @@ ifdef UNRELIABLE_FSTAT BASIC_CFLAGS += -DUNRELIABLE_FSTAT endif +ifdef USE_NED_ALLOCATOR + COMPAT_CFLAGS += -DUSE_NED_ALLOCATOR -DOVERRIDE_STRDUP -DNDEBUG -DREPLACE_SYSTEM_ALLOCATOR -Icompat/nedmalloc + COMPAT_OBJS += compat/nedmalloc/nedmalloc.o +endif + ifeq ($(TCLTK_PATH),) NO_TCLTK=NoThanks endif -- cgit v1.2.3 From 48c46f1a14b45756b7354bdf2a52be8d93ebfaf3 Mon Sep 17 00:00:00 2001 From: Steffen Prohaska Date: Sun, 31 May 2009 18:15:25 +0200 Subject: MinGW: Teach Makefile to detect msysgit and apply specific settings This commit changes handling of the msysgit specific settings, so that they can be applied to official git.git. Some msysgit settings differ from the standard MinGW settings. We move them into an ifndef block that is only evaluated if a file THIS_IS_MSYSGIT is present in the parent directory, which is the case for an msysgit working environment. The tag file is unlikely to be present accidentally. Signed-off-by: Steffen Prohaska Signed-off-by: Junio C Hamano --- Makefile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c718ec7af2..a51cff925d 100644 --- a/Makefile +++ b/Makefile @@ -825,7 +825,6 @@ ifneq (,$(findstring MINGW,$(uname_S))) pathsep = ; NO_PREAD = YesPlease NO_OPENSSL = YesPlease - NO_CURL = YesPlease NO_SYMLINK_HEAD = YesPlease NO_IPV6 = YesPlease NO_SETENV = YesPlease @@ -833,7 +832,6 @@ ifneq (,$(findstring MINGW,$(uname_S))) NO_STRCASESTR = YesPlease NO_STRLCPY = YesPlease NO_MEMMEM = YesPlease - NO_PTHREADS = YesPlease NEEDS_LIBICONV = YesPlease OLD_ICONV = YesPlease NO_C99_FORMAT = YesPlease @@ -855,6 +853,18 @@ ifneq (,$(findstring MINGW,$(uname_S))) COMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/regex/regex.o compat/winansi.o EXTLIBS += -lws2_32 X = .exe +ifneq (,$(wildcard ../THIS_IS_MSYSGIT)) + htmldir=doc/git/html/ + prefix = + INSTALL = /bin/install + EXTLIBS += /mingw/lib/libz.a + NO_R_TO_GCC_LINKER = YesPlease + INTERNAL_QSORT = YesPlease + THREADED_DELTA_SEARCH = YesPlease +else + NO_CURL = YesPlease + NO_PTHREADS = YesPlease +endif endif ifneq (,$(findstring arm,$(uname_M))) ARM_SHA1 = YesPlease -- cgit v1.2.3 From 021fcd99bdafa43aa2834623d9257a1dea4492c2 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Thu, 11 Jun 2009 22:56:12 +0200 Subject: compat/ has subdirectories: do not omit them in 'make clean' [1. text/plain] Signed-off-by: Johannes Sixt Signed-off-by: Junio C Hamano --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a51cff925d..867438de95 100644 --- a/Makefile +++ b/Makefile @@ -1662,7 +1662,7 @@ distclean: clean $(RM) configure clean: - $(RM) *.o mozilla-sha1/*.o arm/*.o ppc/*.o compat/*.o xdiff/*.o \ + $(RM) *.o mozilla-sha1/*.o arm/*.o ppc/*.o compat/*.o compat/*/*.o xdiff/*.o \ $(LIB_FILE) $(XDIFF_LIB) $(RM) $(ALL_PROGRAMS) $(BUILT_INS) git$X $(RM) $(TEST_PROGRAMS) -- cgit v1.2.3