From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Anyone building Emacs trunk with MinGW w64 (32 bits) Date: Tue, 26 Mar 2013 16:17:41 +0200 Message-ID: <83hajyz1mi.fsf@gnu.org> References: <87zjxumbjf.fsf@wanadoo.es> <83vc8f1t0x.fsf@gnu.org> <87sj3jcr6t.fsf@wanadoo.es> <86zjxrs4jm.fsf@gmail.com> <87k3ovcn1r.fsf@wanadoo.es> <86fvzj2gkz.fsf@gmail.com> <87sj3jaqfs.fsf@wanadoo.es> <83y5dazmpt.fsf@gnu.org> <86ehf2zefk.fsf@gmail.com> <86li9az2sw.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1364307498 9684 80.91.229.3 (26 Mar 2013 14:18:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Mar 2013 14:18:18 +0000 (UTC) Cc: emacs-devel@gnu.org To: rzl24ozi@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 26 15:18:43 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UKUi1-0003N3-3k for ged-emacs-devel@m.gmane.org; Tue, 26 Mar 2013 15:18:41 +0100 Original-Received: from localhost ([::1]:35973 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKUhd-0004t9-69 for ged-emacs-devel@m.gmane.org; Tue, 26 Mar 2013 10:18:17 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKUhW-0004s7-A1 for emacs-devel@gnu.org; Tue, 26 Mar 2013 10:18:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKUhR-0005Tq-BM for emacs-devel@gnu.org; Tue, 26 Mar 2013 10:18:10 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:36810) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKUhR-0005Si-3Q for emacs-devel@gnu.org; Tue, 26 Mar 2013 10:18:05 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MK900C00UAZ9Q00@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Tue, 26 Mar 2013 16:17:28 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MK900BOYUD4WS70@a-mtaout22.012.net.il>; Tue, 26 Mar 2013 16:17:28 +0200 (IST) In-reply-to: <86li9az2sw.fsf@gmail.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.172 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:158216 Archived-At: > From: rzl24ozi@gmail.com > Date: Tue, 26 Mar 2013 22:52:15 +0900 > > > I'm trying to build by mingw-w64 at Cygwin. > > I succeed to bootstrap mingw-w64 emacs (32bit and 64bit) by > the changes (for trunk r112139) attached to this mail on Cygwin > at Windows7 64bit. Thanks. But what does it mean "on Cygwin" in this context? If you are building with the MinGW64 tools, what Cygwin has got to do with this? > I'm not sure that this changes is correct, but I hope that this > will help you. They are helpful, but I have a few questions: --- ./nt/addpm.c.orig 2013-03-26 17:33:23.000000000 +0900 +++ ./nt/addpm.c 2013-03-26 21:46:23.405698700 +0900 @@ -34,15 +34,17 @@ installed, then the DDE fallback for creating icons the Windows 3.1 progman way will be used instead, but that is prone to lockups caused by other applications not servicing their message queues. */ -/* MinGW64 defines _W64 and barfs if _WIN32_IE is defined to anything - below 0x500. */ -#ifndef _W64 #define _WIN32_IE 0x400 -#endif /* Request C Object macros for COM interfaces. */ #define COBJMACROS 1 #include +/* MinGW64 defines _W64 and barfs if _WIN32_IE is defined to anything + below 0x500. */ +#ifdef _W64 +#undef _WIN32_IE +#define _WIN32_IE 0x500 +#endif What was wrong with the original code, and why did you need to move the definition of _WIN32_IE further down? What error messages did you see with the original code? --- ./nt/configure.bat.orig 2013-03-26 22:06:16.528698700 +0900 +++ ./nt/configure.bat 2013-03-26 22:06:16.492698700 +0900 @@ -479,10 +479,10 @@ echo Using 'gcc' rm -f junk.c junk.o Rem It is not clear what GCC version began supporting -mtune -Rem and pentium4 on x86, so check this explicitly. +Rem and i686 on x86, so check this explicitly. echo main(){} >junk.c -echo gcc -c -O2 -mtune=pentium4 junk.c >>config.log -gcc -c -O2 -mtune=pentium4 junk.c >>config.log 2>&1 +echo gcc -c -O2 -mtune=i686 junk.c >>config.log +gcc -c -O2 -mtune=i686 junk.c >>config.log 2>&1 What was wrong with the original gcc commands? #ifdef _W64 /* MinGW64 specific stuff. */ -#define USE_NO_MINGW_SETJMP_TWO_ARGS 1 /* Make sure 'struct timespec' and 'struct timezone' are defined. */ #include +#include #include +#ifdef WIN64 +#define _start __start +#endif #endif #ifdef _MSC_VER Please explain why these changes to ms-w32.h were needed. --- ./nt/inc/sys/time.h.orig 2013-03-26 17:33:23.000000000 +0900 +++ ./nt/inc/sys/time.h 2013-03-26 21:46:23.425698700 +0900 @@ -8,7 +8,8 @@ /* The guards are for MinGW64, which defines these structs on its system headers which are included by ms-w32.h. */ -#ifndef _W64 +#if !defined(_TIMEVAL_DEFINED) || !defined(_W64) +#define _TIMEVAL_DEFINED struct timeval { long tv_sec; /* seconds */ This breaks the MinGW32 build, so please see if the current trunk has a better solution for this problem. --- ./src/image.c.orig 2013-03-24 18:16:45.000000000 +0900 +++ ./src/image.c 2013-03-26 21:46:23.437698700 +0900 @@ -5545,6 +5545,9 @@ png_byte **rows; }; +#ifdef _W64 +#define _setjmp setjmp +#endif Why is this needed? --- ./src/lisp.h.orig 2013-03-25 12:31:37.000000000 +0900 +++ ./src/lisp.h 2013-03-26 21:46:23.442698700 +0900 @@ -2164,7 +2164,11 @@ #ifdef HAVE__SETJMP typedef jmp_buf sys_jmp_buf; +#ifdef _W64 +# define sys_setjmp(j) setjmp (j) +#else # define sys_setjmp(j) _setjmp (j) +#endif # define sys_longjmp(j, v) _longjmp (j, v) And this? Thanks.