From owner-freebsd-stable Fri Apr 27 16:27:22 2001 Delivered-To: freebsd-stable@freebsd.org Received: from tensor.xs4all.nl (tensor.xs4all.nl [213.84.53.200]) by hub.freebsd.org (Postfix) with ESMTP id 2C34037B424 for ; Fri, 27 Apr 2001 16:27:18 -0700 (PDT) (envelope-from dim@xs4all.nl) Received: from matrix (matrix.xs4all.nl [192.168.1.2]) by tensor.xs4all.nl (Postfix) with ESMTP id 28894150E4; Sat, 28 Apr 2001 01:27:31 +0200 (CEST) Message-ID: <200104280127330789.011EEEF5@tensor.xs4all.nl> In-Reply-To: <20010427194022.A18639@roma.coe.ufrj.br> References: <20010427194022.A18639@roma.coe.ufrj.br> X-Mailer: Calypso Version 3.20.02.00 (4) Date: Sat, 28 Apr 2001 01:27:33 +0200 From: "Dimitry Andric" To: "Joao Carlos Mendes Luis" Cc: stable@FreeBSD.ORG Subject: Re: Trouble with 4.3-RELEASE compiler Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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=3D-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" =3D "yes"; then GCCVER=3D`$CC -v 2>&1 | awk '$2 =3D=3D "version" {print $3}'` case "$GCCVER" in 2.95.[12]) echo "Removing -O for gcc on $host with GCC $GCCVER" CFLAGS=3D"`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... Maybe it's best to ask the Squid maintainer(s) if gcc 2.95.3 is supported with optimization. Cheers, - -- Dimitry Andric PGP key: http://www.xs4all.nl/~dim/dim.asc KeyID: 4096/1024-0x2E2096A3 Fingerprint: 7AB4 62D2 CE35 FC6D 4239 4FCD B05E A30A 2E20 96A3 -----BEGIN PGP SIGNATURE----- Version: Encrypted with PGP Plugin for Calypso Comment: http://www.gn.apc.org/duncan/stoa_cover.htm iQA/AwUBOunyG7BeowouIJajEQIjXACg7j3EQyCQOeHcTRPZUESv35oWKv0AoKE/ Fico9Jr+DZErx2oEIWiKBT4z =3D+lB5 -----END PGP SIGNATURE----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message