Received: by 10.223.185.116 with SMTP id b49csp1094568wrg; Fri, 23 Feb 2018 11:50:37 -0800 (PST) X-Google-Smtp-Source: AH8x225LVjjaaWy9WRZGsHR7UGRpbHTVM6e3+lnEqO+FRESe9GpxoqQt1U/3iGBtcxsqsAYgUZfT X-Received: by 2002:a17:902:3124:: with SMTP id w33-v6mr2676105plb.356.1519415437497; Fri, 23 Feb 2018 11:50:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519415437; cv=none; d=google.com; s=arc-20160816; b=tSebjLWZsEgebUEQ7KT2OvJjOeoPyy8r0hAfYufrsdTB2+/7LjIgaOHL0IDOQ77zpm h2skVUKml+6pLiXKUvEewTh73y9Y4npDzMrGD2pKJ4zUD6RQYxGFSLGHAiHx5xZ5Sou5 UzL8ksoWH/RIRllF22kI0jY2w1McMWHdsqojADEjTFJ8cASU5jonWdliKP9wYseGRd6Y 5fVyD4JK67ULFoXxT42uVOVy0dPvhVP4H/2CvptdEumwL0FEJDZjamHz3QOMQF7uyc6T ZmawzxyDLrUmP0y8/gaZ5KS0EhBz8hA9fV4kOI3vBBhOMBhpII1jSfikgB883JfYZGe2 0XdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=/6QL9qj8TDUO1MyJxoNn87bRclRMnL3RkyGPPFPL2Ks=; b=nN2Tzh6ZUuB+EnlkZ+b7TyI5GhdL9QW7tCzLApX8FMRxZr4sb0SK6z/OJGL7ekjimT fgQfPsMIMe8QFW/4R44V//22U+pXhvGIGCCB7GLHkQMfGRDg5nGt1CZUFBjPA/2A809+ fZhjoRXZ0BR0PSV4gNSrkkAAHiewQqUrDQCqqpTrRrhEqbl/qBQvy1VYqKU9Caiq2Ok+ VC/ZvzJVuk+yor/nHb2l1HfVDhPwgUuc2bUuFUE5bXfSHiJe3xz7lmhA8OQGj6q9xctC pQaPKbtAnJOzdf2UBSsE8tSUTDFJB8dWKoMCXoqjpzAcZ0Yidj99lDvvZT1oV/RHeUSY nm8g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j13si2228985pfh.78.2018.02.23.11.50.23; Fri, 23 Feb 2018 11:50:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934103AbeBWSrJ (ORCPT + 99 others); Fri, 23 Feb 2018 13:47:09 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:44412 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934058AbeBWSrH (ORCPT ); Fri, 23 Feb 2018 13:47:07 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id A2F7AE3D; Fri, 23 Feb 2018 18:47:06 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Josh Poimboeuf , Jiri Olsa , Michal Marek , Arnaldo Carvalho de Melo Subject: [PATCH 4.9 108/145] tools build: Add tools tree support for make -s Date: Fri, 23 Feb 2018 19:26:54 +0100 Message-Id: <20180223170738.780387317@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170724.669759283@linuxfoundation.org> References: <20180223170724.669759283@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Josh Poimboeuf commit e572d0887137acfc53f18175522964ec19d88175 upstream. When doing a kernel build with 'make -s', everything is silenced except the objtool build. That's because the tools tree support for silent builds is some combination of missing and broken. Three changes are needed to fix it: - Makefile: propagate '-s' to the sub-make's MAKEFLAGS variable so the tools Makefiles can see it. - tools/scripts/Makefile.include: fix the tools Makefiles' ability to recognize '-s'. The MAKE_VERSION and MAKEFLAGS checks are copied from the top-level Makefile. This silences the "DESCEND objtool" message. - tools/build/Makefile.build: add support to the tools Build files for recognizing '-s'. Again the MAKE_VERSION and MAKEFLAGS checks are copied from the top-level Makefile. This silences all the object compile/link messages. Reported-and-Tested-by: Peter Zijlstra Signed-off-by: Josh Poimboeuf Cc: Jiri Olsa Cc: Michal Marek Link: http://lkml.kernel.org/r/e8967562ef640c3ae9a76da4ae0f4e47df737c34.1484799200.git.jpoimboe@redhat.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Greg Kroah-Hartman --- Makefile | 6 ++++-- tools/build/Makefile.build | 10 ++++++++++ tools/scripts/Makefile.include | 12 +++++++++++- 3 files changed, 25 insertions(+), 3 deletions(-) --- a/Makefile +++ b/Makefile @@ -87,10 +87,12 @@ endif ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4 ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),) quiet=silent_ + tools_silent=s endif else # make-3.8x ifneq ($(filter s% -s%,$(MAKEFLAGS)),) quiet=silent_ + tools_silent=-s endif endif @@ -1614,11 +1616,11 @@ image_name: # Clear a bunch of variables before executing the submake tools/: FORCE $(Q)mkdir -p $(objtree)/tools - $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(shell cd $(objtree) && /bin/pwd) subdir=tools -C $(src)/tools/ + $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(shell cd $(objtree) && /bin/pwd) subdir=tools -C $(src)/tools/ tools/%: FORCE $(Q)mkdir -p $(objtree)/tools - $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(shell cd $(objtree) && /bin/pwd) subdir=tools -C $(src)/tools/ $* + $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(shell cd $(objtree) && /bin/pwd) subdir=tools -C $(src)/tools/ $* # Single targets # --------------------------------------------------------------------------- --- a/tools/build/Makefile.build +++ b/tools/build/Makefile.build @@ -19,6 +19,16 @@ else Q=@ endif +ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4 +ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),) + quiet=silent_ +endif +else # make-3.8x +ifneq ($(filter s% -s%,$(MAKEFLAGS)),) + quiet=silent_ +endif +endif + build-dir := $(srctree)/tools/build # Define $(fixdep) for dep-cmd function --- a/tools/scripts/Makefile.include +++ b/tools/scripts/Makefile.include @@ -46,6 +46,16 @@ else NO_SUBDIR = : endif +ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4 +ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),) + silent=1 +endif +else # make-3.8x +ifneq ($(filter s% -s%,$(MAKEFLAGS)),) + silent=1 +endif +endif + # # Define a callable command for descending to a new directory # @@ -58,7 +68,7 @@ descend = \ QUIET_SUBDIR0 = +$(MAKE) $(COMMAND_O) -C # space to separate -C and subdir QUIET_SUBDIR1 = -ifneq ($(findstring $(MAKEFLAGS),s),s) +ifneq ($(silent),1) ifneq ($(V),1) QUIET_CC = @echo ' CC '$@; QUIET_CC_FPIC = @echo ' CC FPIC '$@;