On May 26, 2010, at 7:13 PM, Ian Lance Taylor wrote: > Todd Rinaldo <toddr@xxxxxxxxxx> writes: > >> This makes the program hang on the read call: >> /usr/local/toddr/bin/x86_64-redhat-linux-gnu-gcc-4.5.0 -o conftest -O2 -Wp,-D_FORTIFY_SOURCE=2 -std=c99 conftest.c -g;./conftest >> >> Removing any of the options other than -g makes the program run normally. > > If removing the -D_FORTIFY_SOURCE makes the program work, then I > recommend that you compile with --save-temps with and without that > option and compare the .i files. Perhaps that will show where the > problem lies. > > Or, the fact that you are using -std=c99 with a glibc compiled with > gcc 4.1.2 raises the possibility that you are running into the > difference in the semantics of "extern inline". That was cleaned up > around the gcc 4.3 time frame. Older versions of glibc assume the > gnu89 meaning for "extern inline". That was cleaned up in glibc at > some point but I don't know when. See the -fgnu89-inline option. > > Ian Ian, Thanks for the response. I sent you the .i files, but the mailing list doesn't take attachments. They should be in your inbox if you want them. The -fgnu89-inline option corrected the problem as you suspected. As I understand things, to make this work, I'm going to have to inject this option as a CFLAG on any package I try to compile that uses c99 when this version of glibc is installed. Do you see this as a gcc bug to be fixed? or should this be an autotools problem and I need to pass it to them? Thanks, Todd