From patchwork Tue Aug 20 17:09:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 171816 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp4703663ily; Tue, 20 Aug 2019 10:10:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqyIsqQJxukliVNJOx29d3wDAznXxtS72VtQYJuLr7B3P0UdSJglxxQ3bseyWgRiS9B2L66v X-Received: by 2002:a63:31cc:: with SMTP id x195mr25327877pgx.147.1566321040308; Tue, 20 Aug 2019 10:10:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566321040; cv=none; d=google.com; s=arc-20160816; b=ATAWEfeSvUg2xMt0NXc+Gc6Kw5KhAJzd+G9y7uBal8XB296hkUdpB5DT47CH0KuXlf cj5sRGcJvn9vf4JMTSbLgyQx6cDQB5Br5A72ioD6qu1efzFs+88kJYz3yHMJOFuGS3EV iWu99/gsCrd/XNNfpcjdQ+wBdLCtd3So81xiPpplKF7ePPDzhpVMvudjJKJo9TxMJeB4 C/RrZB8Mt2DW58nfy121ynGuvz1Rl72LkbnHj5aNSRzf6JiGnM2ZgeuJUUKID50/+iAD W9VQtWEzP0YWSKIdhV8yZBNh+Vs3iiqofzeAu486jCLKIUE7d4G3aYfzvPIzoM9XIgix 5AtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=35oiB6f8NsCtFMF7x1hxhc8poRW8t8acsr/yhS3f0ik=; b=LKYzfRZLwU/2C7lScxVt3CaPlNhhEUE9yrHMRZeYCWCzB/WGqc9eh60XhLSmVPhaBC wwuRKFToioFeU+xmxdFAOMoT0cqgd915R3ceJ9ElFm1sg78v3Y5O4FhtpkXmllW/tSAc 2hmRV4hmvuAXhCHQCHdgef5AtNMW9Q8rJqv/guaS5Y6RHOUISAXaZov65gX20SWrRjqm aqPC9X7xYiAg2dqDTkT4CEvImjr1vYem7Q0m6JyxwooCJX8RcX16uWaRJlGmN1wIzZL6 lqy8xkybJl7G57RIixfvtZrge/qiLzAZuTaWtVs2wLYQjI1+U2xe7Jojn2RKjV95cVBb lwww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=tMeVW1PC; 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 126si12398088pgb.47.2019.08.20.10.10.39; Tue, 20 Aug 2019 10:10:40 -0700 (PDT) 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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=tMeVW1PC; 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 S1730380AbfHTRKj (ORCPT + 28 others); Tue, 20 Aug 2019 13:10:39 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:46071 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729991AbfHTRKi (ORCPT ); Tue, 20 Aug 2019 13:10:38 -0400 Received: from grover.flets-west.jp (softbank126125143222.bbtec.net [126.125.143.222]) (authenticated) by conuserg-12.nifty.com with ESMTP id x7KH9n4B020646; Wed, 21 Aug 2019 02:09:51 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com x7KH9n4B020646 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1566320991; bh=35oiB6f8NsCtFMF7x1hxhc8poRW8t8acsr/yhS3f0ik=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tMeVW1PC/8Tj879Rns8s6qCDOSlbv4RDlNSrW3j7HYZqJwf6dv3u3uIcY+gN7kLSn TCuar2EmcFm7NxZtsVg8mAa08vWK1p9XcwgFiNIt1EpkAAJYioVe7omBpue7SJQ8+9 8txjR6zoN3buM/Scidy2yLWnxFBuafEm+Kopf+ABVHbOlF3w6okX2SF0sBByB8DV/y Y44FCITM9AjczWiTbYI3IVHnfaJ80BchCxWgPnsO+4huR5p5WXmfLpLZkUxV6V7IrE UcEvr/AfO3edtFi8A/Wafj9SJWN25LyRRTdavTp8artaPkppC4e71M/6KUa4CZLQqk 1ewDxPAgaAOsA== X-Nifty-SrcIP: [126.125.143.222] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Vineet Gupta , linux-snps-arc@lists.infradead.org, Arnd Bergmann , Masahiro Yamada , Jonathan Corbet , Michal Marek , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] kbuild: remove ARCH_{CPP,A,C}FLAGS Date: Wed, 21 Aug 2019 02:09:41 +0900 Message-Id: <20190820170941.26193-3-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190820170941.26193-1-yamada.masahiro@socionext.com> References: <20190820170941.26193-1-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These flags were added by commit 61754c18752f ("kbuild: Allow arch Makefiles to override {cpp,ld,c}flags") to allow ARC to override -O2. We did not see any other usage after all. Now that ARC switched to CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3, there is no more user of these variables. Signed-off-by: Masahiro Yamada --- Documentation/kbuild/makefiles.rst | 7 ------- Makefile | 14 ++++---------- 2 files changed, 4 insertions(+), 17 deletions(-) -- 2.17.1 diff --git a/Documentation/kbuild/makefiles.rst b/Documentation/kbuild/makefiles.rst index 36ba92e199d2..712cdbcdbe91 100644 --- a/Documentation/kbuild/makefiles.rst +++ b/Documentation/kbuild/makefiles.rst @@ -988,13 +988,6 @@ When kbuild executes, the following steps are followed (roughly): $(KBUILD_ARFLAGS) set by the top level Makefile to "D" (deterministic mode) if this option is supported by $(AR). - ARCH_CPPFLAGS, ARCH_AFLAGS, ARCH_CFLAGS Overrides the kbuild defaults - - These variables are appended to the KBUILD_CPPFLAGS, - KBUILD_AFLAGS, and KBUILD_CFLAGS, respectively, after the - top-level Makefile has set any other flags. This provides a - means for an architecture to override the defaults. - KBUILD_LDS The linker script with full path. Assigned by the top-level Makefile. diff --git a/Makefile b/Makefile index 891e47da503f..6551f136afb0 100644 --- a/Makefile +++ b/Makefile @@ -661,11 +661,6 @@ RETPOLINE_VDSO_CFLAGS := $(call cc-option,$(RETPOLINE_VDSO_CFLAGS_GCC),$(call cc export RETPOLINE_CFLAGS export RETPOLINE_VDSO_CFLAGS -# The arch Makefile can set ARCH_{CPP,A,C}FLAGS to override the default -# values of the respective KBUILD_* variables -ARCH_CPPFLAGS := -ARCH_AFLAGS := -ARCH_CFLAGS := include arch/$(SRCARCH)/Makefile ifdef need-config @@ -918,11 +913,10 @@ include scripts/Makefile.kasan include scripts/Makefile.extrawarn include scripts/Makefile.ubsan -# Add any arch overrides and user supplied CPPFLAGS, AFLAGS and CFLAGS as the -# last assignments -KBUILD_CPPFLAGS += $(ARCH_CPPFLAGS) $(KCPPFLAGS) -KBUILD_AFLAGS += $(ARCH_AFLAGS) $(KAFLAGS) -KBUILD_CFLAGS += $(ARCH_CFLAGS) $(KCFLAGS) +# Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments +KBUILD_CPPFLAGS += $(KCPPFLAGS) +KBUILD_AFLAGS += $(KAFLAGS) +KBUILD_CFLAGS += $(KCFLAGS) KBUILD_LDFLAGS_MODULE += --build-id LDFLAGS_vmlinux += --build-id