unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Cc: "Sébastien Kirche" <sebastien.kirche@free.fr>, emacs-devel@gnu.org
Subject: Re: [OSX] G4 compiled binary fails on G5
Date: Thu, 03 Feb 2005 20:28:28 +0900	[thread overview]
Message-ID: <wlzmyl7uhv.wl%mituharu@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <jwvwttqc2hc.fsf-monnier+emacs@gnu.org> <wlmzyln1ez.wl@church.math.s.chiba-u.ac.jp>

>>>>> On Wed, 02 Feb 2005 12:21:34 -0500, Stefan Monnier <monnier@iro.umontreal.ca> 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 <mituharu@math.s.chiba-u.ac.jp> 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 <monnier@iro.umontreal.ca> 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

  reply	other threads:[~2005-02-03 11:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-16  7:28 Mac OS 9 support YAMAMOTO Mitsuharu
2004-10-16 18:37 ` Stefan Monnier
2004-10-17  9:23   ` YAMAMOTO Mitsuharu
2005-02-03 11:28     ` YAMAMOTO Mitsuharu [this message]
2004-12-24  8:52 ` Mac OS 9 support (and some enhancements for Carbon Emacs) YAMAMOTO Mitsuharu
2004-12-27 17:42   ` Steven Tamm
2005-01-18 10:46   ` Sébastien Kirche
  -- strict thread matches above, loose matches on Subject: below --
2005-01-31 10:15 [OSX] G4 compiled binary fails on G5 Sébastien Kirche
2005-01-31 16:40 ` Steven Tamm
2005-01-31 17:06   ` Sébastien Kirche
2005-01-31 21:45   ` Kim F. Storm
2005-02-02 16:22   ` Sébastien Kirche
2005-02-02 17:21     ` Stefan Monnier
2005-02-02 18:09       ` Steven Tamm
2005-02-02 18:48         ` Stefan Monnier
     [not found]           ` <85wttqwwv5.fsf@obelix.seki.fr>
2005-02-02 20:25             ` Stefan Monnier
     [not found]         ` <85sm4ewwqo.fsf@obelix.seki.fr>
2005-02-02 22:50           ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=wlzmyl7uhv.wl%mituharu@math.s.chiba-u.ac.jp \
    --to=mituharu@math.s.chiba-u.ac.jp \
    --cc=emacs-devel@gnu.org \
    --cc=sebastien.kirche@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).