possible need for "no inline" patch from glibc-2.3.2?

Dan Kegel dank@kegel.com
Sun Dec 5 16:00:00 GMT 2004


Robert P. J. Day wrote:
>   just because i have a spare machine and lots of CPU cycles, i
> decided to take a shot at building a chain with
> 
>   gcc-4.0-20041128
>   glibc-20041204
>   linux-2.6.9
> 
> using gcc4 as the build compiler.  (like i said, the machine's just
> sitting there ... what the hell?)
> 
>   with only the patches applied that i've posted to the list thus far,
> i created the appropriate gcc-*-glibc-*.dat file and let it go.  about
> 70,000 lines into the build, i got (trying to compile
> glibc/stdlib/atof.c):
> 
> sh3eb-unknown-linux-gnu-gcc  atof.c -c -std=gnu99 -O -Wall -Winline -Wstrict-prototypes -Wwrite-strings -m3 -mb      -I../include -I. -I/home/rob/ct/crosstool-0.28-rc37/build/sh3eb-unknown-linux-gnu/gcc-4.0-20041128-glibc-20041204/build-glibc/stdlib -I.. -I../libio  -I/home/rob/ct/crosstool-0.28-rc37/build/sh3eb-unknown-linux-gnu/gcc-4.0-20041128-glibc-20041204/build-glibc -I../sysdeps/sh/elf -I../linuxthreads/sysdeps/unix/sysv/linux/sh -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/sh -I../sysdeps/unix/sysv/linux/sh/sh3 -I../sysdeps/unix/sysv/linux/sh -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/sh -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/sh/sh3 -I../sysdeps/sh -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32
 !
>  -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -nostdinc -isystem /home/rob/ct/results/sh3eb-unknown-linux-gnu/gcc-4.0-20041128-glibc-20041204/lib/gcc/sh3eb-unknown-linux-gnu/4.0.0/include -isystem /home/rob/ct/results/sh3eb-unknown-linux-gnu/gcc-4.0-20041128-glibc-20041204/sh3eb-unknown-linux-gnu/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h       -o /home/rob/ct/crosstool-0.28-rc37/build/sh3eb-unknown-linux-gnu/gcc-4.0-20041128-glibc-20041204/build-glibc/stdlib/atof.o -MD -MP -MF /home/rob/ct/crosstool-0.28-rc37/build/sh3eb-unknown-linux-gnu/gcc-4.0-20041128-glibc-20041204/build-glibc/stdlib/atof.o.dt -MT /home/rob/ct/crosstool-0.28-rc37/build/sh3eb-unknown-linux-gnu/gcc-4.0-20041128-glibc-20041204/build-glibc/stdlib/atof.o
> atof.c:29: error: Inlined_to pointer is set but no predecesors found
> strtod/17: (inline copy in atof/16) 16 insns tree always_inline
>   called by:
>   calls: __strtod_internal/0
> atof.c:29: internal compiler error: verify_cgraph_node failed.
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
> make[2]: *** [/home/rob/ct/crosstool-0.28-rc37/build/sh3eb-unknown-linux-gnu/gcc-4.0-20041128-glibc-20041204/build-glibc/stdlib/atof.o] Error 1
> make[2]: Leaving directory `/home/rob/ct/crosstool-0.28-rc37/build/sh3eb-unknown-linux-gnu/gcc-4.0-20041128-glibc-20041204/glibc-20041204/stdlib'
> make[1]: *** [stdlib/subdir_lib] Error 2
> make[1]: Leaving directory `/home/rob/ct/crosstool-0.28-rc37/build/sh3eb-unknown-linux-gnu/gcc-4.0-20041128-glibc-20041204/glibc-20041204'
> make: *** [all] Error 2

Heh.  You just found a bug in your copy of gcc4.  And I don't think
it's fixed in the latest one, either.  See
http://sources.redhat.com/ml/libc-alpha/2004-05/msg00217.html
http://sources.redhat.com/ml/libc-alpha/2004-05/msg00219.html
http://gcc.gnu.org/PR14096
http://gcc.gnu.org/PR15398

>   i looked thru patches/glibc.2.3.3 for an appropriate fix, but there
> was nothing there that seemed to match.  however, under
> patches/glibc-2.3.2, i found glibc-2.3.2-allow-gcc-3.5-PR14096.patch,
> which added the preprocessor directive:
> 
>   #define __NO_INLINE__ 1
> 
> to a number of files, including that atof.c file.
> 
>   this is definitely out of my league here -- can anyone tell me if
> this patch corresponds to this build error?  i'm curious that it was
> needed for glibc-2.3.2, but wasn't carried forward to glibc-2.3.3, and
> yet might be necessary again for glibc-20041204.

Yes, I think that's the right workaround, and it should probably
be carried forward... except that it might a small performance hit.
Aw, it's probably worth it for portability's sake.

Also, if you want to get this fixed in gcc,
try the latest gcc4 snapshot, and if that still has the crash,
see if you can boil it down to a ten-line test case, and
append that to http://gcc.gnu.org/PR15398, maybe.
But one might also argue it's a glibc bug.  They'll
fix it one of these days, once enough people are using gcc4...
- Dan

-- 
Trying to get a job as a c++ developer?  See http://kegel.com/academy/getting-hired.html

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list