[fortran] Disable use of -malign-double
Richard Guenther
richard.guenther@gmail.com
Thu Feb 1 09:48:00 GMT 2007
On 2/1/07, Jerry DeLisle <jvdelisle@verizon.net> wrote:
>
(Note I agree with Andrew that no special action should be required,
the documentation
is quite clear)
> 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.
A compile time test will not work (think of shared libraries and
moving a binary).
> We could make this function callable as part of initialization of main or in
> start_library to issue a runtime error or warning as well.
What you _can_ do is at runtime program initialization time do a check if
the program and libgfortran have been compiled with a compatible ABI, but of
course this doesn't cover other libraries such as blas or glibc.
The only sane way to do it is marking your objects in a way that the linker and
dynamic loader can reject incompatible versions.
(Note I agree with Andrew that no special action should be required,
the documentation
is quite clear)
Richard.
More information about the Gcc-patches
mailing list