This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc 4.5.0 read call hangs program
- From: Ian Lance Taylor <iant at google dot com>
- To: Todd Rinaldo <toddr at cpanel dot net>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 26 May 2010 17:13:16 -0700
- Subject: Re: gcc 4.5.0 read call hangs program
- References: <A183A98B-2C0F-4B5B-A034-4E91DF704D98@cpanel.net>
Todd Rinaldo <toddr@cpanel.net> 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