Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Apr 2001 01:27:33 +0200
From:      "Dimitry Andric" <dim@xs4all.nl>
To:        "Joao Carlos Mendes Luis" <jonny@jonny.eng.br>
Cc:        stable@FreeBSD.ORG
Subject:   Re: Trouble with 4.3-RELEASE compiler
Message-ID:  <200104280127330789.011EEEF5@tensor.xs4all.nl>
In-Reply-To: <20010427194022.A18639@roma.coe.ufrj.br>
References:  <20010427194022.A18639@roma.coe.ufrj.br>

next in thread | previous in thread | raw e-mail | index | archive | help
-----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 <dim@xs4all.nl>
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200104280127330789.011EEEF5>