From patchwork Fri Mar 16 02:18:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 131893 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp179372ljb; Thu, 15 Mar 2018 19:20:27 -0700 (PDT) X-Google-Smtp-Source: AG47ELt04FUD0h+Fh8JMV/13KMsAGugsco82QC+PaFKH19ECSbEJTTrsT0ffnw6OGkRCfopaA/nq X-Received: by 10.99.107.131 with SMTP id g125mr107978pgc.16.1521166827107; Thu, 15 Mar 2018 19:20:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521166827; cv=none; d=google.com; s=arc-20160816; b=dOzwHd9svu3GlZ4PRC5I9i5oI9r0cumHqcnk2+KBDKYhEuOtIBTCHwpnoZHUutkkF6 xfVDQxB38THzFxN77F9xR9nzbORK+VxxVZ/RHY+JxoDctEhshg4lGi01qgLxATtrRftA JIIW4r9XKUXXePGMnDN0hf87qYfCgY6AnaSNLegTUaR2KR9ojBE3c3PQwECxHa9YEtXi 4jOZu0tWa+hPyI3z+9OKN9JC7PMwleFLK+pedz0NZdhy0hBTS3a5vVfw4r1+ur+DuYws iE/UAgDzJpy+TfMaAwshIvAtTn80FYyQ92tEVoWFDm7+gR+rOjIOuWWlLvFvOSwc6DGO U9eg== 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 :arc-authentication-results; bh=xjgzDrirNqKMEvo8Quh+R4Q91ERH9cAx5FqZL73rRak=; b=msRZkrjJxIJoZfdSryoj7bxvbYg/fVyOjp+xKSI32kKf7sCzQgv/jdAZIk6QmZvILx 2JSUOqpIbFQ5VlAiMycNmkVmyExcOLHg43Yq7XKwqXiZoVR6ejbAfVC+zCKg1opeWCbg UEXzLlYbsOgLYrsTrY+hbAZo9pTVGJdEdmf1h2+dKyyCyeSdG7GZKyExUM94/et9xaAr u6CjFmTU/7YIzUtUIHkKJwI+F75bz1oUYyLUlh0sqWmX/jXcPzdfwALtV0Gg5SvfIn2S P/7mPhZXgQLRSWBh5CI0C/cdK+gg3geSuyc94DhJmdLKlwzMrV4Apeg6/fUtj5PdYSOx NuQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=U4SYqay4; 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 c12-v6si5226852plo.278.2018.03.15.19.20.26; Thu, 15 Mar 2018 19:20:27 -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=U4SYqay4; 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 S1752977AbeCPCT6 (ORCPT + 28 others); Thu, 15 Mar 2018 22:19:58 -0400 Received: from conuserg-11.nifty.com ([210.131.2.78]:44532 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752819AbeCPCTM (ORCPT ); Thu, 15 Mar 2018 22:19:12 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id w2G2IoBM003525; Fri, 16 Mar 2018 11:18:51 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com w2G2IoBM003525 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1521166732; bh=xjgzDrirNqKMEvo8Quh+R4Q91ERH9cAx5FqZL73rRak=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U4SYqay4T7mRgxK2Dl8ZXFCgLdLSLe/SH5wpOHxLoP8SzwyErMCvwTFPjZFJelfWX 8UeVBuoxzN6dm5CkZpYWBliqKG5PGQIIPT/3to0kBwjrGVDN3vF+g7YNkcBXEetr6Y me15/4rvPWn1gtESZi/cXNp4AWoNC76jPpkjkhTnfDZqaXq06FrZTua/npR8Kzm63F ipTvbCXJuVUFh1K+PkHZS3yY7WWmAPRxlLoY49wSkFSMiTybOEpQkjT6bM9ZI9TYSp iXyBEf382Bsr1mBysQrsUPAUeHZgDI15bugTGvByAtBKvSkh+VCTasow5is+oVgQmJ ZI/X/xC67krmA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Nicolas Pitre , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH v2 1/7] kbuild: clear LDFLAGS in the top Makefile Date: Fri, 16 Mar 2018 11:18:38 +0900 Message-Id: <1521166725-24157-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521166725-24157-1-git-send-email-yamada.masahiro@socionext.com> References: <1521166725-24157-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently LDFLAGS is not cleared, so same flags are accumulated in LDFLAGS when the top Makefile is recursively invoked. I found unneeded rebuild for ARCH=arm64 when CONFIG_TRIM_UNUSED_KSYMS is enabled. If include/generated/autoksyms.h is updated, the top Makefile is recursively invoked, then arch/arm64/Makefile adds one more '-maarch64linux'. Due to the command line change, modules are rebuilt needlessly. Signed-off-by: Masahiro Yamada --- Changes in v2: None Makefile | 1 + 1 file changed, 1 insertion(+) -- 2.7.4 Acked-by: Nicolas Pitre diff --git a/Makefile b/Makefile index d9bb6dd6..ac8755d 100644 --- a/Makefile +++ b/Makefile @@ -437,6 +437,7 @@ KBUILD_CFLAGS_KERNEL := KBUILD_AFLAGS_MODULE := -DMODULE KBUILD_CFLAGS_MODULE := -DMODULE KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds +LDFLAGS := GCC_PLUGINS_CFLAGS := export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC