This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [fortran] Disable use of -malign-double
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Jerry DeLisle <jvdelisle at verizon dot net>
- Cc: Andrew Pinski <pinskia at physics dot uc dot edu>, Steve Kargl <sgk at troutmask dot apl dot washington dot edu>, fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Thu, 1 Feb 2007 02:59:53 +0000 (UTC)
- Subject: Re: [fortran] Disable use of -malign-double
- References: <200701311824.l0VIORT3025323@localhost.localdomain> <45C1515A.1070304@verizon.net>
On Wed, 31 Jan 2007, Jerry DeLisle wrote:
> I think we should have a test at compile time to determine if the libraries
> have been aligned and if not issue an error if -malign-double is used. I am
> not sure exactly how we would do this, but maybe add a simple structure and
> test function in the library that is called at compile time to answer the
> question.
An established approach for checking ABI compatibility is to tag object
files and libraries with ABI information and then have the linker complain
if linking together objects with incompatible ABIs. Sometimes there is a
standard for the object file tags (e.g. in the ARM EABI), but if there
isn't one for x86 you could establish a convention followed by GCC and GNU
binutils for marking whether objects use align-double.
GCC may end up needing such conventions more generally for LTO in order to
tell whether it can optimize across two objects compiled with different
options.
--
Joseph S. Myers
joseph@codesourcery.com