From owner-freebsd-doc@FreeBSD.ORG Fri Mar 5 09:00:15 2010 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC1D71065674 for ; Fri, 5 Mar 2010 09:00:14 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id AFCFE8FC14 for ; Fri, 5 Mar 2010 09:00:14 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o2590ETD090461 for ; Fri, 5 Mar 2010 09:00:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id o2590Egt090460; Fri, 5 Mar 2010 09:00:14 GMT (envelope-from gnats) Resent-Date: Fri, 5 Mar 2010 09:00:14 GMT Resent-Message-Id: <201003050900.o2590Egt090460@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dmitry Marakasov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2911F1065678 for ; Fri, 5 Mar 2010 08:58:18 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from smtp.timeweb.ru (smtp.timeweb.ru [92.53.116.15]) by mx1.freebsd.org (Postfix) with ESMTP id DAA548FC1C for ; Fri, 5 Mar 2010 08:58:17 +0000 (UTC) Received: from [213.148.20.85] (helo=hive.panopticon) by smtp.timeweb.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.71) (envelope-from ) id 1NnTMN-0004BI-Rb for FreeBSD-gnats-submit@freebsd.org; Fri, 05 Mar 2010 11:58:16 +0300 Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id 367DFB860 for ; Fri, 5 Mar 2010 11:58:15 +0300 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id 2EFE6B829; Fri, 5 Mar 2010 11:58:15 +0300 (MSK) Message-Id: <20100305085815.2EFE6B829@hades.panopticon> Date: Fri, 5 Mar 2010 11:58:15 +0300 (MSK) From: Dmitry Marakasov To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: docs/144488: share/examples/etc/make.conf: contains dangerous example of CFLAGS override X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dmitry Marakasov List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 09:00:15 -0000 >Number: 144488 >Category: docs >Synopsis: share/examples/etc/make.conf: contains dangerous example of CFLAGS override >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Fri Mar 05 09:00:14 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Dmitry Marakasov >Release: FreeBSD 8.0-RELEASE i386 >Organization: >Environment: System: FreeBSD hades.panopticon 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Tue Nov 24 22:31:59 MSK 2009 root@hades.panopticon:/async/obj/usr/src/sys/HADES i386 We have make.conf example in share/examples, which contains evil lines which I've just witnessed impact of. -- # Compiling with -fstrict-aliasing optimization breaks some [notable] ports. # GCC turns on -fstrict-aliasing optimization at all levels above -O[1], so # explicitly turn it off when using compiling with the -O2 optimization level. # #CFLAGS= -O2 -fno-strict-aliasing -pipe # -- If a user enables this, many ports (for example, x11-wm/lwm) will become broken, as with CFLAGS set in make.conf it will be impossible to pass CFLAGS via MAKE_ENV to child make, which ports do. This line should likely be changed to CFLAGS+= -fno-strict-aliasing but I do not understand the need for that chunk in general - if strict-aliasing breaks some ports, why is it not set in these ports? We [should] provide ports that build correctly with default settings, and we don't need to have users set something in make.conf to unbreak anything, so that confusing piece should likely be removed. Probably, changed to something more practical, like # You can specify additional compiler flags that extend or override # default ones. However, neither base systems nor ports are guaranteed # to build and work without problems with non-default settings. # #CFLAGS+= -msse3 #CXXFLAGS+= -msse3 >Description: >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: