From owner-freebsd-current@FreeBSD.ORG Fri Sep 19 14:57:02 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F6D016F for ; Fri, 19 Sep 2014 14:57:02 +0000 (UTC) Received: from dmz-mailsec-scanner-4.mit.edu (dmz-mailsec-scanner-4.mit.edu [18.9.25.15]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A04C1E1D for ; Fri, 19 Sep 2014 14:57:01 +0000 (UTC) X-AuditID: 1209190f-f79aa6d000005b45-1d-541c4436a607 Received: from mailhub-auth-2.mit.edu ( [18.7.62.36]) (using TLS with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP id 75.BB.23365.6344C145; Fri, 19 Sep 2014 10:56:54 -0400 (EDT) Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id s8JEur4l029993; Fri, 19 Sep 2014 10:56:54 -0400 Received: from multics.mit.edu (system-low-sipb.mit.edu [18.187.2.37]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s8JEupR6003091 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 19 Sep 2014 10:56:53 -0400 Received: (from kaduk@localhost) by multics.mit.edu (8.12.9.20060308) id s8JEuo2N002844; Fri, 19 Sep 2014 10:56:50 -0400 (EDT) Date: Fri, 19 Sep 2014 10:56:50 -0400 (EDT) From: Benjamin Kaduk To: "O. Hartmann" Subject: Re: src.conf: CFLAGS/COPTFLAGS inconsistency In-Reply-To: <20140919150029.1f27e490.ohartman@zedat.fu-berlin.de> Message-ID: References: <20140919150029.1f27e490.ohartman@zedat.fu-berlin.de> User-Agent: Alpine 1.10 (GSO 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrFIsWRmVeSWpSXmKPExsUixG6nomvmIhNicOadusWcNx+YLP7O+sPk wOQx49N8Fo9T2w8yBjBFcdmkpOZklqUW6dslcGU8aNnLWnCKp6J32U/WBsavnF2MnBwSAiYS f3bMZoWwxSQu3FvP1sXIxSEkMJtJYuXmnVDORkaJF1dusEA4h5gk/k78A5VpYJSYOOsuM0g/ i4C2xKO1Z8FmsQmoSMx8s5ENxBYR0Jc413QazGYWMJSYvHUBWL2wgKlE/9SVLCA2p4CTROuF 50wgNq+Ao8T5O5fB5ggB2fu2LwOrERXQkVi9fwoLRI2gxMmZT1ggZmpJLJ++jWUCo+AsJKlZ SFILGJlWMcqm5Fbp5iZm5hSnJusWJyfm5aUW6Zro5WaW6KWmlG5iBAUrpyT/DsZvB5UOMQpw MCrx8Bo8lw4RYk0sK67MPcQoycGkJMrb7yQTIsSXlJ9SmZFYnBFfVJqTWnyIUYKDWUmEl08M KMebklhZlVqUD5OS5mBREufd9IMvREggPbEkNTs1tSC1CCYrw8GhJMGb7wzUKFiUmp5akZaZ U4KQZuLgBBnOAzR8GkgNb3FBYm5xZjpE/hSjLse6zm/9TEIsefl5qVLivBdBrhMAKcoozYOb A0syrxjFgd4S5p0DMooHmKDgJr0CWsIEtITthhTIkpJEhJRUA+NEu9M+T9lEbG0SRN/y6r/1 qbr/cnJEQ97iG//Zgg9v2vMw4U6H5gmOjf+rNYu47i0zPpLx9Nda3ktzhZeKpbJe9fjA7sZ/ 4NjiTsn8e1LThPiaN8kdlW19M99673LzMwqpnwze9K6M/e3v+avobUZIY9hTAb9XjD/+qGXw Mzw+v3zquUBO3iAlluKMREMt5qLiRAAlN/WzDQMAAA== Cc: FreeBSD CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-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, 19 Sep 2014 14:57:02 -0000 On Fri, 19 Sep 2014, O. Hartmann wrote: > man make.conf states, that COPTFLAGS is used for building/compiling the kernel > (exclusively). The question arises: are kernel modules NOT kernel or are they kernel? > > The problem I face is that with optimization level -O3 loader.efi gets miscompiled and a > UEFI laptop stops/reject booting. To avoid other interference, I defined COPTFLAGS > in /etc/src.conf accordingly, but leave CFLAGS?=-O3 in /etc/make.conf for compilation of > regular ports and the rest of the OS. > > I can observe that with CFLAGS set, either in make.conf, or src.conf or mutual exclusive, > the CFLAGS is ALWAYS incorporated when kernel stuff like modules and even the loader.efi > is built! I consider this inconsitent, since loader.efi is definitely kernel related > stuff as well as modules. Sorry, I don't think I understand what you're trying to say in these two pragraphs. What does "defined COPTFLAGS in /etc/src.conf accordingly" mean? Likewise, what does " CFLAGS set, either in make.conf, or src.conf or mutual exclusive" mean? It may be best to give concrete examples of make.conf/src.conf settings pairs, and the observed behavior. > It seems to me that it s not possible to separate cleanly CFLAGS and COPTFLAGS for > userland/ports and kernel-only related compilations as described in the man page. BTW, COPTFLAGS (str) Controls the compiler settings when building the ker- nel. Optimization levels above [-O (-O2, ...)] are not guaranteed to work. Note the last sentence. -Ben