* [PATCH 01/14] MINGW: compat/mingw.h: do not attempt to redefine lseek on mingw-w64
2014-10-08 18:00 [PATCH v5] MinGW(-W64) compilation Marat Radchenko
@ 2014-10-08 18:00 ` Marat Radchenko
2014-10-09 1:01 ` Erik Faye-Lund
2014-10-08 18:00 ` [PATCH 02/14] MSVC: config.mak.uname: drop -D__USE_MINGW_ACCESS from CFLAGS Marat Radchenko
` (14 subsequent siblings)
15 siblings, 1 reply; 45+ messages in thread
From: Marat Radchenko @ 2014-10-08 18:00 UTC (permalink / raw)
To: git; +Cc: marat, msysGit
Unlike MinGW, MinGW-W64 has lseek already properly defined in io.h.
Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
Acked-by: Eric Faye-Lund <kusmabite@gmail.com>
---
compat/mingw.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/compat/mingw.h b/compat/mingw.h
index 5e499cf..36a47cb 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -286,7 +286,9 @@ static inline int getrlimit(int resource, struct rlimit *rlp)
* Use mingw specific stat()/lstat()/fstat() implementations on Windows.
*/
#define off_t off64_t
+#ifndef lseek
#define lseek _lseeki64
+#endif
/* use struct stat with 64 bit st_size */
#ifdef stat
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply related [flat|nested] 45+ messages in thread
* Re: [PATCH 01/14] MINGW: compat/mingw.h: do not attempt to redefine lseek on mingw-w64
2014-10-08 18:00 ` [PATCH 01/14] MINGW: compat/mingw.h: do not attempt to redefine lseek on mingw-w64 Marat Radchenko
@ 2014-10-09 1:01 ` Erik Faye-Lund
0 siblings, 0 replies; 45+ messages in thread
From: Erik Faye-Lund @ 2014-10-09 1:01 UTC (permalink / raw)
To: Marat Radchenko; +Cc: GIT Mailing-list, msysGit
On Wed, Oct 8, 2014 at 8:00 PM, Marat Radchenko <marat@slonopotamus.org> wrote:
> Unlike MinGW, MinGW-W64 has lseek already properly defined in io.h.
>
> Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
> Acked-by: Eric Faye-Lund <kusmabite@gmail.com>
I spell my name with a K, "Erik Faye-Lund".
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 02/14] MSVC: config.mak.uname: drop -D__USE_MINGW_ACCESS from CFLAGS
2014-10-08 18:00 [PATCH v5] MinGW(-W64) compilation Marat Radchenko
2014-10-08 18:00 ` [PATCH 01/14] MINGW: compat/mingw.h: do not attempt to redefine lseek on mingw-w64 Marat Radchenko
@ 2014-10-08 18:00 ` Marat Radchenko
2014-10-08 18:00 ` [PATCH 03/14] MINGW: compat/mingw.h: drop fork() definition Marat Radchenko
` (13 subsequent siblings)
15 siblings, 0 replies; 45+ messages in thread
From: Marat Radchenko @ 2014-10-08 18:00 UTC (permalink / raw)
To: git; +Cc: marat, msysGit
-D__USE_MINGW_ACCESS only affects MinGW and does nothing when
MSVC is used.
Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
Acked-by: Eric Faye-Lund <kusmabite@gmail.com>
---
config.mak.uname | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config.mak.uname b/config.mak.uname
index a2f380f..20cbdcf 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -368,7 +368,7 @@ ifeq ($(uname_S),Windows)
COMPAT_OBJS = compat/msvc.o compat/winansi.o \
compat/win32/pthread.o compat/win32/syslog.o \
compat/win32/dirent.o
- COMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DNOGDI -DHAVE_STRING_H -Icompat -Icompat/regex -Icompat/win32 -DSTRIP_EXTENSION=\".exe\"
+ COMPAT_CFLAGS = -DNOGDI -DHAVE_STRING_H -Icompat -Icompat/regex -Icompat/win32 -DSTRIP_EXTENSION=\".exe\"
BASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE
EXTLIBS = user32.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib invalidcontinue.obj
PTHREAD_LIBS =
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 03/14] MINGW: compat/mingw.h: drop fork() definition
2014-10-08 18:00 [PATCH v5] MinGW(-W64) compilation Marat Radchenko
2014-10-08 18:00 ` [PATCH 01/14] MINGW: compat/mingw.h: do not attempt to redefine lseek on mingw-w64 Marat Radchenko
2014-10-08 18:00 ` [PATCH 02/14] MSVC: config.mak.uname: drop -D__USE_MINGW_ACCESS from CFLAGS Marat Radchenko
@ 2014-10-08 18:00 ` Marat Radchenko
2014-10-08 18:00 ` [PATCH 04/14] MINGW: do not fail at redefining pid_t on MinGW-W64 Marat Radchenko
` (12 subsequent siblings)
15 siblings, 0 replies; 45+ messages in thread
From: Marat Radchenko @ 2014-10-08 18:00 UTC (permalink / raw)
To: git; +Cc: marat, msysGit
fork() is not used in MinGW builds but causes a compiler warning
on x86_64 MinGW-W64: conflicting types for built-in function 'fork'
Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
Acked-by: Eric Faye-Lund <kusmabite@gmail.com>
---
compat/mingw.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/compat/mingw.h b/compat/mingw.h
index 36a47cb..1ddd663 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -92,8 +92,6 @@ static inline int symlink(const char *oldpath, const char *newpath)
{ errno = ENOSYS; return -1; }
static inline int fchmod(int fildes, mode_t mode)
{ errno = ENOSYS; return -1; }
-static inline pid_t fork(void)
-{ errno = ENOSYS; return -1; }
static inline unsigned int alarm(unsigned int seconds)
{ return 0; }
static inline int fsync(int fd)
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 04/14] MINGW: do not fail at redefining pid_t on MinGW-W64
2014-10-08 18:00 [PATCH v5] MinGW(-W64) compilation Marat Radchenko
` (2 preceding siblings ...)
2014-10-08 18:00 ` [PATCH 03/14] MINGW: compat/mingw.h: drop fork() definition Marat Radchenko
@ 2014-10-08 18:00 ` Marat Radchenko
2014-10-08 18:00 ` [PATCH 05/14] MINGW: config.mak.uname: allow using cURL for non-msysGit builds Marat Radchenko
` (11 subsequent siblings)
15 siblings, 0 replies; 45+ messages in thread
From: Marat Radchenko @ 2014-10-08 18:00 UTC (permalink / raw)
To: git; +Cc: marat, msysGit
pid_t is available in sys/types.h on both MinGW and MinGW-W64
Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
Acked-by: Eric Faye-Lund <kusmabite@gmail.com>
---
compat/mingw.h | 1 -
compat/msvc.h | 2 ++
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/compat/mingw.h b/compat/mingw.h
index 1ddd663..ba05044 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -5,7 +5,6 @@
* things that are not available in header files
*/
-typedef int pid_t;
typedef int uid_t;
typedef int socklen_t;
#define hstrerror strerror
diff --git a/compat/msvc.h b/compat/msvc.h
index 580bb55..a63d878 100644
--- a/compat/msvc.h
+++ b/compat/msvc.h
@@ -15,6 +15,8 @@
#define strtoull _strtoui64
#define strtoll _strtoi64
+typedef int pid_t;
+
static __inline int strcasecmp (const char *s1, const char *s2)
{
int size1 = strlen(s1);
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 05/14] MINGW: config.mak.uname: allow using cURL for non-msysGit builds
2014-10-08 18:00 [PATCH v5] MinGW(-W64) compilation Marat Radchenko
` (3 preceding siblings ...)
2014-10-08 18:00 ` [PATCH 04/14] MINGW: do not fail at redefining pid_t on MinGW-W64 Marat Radchenko
@ 2014-10-08 18:00 ` Marat Radchenko
2014-10-08 18:00 ` [PATCH 06/14] MINGW: compat/winansi.c: do not redefine CONSOLE_FONT_INFOEX Marat Radchenko
` (10 subsequent siblings)
15 siblings, 0 replies; 45+ messages in thread
From: Marat Radchenko @ 2014-10-08 18:00 UTC (permalink / raw)
To: git; +Cc: marat, msysGit
Is it absolutely valid and possible to have cURL in generic
MinGW environment. Building Git without cURL is still possible
by passing NO_CURL=1
Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
Acked-by: Eric Faye-Lund <kusmabite@gmail.com>
---
config.mak.uname | 2 --
1 file changed, 2 deletions(-)
diff --git a/config.mak.uname b/config.mak.uname
index 20cbdcf..324a7fc 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -531,8 +531,6 @@ ifneq (,$(wildcard ../THIS_IS_MSYSGIT))
INTERNAL_QSORT = YesPlease
HAVE_LIBCHARSET_H = YesPlease
NO_GETTEXT = YesPlease
-else
- NO_CURL = YesPlease
endif
endif
ifeq ($(uname_S),QNX)
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 06/14] MINGW: compat/winansi.c: do not redefine CONSOLE_FONT_INFOEX
2014-10-08 18:00 [PATCH v5] MinGW(-W64) compilation Marat Radchenko
` (4 preceding siblings ...)
2014-10-08 18:00 ` [PATCH 05/14] MINGW: config.mak.uname: allow using cURL for non-msysGit builds Marat Radchenko
@ 2014-10-08 18:00 ` Marat Radchenko
2014-10-08 18:01 ` [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64 Marat Radchenko
` (9 subsequent siblings)
15 siblings, 0 replies; 45+ messages in thread
From: Marat Radchenko @ 2014-10-08 18:00 UTC (permalink / raw)
To: git; +Cc: marat, msysGit
Unlike MinGW, MinGW-W64 has CONSOLE_FONT_INFOEX already properly defined
in wincon.h.
Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
---
compat/winansi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compat/winansi.c b/compat/winansi.c
index efc5bb3..0ac3297 100644
--- a/compat/winansi.c
+++ b/compat/winansi.c
@@ -22,7 +22,7 @@ static int non_ascii_used = 0;
static HANDLE hthread, hread, hwrite;
static HANDLE hconsole1, hconsole2;
-#ifdef __MINGW32__
+#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
typedef struct _CONSOLE_FONT_INFOEX {
ULONG cbSize;
DWORD nFont;
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64
2014-10-08 18:00 [PATCH v5] MinGW(-W64) compilation Marat Radchenko
` (5 preceding siblings ...)
2014-10-08 18:00 ` [PATCH 06/14] MINGW: compat/winansi.c: do not redefine CONSOLE_FONT_INFOEX Marat Radchenko
@ 2014-10-08 18:01 ` Marat Radchenko
2014-10-08 19:24 ` Junio C Hamano
2014-10-09 19:22 ` Johannes Schindelin
2014-10-08 18:01 ` [PATCH 08/14] MINGW: git-compat-util.h: use inttypes.h for printf macros Marat Radchenko
` (8 subsequent siblings)
15 siblings, 2 replies; 45+ messages in thread
From: Marat Radchenko @ 2014-10-08 18:01 UTC (permalink / raw)
To: git; +Cc: marat, msysGit, Ray Donnelly
From: Ray Donnelly <mingw.android@gmail.com>
Signed-off-by: Ray Donnelly <mingw.android@gmail.com>
Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
---
config.mak.uname | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/config.mak.uname b/config.mak.uname
index 324a7fc..4470a928 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -6,6 +6,7 @@ uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')
uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
+CC_MACH := $(shell sh -c '$(CC) -dumpmachine 2>/dev/null || echo not')
ifdef MSVC
# avoid the MingW and Cygwin configuration sections
@@ -509,12 +510,15 @@ ifneq (,$(findstring MINGW,$(uname_S)))
NO_POSIX_GOODIES = UnfortunatelyYes
DEFAULT_HELP_FORMAT = html
NO_D_INO_IN_DIRENT = YesPlease
- COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -D_USE_32BIT_TIME_T -DNOGDI -Icompat -Icompat/win32
+ COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/win32
+ ifneq (,$(findstring i686,$(CC_MACH)))
+ COMPAT_CFLAGS += -D_USE_32BIT_TIME_T
+ BASIC_LDFLAGS += -Wl,--large-address-aware
+ endif
COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
COMPAT_OBJS += compat/mingw.o compat/winansi.o \
compat/win32/pthread.o compat/win32/syslog.o \
compat/win32/dirent.o
- BASIC_LDFLAGS += -Wl,--large-address-aware
EXTLIBS += -lws2_32
GITLIBS += git.res
PTHREAD_LIBS =
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply related [flat|nested] 45+ messages in thread
* Re: [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64
2014-10-08 18:01 ` [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64 Marat Radchenko
@ 2014-10-08 19:24 ` Junio C Hamano
2014-10-09 19:22 ` Johannes Schindelin
1 sibling, 0 replies; 45+ messages in thread
From: Junio C Hamano @ 2014-10-08 19:24 UTC (permalink / raw)
To: Marat Radchenko; +Cc: git, msysGit, Ray Donnelly
Marat Radchenko <marat@slonopotamus.org> writes:
> Subject: Re: [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64
Please prefix with MinGW: like you did for other changes.
> From: Ray Donnelly <mingw.android@gmail.com>
Needs a bit of explanation what breaks without this change. I can
see that unconditional use of USE_32BIT_TIME_T probably goes against
a 64-bit platform by looking at the change, but "Fix Blah" is never
informative enough to justify any change in the log message. We
want to be able to read "Fix Blah *how*/*why*" in our "git log" (and
prefereably in "git shortlog").
Thanks.
> Signed-off-by: Ray Donnelly <mingw.android@gmail.com>
> Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
> ---
> config.mak.uname | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/config.mak.uname b/config.mak.uname
> index 324a7fc..4470a928 100644
> --- a/config.mak.uname
> +++ b/config.mak.uname
> @@ -6,6 +6,7 @@ uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
> uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')
> uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
> uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
> +CC_MACH := $(shell sh -c '$(CC) -dumpmachine 2>/dev/null || echo not')
>
> ifdef MSVC
> # avoid the MingW and Cygwin configuration sections
> @@ -509,12 +510,15 @@ ifneq (,$(findstring MINGW,$(uname_S)))
> NO_POSIX_GOODIES = UnfortunatelyYes
> DEFAULT_HELP_FORMAT = html
> NO_D_INO_IN_DIRENT = YesPlease
> - COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -D_USE_32BIT_TIME_T -DNOGDI -Icompat -Icompat/win32
> + COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/win32
> + ifneq (,$(findstring i686,$(CC_MACH)))
> + COMPAT_CFLAGS += -D_USE_32BIT_TIME_T
> + BASIC_LDFLAGS += -Wl,--large-address-aware
> + endif
> COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
> COMPAT_OBJS += compat/mingw.o compat/winansi.o \
> compat/win32/pthread.o compat/win32/syslog.o \
> compat/win32/dirent.o
> - BASIC_LDFLAGS += -Wl,--large-address-aware
> EXTLIBS += -lws2_32
> GITLIBS += git.res
> PTHREAD_LIBS =
> --
> 2.1.1
>
> --
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64
2014-10-08 18:01 ` [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64 Marat Radchenko
2014-10-08 19:24 ` Junio C Hamano
@ 2014-10-09 19:22 ` Johannes Schindelin
2014-10-09 19:25 ` [msysGit] " Ray Donnelly
2014-10-14 7:08 ` Marat Radchenko
1 sibling, 2 replies; 45+ messages in thread
From: Johannes Schindelin @ 2014-10-09 19:22 UTC (permalink / raw)
To: Marat Radchenko; +Cc: git, gitster, msysGit, Ray Donnelly
Hi,
On Wed, 8 Oct 2014, Marat Radchenko wrote:
> +CC_MACH := $(shell sh -c '$(CC) -dumpmachine 2>/dev/null || echo not')
There is a rather huge problem with that. The latest mingw-w64 release,
4.9.1, does not do what you expect here: while '.../mingw32/bin/gcc -m32
-o 32.exe test.c' and '.../mingw32/bin/gcc -m64 -o 64.exe test.c' work
fine, producing i686 and x86_64 executables respectively,
'.../mingw32/bin/gcc -dumpmachine' prints i686-w64-mingw32 *always*, even
when specifying the -m64 option.
So unfortunately, the test introduced by this patch (intended to figure
out whether the build targets i686, and skip a compiler and a linker
option otherwise) is incorrect.
Ciao,
Johannes
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [msysGit] [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64
2014-10-09 19:22 ` Johannes Schindelin
@ 2014-10-09 19:25 ` Ray Donnelly
2014-10-09 19:47 ` Johannes Schindelin
2014-10-14 7:08 ` Marat Radchenko
1 sibling, 1 reply; 45+ messages in thread
From: Ray Donnelly @ 2014-10-09 19:25 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Marat Radchenko, git, gitster, msysGit
On Thu, Oct 9, 2014 at 8:22 PM, Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> On Wed, 8 Oct 2014, Marat Radchenko wrote:
>
>> +CC_MACH := $(shell sh -c '$(CC) -dumpmachine 2>/dev/null || echo not')
>
> There is a rather huge problem with that. The latest mingw-w64 release,
> 4.9.1, does not do what you expect here: while '.../mingw32/bin/gcc -m32
> -o 32.exe test.c' and '.../mingw32/bin/gcc -m64 -o 64.exe test.c' work
> fine, producing i686 and x86_64 executables respectively,
> '.../mingw32/bin/gcc -dumpmachine' prints i686-w64-mingw32 *always*, even
> when specifying the -m64 option.
>
> So unfortunately, the test introduced by this patch (intended to figure
> out whether the build targets i686, and skip a compiler and a linker
> option otherwise) is incorrect.
Which release are you talking about? Can you point me to the tarball please?
>
> Ciao,
> Johannes
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64
2014-10-09 19:25 ` [msysGit] " Ray Donnelly
@ 2014-10-09 19:47 ` Johannes Schindelin
2014-10-09 23:56 ` Ray Donnelly
0 siblings, 1 reply; 45+ messages in thread
From: Johannes Schindelin @ 2014-10-09 19:47 UTC (permalink / raw)
To: Ray Donnelly; +Cc: Marat Radchenko, git, gitster, msysGit
Hi Ray,
On Thu, 9 Oct 2014, Ray Donnelly wrote:
> On Thu, Oct 9, 2014 at 8:22 PM, Johannes Schindelin
> <Johannes.Schindelin@gmx.de> wrote:
> >
> > On Wed, 8 Oct 2014, Marat Radchenko wrote:
> >
> >> +CC_MACH := $(shell sh -c '$(CC) -dumpmachine 2>/dev/null || echo not')
> >
> > There is a rather huge problem with that. The latest mingw-w64
> > release, 4.9.1, does not do what you expect here: while
> > '.../mingw32/bin/gcc -m32 -o 32.exe test.c' and '.../mingw32/bin/gcc
> > -m64 -o 64.exe test.c' work fine, producing i686 and x86_64
> > executables respectively, '.../mingw32/bin/gcc -dumpmachine' prints
> > i686-w64-mingw32 *always*, even when specifying the -m64 option.
> >
> > So unfortunately, the test introduced by this patch (intended to
> > figure out whether the build targets i686, and skip a compiler and a
> > linker option otherwise) is incorrect.
>
> Which release are you talking about? Can you point me to the tarball
> please?
Certainly:
http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.1/threads-win32/sjlj/
(rev1, not rev0)
Ciao,
Johannes
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64
2014-10-09 19:47 ` Johannes Schindelin
@ 2014-10-09 23:56 ` Ray Donnelly
2014-10-10 6:38 ` Johannes Schindelin
0 siblings, 1 reply; 45+ messages in thread
From: Ray Donnelly @ 2014-10-09 23:56 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Marat Radchenko, git, gitster, msysGit
[-- Attachment #1: Type: text/plain, Size: 2700 bytes --]
Thanks Johannes.
On Thu, Oct 9, 2014 at 8:47 PM, Johannes Schindelin <
Johannes.Schindelin@gmx.de> wrote:
> Hi Ray,
>
> On Thu, 9 Oct 2014, Ray Donnelly wrote:
>
>> On Thu, Oct 9, 2014 at 8:22 PM, Johannes Schindelin
>> <Johannes.Schindelin@gmx.de> wrote:
>> >
>> > On Wed, 8 Oct 2014, Marat Radchenko wrote:
>> >
>> >> +CC_MACH := $(shell sh -c '$(CC) -dumpmachine 2>/dev/null || echo
not')
>> >
>> > There is a rather huge problem with that. The latest mingw-w64
>> > release, 4.9.1, does not do what you expect here: while
>> > '.../mingw32/bin/gcc -m32 -o 32.exe test.c' and '.../mingw32/bin/gcc
>> > -m64 -o 64.exe test.c' work fine, producing i686 and x86_64
>> > executables respectively, '.../mingw32/bin/gcc -dumpmachine' prints
>> > i686-w64-mingw32 *always*, even when specifying the -m64 option.
>> >
>> > So unfortunately, the test introduced by this patch (intended to
>> > figure out whether the build targets i686, and skip a compiler and a
>> > linker option otherwise) is incorrect.
>>
>> Which release are you talking about? Can you point me to the tarball
>> please?
>
> Certainly:
>
>
http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.1/threads-win32/sjlj/
>
> (rev1, not rev0)
I guess I can add passing in CFLAGS also to try to catch that case. What
would you recommend?
I've added support to build using your branch to MSYS2's MINGW-packages
git-git package in case anyone wants to help out:
https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-git-git
Change _based_on_dscho_w64_msysgit=no to =yes. Note also that some more
patches are needed before we can build, and I think more are needed. Using
plain msysGit (I.e. =no) and 15 patches we are able to build a somewhat
functional git.
>
> Ciao,
> Johannes
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #2: Type: text/html, Size: 3974 bytes --]
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64
2014-10-09 23:56 ` Ray Donnelly
@ 2014-10-10 6:38 ` Johannes Schindelin
2014-10-10 10:55 ` Johannes Schindelin
[not found] ` <CAOYw7dtSdR8GVYK2YrVjgQ7ZRExHjPBLCNQk7vchV66fx27xBw@mail.gmail.com>
0 siblings, 2 replies; 45+ messages in thread
From: Johannes Schindelin @ 2014-10-10 6:38 UTC (permalink / raw)
To: Ray Donnelly; +Cc: Marat Radchenko, git, gitster, msysGit
Hi Ray,
On Fri, 10 Oct 2014, Ray Donnelly wrote:
> On Thu, Oct 9, 2014 at 8:47 PM, Johannes Schindelin <
> Johannes.Schindelin@gmx.de> wrote:
> >
> > On Thu, 9 Oct 2014, Ray Donnelly wrote:
> >
> >> On Thu, Oct 9, 2014 at 8:22 PM, Johannes Schindelin
> >> <Johannes.Schindelin@gmx.de> wrote:
> >> >
> >> > On Wed, 8 Oct 2014, Marat Radchenko wrote:
> >> >
> >> >> +CC_MACH := $(shell sh -c '$(CC) -dumpmachine 2>/dev/null || echo
> not')
> >> >
> >> > There is a rather huge problem with that. The latest mingw-w64
> >> > release, 4.9.1, does not do what you expect here: while
> >> > '.../mingw32/bin/gcc -m32 -o 32.exe test.c' and
> >> > '.../mingw32/bin/gcc -m64 -o 64.exe test.c' work fine, producing
> >> > i686 and x86_64 executables respectively, '.../mingw32/bin/gcc
> >> > -dumpmachine' prints i686-w64-mingw32 *always*, even when
> >> > specifying the -m64 option.
> >> >
> >> > So unfortunately, the test introduced by this patch (intended to
> >> > figure out whether the build targets i686, and skip a compiler and
> >> > a linker option otherwise) is incorrect.
> >>
> >> Which release are you talking about? Can you point me to the tarball
> >> please?
> >
> http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.1/threads-win32/sjlj/
> >
> > (rev1, not rev0)
>
> I guess I can add passing in CFLAGS also to try to catch that case.
Well, my tests say that the CFLAGS do *not* change the behavior of
-dumpmachine. IOW `i686-w64-mingw32-gcc -m64 -dumpmachine` *still* spits
out i686-w64-mingw32. Even if the -m64 flag would cause the compiler to
generate 64-bit binaries.
> I've added support to build using your branch to MSYS2's MINGW-packages
> git-git package in case anyone wants to help out:
>
> https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-git-git
Interesting.
With Git for Windows, we aim to become waaaaay more standards-compliant by
providing Git as a regular mingw-get'able package. To this end, we use
mgwport recipes to build the required packages.
It looks as if the PKGBUILD system is similar, but *just* incompatible
enough with mgwport to prevent code sharing. Is this fixable?
> Change _based_on_dscho_w64_msysgit=no to =yes. Note also that some more
> patches are needed before we can build, and I think more are needed.
> Using plain msysGit (I.e. =no) and 15 patches we are able to build a
> somewhat functional git.
So here is my plan, please let me know whether you think we can compromise
on a strategy that benefits both of us:
Since I want mingw-get'able packages – also for 64-bit – I would like to
keep the CPU architecture dependent parts as contained as possible and use
only one package system for both. Likewise, I would really prefer to have
a single development environment for both architectures, and the Git for
Windows SDK is really coming along nicely, thanks to the tremendous
efforts put in by Thomas Braun and Sebastian Schuberth.
I am planning, therefore, to provide the MinGW-w64 compiler as an add-on
package that needs to be installed in order to build 64-bit stuff.
At this stage, it is actually *more* than a plan: I already have a package
to install 7za – required to unpack MinGW-w64 pre-built packages – and the
script to package mingw-w64 is in the process of being fleshed out.
With this compiler, and the 'w64' branch from https://github.com/dscho/git
– intended to be merged into https://github.com/git-for-windows/git – the
following command-line produces 64-bit Git:
PATH=/path/to/unpacked/mingw-w64/mingw64/bin/:$PATH \
make \
CROSS_COMPILE=x86_64-w64-mingw32- CC='$(CROSS_COMPILE)gcc' \
AR=ar RC=windres \
NO_ICONV=1 NO_OPENSSL=1 NO_CURL=1 NEEDS_LIBICONV= USE_LIBPCRE=
The test suite passes so far (still running, at the time of writing it is
going through t3404).
Ciao,
Johannes
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64
2014-10-10 6:38 ` Johannes Schindelin
@ 2014-10-10 10:55 ` Johannes Schindelin
2014-10-11 11:12 ` Johannes Schindelin
[not found] ` <CAOYw7dtSdR8GVYK2YrVjgQ7ZRExHjPBLCNQk7vchV66fx27xBw@mail.gmail.com>
1 sibling, 1 reply; 45+ messages in thread
From: Johannes Schindelin @ 2014-10-10 10:55 UTC (permalink / raw)
To: Ray Donnelly; +Cc: Marat Radchenko, git, gitster, msysGit
Hi,
On Fri, 10 Oct 2014, Johannes Schindelin wrote:
> With this [mingw-w64] compiler, and the 'w64' branch from
> https://github.com/dscho/git – intended to be merged into
> https://github.com/git-for-windows/git – the following command-line
> produces 64-bit Git:
>
> PATH=/path/to/unpacked/mingw-w64/mingw64/bin/:$PATH \
> make \
> CROSS_COMPILE=x86_64-w64-mingw32- CC='$(CROSS_COMPILE)gcc' \
> AR=ar RC=windres \
> NO_ICONV=1 NO_OPENSSL=1 NO_CURL=1 NEEDS_LIBICONV= USE_LIBPCRE=
>
> The test suite passes so far (still running, at the time of writing it is
> going through t3404).
And it stopped at t3900-i18n-commit.txt:
not ok 15 - ISO8859-1 should be shown in UTF-8 now
not ok 16 - eucJP should be shown in UTF-8 now
not ok 17 - ISO-2022-JP should be shown in UTF-8 now
not ok 23 - ISO8859-1 should be shown in UTF-8 now
not ok 24 - eucJP should be shown in UTF-8 now
not ok 25 - ISO-2022-JP should be shown in UTF-8 now
not ok 27 - ISO-2022-JP should be shown in eucJP now
not ok 28 - eucJP should be shown in ISO-2022-JP now
Inspecting the test case 15 above, it appears as if ISO-8859-1 was still
shown as ISO-8859-1 instead of UTF-8:
$ hexdump.exe /git/t/t3900/1-UTF-8.txt trash
directory.t3900-i18n-commit/current
---- /git/t/t3900/1-UTF-8.txt ----
0000 c3 84 c3 8b c3 91 c3 8f c3 96 0a 0a c3 81 62 c3
0010 a7 64 c3 a8 66 67 0a
---- trash directory.t3900-i18n-commit/current ----
0000 c4 cb d1 cf d6 0a 0a c1 62 e7 64 e8 66 67 0a
So I fear we have still a ways to go before Git works as a 64-bit Windows
binary...
Ciao,
Johannes
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64
2014-10-10 10:55 ` Johannes Schindelin
@ 2014-10-11 11:12 ` Johannes Schindelin
0 siblings, 0 replies; 45+ messages in thread
From: Johannes Schindelin @ 2014-10-11 11:12 UTC (permalink / raw)
To: Ray Donnelly; +Cc: Marat Radchenko, git, gitster, msysGit
Hi,
On Fri, 10 Oct 2014, Johannes Schindelin wrote:
> On Fri, 10 Oct 2014, Johannes Schindelin wrote:
>
> > With this [mingw-w64] compiler, and the 'w64' branch from
> > https://github.com/dscho/git – intended to be merged into
> > https://github.com/git-for-windows/git – the following command-line
> > produces 64-bit Git:
> >
> > PATH=/path/to/unpacked/mingw-w64/mingw64/bin/:$PATH \
> > make \
> > CROSS_COMPILE=x86_64-w64-mingw32- CC='$(CROSS_COMPILE)gcc' \
> > AR=ar RC=windres \
> > NO_ICONV=1 NO_OPENSSL=1 NO_CURL=1 NEEDS_LIBICONV= USE_LIBPCRE=
> >
> > The test suite passes so far (still running, at the time of writing it is
> > going through t3404).
> [...]
>
> So I fear we have still a ways to go before Git works as a 64-bit Windows
> binary...
It seems to be not *all* that bad: only t3900, t3901, t4041, t4205, t4210,
t5100, t6006 and t7102 display test failures.
Ciao,
Dscho
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 45+ messages in thread
[parent not found: <CAOYw7dtSdR8GVYK2YrVjgQ7ZRExHjPBLCNQk7vchV66fx27xBw@mail.gmail.com>]
* Re: [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64
[not found] ` <CAOYw7dtSdR8GVYK2YrVjgQ7ZRExHjPBLCNQk7vchV66fx27xBw@mail.gmail.com>
@ 2014-10-11 9:11 ` Johannes Schindelin
0 siblings, 0 replies; 45+ messages in thread
From: Johannes Schindelin @ 2014-10-11 9:11 UTC (permalink / raw)
To: Ray Donnelly; +Cc: git, msysgit, git-for-windows
Hi Ray,
On Fri, 10 Oct 2014, Ray Donnelly wrote:
> what's the difference between https://github.com/msysgit/git and
> https://github.com/git-for-windows/git ? I noticed that your fork is
> forked from msysgit, not git-for-windows?
I am glad you asked!
Git for Windows was developed using the development environment called
"msysGit" ever since 2007. Unfortunately the name caused a *real* lot of
confusion, not only because some people wondered what the heck MSys is,
but those who did not wonder mistook it for a *different* version of Git
for Windows.
Apart from the name, msysGit also has the shortcoming of abusing Git to
deploy binaries. In other words, msysGit itself is a Git-managed project
that delivers the complete development environment. Upgrading individual
components is unnecessarily hard, but msysGit's way was necessary because
there was no nice package manager for MinGW/MSys yet.
Things have changed in the meantime, and pushed forward by Thomas Braun
and Sebastian Schuberth, we now have a light-weight Git for Windows SDK –
which is essentially a standard MinGW/MSys system managed through the
package manager mingw-get. The only two add-ons we have is a nicer
installer (that Sebastian offered to MinGW but they declined) and the
addition of our own mingw-get'able packages (such as openssl, libpcre, and
git itself).
Needless to say, I am a big fan of that new strategy. This is why we
decided to just phase out the name "msysGit" (as well as the GitHub org of
the same name) and work on Git for Windows (with the corresponding GitHub
org, and using the name "Git for Windows" for the installer aimed at
"end-users" and "Git for Windows SDK" for the development environment
targeting Git for Windows developers).
I also added this writeup to the FAQ on the msysGit wiki:
https://github.com/msysgit/msysgit/wiki/Relationship-to-Git-for-Windows
Ciao,
Johannes
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64
2014-10-09 19:22 ` Johannes Schindelin
2014-10-09 19:25 ` [msysGit] " Ray Donnelly
@ 2014-10-14 7:08 ` Marat Radchenko
1 sibling, 0 replies; 45+ messages in thread
From: Marat Radchenko @ 2014-10-14 7:08 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git, gitster, msysGit, Ray Donnelly, marat
On Thu, Oct 09, 2014 at 09:22:19PM +0200, Johannes Schindelin wrote:
> Hi,
>
> On Wed, 8 Oct 2014, Marat Radchenko wrote:
>
> > +CC_MACH := $(shell sh -c '$(CC) -dumpmachine 2>/dev/null || echo not')
>
> There is a rather huge problem with that. The latest mingw-w64 release,
> 4.9.1, does not do what you expect here: while '.../mingw32/bin/gcc -m32
> -o 32.exe test.c' and '.../mingw32/bin/gcc -m64 -o 64.exe test.c' work
> fine, producing i686 and x86_64 executables respectively,
> '.../mingw32/bin/gcc -dumpmachine' prints i686-w64-mingw32 *always*, even
> when specifying the -m64 option.
>
> So unfortunately, the test introduced by this patch (intended to figure
> out whether the build targets i686, and skip a compiler and a linker
> option otherwise) is incorrect.
According to [1], it is by design. For now, I suggest using separate
gcc binaries for 32/64, without messing with -m32. Of course we can
fallback to `./configure` that will determine bitness by compiling something.
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52096#c1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 08/14] MINGW: git-compat-util.h: use inttypes.h for printf macros
2014-10-08 18:00 [PATCH v5] MinGW(-W64) compilation Marat Radchenko
` (6 preceding siblings ...)
2014-10-08 18:01 ` [PATCH 07/14] Fix BASIC_LDFLAGS and COMPAT_CFLAGS for 64bit MinGW-w64 Marat Radchenko
@ 2014-10-08 18:01 ` Marat Radchenko
2014-10-08 19:25 ` Junio C Hamano
2014-10-08 18:01 ` [PATCH 09/14] MINGW: config.mak.uname: reorganize MinGW settings Marat Radchenko
` (7 subsequent siblings)
15 siblings, 1 reply; 45+ messages in thread
From: Marat Radchenko @ 2014-10-08 18:01 UTC (permalink / raw)
To: git; +Cc: marat, msysGit
All MinGW flavors have inttypes.h, so just include it.
However, we need to pass -D__USE_MINGW_ANSI_STDIO=1 to select
GNU-compatible macro definitions on MinGW-W64:
http://sourceforge.net/p/mingw-w64/wiki2/gnu%20printf/
As a side-effect, Git no longer builds with MSVC < 2010 due to
its lack of stdint.h but hopefully that is not a problem.
Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
---
compat/mingw.h | 2 --
compat/msvc.h | 3 +++
config.mak.uname | 3 ++-
git-compat-util.h | 11 ++++++-----
4 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/compat/mingw.h b/compat/mingw.h
index ba05044..59a50fc 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -358,8 +358,6 @@ static inline char *mingw_find_last_dir_sep(const char *path)
int mingw_offset_1st_component(const char *path);
#define offset_1st_component mingw_offset_1st_component
#define PATH_SEP ';'
-#define PRIuMAX "I64u"
-#define PRId64 "I64d"
void mingw_open_html(const char *path);
#define open_html mingw_open_html
diff --git a/compat/msvc.h b/compat/msvc.h
index a63d878..84a03f9 100644
--- a/compat/msvc.h
+++ b/compat/msvc.h
@@ -17,6 +17,9 @@
typedef int pid_t;
+#define PRIuMAX "I64u"
+#define PRId64 "I64d"
+
static __inline int strcasecmp (const char *s1, const char *s2)
{
int size1 = strlen(s1);
diff --git a/config.mak.uname b/config.mak.uname
index 4470a928..c7aaa1c 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -328,6 +328,7 @@ ifeq ($(uname_S),Windows)
NO_PREAD = YesPlease
NEEDS_CRYPTO_WITH_SSL = YesPlease
NO_LIBGEN_H = YesPlease
+ NO_INTTYPES_H = UnfortunatelyYes
NO_POLL = YesPlease
NO_SYMLINK_HEAD = YesPlease
NO_IPV6 = YesPlease
@@ -510,7 +511,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
NO_POSIX_GOODIES = UnfortunatelyYes
DEFAULT_HELP_FORMAT = html
NO_D_INO_IN_DIRENT = YesPlease
- COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/win32
+ COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -D__USE_MINGW_ANSI_STDIO=1 -DNOGDI -Icompat -Icompat/win32
ifneq (,$(findstring i686,$(CC_MACH)))
COMPAT_CFLAGS += -D_USE_32BIT_TIME_T
BASIC_LDFLAGS += -Wl,--large-address-aware
diff --git a/git-compat-util.h b/git-compat-util.h
index fb41118..b338277 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -96,6 +96,12 @@
#define GIT_WINDOWS_NATIVE
#endif
+#ifndef NO_INTTYPES_H
+#include <inttypes.h>
+#else
+#include <stdint.h>
+#endif
+
#include <unistd.h>
#include <stdio.h>
#include <sys/stat.h>
@@ -147,11 +153,6 @@
#include <netdb.h>
#include <pwd.h>
#include <sys/un.h>
-#ifndef NO_INTTYPES_H
-#include <inttypes.h>
-#else
-#include <stdint.h>
-#endif
#ifdef NO_INTPTR_T
/*
* On I16LP32, ILP32 and LP64 "long" is the save bet, however
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply related [flat|nested] 45+ messages in thread
* Re: [PATCH 08/14] MINGW: git-compat-util.h: use inttypes.h for printf macros
2014-10-08 18:01 ` [PATCH 08/14] MINGW: git-compat-util.h: use inttypes.h for printf macros Marat Radchenko
@ 2014-10-08 19:25 ` Junio C Hamano
0 siblings, 0 replies; 45+ messages in thread
From: Junio C Hamano @ 2014-10-08 19:25 UTC (permalink / raw)
To: Marat Radchenko; +Cc: git, msysGit
Marat Radchenko <marat@slonopotamus.org> writes:
> All MinGW flavors have inttypes.h, so just include it.
>
> However, we need to pass -D__USE_MINGW_ANSI_STDIO=1 to select
> GNU-compatible macro definitions on MinGW-W64:
> http://sourceforge.net/p/mingw-w64/wiki2/gnu%20printf/
>
> As a side-effect, Git no longer builds with MSVC < 2010 due to
> its lack of stdint.h but hopefully that is not a problem.
That "hopefully" does not build much confidence.
"All have inttypes.h, so just include it" does not say why it is a
good idea to do so, if the source before this patch built OK without
including it.
Bad things like this and that happen because the current code
does not include inttypes.h, but the header exists everywhere so
we can fix this and that by including it.
would be more understandable, but otherwise, it is unclear what
problems it attempts to fix, and if it is an improvement overall to
trade it off with the possible breakage on some systems.
The log message also needs to explain why inclusion order in
git-compat-util.h must be changed. What problem does that change
fix?
> Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
> ---
> compat/mingw.h | 2 --
> compat/msvc.h | 3 +++
> config.mak.uname | 3 ++-
> git-compat-util.h | 11 ++++++-----
> 4 files changed, 11 insertions(+), 8 deletions(-)
>
> diff --git a/compat/mingw.h b/compat/mingw.h
> index ba05044..59a50fc 100644
> --- a/compat/mingw.h
> +++ b/compat/mingw.h
> @@ -358,8 +358,6 @@ static inline char *mingw_find_last_dir_sep(const char *path)
> int mingw_offset_1st_component(const char *path);
> #define offset_1st_component mingw_offset_1st_component
> #define PATH_SEP ';'
> -#define PRIuMAX "I64u"
> -#define PRId64 "I64d"
>
> void mingw_open_html(const char *path);
> #define open_html mingw_open_html
> diff --git a/compat/msvc.h b/compat/msvc.h
> index a63d878..84a03f9 100644
> --- a/compat/msvc.h
> +++ b/compat/msvc.h
> @@ -17,6 +17,9 @@
>
> typedef int pid_t;
>
> +#define PRIuMAX "I64u"
> +#define PRId64 "I64d"
> +
> static __inline int strcasecmp (const char *s1, const char *s2)
> {
> int size1 = strlen(s1);
> diff --git a/config.mak.uname b/config.mak.uname
> index 4470a928..c7aaa1c 100644
> --- a/config.mak.uname
> +++ b/config.mak.uname
> @@ -328,6 +328,7 @@ ifeq ($(uname_S),Windows)
> NO_PREAD = YesPlease
> NEEDS_CRYPTO_WITH_SSL = YesPlease
> NO_LIBGEN_H = YesPlease
> + NO_INTTYPES_H = UnfortunatelyYes
> NO_POLL = YesPlease
> NO_SYMLINK_HEAD = YesPlease
> NO_IPV6 = YesPlease
> @@ -510,7 +511,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
> NO_POSIX_GOODIES = UnfortunatelyYes
> DEFAULT_HELP_FORMAT = html
> NO_D_INO_IN_DIRENT = YesPlease
> - COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/win32
> + COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -D__USE_MINGW_ANSI_STDIO=1 -DNOGDI -Icompat -Icompat/win32
> ifneq (,$(findstring i686,$(CC_MACH)))
> COMPAT_CFLAGS += -D_USE_32BIT_TIME_T
> BASIC_LDFLAGS += -Wl,--large-address-aware
> diff --git a/git-compat-util.h b/git-compat-util.h
> index fb41118..b338277 100644
> --- a/git-compat-util.h
> +++ b/git-compat-util.h
> @@ -96,6 +96,12 @@
> #define GIT_WINDOWS_NATIVE
> #endif
>
> +#ifndef NO_INTTYPES_H
> +#include <inttypes.h>
> +#else
> +#include <stdint.h>
> +#endif
> +
> #include <unistd.h>
> #include <stdio.h>
> #include <sys/stat.h>
> @@ -147,11 +153,6 @@
> #include <netdb.h>
> #include <pwd.h>
> #include <sys/un.h>
> -#ifndef NO_INTTYPES_H
> -#include <inttypes.h>
> -#else
> -#include <stdint.h>
> -#endif
> #ifdef NO_INTPTR_T
> /*
> * On I16LP32, ILP32 and LP64 "long" is the save bet, however
> --
> 2.1.1
>
> --
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 09/14] MINGW: config.mak.uname: reorganize MinGW settings
2014-10-08 18:00 [PATCH v5] MinGW(-W64) compilation Marat Radchenko
` (7 preceding siblings ...)
2014-10-08 18:01 ` [PATCH 08/14] MINGW: git-compat-util.h: use inttypes.h for printf macros Marat Radchenko
@ 2014-10-08 18:01 ` Marat Radchenko
2014-10-08 18:01 ` [PATCH 10/14] Makefile: introduce CROSS_COMPILE variable Marat Radchenko
` (6 subsequent siblings)
15 siblings, 0 replies; 45+ messages in thread
From: Marat Radchenko @ 2014-10-08 18:01 UTC (permalink / raw)
To: git; +Cc: marat, msysGit
HAVE_LIBCHARSET_H and NO_R_TO_GCC_LINKER are not specific to
msysGit, they're general MinGW settings.
Logic behind HAVE_LIBCHARSET_H: if user is on MinGW and has iconv,
we expect him to have libcharset.h. If user doesn't have iconv,
he has to explicitly say so via NO_ICONV=1 regardless of this
commit.
Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
---
config.mak.uname | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/config.mak.uname b/config.mak.uname
index c7aaa1c..f79c0e0 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -532,11 +532,11 @@ ifneq (,$(wildcard ../THIS_IS_MSYSGIT))
prefix =
INSTALL = /bin/install
EXTLIBS += /mingw/lib/libz.a
- NO_R_TO_GCC_LINKER = YesPlease
INTERNAL_QSORT = YesPlease
- HAVE_LIBCHARSET_H = YesPlease
NO_GETTEXT = YesPlease
endif
+ HAVE_LIBCHARSET_H = YesPlease
+ NO_R_TO_GCC_LINKER = YesPlease
endif
ifeq ($(uname_S),QNX)
COMPAT_CFLAGS += -DSA_RESTART=0
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 10/14] Makefile: introduce CROSS_COMPILE variable
2014-10-08 18:00 [PATCH v5] MinGW(-W64) compilation Marat Radchenko
` (8 preceding siblings ...)
2014-10-08 18:01 ` [PATCH 09/14] MINGW: config.mak.uname: reorganize MinGW settings Marat Radchenko
@ 2014-10-08 18:01 ` Marat Radchenko
2014-10-08 19:25 ` Junio C Hamano
2014-10-08 18:01 ` [PATCH 11/14] compat/nedmalloc/malloc.c.h: fix compilation under MinGW-W64 Marat Radchenko
` (5 subsequent siblings)
15 siblings, 1 reply; 45+ messages in thread
From: Marat Radchenko @ 2014-10-08 18:01 UTC (permalink / raw)
To: git; +Cc: marat, msysGit
To ease cross-compilation process, introduce a single variable
with the prefix to all compiler-related executables.
Define CROSS_COMPILE=foo- if your compiler and binary utilities
are foo-cc, foo-ar, foo-strip, etc. More specific variables
override this, so if you set CC=gcc CROSS_COMPILE=ia64-linux-gnu-
then the compiler will be 'gcc', not 'ia64-linux-gnu-gcc'.
Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
---
Makefile | 19 +++++++++++++------
config.mak.uname | 2 +-
2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
index f34a2d4..c412996 100644
--- a/Makefile
+++ b/Makefile
@@ -339,6 +339,11 @@ all::
# return NULL when it receives a bogus time_t.
#
# Define HAVE_CLOCK_GETTIME if your platform has clock_gettime in librt.
+#
+# Define CROSS_COMPILE=foo- if your compiler and binary utilities
+# are foo-cc, foo-ar, foo-strip, etc. More specific variables
+# override this, so if you set CC=gcc CROSS_COMPILE=ia64-linux-gnu-
+# then the compiler will be 'gcc', not 'ia64-linux-gnu-gcc'.
GIT-VERSION-FILE: FORCE
@$(SHELL_PATH) ./GIT-VERSION-GEN
@@ -350,7 +355,6 @@ CFLAGS = -g -O2 -Wall
LDFLAGS =
ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)
ALL_LDFLAGS = $(LDFLAGS)
-STRIP ?= strip
# Among the variables below, these:
# gitexecdir
@@ -390,8 +394,12 @@ htmldir_relative = $(patsubst $(prefix)/%,%,$(htmldir))
export prefix bindir sharedir sysconfdir gitwebdir localedir
-CC = cc
-AR = ar
+AR = $(CROSS_COMPILE)ar
+CC = $(CROSS_COMPILE)cc
+GCOV = $(CROSS_COMPILE)gcov
+RC = $(CROSS_COMPILE)windres
+STRIP = $(CROSS_COMPILE)strip
+
RM = rm -f
DIFF = diff
TAR = tar
@@ -404,13 +412,12 @@ XGETTEXT = xgettext
MSGFMT = msgfmt
PTHREAD_LIBS = -lpthread
PTHREAD_CFLAGS =
-GCOV = gcov
export TCL_PATH TCLTK_PATH
SPARSE_FLAGS =
-
+RCFLAGS =
### --- END CONFIGURATION SECTION ---
@@ -1669,7 +1676,7 @@ $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES
mv $@+ $@
git.res: git.rc GIT-VERSION-FILE
- $(QUIET_RC)$(RC) \
+ $(QUIET_RC)$(RC) $(RCFLAGS) \
$(join -DMAJOR= -DMINOR=, $(wordlist 1,2,$(subst -, ,$(subst ., ,$(GIT_VERSION))))) \
-DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@
diff --git a/config.mak.uname b/config.mak.uname
index f79c0e0..9f7037e 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -523,7 +523,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
EXTLIBS += -lws2_32
GITLIBS += git.res
PTHREAD_LIBS =
- RC = windres -O coff
+ RCFLAGS += -O coff
NATIVE_CRLF = YesPlease
X = .exe
SPARSE_FLAGS = -Wno-one-bit-signed-bitfield
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply related [flat|nested] 45+ messages in thread
* Re: [PATCH 10/14] Makefile: introduce CROSS_COMPILE variable
2014-10-08 18:01 ` [PATCH 10/14] Makefile: introduce CROSS_COMPILE variable Marat Radchenko
@ 2014-10-08 19:25 ` Junio C Hamano
0 siblings, 0 replies; 45+ messages in thread
From: Junio C Hamano @ 2014-10-08 19:25 UTC (permalink / raw)
To: Marat Radchenko; +Cc: git, msysGit
Marat Radchenko <marat@slonopotamus.org> writes:
> To ease cross-compilation process, introduce a single variable
> with the prefix to all compiler-related executables.
>
> Define CROSS_COMPILE=foo- if your compiler and binary utilities
> are foo-cc, foo-ar, foo-strip, etc. More specific variables
> override this, so if you set CC=gcc CROSS_COMPILE=ia64-linux-gnu-
> then the compiler will be 'gcc', not 'ia64-linux-gnu-gcc'.
>
> Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
> ---
> Makefile | 19 +++++++++++++------
> config.mak.uname | 2 +-
> 2 files changed, 14 insertions(+), 7 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index f34a2d4..c412996 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -339,6 +339,11 @@ all::
> # return NULL when it receives a bogus time_t.
> #
> # Define HAVE_CLOCK_GETTIME if your platform has clock_gettime in librt.
> +#
> +# Define CROSS_COMPILE=foo- if your compiler and binary utilities
> +# are foo-cc, foo-ar, foo-strip, etc. More specific variables
> +# override this, so if you set CC=gcc CROSS_COMPILE=ia64-linux-gnu-
> +# then the compiler will be 'gcc', not 'ia64-linux-gnu-gcc'.
I think you forgot the "default to empty", i.e.
CROSS_COMPILE =
somewhere to prevent stray an environment variable from affecting
the build (which you did correctly for RCFLAGS).
> GIT-VERSION-FILE: FORCE
> @$(SHELL_PATH) ./GIT-VERSION-GEN
> @@ -350,7 +355,6 @@ CFLAGS = -g -O2 -Wall
> LDFLAGS =
> ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)
> ALL_LDFLAGS = $(LDFLAGS)
> -STRIP ?= strip
>
> # Among the variables below, these:
> # gitexecdir
> @@ -390,8 +394,12 @@ htmldir_relative = $(patsubst $(prefix)/%,%,$(htmldir))
>
> export prefix bindir sharedir sysconfdir gitwebdir localedir
>
> -CC = cc
> -AR = ar
> +AR = $(CROSS_COMPILE)ar
> +CC = $(CROSS_COMPILE)cc
> +GCOV = $(CROSS_COMPILE)gcov
> +RC = $(CROSS_COMPILE)windres
> +STRIP = $(CROSS_COMPILE)strip
> +
> RM = rm -f
> DIFF = diff
> TAR = tar
> @@ -404,13 +412,12 @@ XGETTEXT = xgettext
> MSGFMT = msgfmt
> PTHREAD_LIBS = -lpthread
> PTHREAD_CFLAGS =
> -GCOV = gcov
>
> export TCL_PATH TCLTK_PATH
>
> SPARSE_FLAGS =
>
> -
> +RCFLAGS =
>
> ### --- END CONFIGURATION SECTION ---
>
> @@ -1669,7 +1676,7 @@ $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES
> mv $@+ $@
>
> git.res: git.rc GIT-VERSION-FILE
> - $(QUIET_RC)$(RC) \
> + $(QUIET_RC)$(RC) $(RCFLAGS) \
> $(join -DMAJOR= -DMINOR=, $(wordlist 1,2,$(subst -, ,$(subst ., ,$(GIT_VERSION))))) \
> -DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@
>
> diff --git a/config.mak.uname b/config.mak.uname
> index f79c0e0..9f7037e 100644
> --- a/config.mak.uname
> +++ b/config.mak.uname
> @@ -523,7 +523,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
> EXTLIBS += -lws2_32
> GITLIBS += git.res
> PTHREAD_LIBS =
> - RC = windres -O coff
> + RCFLAGS += -O coff
> NATIVE_CRLF = YesPlease
> X = .exe
> SPARSE_FLAGS = -Wno-one-bit-signed-bitfield
> --
> 2.1.1
>
> --
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 11/14] compat/nedmalloc/malloc.c.h: fix compilation under MinGW-W64
2014-10-08 18:00 [PATCH v5] MinGW(-W64) compilation Marat Radchenko
` (9 preceding siblings ...)
2014-10-08 18:01 ` [PATCH 10/14] Makefile: introduce CROSS_COMPILE variable Marat Radchenko
@ 2014-10-08 18:01 ` Marat Radchenko
2014-10-08 18:01 ` [PATCH 12/14] Fix pointer -> integer casts on IL32P64 systems Marat Radchenko
` (4 subsequent siblings)
15 siblings, 0 replies; 45+ messages in thread
From: Marat Radchenko @ 2014-10-08 18:01 UTC (permalink / raw)
To: git; +Cc: marat, msysGit
1. Unlike MinGW, MinGW-W64 already provides _ReadWriteBarrier macro,
so don't try to redefine it.
2. MinGW-W64 has a strange definition FORCEINLINE as
extern __inline__ __attribute__((__always_inline__,__gnu_inline__))
'extern' doesn't work together with 'static', so #undef MinGW-W64
version of FORCEINLINE.
Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
---
compat/nedmalloc/malloc.c.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/compat/nedmalloc/malloc.c.h b/compat/nedmalloc/malloc.c.h
index f216a2a..a6c8cac 100644
--- a/compat/nedmalloc/malloc.c.h
+++ b/compat/nedmalloc/malloc.c.h
@@ -715,6 +715,10 @@ struct mallinfo {
#endif /* HAVE_USR_INCLUDE_MALLOC_H */
#endif /* NO_MALLINFO */
+#ifdef __MINGW64_VERSION_MAJOR
+ #undef FORCEINLINE
+#endif
+
/*
Try to persuade compilers to inline. The most critical functions for
inlining are defined as macros, so these aren't used for them.
@@ -1382,7 +1386,9 @@ LONG __cdecl _InterlockedExchange(LONG volatile *Target, LONG Value);
/*** Atomic operations ***/
#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100
- #define _ReadWriteBarrier() __sync_synchronize()
+ #ifndef _ReadWriteBarrier
+ #define _ReadWriteBarrier() __sync_synchronize()
+ #endif
#else
static __inline__ __attribute__((always_inline)) long __sync_lock_test_and_set(volatile long * const Target, const long Value)
{
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 12/14] Fix pointer -> integer casts on IL32P64 systems
2014-10-08 18:00 [PATCH v5] MinGW(-W64) compilation Marat Radchenko
` (10 preceding siblings ...)
2014-10-08 18:01 ` [PATCH 11/14] compat/nedmalloc/malloc.c.h: fix compilation under MinGW-W64 Marat Radchenko
@ 2014-10-08 18:01 ` Marat Radchenko
2014-10-08 18:01 ` [PATCH 13/14] git-compat-util.h: fix integer overflow " Marat Radchenko
` (3 subsequent siblings)
15 siblings, 0 replies; 45+ messages in thread
From: Marat Radchenko @ 2014-10-08 18:01 UTC (permalink / raw)
To: git; +Cc: marat, msysGit
This commit touches regcomp.c from Gnulib,
was fixed upstream in 3a4836d1.
This commit also touches poll.c from Gnulib,
was fixed upstream in d295f6c5.
This commit also touches regex_internal.h from Gnulib,
was fixed upstream in 8335a4d6.
Wrt ShellExecute in winansi.c, quoting [1]:
MSDN says you can cast the result to an integer and compare the result
against 32... You could cast in the other direction, comparing the return
value against (HINSTANCE)32... Or you could cast the result to an INT_PTR
and compare the result against 32.
We use the third option: cast HINSTANCE to intptr_t.
[1]: http://blogs.msdn.com/b/oldnewthing/archive/2006/11/08/1035971.aspx
Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
---
compat/mingw.c | 8 ++++----
compat/poll/poll.c | 2 +-
compat/regex/regcomp.c | 4 ++--
compat/regex/regex_internal.h | 1 +
compat/win32/pthread.h | 2 +-
compat/winansi.c | 2 +-
pack-revindex.c | 2 +-
sha1_file.c | 8 ++++----
8 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/compat/mingw.c b/compat/mingw.c
index c5c37e5..27925d9 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -674,13 +674,13 @@ int pipe(int filedes[2])
errno = err_win_to_posix(GetLastError());
return -1;
}
- filedes[0] = _open_osfhandle((int)h[0], O_NOINHERIT);
+ filedes[0] = _open_osfhandle((intptr_t)h[0], O_NOINHERIT);
if (filedes[0] < 0) {
CloseHandle(h[0]);
CloseHandle(h[1]);
return -1;
}
- filedes[1] = _open_osfhandle((int)h[1], O_NOINHERIT);
+ filedes[1] = _open_osfhandle((intptr_t)h[1], O_NOINHERIT);
if (filedes[0] < 0) {
close(filedes[0]);
CloseHandle(h[1]);
@@ -1819,7 +1819,7 @@ void mingw_open_html(const char *unixpath)
const char *, const char *, const char *, INT);
T ShellExecute;
HMODULE shell32;
- int r;
+ intptr_t r;
shell32 = LoadLibrary("shell32.dll");
if (!shell32)
@@ -1829,7 +1829,7 @@ void mingw_open_html(const char *unixpath)
die("cannot run browser");
printf("Launching default browser to display HTML ...\n");
- r = (int)ShellExecute(NULL, "open", htmlpath, NULL, "\\", SW_SHOWNORMAL);
+ r = (intptr_t)ShellExecute(NULL, "open", htmlpath, NULL, "\\", SW_SHOWNORMAL);
FreeLibrary(shell32);
/* see the MSDN documentation referring to the result codes here */
if (r <= 32) {
diff --git a/compat/poll/poll.c b/compat/poll/poll.c
index a9b41d8..8941249 100644
--- a/compat/poll/poll.c
+++ b/compat/poll/poll.c
@@ -76,7 +76,7 @@
#ifdef WIN32_NATIVE
-#define IsConsoleHandle(h) (((long) (h) & 3) == 3)
+#define IsConsoleHandle(h) (((intptr_t) (h) & 3) == 3)
static BOOL
IsSocketHandle (HANDLE h)
diff --git a/compat/regex/regcomp.c b/compat/regex/regcomp.c
index 06f3088..d8bde06 100644
--- a/compat/regex/regcomp.c
+++ b/compat/regex/regcomp.c
@@ -2577,7 +2577,7 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
old_tree = NULL;
if (elem->token.type == SUBEXP)
- postorder (elem, mark_opt_subexp, (void *) (long) elem->token.opr.idx);
+ postorder (elem, mark_opt_subexp, (void *) (intptr_t) elem->token.opr.idx);
tree = create_tree (dfa, elem, NULL, (end == -1 ? OP_DUP_ASTERISK : OP_ALT));
if (BE (tree == NULL, 0))
@@ -3806,7 +3806,7 @@ create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
static reg_errcode_t
mark_opt_subexp (void *extra, bin_tree_t *node)
{
- int idx = (int) (long) extra;
+ int idx = (int) (intptr_t) extra;
if (node->token.type == SUBEXP && node->token.opr.idx == idx)
node->token.opt_subexp = 1;
diff --git a/compat/regex/regex_internal.h b/compat/regex/regex_internal.h
index 4184d7f..da12670 100644
--- a/compat/regex/regex_internal.h
+++ b/compat/regex/regex_internal.h
@@ -26,6 +26,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <stdint.h>
#if defined HAVE_LANGINFO_H || defined HAVE_LANGINFO_CODESET || defined _LIBC
# include <langinfo.h>
diff --git a/compat/win32/pthread.h b/compat/win32/pthread.h
index 8ad1873..6ccfb7b 100644
--- a/compat/win32/pthread.h
+++ b/compat/win32/pthread.h
@@ -77,7 +77,7 @@ extern pthread_t pthread_self(void);
static inline int pthread_exit(void *ret)
{
- ExitThread((DWORD)ret);
+ ExitThread((DWORD)(uintptr_t)ret);
}
typedef DWORD pthread_key_t;
diff --git a/compat/winansi.c b/compat/winansi.c
index 0ac3297..ca4c295 100644
--- a/compat/winansi.c
+++ b/compat/winansi.c
@@ -452,7 +452,7 @@ static HANDLE duplicate_handle(HANDLE hnd)
HANDLE hresult, hproc = GetCurrentProcess();
if (!DuplicateHandle(hproc, hnd, hproc, &hresult, 0, TRUE,
DUPLICATE_SAME_ACCESS))
- die_lasterr("DuplicateHandle(%li) failed", (long) hnd);
+ die_lasterr("DuplicateHandle(%p) failed", hnd);
return hresult;
}
diff --git a/pack-revindex.c b/pack-revindex.c
index 5c8376e..df02e9f 100644
--- a/pack-revindex.c
+++ b/pack-revindex.c
@@ -21,7 +21,7 @@ static int pack_revindex_hashsz;
static int pack_revindex_ix(struct packed_git *p)
{
- unsigned long ui = (unsigned long)p;
+ uintptr_t ui = (uintptr_t)p;
int i;
ui = ui ^ (ui >> 16); /* defeat structure alignment */
diff --git a/sha1_file.c b/sha1_file.c
index c08c0cb..a534fda 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -1966,11 +1966,11 @@ static struct delta_base_cache_entry {
enum object_type type;
} delta_base_cache[MAX_DELTA_CACHE];
-static unsigned long pack_entry_hash(struct packed_git *p, off_t base_offset)
+static uintptr_t pack_entry_hash(struct packed_git *p, off_t base_offset)
{
- unsigned long hash;
+ uintptr_t hash;
- hash = (unsigned long)p + (unsigned long)base_offset;
+ hash = (uintptr_t)p + base_offset;
hash += (hash >> 8) + (hash >> 16);
return hash % MAX_DELTA_CACHE;
}
@@ -1978,7 +1978,7 @@ static unsigned long pack_entry_hash(struct packed_git *p, off_t base_offset)
static struct delta_base_cache_entry *
get_delta_base_cache_entry(struct packed_git *p, off_t base_offset)
{
- unsigned long hash = pack_entry_hash(p, base_offset);
+ uintptr_t hash = pack_entry_hash(p, base_offset);
return delta_base_cache + hash;
}
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 13/14] git-compat-util.h: fix integer overflow on IL32P64 systems
2014-10-08 18:00 [PATCH v5] MinGW(-W64) compilation Marat Radchenko
` (11 preceding siblings ...)
2014-10-08 18:01 ` [PATCH 12/14] Fix pointer -> integer casts on IL32P64 systems Marat Radchenko
@ 2014-10-08 18:01 ` Marat Radchenko
2014-10-08 19:22 ` Junio C Hamano
2014-10-08 18:01 ` [PATCH 14/14] MINGW: config.mak.uname: auto-detect MinGW build from compiler Marat Radchenko
` (2 subsequent siblings)
15 siblings, 1 reply; 45+ messages in thread
From: Marat Radchenko @ 2014-10-08 18:01 UTC (permalink / raw)
To: git; +Cc: marat, msysGit
Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
---
git-compat-util.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-compat-util.h b/git-compat-util.h
index b338277..101c9d7 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -474,7 +474,7 @@ extern int git_munmap(void *start, size_t length);
#endif
#define DEFAULT_PACKED_GIT_LIMIT \
- ((1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))
+ ((size_t)(1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))
#ifdef NO_PREAD
#define pread git_pread
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply related [flat|nested] 45+ messages in thread
* Re: [PATCH 13/14] git-compat-util.h: fix integer overflow on IL32P64 systems
2014-10-08 18:01 ` [PATCH 13/14] git-compat-util.h: fix integer overflow " Marat Radchenko
@ 2014-10-08 19:22 ` Junio C Hamano
2014-10-08 20:02 ` Junio C Hamano
2014-10-09 6:08 ` Johannes Schindelin
0 siblings, 2 replies; 45+ messages in thread
From: Junio C Hamano @ 2014-10-08 19:22 UTC (permalink / raw)
To: Marat Radchenko; +Cc: git, msysGit
Marat Radchenko <marat@slonopotamus.org> writes:
> Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
> ---
> git-compat-util.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/git-compat-util.h b/git-compat-util.h
> index b338277..101c9d7 100644
> --- a/git-compat-util.h
> +++ b/git-compat-util.h
> @@ -474,7 +474,7 @@ extern int git_munmap(void *start, size_t length);
> #endif
>
> #define DEFAULT_PACKED_GIT_LIMIT \
> - ((1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))
> + ((size_t)(1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))
1024 * 1024 * 8192 overflows 32-bit unsigned, but is size_t always
large enough? Just checking.
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 13/14] git-compat-util.h: fix integer overflow on IL32P64 systems
2014-10-08 19:22 ` Junio C Hamano
@ 2014-10-08 20:02 ` Junio C Hamano
2014-10-09 5:05 ` Marat Radchenko
2014-10-09 6:08 ` Johannes Schindelin
1 sibling, 1 reply; 45+ messages in thread
From: Junio C Hamano @ 2014-10-08 20:02 UTC (permalink / raw)
To: Marat Radchenko; +Cc: git, msysGit
Junio C Hamano <gitster@pobox.com> writes:
> Marat Radchenko <marat@slonopotamus.org> writes:
>
>> Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
>> ---
>> git-compat-util.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/git-compat-util.h b/git-compat-util.h
>> index b338277..101c9d7 100644
>> --- a/git-compat-util.h
>> +++ b/git-compat-util.h
>> @@ -474,7 +474,7 @@ extern int git_munmap(void *start, size_t length);
>> #endif
>>
>> #define DEFAULT_PACKED_GIT_LIMIT \
>> - ((1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))
>> + ((size_t)(1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))
>
> 1024 * 1024 * 8192 overflows 32-bit unsigned, but is size_t always
> large enough? Just checking.
Heh, I was being silly. This gives the default value for a variable
whose type is size_t, so it would better fit. So please throw 13 in
the list of changes I found sensible in the other message.
Thanks.
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 13/14] git-compat-util.h: fix integer overflow on IL32P64 systems
2014-10-08 20:02 ` Junio C Hamano
@ 2014-10-09 5:05 ` Marat Radchenko
2014-10-09 7:31 ` Junio C Hamano
0 siblings, 1 reply; 45+ messages in thread
From: Marat Radchenko @ 2014-10-09 5:05 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, msysGit, marat
On Wed, Oct 08, 2014 at 01:02:10PM -0700, Junio C Hamano wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
> > Marat Radchenko <marat@slonopotamus.org> writes:
> >
> >> Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
> >> ---
> >> git-compat-util.h | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/git-compat-util.h b/git-compat-util.h
> >> index b338277..101c9d7 100644
> >> --- a/git-compat-util.h
> >> +++ b/git-compat-util.h
> >> @@ -474,7 +474,7 @@ extern int git_munmap(void *start, size_t length);
> >> #endif
> >>
> >> #define DEFAULT_PACKED_GIT_LIMIT \
> >> - ((1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))
> >> + ((size_t)(1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))
> >
> > 1024 * 1024 * 8192 overflows 32-bit unsigned, but is size_t always
> > large enough? Just checking.
>
> Heh, I was being silly. This gives the default value for a variable
> whose type is size_t, so it would better fit. So please throw 13 in
> the list of changes I found sensible in the other message.
Is it an Acked-by?
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 13/14] git-compat-util.h: fix integer overflow on IL32P64 systems
2014-10-09 5:05 ` Marat Radchenko
@ 2014-10-09 7:31 ` Junio C Hamano
0 siblings, 0 replies; 45+ messages in thread
From: Junio C Hamano @ 2014-10-09 7:31 UTC (permalink / raw)
To: Marat Radchenko; +Cc: git, msysGit
Marat Radchenko <marat@slonopotamus.org> writes:
> On Wed, Oct 08, 2014 at 01:02:10PM -0700, Junio C Hamano wrote:
>> Junio C Hamano <gitster@pobox.com> writes:
>>
>> > Marat Radchenko <marat@slonopotamus.org> writes:
>> >
>> >> Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
>> >> ---
>> >> git-compat-util.h | 2 +-
>> >> 1 file changed, 1 insertion(+), 1 deletion(-)
>> >>
>> >> diff --git a/git-compat-util.h b/git-compat-util.h
>> >> index b338277..101c9d7 100644
>> >> --- a/git-compat-util.h
>> >> +++ b/git-compat-util.h
>> >> @@ -474,7 +474,7 @@ extern int git_munmap(void *start, size_t length);
>> >> #endif
>> >>
>> >> #define DEFAULT_PACKED_GIT_LIMIT \
>> >> - ((1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))
>> >> + ((size_t)(1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))
>> >
>> > 1024 * 1024 * 8192 overflows 32-bit unsigned, but is size_t always
>> > large enough? Just checking.
>>
>> Heh, I was being silly. This gives the default value for a variable
>> whose type is size_t, so it would better fit. So please throw 13 in
>> the list of changes I found sensible in the other message.
>
> Is it an Acked-by?
Not really. It just shows that the change needs to be explained
well in the proposed log message.
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Re: [PATCH 13/14] git-compat-util.h: fix integer overflow on IL32P64 systems
2014-10-08 19:22 ` Junio C Hamano
2014-10-08 20:02 ` Junio C Hamano
@ 2014-10-09 6:08 ` Johannes Schindelin
1 sibling, 0 replies; 45+ messages in thread
From: Johannes Schindelin @ 2014-10-09 6:08 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Marat Radchenko, git, msysGit
Hi Junio,
On Wed, 8 Oct 2014, Junio C Hamano wrote:
> Marat Radchenko <marat@slonopotamus.org> writes:
>
> > #define DEFAULT_PACKED_GIT_LIMIT \
> > - ((1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))
> > + ((size_t)(1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))
>
> 1024 * 1024 * 8192 overflows 32-bit unsigned, but is size_t always
> large enough? Just checking.
The diff is a bit misleading as to what it *actually* changes. It *just*
casts the result to size_t. The arithmetic is performed with longs (thanks
to the "l" in 1024l) and it only overflows 32 bit iff the sizeof() test
verifies that we're at least on 64 bit -- this arithmetic operation is the
same as before the patch. I was fooled by the diff myself (adding another
parenthesis just to add the cast would probably have helped, though).
IMHO this is a good demonstration how a commit message that goes slightly
beyond the necessary can help tons of time by avoiding to let every
reviewer/reader go through the exact same steps of puzzlement.
Ciao,
Dscho
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 14/14] MINGW: config.mak.uname: auto-detect MinGW build from compiler
2014-10-08 18:00 [PATCH v5] MinGW(-W64) compilation Marat Radchenko
` (12 preceding siblings ...)
2014-10-08 18:01 ` [PATCH 13/14] git-compat-util.h: fix integer overflow " Marat Radchenko
@ 2014-10-08 18:01 ` Marat Radchenko
2014-10-08 19:26 ` Junio C Hamano
2014-10-08 19:23 ` [PATCH v5] MinGW(-W64) compilation Junio C Hamano
2014-10-09 10:11 ` Johannes Schindelin
15 siblings, 1 reply; 45+ messages in thread
From: Marat Radchenko @ 2014-10-08 18:01 UTC (permalink / raw)
To: git; +Cc: marat, msysGit
When crosscompiling, one cannot rely on `uname` from host system.
Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
---
config.mak.uname | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/config.mak.uname b/config.mak.uname
index 9f7037e..182da50 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -14,6 +14,11 @@ ifdef MSVC
uname_O := Windows
endif
+ifneq (,$(findstring mingw,$(CC_MACH)))
+ uname_S := MINGW
+ uname_O := MINGW
+endif
+
# We choose to avoid "if .. else if .. else .. endif endif"
# because maintaining the nesting to match is a pain. If
# we had "elif" things would have been much nicer...
--
2.1.1
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply related [flat|nested] 45+ messages in thread
* Re: [PATCH 14/14] MINGW: config.mak.uname: auto-detect MinGW build from compiler
2014-10-08 18:01 ` [PATCH 14/14] MINGW: config.mak.uname: auto-detect MinGW build from compiler Marat Radchenko
@ 2014-10-08 19:26 ` Junio C Hamano
2014-10-09 5:03 ` Marat Radchenko
0 siblings, 1 reply; 45+ messages in thread
From: Junio C Hamano @ 2014-10-08 19:26 UTC (permalink / raw)
To: Marat Radchenko; +Cc: git, msysGit
Marat Radchenko <marat@slonopotamus.org> writes:
> When crosscompiling, one cannot rely on `uname` from host system.
That may well be true, but is that limited to cross-compiling to
mingw? Would it be generally true for any cross compilation,
wouldn't it?
What I am wondering is if it is a better solution to make it easier
to allow somebody who is cross compiling to express "Mr. Makefile,
we know better than you and want you to do a MINGW build for us
without checking with `uname -?` yourself", i.e.
$ make uname_O=MINGW uname_S=MINGW
which would hopefully allow cross-compilation into other
environments, not just MINGW.
>
> Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
> ---
> config.mak.uname | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/config.mak.uname b/config.mak.uname
> index 9f7037e..182da50 100644
> --- a/config.mak.uname
> +++ b/config.mak.uname
> @@ -14,6 +14,11 @@ ifdef MSVC
> uname_O := Windows
> endif
>
> +ifneq (,$(findstring mingw,$(CC_MACH)))
> + uname_S := MINGW
> + uname_O := MINGW
> +endif
> +
> # We choose to avoid "if .. else if .. else .. endif endif"
> # because maintaining the nesting to match is a pain. If
> # we had "elif" things would have been much nicer...
> --
> 2.1.1
>
> --
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 14/14] MINGW: config.mak.uname: auto-detect MinGW build from compiler
2014-10-08 19:26 ` Junio C Hamano
@ 2014-10-09 5:03 ` Marat Radchenko
2014-10-09 7:04 ` Johannes Schindelin
2014-10-09 7:34 ` Junio C Hamano
0 siblings, 2 replies; 45+ messages in thread
From: Marat Radchenko @ 2014-10-09 5:03 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, msysGit, marat
On Wed, Oct 08, 2014 at 12:26:52PM -0700, Junio C Hamano wrote:
> Marat Radchenko <marat@slonopotamus.org> writes:
>
> > When crosscompiling, one cannot rely on `uname` from host system.
>
> That may well be true, but is that limited to cross-compiling to
> mingw? Would it be generally true for any cross compilation,
> wouldn't it?
>
> What I am wondering is if it is a better solution to make it easier
> to allow somebody who is cross compiling to express "Mr. Makefile,
> we know better than you and want you to do a MINGW build for us
> without checking with `uname -?` yourself", i.e.
>
> $ make uname_O=MINGW uname_S=MINGW
>
> which would hopefully allow cross-compilation into other
> environments, not just MINGW.
So, do you really want this patch to be changed from 5-liner into
a full-blow system detection rewrite based on `cc -dumpmachine`
instead of `uname`?
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Re: [PATCH 14/14] MINGW: config.mak.uname: auto-detect MinGW build from compiler
2014-10-09 5:03 ` Marat Radchenko
@ 2014-10-09 7:04 ` Johannes Schindelin
2014-10-09 7:34 ` Junio C Hamano
1 sibling, 0 replies; 45+ messages in thread
From: Johannes Schindelin @ 2014-10-09 7:04 UTC (permalink / raw)
To: Marat Radchenko; +Cc: Junio C Hamano, git, msysGit
Hi Marat,
On Thu, 9 Oct 2014, Marat Radchenko wrote:
> On Wed, Oct 08, 2014 at 12:26:52PM -0700, Junio C Hamano wrote:
> > Marat Radchenko <marat@slonopotamus.org> writes:
> >
> > > When crosscompiling, one cannot rely on `uname` from host system.
> >
> > That may well be true, but is that limited to cross-compiling to
> > mingw? Would it be generally true for any cross compilation,
> > wouldn't it?
> >
> > What I am wondering is if it is a better solution to make it easier
> > to allow somebody who is cross compiling to express "Mr. Makefile,
> > we know better than you and want you to do a MINGW build for us
> > without checking with `uname -?` yourself", i.e.
> >
> > $ make uname_O=MINGW uname_S=MINGW
> >
> > which would hopefully allow cross-compilation into other
> > environments, not just MINGW.
>
> So, do you really want this patch to be changed from 5-liner into
> a full-blow system detection rewrite based on `cc -dumpmachine`
> instead of `uname`?
Junio's responsibility as a maintainer is to keep this project afloat for
a broader audience than this patch series tries to reach. Keeping that in
mind, a patch that fixes a broad issue (in this case, cross-compiling)
*just* for one small use case (in this case, cross-compiling for Windows
using MinGW) might need a very good argument to convince the maintainer
that a broader solution is either not achievable or so much more
complicated that it is completely outside of the scope of this patch
series.
FWIW this is *exactly* what I pointed out here:
https://github.com/dscho/git/commit/e31124d4e8ba4e48181306198648cdfe73ff9c30#comments
Hmm. This is a very narrow solution to the underlying problem.
Just think about cross-compiling for e.g. MacOSX. The solution
presented in this commit works for MinGW, only for MinGW, and for
MinGW alone. The commit message needs to do a much better job to
make that clear.
And Junio actually pointed out that a broader solution is neither
impossible nor complex: Junio hinted at the use of the conditional
assignment "FOO ?= bar":
https://www.gnu.org/software/make/manual/make.html#index-_003f_003d
IMHO it would make tons of sense to replace the := assignments in
https://github.com/dscho/git/blob/e31124d4e8ba4e48181306198648cdfe73ff9c30/config.mak.uname#L3-L8
by ?= assignments.
Of course it is very obvious where the idea for the patch we are
discussing here comes from: the current config.mak.uname has this:
ifdef MSVC
# avoid the MingW and Cygwin configuration sections
uname_S := Windows
uname_O := Windows
endif
This could be cleaned up in the same run: to be assigned *before* the
conditional assignments of uname_S. Likewise, the MINGW-specific part
should be done by searching for "mingw" in CROSS_COMPILE, also before the
block of the uname_* variable assignments.
Ciao,
Johannes
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 14/14] MINGW: config.mak.uname: auto-detect MinGW build from compiler
2014-10-09 5:03 ` Marat Radchenko
2014-10-09 7:04 ` Johannes Schindelin
@ 2014-10-09 7:34 ` Junio C Hamano
2014-10-09 7:38 ` [msysGit] " Johannes Schindelin
2014-10-09 8:48 ` Marat Radchenko
1 sibling, 2 replies; 45+ messages in thread
From: Junio C Hamano @ 2014-10-09 7:34 UTC (permalink / raw)
To: Marat Radchenko; +Cc: git, msysGit
Marat Radchenko <marat@slonopotamus.org> writes:
> On Wed, Oct 08, 2014 at 12:26:52PM -0700, Junio C Hamano wrote:
> ...
>> What I am wondering is if it is a better solution to make it easier
>> to allow somebody who is cross compiling to express "Mr. Makefile,
>> we know better than you and want you to do a MINGW build for us
>> without checking with `uname -?` yourself", i.e.
>>
>> $ make uname_O=MINGW uname_S=MINGW
>>
>> which would hopefully allow cross-compilation into other
>> environments, not just MINGW.
>
> So, do you really want this patch to be changed from 5-liner into
> a full-blow system detection rewrite based on `cc -dumpmachine`
> instead of `uname`?
No, and I do not quite see why you even need to look at -dumbmachine
output when your goal is to make this command line
>> $ make uname_O=MINGW uname_S=MINGW
work sensibly. Wouldn't it be more like a series of
ifndef uname_O
uname_O := $(shell uname -o)
endif
or something like that?
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [msysGit] Re: [PATCH 14/14] MINGW: config.mak.uname: auto-detect MinGW build from compiler
2014-10-09 7:34 ` Junio C Hamano
@ 2014-10-09 7:38 ` Johannes Schindelin
[not found] ` <CAPc5daUo+Fw2Oh3LK+0HJCmtVjicYk62qiQ2v8h8pitYHAZL3w@mail.gmail.com>
2014-10-09 8:48 ` Marat Radchenko
1 sibling, 1 reply; 45+ messages in thread
From: Johannes Schindelin @ 2014-10-09 7:38 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Marat Radchenko, git, msysGit
Hi Junio,
On Thu, 9 Oct 2014, Junio C Hamano wrote:
> Marat Radchenko <marat@slonopotamus.org> writes:
>
> > On Wed, Oct 08, 2014 at 12:26:52PM -0700, Junio C Hamano wrote:
> > ...
> >> What I am wondering is if it is a better solution to make it easier
> >> to allow somebody who is cross compiling to express "Mr. Makefile,
> >> we know better than you and want you to do a MINGW build for us
> >> without checking with `uname -?` yourself", i.e.
> >>
> >> $ make uname_O=MINGW uname_S=MINGW
> >>
> >> which would hopefully allow cross-compilation into other
> >> environments, not just MINGW.
> >
> > So, do you really want this patch to be changed from 5-liner into
> > a full-blow system detection rewrite based on `cc -dumpmachine`
> > instead of `uname`?
>
> No, and I do not quite see why you even need to look at -dumbmachine
Nice Freudian ;-)
> output when your goal is to make this command line
>
> >> $ make uname_O=MINGW uname_S=MINGW
>
> work sensibly. Wouldn't it be more like a series of
>
> ifndef uname_O
> uname_O := $(shell uname -o)
> endif
>
> or something like that?
Or uname_O ?= $(shell uname -o)
To clarify: it would be enough to look at CROSS_COMPILE to determine
whether we're cross-compiling for MinGW.
The output of -dumpmachine is still needed for the correct CFLAGS/LDFLAGS.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 14/14] MINGW: config.mak.uname: auto-detect MinGW build from compiler
2014-10-09 7:34 ` Junio C Hamano
2014-10-09 7:38 ` [msysGit] " Johannes Schindelin
@ 2014-10-09 8:48 ` Marat Radchenko
1 sibling, 0 replies; 45+ messages in thread
From: Marat Radchenko @ 2014-10-09 8:48 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, msysGit, marat
On Thu, Oct 09, 2014 at 12:34:25AM -0700, Junio C Hamano wrote:
> No, and I do not quite see why you even need to look at -dumbmachine
> output when your goal is to make this command line
>
> >> $ make uname_O=MINGW uname_S=MINGW
>
> work sensibly. Wouldn't it be more like a series of
>
> ifndef uname_O
> uname_O := $(shell uname -o)
> endif
>
> or something like that?
I don't want to tell `make` my system name several times. It should be
possible to infer system type from CC.
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH v5] MinGW(-W64) compilation
2014-10-08 18:00 [PATCH v5] MinGW(-W64) compilation Marat Radchenko
` (13 preceding siblings ...)
2014-10-08 18:01 ` [PATCH 14/14] MINGW: config.mak.uname: auto-detect MinGW build from compiler Marat Radchenko
@ 2014-10-08 19:23 ` Junio C Hamano
2014-10-09 10:11 ` Johannes Schindelin
15 siblings, 0 replies; 45+ messages in thread
From: Junio C Hamano @ 2014-10-08 19:23 UTC (permalink / raw)
To: Marat Radchenko; +Cc: git, msysGit
Marat Radchenko <marat@slonopotamus.org> writes:
> This patch series fixes building on modern MinGW and MinGW-W64 (including x86_64).
As Dscho explained in a sub-thread, I really do not want to bypass
msysgit folks when dealing with things that relate to Windows, for
at least two reasons:
* I can be a patch monkey and apply them to my tree but then I
would be pushing out changes that I didn't try out myself
otherwise. Granted, that is true for platforms other than
Windows that I do not regularly build and test on, but when I
know there are capable folks who have been working on Windows
issues for a long time, not asking for their help does not make
much sense.
* They still have other changes that are yet to be fed to my tree,
and I do not actively track and compare their tree. A patch
series prepared against my tree may collide with their ongoing
effort to make Git on Windows platform better and risk making
more work for them, not less.
The earlier part of your series (including the ones that were Acked
by EFL) looked sensible to me: 1-6, 9, 11, 12 (outside compat/ part
only).
I could take them directly to my tree, but that is still on "as long
as msysgit folks are OK with them" basis.
Thanks.
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH v5] MinGW(-W64) compilation
2014-10-08 18:00 [PATCH v5] MinGW(-W64) compilation Marat Radchenko
` (14 preceding siblings ...)
2014-10-08 19:23 ` [PATCH v5] MinGW(-W64) compilation Junio C Hamano
@ 2014-10-09 10:11 ` Johannes Schindelin
2014-10-09 10:39 ` Marat Radchenko
15 siblings, 1 reply; 45+ messages in thread
From: Johannes Schindelin @ 2014-10-09 10:11 UTC (permalink / raw)
To: Marat Radchenko; +Cc: git, gister, msysGit
Hi all,
On Wed, 8 Oct 2014, Marat Radchenko wrote:
> This patch series fixes building on modern MinGW and MinGW-W64
> (including x86_64).
To make it more convenient to work on this patch series using Git, I
pushed this branch to
https://github.com/dscho/git/compare/git:master...w64-slonopotamus
I also added one patch I find highly convenient:
https://github.com/dscho/git/commit/29749c7d7b4638c63369d6cf067f5d524d0092f9
-- snipsnap --
Subject: [PATCH] MinGW-w64: Work around bug in MinGW-w64's winuser.h
This allows contributors to compile 64-bit Windows builds of Git without
forcing them to use an unstable version of MinGW-w64.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
compat/poll/poll.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/compat/poll/poll.c b/compat/poll/poll.c
index 8941249..dcbcbaf 100644
--- a/compat/poll/poll.c
+++ b/compat/poll/poll.c
@@ -76,6 +76,18 @@
#ifdef WIN32_NATIVE
+/*
+ * Work around https://sourceforge.net/p/mingw-w64/bugs/397. In short, some
+ * definitions were put into the GUI-only section of winuser.h by mistake
+ * in MinGW-w64 versions up to 3.1.0.
+ */
+#ifndef QS_ALLINPUT
+#define QS_ALLINPUT 0xff
+extern WINUSERAPI DWORD WINAPI MsgWaitForMultipleObjects(DWORD nCount,
+ CONST HANDLE *pHandles, WINBOOL fWaitAll, DWORD dwMilliseconds,
+ DWORD dwWakeMask);
+#endif
+
#define IsConsoleHandle(h) (((intptr_t) (h) & 3) == 3)
static BOOL
--
2.0.0.rc3.9669.g840d1f9
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply related [flat|nested] 45+ messages in thread
* Re: [PATCH v5] MinGW(-W64) compilation
2014-10-09 10:11 ` Johannes Schindelin
@ 2014-10-09 10:39 ` Marat Radchenko
2014-10-09 10:59 ` Johannes Schindelin
0 siblings, 1 reply; 45+ messages in thread
From: Marat Radchenko @ 2014-10-09 10:39 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git, gister, msysGit, marat
On Thu, Oct 09, 2014 at 12:11:01PM +0200, Johannes Schindelin wrote:
> I also added one patch I find highly convenient:
>
> https://github.com/dscho/git/commit/29749c7d7b4638c63369d6cf067f5d524d0092f9
There already were two attempts to this issue:
1. http://www.spinics.net/lists/git/msg230028.html
2. http://www.spinics.net/lists/git/msg229822.html
Neither of them was accepted to git.git. I doubt your one will be.
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH v5] MinGW(-W64) compilation
2014-10-09 10:39 ` Marat Radchenko
@ 2014-10-09 10:59 ` Johannes Schindelin
0 siblings, 0 replies; 45+ messages in thread
From: Johannes Schindelin @ 2014-10-09 10:59 UTC (permalink / raw)
To: Marat Radchenko; +Cc: git, gister, msysGit
Hi Marat,
On Thu, 9 Oct 2014, Marat Radchenko wrote:
> On Thu, Oct 09, 2014 at 12:11:01PM +0200, Johannes Schindelin wrote:
> > I also added one patch I find highly convenient:
> >
> > https://github.com/dscho/git/commit/29749c7d7b4638c63369d6cf067f5d524d0092f9
>
> There already were two attempts to this issue:
>
> 1. http://www.spinics.net/lists/git/msg230028.html
> 2. http://www.spinics.net/lists/git/msg229822.html
>
> Neither of them was accepted to git.git. I doubt your one will be.
I would guess that they were not accepted mostly because they were not
coordinated with the Windows developers on the msysGit mailing list.
Let's fix the rest of the issues, and then we can always carry this patch
in Git for Windows until MinGW-w64 3.1.1 (or 3.2.0) is released.
Ciao,
Johannes
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 45+ messages in thread