From owner-freebsd-current@FreeBSD.ORG Thu Jun 18 07:22:27 2015 Return-Path: Delivered-To: freebsd-current@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBCBC328; Thu, 18 Jun 2015 07:22:27 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id D3C2766B; Thu, 18 Jun 2015 07:22:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA11391; Thu, 18 Jun 2015 10:22:24 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Z5U9Y-000D2H-EB; Thu, 18 Jun 2015 10:22:24 +0300 Message-ID: <55827177.3060803@FreeBSD.org> Date: Thu, 18 Jun 2015 10:21:27 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "Simon J. Gerraty" CC: FreeBSD Current , Dimitry Andric Subject: Re: toolchain target References: <5581DBD0.3020004@FreeBSD.org> <5581E324.8030000@FreeBSD.org> <22196.1434583597@chaos> <55826399.3020801@FreeBSD.org> In-Reply-To: <55826399.3020801@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 18 Jun 2015 07:22:28 -0000 On 18/06/2015 09:22, Andriy Gapon wrote: > My make.conf: > .if defined(CC) > .if ${CC} == gcc > CPUTYPE?=k8-sse3 > .else > CPUTYPE?=amdfam10 > .endif > .endif > CFLAGS+= -O2 -fno-strict-aliasing -pipe > CFLAGS+= -fno-omit-frame-pointer > CXXFLAGS+= -O2 -fno-strict-aliasing -pipe > [snip] > Looks like my rather innocent manipulations of CFLAGS could be causing the problem. > Without my make.conf: > mkdep -f .depend -a > -I/usr/devel/svn2/head/lib/clang/libllvmsupport/../../../contrib/llvm/include > -I/usr/devel/svn2/head/lib/clang/libllvmsupport/../../../contrib/llvm/tools/clang/include > -I/usr/devel/svn2/head/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support -I. > -I/usr/devel/svn2/head/lib/clang/libllvmsupport/../../../contrib/llvm/../../lib/clang/include > -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS > -DLLVM_DEFAULT_TARGET_TRIPLE=\"x86_64-unknown-freebsd11.0\" > -DLLVM_HOST_TRIPLE=\"x86_64-unknown-freebsd11.0\" -DDEFAULT_SYSROOT=\"\" > -I/usr/obj/usr/devel/svn2/head/tmp/legacy/usr/include -std=c++11 > -stdlib=libc++ > /usr/devel/svn2/head/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/APFloat.cpp > ... > > With my make.conf: > mkdep -f .depend -a -std=c++11 -stdlib=libc++ > /usr/devel/svn2/head/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/APFloat.cpp > ... > > All the preprocessor flags (-I, -D) are gone. > Or rather it's CXXFLAGS that is affected. Looks like now in my environment the initial value of CXXFLAGS is set by make.conf instead of being derived from CFLAGS in mk/sys.mk. This breaks expectation of many makefiles that flags added to CFLAGS will also be appear in CXXFLAGS. Apparently, this problem is documented in UPDATING 20150616, but it does not cover all possible variables affected by the change... So, I guess that I could just remove CXXFLAGS from my make.conf, because it is quite redundant, but in some cases people may still want to set it. Or I could copy the CXXFLAGS assignment line from mk/sys.mk to make.conf, but that's a slippery slope towards having to copy all of mk/sys.mk to make.conf. Or maybe the historic behavior could be restored and whatever prompted the change could be done in a different fashion? -- Andriy Gapon