This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A Linux/libc 5 patch for egcs 1.1.2


>   > > 
>   > > > >   > 12. Fix libio for libc 5.
>   > > > > Can't comment without a patch.
>   > > > 
>   > > > http://www.cygnus.com/ml/egcs-patches/1998-Jul/0578.html
>   > > > 
>   > > > You can see how old that patch is.
>   > > 
>   > > This one looks low-risk (it only makes some symbols weak).  It seems
>   > > there's no risk of it destabilizing 1.1.2.
>   > > 
>   > > Of course it uses #pragma weak so if the rule now is to use attributes
>   > > instead, I guess this patch must be adjusted.
>   > > 
>   > 
>   > What is the attribute format for
>   > 
>   > #pragma weak old = new
> >From the manual:
> @cindex @code{alias} attribute
> The @code{alias} attribute causes the declaration to be emitted as an
> alias for another symbol, which must be specified.  For instance,
> 
> @smallexample
> void __f () @{ /* do something */; @}
> void f () __attribute__ ((weak, alias ("__f")));
> @end smallexample
> 
> declares @samp{f} to be a weak alias for @samp{__f}.  In C++, the
> mangled name for the target must be used.
> 
> Sounds like we need TARGET_ATTRIBUTE_WEAK_ALIAS
> 

Well, it seems a mess to me. We need TARGET_ATTRIBUTE_WEAK and
TARGET_ATTRIBUTE_WEAK_ALIAS for the target libraries. They
should be shared between gcc and libraries. There is a include
directory. Should I put a "runtime.h" there and put the weak
definitions in it? Also, somehow we need to make the target
runtime information available to libraries. Right now only gcc
knows it. Maybe it can be done for egcs 1.2.

As for libio, Ulrich, are you still maintaining libio in egcs?
Can you take a look at my libio patch? I don't want to spend my
time on it without your input first.

Thanks.



-- 
H.J. Lu (hjl@gnu.org)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]