Date: Sat, 28 Apr 2001 03:59:16 -0300 From: Joao Carlos Mendes Luis <jonny@jonny.eng.br> To: Dimitry Andric <dim@xs4all.nl> Cc: stable@FreeBSD.ORG, "=?iso-8859-1?Q?Jo=E3o?= Carlos Mendes =?iso-8859-1?Q?Lu=EDs?=" <jonny@embratel.com.br> Subject: Re: Trouble with 4.3-RELEASE compiler Message-ID: <3AEA6A44.8936FF61@jonny.eng.br> References: <20010427194022.A18639@roma.coe.ufrj.br> <200104280127330789.011EEEF5@tensor.xs4all.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
Dimitry Andric wrote: > On 2001-04-27 at 19:40 Joao Carlos Mendes Luis wrote: > > I was installing a squid server with 4.3-RELEASE, and found that > >FreeBSD has now a bug in the compiler that affects squid. The > >default compilation of squid is with CFLAGS=-g -O2 -Wall, and this > >setup > >triggers the bug. > > This is a fragment from the Squid configure file (from the original > 2.4-STABLE1 distribution): > > # Remove optimization for GCC 2.95.[12] > # gcc -O[2] on *BSD and Linux (x86) causes pointers to magically > become NULL > if test "$GCC" = "yes"; then > GCCVER=`$CC -v 2>&1 | awk '$2 == "version" {print $3}'` > case "$GCCVER" in > 2.95.[12]) > echo "Removing -O for gcc on $host with GCC $GCCVER" > CFLAGS="`echo $CFLAGS | sed -e 's/-O[0-9]*//'`" > ;; > esac > fi > > This was probably written before gcc 2.95.3 got out, but I'm not sure > if that version fixed the problem. I have foolishly tried to compile > Squid with gcc 2.95.2 and optimization (both -O, -O2 and -O666), and > I can assure you it bombed out with inexplicable null pointer > accesses. Yet when you compile with -O0, no such thing happens... That's it! I did not notice that -O2 was not inserted when using gcc 2.95.2. Thanks a lot! Jonny -- João Carlos Mendes Luís jonny@embratel.net.br Networking Engineer jonny@jonny.eng.br Internet via Embratel jcml@ieee.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AEA6A44.8936FF61>