From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: rzl24ozi@gmail.com Newsgroups: gmane.emacs.devel Subject: Re: Anyone building Emacs trunk with MinGW w64 (32 bits) Date: Wed, 27 Mar 2013 00:48:58 +0900 Message-ID: <867gku88lx.fsf@gmail.com> 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> <83hajyz1mi.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1364313109 15213 80.91.229.3 (26 Mar 2013 15:51:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Mar 2013 15:51:49 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 26 16:52:14 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 1UKW8J-0006Lf-V4 for ged-emacs-devel@m.gmane.org; Tue, 26 Mar 2013 16:49:56 +0100 Original-Received: from localhost ([::1]:50689 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKW7v-00025z-SJ for ged-emacs-devel@m.gmane.org; Tue, 26 Mar 2013 11:49:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39061) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKW7p-0001wJ-MR for emacs-devel@gnu.org; Tue, 26 Mar 2013 11:49:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKW7m-0004a6-NF for emacs-devel@gnu.org; Tue, 26 Mar 2013 11:49:25 -0400 Original-Received: from mail-pd0-f178.google.com ([209.85.192.178]:56930) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKW7m-0004Zr-H6; Tue, 26 Mar 2013 11:49:22 -0400 Original-Received: by mail-pd0-f178.google.com with SMTP id u10so3105597pdi.37 for ; Tue, 26 Mar 2013 08:49:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=wXxmyHv/nTM9MxAH06DpKBs4ksRRN42NdO+cIQcyYCk=; b=K4B3w8JaTlSsjz4GlwWYVpS4zeB9PYvfgLk9fg+t60XH7XgHGJAS6myLUc5LSdbLGz a9HdShwRpOvGw0WYpVXtcI9stnn/df6D7hvrOnxD064OqNTKPdV7E5IwbnD6zgf0uqAq +ZU5UOUQmZs7tbj8fTw+X8/xA4JqSAK8GcwyQbIVizF9TG41t6akY7qKeuecGvRrF0uV cP0lzvetsyr2jbV5cgQnpHHCnKs9R118GOsZdJJmtBS4hFJrzP1TzBfPOL3tFA6eTk3f re+Cuvslyf30GN7Apt209FfYit6IQUsOJney8VQv+iOZpKaSLbgFgWJlQkHbGt72op0i SUdQ== X-Received: by 10.66.234.101 with SMTP id ud5mr24564880pac.40.1364312959078; Tue, 26 Mar 2013 08:49:19 -0700 (PDT) Original-Received: from 192.168.1.3 (64.24.30.125.dy.iij4u.or.jp. [125.30.24.64]) by mx.google.com with ESMTPS id kl4sm17919978pbc.31.2013.03.26.08.49.16 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 26 Mar 2013 08:49:17 -0700 (PDT) In-Reply-To: <83hajyz1mi.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 26 Mar 2013 16:17:41 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.192.178 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:158221 Archived-At: > 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? It mean that I use MinGW64 tools on Cygwin shell. I think Cygwin is not important. > --- ./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 @@ : > 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? Because _W64 is defined after include MinGW64 header. > --- ./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 @@ : > What was wrong with the original gcc commands? "-mtune=pentium4" cause an error in 64bit gcc, like "hello.c:1:0: error: CPU you selected does not support x86-64 instruction set" If "-mtune=pentium4" is failed configure.bat use "-mcpu=i686" instead, but it cause gcc warnig like "gcc.exe: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead" > #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. If USE_NO_MINGW_SETJMP_TWO_ARGS is defined, it seems that emacs crash when byte-compile. I do not know what happened in this case exactly, sorry. In ms-w32.h, some functions are defined to sys_..., such as chmod -> sys_chmod. if it is defined before "#include ", functions in sys/stat.h are changed. It cause warning like "warning: 'sys_chmod' redeclared without dllimport...", I think. so I include it here. __start is entry point that specified by linker option in makefile, but 64bit gcc does not add '_' to symbol, so change _start to __start. > --- ./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 : > This breaks the MinGW32 build, so please see if the current trunk has > a better solution for this problem. I understand. > --- ./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? In image.c, _setjmp() is used with 1 arg. It seems that some compile error. This is also related to the following. > --- ./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? If USE_NO_MINGW_SETJMP_TWO_ARGS is not defined, it seems that _setjmp() need 2 args (see mingw-w64's setjmp.h). so I change this. Sorry for my poor english. I'm not english native.