Received: by 10.223.185.116 with SMTP id b49csp1127126wrg; Fri, 23 Feb 2018 12:24:19 -0800 (PST) X-Google-Smtp-Source: AH8x225UPWjkk+ObyTXkt6V7bE2XLrBQHxS/+IEJU2r+2Det3SrTXXDx24JJhQ1O32EkdTwpId8b X-Received: by 2002:a17:902:b942:: with SMTP id h2-v6mr2789663pls.45.1519417459213; Fri, 23 Feb 2018 12:24:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519417459; cv=none; d=google.com; s=arc-20160816; b=HMND3B8GOEEkUXsv97rx40R9CfxKpNVhporIvDUXOwz2Hffsjb4HxPjcBfjyNWaTDn u3uE+gKK+fH7zjfb5EEYEmoAO6X3b2aVdVpB+mFtcG+Hi7JFEnpLC7/IH6Qe1yLw44bQ 3jaX3NHGyfYyebMoiyQhrOIQu8gzw5MWLFtPBAOp4fvn3VT6/Yelp6FtxGVjeZMXgWzQ XSAaZfAEu1YgB0HvGQTZPHSqnR1SoMMdQC+UZe3LIKWwOwEwKeYpEVAe1zBes3LPBmuz aZPL1YTwL51PtnwhAA82XBGMo0W+6cnL+BeYMlkciq9OM305K0lSLbdEAf8HsDrhBAZQ 5SQw== 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=1XkGpCmzdCHJ5C3Ndngc9cME330LHeZPJ03+RMu1BJk=; b=TkkzJ6v3F4YGswmK/R7B/dZt4YeeatLIKVkyYWwmJK/V8GBAeJhvwJxpiWC3zRMvlg aHqx+lESDE7PpAOLPZylBUTTB0JQSrcWtBAezipnJ4Uacour4nuAcdD6ANqnbc2ZEoEM BYY43BcCtbSRlrr4Ekj/aQ+RxrGjXzFQA3xb4/Eckkaq8rfSlIaNNYZFVBUguqvq/ffN ZaaIzbb7Ea5jZly+gSW//GfVLKdURQjdHNYFSLPtlbI1AxtJ4EbBGfJE9SB4EFCcCq6k vFmwWD4Ooy6KS0fQcJac4otQ3WkHUuVhRjC1fIzrfNyHaiv9dvK7NKffIkJfTDYkTsqc SSjw== 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 a62si1939149pgc.70.2018.02.23.12.24.04; Fri, 23 Feb 2018 12:24:19 -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 S932330AbeBWSiU (ORCPT + 99 others); Fri, 23 Feb 2018 13:38:20 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:38936 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932314AbeBWSiQ (ORCPT ); Fri, 23 Feb 2018 13:38:16 -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 9A3B4100B; Fri, 23 Feb 2018 18:38:15 +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.4 072/193] tools build: Add tools tree support for make -s Date: Fri, 23 Feb 2018 19:25:05 +0100 Message-Id: <20180223170337.252974260@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170325.997716448@linuxfoundation.org> References: <20180223170325.997716448@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.4-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 @@ -1523,11 +1525,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 '$@;