This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Gcc builtin functions used by glibc not available on mips

> No.  Just because for some architectures the handling of the builtin
> is different this does not mean it is acceptable to make other
> platforms suffer.  The code in glibc does not have to be generic.  You
> cannot compile glibc without optimization and if further restrictions
> are necessary they will be enforced.

It is possible to make __builtin_memset call the system library memset
on all platforms.  So the current comment in the code is misleading and
misguided.  Its just that you've been bitten by this logic more often on
some platforms than on others.

The real question might whether it is safe to call library functions from
_dl_start on all platforms?  I believe this is the solution Jakub Jelinek
and Richard Henderson were proposing.

Another possibility, is for glibc to use its own memset macros from
bits/string.h and/or bits/string2.h, if it can be sure that the libcall
will never be made.  But attempting to second guess the compiler's
internal decisions on inlining functions is risky on any platform.


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