From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753278AbdDLH4h (ORCPT ); Wed, 12 Apr 2017 03:56:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38292 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752779AbdDLH4d (ORCPT ); Wed, 12 Apr 2017 03:56:33 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com ACE6D378D3F Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jolsa@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com ACE6D378D3F Date: Wed, 12 Apr 2017 09:56:29 +0200 From: Jiri Olsa To: David Carrillo-Cisneros Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Andi Kleen , Simon Que , Wang Nan , Jiri Olsa , He Kuang , Masami Hiramatsu , Stephane Eranian , Paul Turner Subject: Re: [PATCH 2/6] tools build: fix feature redefine build flags Message-ID: <20170412075629.GB17517@krava> References: <20170412064919.92449-1-davidcc@google.com> <20170412064919.92449-4-davidcc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170412064919.92449-4-davidcc@google.com> User-Agent: Mutt/1.8.0 (2017-02-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 12 Apr 2017 07:56:33 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 11, 2017 at 11:49:15PM -0700, David Carrillo-Cisneros wrote: > This change is a follow up of https://lkml.org/lkml/2017/2/2/16 hi, there's another 2/6 in this patchset with same change but slightly different changelog jirka > > The patch above avoided redefining CC, CXX and PKG_CONFIG in feature > detection. The patch was not merged due to a unsolved concern with > the -MD flag. > > Later, commit c8c188679c ("tools build: Use the same CC for feature > detection and actual build") > did the change for CC and CXX but not PKG_CONFIG. > > This patch makes PKG_CONFIG consistent with CC and CXX and moves > the -MD to CFLAGS, as suggested by Jiri in the thread above. > > Signed-off-by: David Carrillo-Cisneros > --- > tools/build/feature/Makefile | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile > index 523e587fe05f..e35e4e5ad192 100644 > --- a/tools/build/feature/Makefile > +++ b/tools/build/feature/Makefile > @@ -53,17 +53,17 @@ FILES= \ > > FILES := $(addprefix $(OUTPUT),$(FILES)) > > -CC ?= $(CROSS_COMPILE)gcc -MD > -CXX ?= $(CROSS_COMPILE)g++ -MD > -PKG_CONFIG := $(CROSS_COMPILE)pkg-config > +CC ?= $(CROSS_COMPILE)gcc > +CXX ?= $(CROSS_COMPILE)g++ > +PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config > LLVM_CONFIG ?= llvm-config > > all: $(FILES) > > -__BUILD = $(CC) $(CFLAGS) -Wall -Werror -o $@ $(patsubst %.bin,%.c,$(@F)) $(LDFLAGS) > +__BUILD = $(CC) $(CFLAGS) -MD -Wall -Werror -o $@ $(patsubst %.bin,%.c,$(@F)) $(LDFLAGS) > BUILD = $(__BUILD) > $(@:.bin=.make.output) 2>&1 > > -__BUILDXX = $(CXX) $(CXXFLAGS) -Wall -Werror -o $@ $(patsubst %.bin,%.cpp,$(@F)) $(LDFLAGS) > +__BUILDXX = $(CXX) $(CXXFLAGS) -MD -Wall -Werror -o $@ $(patsubst %.bin,%.cpp,$(@F)) $(LDFLAGS) > BUILDXX = $(__BUILDXX) > $(@:.bin=.make.output) 2>&1 > > ############################### > -- > 2.12.2.715.g7642488e1d-goog >