From owner-freebsd-current@FreeBSD.ORG Fri Nov 5 22:58:04 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 20BFF16A4CF; Fri, 5 Nov 2004 22:58:04 +0000 (GMT) Received: from obsecurity.dyndns.org (CPE0050040655c8-CM00111ae02aac.cpe.net.cable.rogers.com [69.194.102.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id D7DEB43D41; Fri, 5 Nov 2004 22:58:03 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id C4C06524CC; Fri, 5 Nov 2004 15:00:32 -0800 (PST) Date: Fri, 5 Nov 2004 15:00:32 -0800 From: Kris Kennaway To: Dag-Erling Sm?rgrav Message-ID: <20041105230032.GA44517@xor.obsecurity.org> References: <20041102222000.GA65845@xor.obsecurity.org> <639522fe041103144732ea6683@mail.gmail.com> <1099522198.59328.4.camel@blueheron.ahze.net> <200411050919.09547.freebsd.nospam@mekanix.dk> <20041105215220.GA32961@xor.obsecurity.org> <7CBFDBE9-2F75-11D9-8D06-000A958C81C6@ahze.net> <20041105221020.GA39140@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cNdxnHkX5QqsyA0e" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i cc: FreeBSD ports cc: Michael Johnson cc: current@freebsd.org cc: Kris Kennaway Subject: Re: HEADS UP: Ports are not ready for CFLAGS=-O2 in 6.0 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Nov 2004 22:58:04 -0000 --cNdxnHkX5QqsyA0e Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 05, 2004 at 11:43:30PM +0100, Dag-Erling Sm?rgrav wrote: > Kris Kennaway writes: > > On Fri, Nov 05, 2004 at 04:56:03PM -0500, Michael Johnson wrote: > > > Is there a list of what's broke with -O2 in ports anywhere? > > Some of the bugs are probably silent. For example, different versions > > of gcc sometimes have bugs at higher optimization levels or with > > certain CPUTYPE values. >=20 > As far as we know, that is not the case for FreeBSD 5.3 and 6.0. Yeah, but in the context of ports we have to think about 4.x too, and other supported old releases. > > -O2 will also cause build errors in other ways, e.g. if functions in a > > library are improperly declared static and not referenced internally > > (but are referenced externally by another application trying to link > > with the library), since -O2 may optimize them out completely. >=20 > That's crap. You can't reference a static symbol outside your own > compilation unit. That's the whole point with declaring it static. >=20 > The problem with arj is that it uses a tool to embed a checksum in > each binary, and the placeholder for that checksum was declared static > but never referenced, so gcc optimized it out and the tool couldn't > find it. Sorry, that's the case I was thinking of. I hadn't analyzed the failure in detail. Kris --cNdxnHkX5QqsyA0e Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBjAYPWry0BWjoQKURAkVYAJ0QrAuCE8O6QTseijndm/FHXvNSaQCeN2cP /VT1ahrSWytmYud/AmwYaDk= =Joxp -----END PGP SIGNATURE----- --cNdxnHkX5QqsyA0e--