FORTRAN GCC 4.3.X library
Janne Blomqvist
blomqvist.janne@gmail.com
Wed Mar 4 22:48:00 GMT 2009
Takis Psarogiannakopoulos wrote:
> Thomas,
>
> Thank you for your answer. I didnt email the fortran list cause I thought
> its not worth it. I was under the impression I was missing something
> something very obvious.
The obvious thing, as Thomas mentioned, is that due to the way the GCC
bootstrap works, libgfortran is designed to be built with the same
version of the gcc compiler as the library itself.
> You are right its the -std=c99 that is needed and the const restrict seems
> to be the old __restrict right?
restrict is the C99 standardized version of the GNU extension
__restrict, yes (some other compilers have the same extension with some
other name such as #pragma noalias and whatnot). const is another
specifier that is not related to restrict. They are use together in
libgfortran since the combination implements more or less the Fortran
argument passing semantics, allowing the compiler to optimize more
aggressively. And yes, in some cases the performance difference has been
measured to be significant (search the list archives for details).
> I must confess thats a very peculiar
> name...
It is what it is, I'm pretty sure the gfortran maintainers are not
interested in trying to convince the ISO C committee to change the name.
If you wish to tilt at windmills yourself, feel free.
> I have never use it really but i kind rememebr a regression about
> that name.
Uh-uh, well that's pretty vague. Is this supposed to convince us to
remove our usage of restrict, or?
> I am using a gcc-4.3.x/config/mh-os file that picks up all the flags and
> as this file by default in GCC is being copied "as is" to the main
> Makefile can it override all the flags.
> -std=gnu99 is defined on libgfortran/Makefile.in/am AM_CFLAGS with other
> warnings. As have switched the warnings off from the main config/mh-*
> config file the flag -std=gnu99 is not passed to the compile flags.
> However the main Makefile has a -D_GNU_SOURCE clearly defined and its
> there really it should also have included the -std=gnu99 flag.
> Maybe someone can do that change?
> If a system doesnt need a -std=gnu99 there is not harm, but if its needed
> and its not there the whole compilation fail!
Indeed, libgfortran requires the -std=gnu99 flag in order to compile, so
removing that in one way or another will not allow the library to build.
But to be honest, I have no idea what you're asking us to actually do
here, or what your problem really is. You're apparently using gcc 4.3,
which should handle -std=gnu99 including using 'restrict' just fine.
--
Janne Blomqvist
More information about the Fortran
mailing list