From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: [OSX] G4 compiled binary fails on G5 Date: Thu, 03 Feb 2005 20:28:28 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1107431659 32053 80.91.229.2 (3 Feb 2005 11:54:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 3 Feb 2005 11:54:19 +0000 (UTC) Cc: =?ISO-8859-1?Q?S=E9bastien?= Kirche , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 03 12:54:19 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1CwfYT-0007s5-LP for ged-emacs-devel@m.gmane.org; Thu, 03 Feb 2005 12:53:50 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cwfli-0002uV-Sz for ged-emacs-devel@m.gmane.org; Thu, 03 Feb 2005 07:07:30 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CwfYY-0005hz-PJ for emacs-devel@gnu.org; Thu, 03 Feb 2005 06:53:56 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CwfYS-0005g4-QK for emacs-devel@gnu.org; Thu, 03 Feb 2005 06:53:49 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CwfYQ-0005ao-BQ for emacs-devel@gnu.org; Thu, 03 Feb 2005 06:53:47 -0500 Original-Received: from [133.82.132.2] (helo=mathmail.math.s.chiba-u.ac.jp) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CwfA0-0002aC-8n for emacs-devel@gnu.org; Thu, 03 Feb 2005 06:28:33 -0500 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id ECD091A6381; Thu, 3 Feb 2005 20:28:28 +0900 (JST) Original-To: Stefan Monnier In-Reply-To: User-Agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: main.gmane.org gmane.emacs.devel:32804 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32804 >>>>> On Wed, 02 Feb 2005 12:21:34 -0500, Stefan Monnier said: > what's the problem with optimization flags and ENABLE_CHECKING and > USE_LSB_TAG? It crashes at startup time (while loading loadup.el). This issue was mentioned in my previous mail. >>>>> On Sun, 17 Oct 2004 18:23:32 +0900, YAMAMOTO Mitsuharu said: >> If you want to be more confident that it does indeed work, compile >> with -DENABLE_CHECKING. This should pretty quickly catch any >> problem. I think it's not unexpected on RISC systems like PowerPC >> that DECL_ALIGN is not needed. > Actually, I used this in the early development stage. It seems that > the default optimization option of MrC compiler is not compatible > with -DENABLE_CHECKING. Unfortunately, I still don't know why, and it's difficult for me to use a debugger on Mac OS 9. I couldn't invoke PowerMac Debugger (http://developer.apple.com/tools/debuggers/) on the Classic Environment. >>>>> On Wed, 02 Feb 2005 12:21:34 -0500, Stefan Monnier said: > Also in s-mac.h, would it be correct to add to the code > #ifdef __MRC__ > #define DECL_ALIGN(type, var) type var > #endif > a little comment saying something like "MrC always aligns structures > larger than 8bytes on 8byte boundaries". If not, what is the > justification for defining DECL_ALIGN as a nop? Sorry, I'm not 100% sure. All I have is "Just it seems to work" and a description in "Macintosh C/C++ ABI": (http://developer.apple.com/tools/mpw-tools/compilers/docs/abi_spec.pdf) 3.3.1.1 Natural Alignment The natural alignment of the type of is used whenever an instance of that type, a local or global, is allocated to memory or assigned a memory address. ... The natural alignment for an aggregate type is the maximum of the natural alignments of its members. According to the natural alignment, one can only assume that Lisp_Subr is aligned on 4 byte boundaries. But there's also the following note: NOTE: It is recommended that compilers use the following formula to choose the alignment for local and global aggregate variables instead of using the natural alignment: ... size of 8-15 bytes -> alignment of 8 bytes size of 16 byte or more -> larger of 8 and the embedding alignment of the variable's type So, 8 byte alignment would be expected. But again, I'm not 100% sure. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp