------- Comment #11 from jb at gcc dot gnu dot org  2007-04-18 19:05 -------
(In reply to comment #10)
> > What happend to this? I can't find the patch in the tracker anymore, but
> > there's no indication in the ChangeLog(s) that is was applied.
> 
> The last patch was applied, i.e. gfortran uses now _gfortran_ prefixes to for
> the libgfortran symbols.
> 
> However, what is missing are named symbols.

To use the proper term, symbol versioning is not yet implemented. Obviusly,
symbols do have names.

> That is: One may change the
> library, but one keeps the old version. Using the version information, old
> programs get the old version. This is used, e.g., by the glibc. If you use
> objdump -t libc.so.6, you find:
> [EMAIL PROTECTED]  <--- old version for old programs
> sched_getaffinity@@GLIBC_2.3.4 <--- new interface

Yes. For the longer version see http://gcc.gnu.org/wiki/SymbolVersioning and
links therein.

> This was done in the old patch
> http://gcc.gnu.org/ml/gcc-patches/2006-05/msg01186.html
> That patch got stuck with ISO_C_BINDINGS. We still don't have them, but we 
> have
> _gfortran_ prefixes. Thus one could probably start updating that patch even
> though ISO_C_BINDING is not yet in gfortran.

Actually, we don't need ISO_C_BINDING anymore for this; the original reason was
that the Fortran standard doesn't allow procedure names to begin with "_", so
the idea was to use ISO_C_BINDING to mangle the symbol name (to get the names
to begin with "_gfortran"). However, as explained in #5, we now have
-fallow-leading-underscore (undocumented, for internal use only) option for
exactly this purpose.

The reason why the patch is in limbo (besides me being busy with real life :( )
is that while it worked fine under Linux, it turned out that it doesn't work on
many other platforms since on those platforms the C library don't contain all
the C99 stuff that libgfortran needs and thus libgfortran apparently uses its
own implementations instead. Or something like that. So to make the patch work
one would have to, if it works, make the map file a superset of the needed
symbols for all platforms we support. If that doesn't work, I guess one would
have to generate the map file during build time (ugh). Or just disable symbol
versioning for those [EMAIL PROTECTED] platforms that can't even get a C99 libc 
done
correctly.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27740

Reply via email to