From owner-freebsd-current@freebsd.org Wed Mar 30 16:33:22 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E307EAE3E6F for ; Wed, 30 Mar 2016 16:33:22 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A652B14BC; Wed, 30 Mar 2016 16:33:22 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.15.2/8.15.2) with ESMTPS id u2UGX5L4027528 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 30 Mar 2016 10:33:05 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.15.2/8.15.2/Submit) with ESMTP id u2UGX3M8027525; Wed, 30 Mar 2016 10:33:04 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Wed, 30 Mar 2016 10:33:03 -0600 (MDT) From: Warren Block To: Aleksander Alekseev cc: Michael Gmelin , Dimitry Andric , Gary Jennejohn , freebsd-current@freebsd.org Subject: Re: Need some help with ports and rebuilding the world In-Reply-To: <20160330001208.0634c25c@fujitsu> Message-ID: References: <20160327234202.178df9a4@fujitsu> <20160327225612.713eaa2a@bsd64.grem.de> <20160328084735.29eff991@fujitsu> <20160328094742.68bc9046@ernst.home> <20160328170031.023f0adb@fujitsu> <20160329123821.120d8de8@fujitsu> <72586F27-113D-4225-B7AB-A890C9522CD5@FreeBSD.org> <20160329165318.2af443c4@fujitsu> <20160329160201.292052a1@bsd64.grem.de> <20160329172835.6526c345@fujitsu> <20160330001208.0634c25c@fujitsu> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Wed, 30 Mar 2016 10:33:05 -0600 (MDT) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.21 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: Wed, 30 Mar 2016 16:33:23 -0000 On Wed, 30 Mar 2016, Aleksander Alekseev wrote: >>> CPUTYPE?=native >>> CFLAGS+=-O2 -pipe >>> CXXFLAGS+=-O2 -pipe > >> These will bite with no provocation, and prevent ports that want to >> set their own flags from using them. > > Frankly as a rule of thumb I prefer binary packages. But how would you > recommend to change these lines? You see if I use ports I would like > compiled code to be optimized and preferably for local CPU. Don't set them at all, just remove those lines from make.conf. Well, let me be more specific. It is probably safe to set CPUTYPE, although choosing native has caused problems for me, where specifically setting a type like core-avx2 has been fine. It is just the CFLAGS and CXXFLAGS that are best not set. When not set, the world and kernel build will use safe defaults, but ports that can safely override those flags for better performance can do so.