glibc-2.5 build with -Os broken on PowerPC

Steve Munroe sjmunroe@us.ibm.com
Thu Nov 2 17:51:00 GMT 2006



sparky@pld-linux.org wrote on 11/02/2006 11:24:43 AM:

> Hello.
>
> glibc 2.5 does not compile on PowerPC with -Os. It fails on:
>  sysdeps/powerpc/fpu/e_sqrt.c
> and
>  sysdeps/powerpc/fpu/e_sqrtf.c
> because of undefined reference to __CPU_HAS_FSQRT.
>
> This is because __CPU_HAS_FSQRT is defined in mathinline.h, which is not
> included if glibc is built with -Os optimization (and shouldn't be).
>
> My fix/hack was to force mathinline.h inclusion in e_sqrt(f).c files:
> http://cvs.pld-linux.org/cgi-bin/cvsweb/SOURCES/glibc-ppc-include-
> mathinline.patch?rev=1.1
> but I've been told it isn't a good idea.
>
> Probably __CPU_HAS_FSQRT definitions should be moved somewere else, but
> I see no good place for it.
>

Builds for me with -O2 (libc default) so which gcc version are you using
and which day did you pull glibc? And what configure options?

Steven J. Munroe
Linux on Power Toolchain Architect
IBM Corporation, Linux Technology Center



More information about the Libc-alpha mailing list