From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Nov 11 01:30:26 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF8A016A4CE for ; Thu, 11 Nov 2004 01:30:25 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBB7543D31 for ; Thu, 11 Nov 2004 01:30:25 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) iAB1UP6w058668 for ; Thu, 11 Nov 2004 01:30:25 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id iAB1UPE8058667; Thu, 11 Nov 2004 01:30:25 GMT (envelope-from gnats) Resent-Date: Thu, 11 Nov 2004 01:30:25 GMT Resent-Message-Id: <200411110130.iAB1UPE8058667@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "David O'Brien" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EC3BF16A4CF for ; Thu, 11 Nov 2004 01:20:25 +0000 (GMT) Received: from dragon.nuxi.com (trang.nuxi.com [66.93.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id B5FBB43D53 for ; Thu, 11 Nov 2004 01:20:25 +0000 (GMT) (envelope-from obrien@NUXI.com) Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by dragon.nuxi.com (8.13.1/8.13.1) with ESMTP id iAB1KO8G035263 for ; Wed, 10 Nov 2004 17:20:24 -0800 (PST) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.13.1/8.13.1/Submit) id iAB1KORP035262; Wed, 10 Nov 2004 17:20:24 -0800 (PST) (envelope-from obrien) Message-Id: <200411110120.iAB1KORP035262@dragon.nuxi.com> Date: Wed, 10 Nov 2004 17:20:24 -0800 (PST) From: "David O'Brien" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/73797: Be causious compiling with -O2 (use -fno-strict-aliasing) X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: David O'Brien List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Nov 2004 01:30:26 -0000 >Number: 73797 >Category: ports >Synopsis: Be causious compiling with -O2 (use -fno-strict-aliasing) >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Nov 11 01:30:25 GMT 2004 >Closed-Date: >Last-Modified: >Originator: David O'Brien >Release: FreeBSD 6.0-CURRENT i386 >Organization: >Environment: System: FreeBSD dragon.nuxi.com 6.0-CURRENT FreeBSD 6.0-CURRENT #447: Tue Oct 19 09:53:16 PDT 2004 rootk@dragon.nuxi.com:/FBSD/src/sys/i386/compile/DRAGON i386 >Description: Compiling with 'strict-aliasing' optimization breaks some [notable] ports. GCC turns on 'strict-aliasing' optimization at all levels above -O[1], so explicitly turn it off when using compiling with "high" optimization levels. >How-To-Repeat: Build Firefox and other ports with -O2 (or -Os or -O3). >Fix: Index: bsd.port.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.499 diff -u -u -7 -r1.499 bsd.port.mk --- bsd.port.mk 7 Oct 2004 17:59:18 -0000 1.499 +++ bsd.port.mk 11 Nov 2004 01:16:33 -0000 @@ -1222,14 +1223,17 @@ .if defined(WITHOUT_CPU_CFLAGS) .if defined(_CPUCFLAGS) .if !empty(_CPUCFLAGS) CFLAGS:= ${CFLAGS:C/${_CPUCFLAGS}//} .endif .endif .endif +.if ${CFLAGS:M-O[23s]} != "" +CFLAGS+= -fno-strict-aliasing +.endif .if defined(NOPORTDOCS) PLIST_SUB+= PORTDOCS="@comment " .else PLIST_SUB+= PORTDOCS="" .endif >Release-Note: >Audit-Trail: >Unformatted: