frv-*linux*: don't assume a C99 libc

Andrew Pinski pinskia@physics.uc.edu
Tue Jul 27 17:09:00 GMT 2004


> 
> On Jul 26, 2004, Andrew Pinski <pinskia@physics.uc.edu> wrote:
> 
> > On Jul 26, 2004, at 7:19 PM, Alexandre Oliva wrote:
> 
> >> This patch fixes problems in the frv-uclinux and frv-linux-uclibc
> >> configurations in which gcc optimized some calls of say log() to
> >> logf(), at particularly undesirable points such as the logf() stub in
> >> libstdc++.  Ok to install?
> 
> > Maybe we need a glibc.h and uclibc.h and define the right
> > TARGET_C99_FUNCTIONS
> > for them, instead of what we currently have were we define
> > TARGET_C99_FUNCTIONS
> > as 1 for all *-linux which is only right for glibc.
> 
> Part of the problem is that quite often people will use the toolchain
> built for glibc to compile applications using the uClibc headers and
> libraries.  Having TARGET_C99_FUNCTIONS defined in this case
> potentially breaks programs.  I don't have a good suggestion on how to
> address this problem.  At first, I thought we might pull it off by
> only using say logf() if there is a declaration of this function in
> scope, but, as it turns out, uClibc does have such a declaration in
> math.h, even though it doesn't define the function ;-(

Are not those people just doing things wrong anyways.  I think we should
just force them to do the right thing and have them use the right toolchain
as the target means the OS which includes the C library also.

Thanks,
Andrew Pinski

> 
> -- 
> Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
> Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
> Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}
> 
> 



More information about the Gcc-patches mailing list