This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
-malign-natural for Linux PPC64 and AIX
- From: "Kevin B. Hendricks" <kevin dot hendricks at sympatico dot ca>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 25 Apr 2003 10:24:51 -0400
- Subject: -malign-natural for Linux PPC64 and AIX
- References: <200304211421.KAA24576@makai.watson.ibm.com>
Hi David (Geoff),
I noticed that Darwin, AIX and if I am reading the file right LinuxPPC 64
have all adopted the double aligned to 4 while long long int aligned to 8
(at least based on the comments in the relevant rs6000/*.h files in gcc
3.3).
This presents a problem interfacing to the component model of
OpenOffice.org.
Luckily the Mac OSX version of gcc has added a command
line switch to the compiler -malign-natural that that nicely allows both
doubles and long long ints to be aligned to 8 (i.e the natural alignment
based on size). This type of alignment is used by Linux PPC32
(sysvr4.h?).
If I were to create a patch to allow -malign-natural to work as it does
under MacOSX gcc version, for both AIX and Linux PPC64 would you be
willing to include it in some future release?
Thanks,
Kevin