Date: Thu, 20 Feb 2014 23:42:49 +0100 (CET) From: Tijl Coosemans <tijl@FreeBSD.org> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/186929: [patch] Mk/bsd.port.mk: unconditionally add -fno-strict-aliasing Message-ID: <201402202242.s1KMgnth025704@kalimero.tijl.coosemans.org> Resent-Message-ID: <201402202250.s1KMo0vZ024544@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 186929 >Category: ports >Synopsis: [patch] Mk/bsd.port.mk: unconditionally add -fno-strict-aliasing >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Feb 20 22:50:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Tijl Coosemans >Release: FreeBSD 11.0-CURRENT i386 >Organization: >Environment: >Description: Currently bsd.port.mk adds -fno-strict-aliasing to CFLAGS when it detects -O2, -O3 or -Os, but clang has new optimisation flags such as -O4, -Oz and -Ofast that also need it. The attached patch adds -fno-strict-aliasing unconditionally. There's no harm in adding it to -O0 and -O1. >How-To-Repeat: >Fix: --- bsd.port.mk.nostrictaliasing.patch begins here --- Index: Mk/bsd.port.mk =================================================================== --- Mk/bsd.port.mk (revision 345014) +++ Mk/bsd.port.mk (working copy) @@ -2053,7 +2053,7 @@ MAKE_ENV+= PREFIX=${PREFIX} \ # a lot of ports. .if !defined(WITHOUT_NO_STRICT_ALIASING) .if ${CC} != "icc" -.if !empty(CFLAGS:M-O[23s]) && empty(CFLAGS:M-fno-strict-aliasing) +.if empty(CFLAGS:M-fno-strict-aliasing) CFLAGS+= -fno-strict-aliasing .endif .endif --- bsd.port.mk.nostrictaliasing.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402202242.s1KMgnth025704>