From nobody Fri Dec 19 20:52:41 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C90DC32772 for ; Tue, 23 Aug 2022 10:20:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354092AbiHWKUS (ORCPT ); Tue, 23 Aug 2022 06:20:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352812AbiHWKI7 (ORCPT ); Tue, 23 Aug 2022 06:08:59 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E38EE7D7B7; Tue, 23 Aug 2022 01:54:58 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 96D02B81C39; Tue, 23 Aug 2022 08:54:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00F8AC433C1; Tue, 23 Aug 2022 08:54:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661244896; bh=R9WSvWCXx76BsI8euW0jKufvJkvEvjle4/TwJ7m2w88=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rZcXDAF6LatjQAn7IBTSx3aEF/Z3a8NeoQ1lQ29JSo820zohGqHOtcW6zVHjBMa47 xPz4SZEd0r9Y4uRrnCZpE57o7QsTAeUu6mum8w8uJpVNcpPfqQPb/sMMjFEdfEKSaQ JWHc46iqpxbn7Z97+4MfGOa036YQMxrQ+3KIOxf0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada , Nicolas Pitre Subject: [PATCH 4.14 208/229] kbuild: clear LDFLAGS in the top Makefile Date: Tue, 23 Aug 2022 10:26:09 +0200 Message-Id: <20220823080101.073098690@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080053.202747790@linuxfoundation.org> References: <20220823080053.202747790@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Masahiro Yamada commit ce99d0bf312daf0178e640da9e3c93b773a67e7d upstream. 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=3Darm64 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 Acked-by: Nicolas Pitre Signed-off-by: Greg Kroah-Hartman --- Makefile | 1 + 1 file changed, 1 insertion(+) --- a/Makefile +++ b/Makefile @@ -426,6 +426,7 @@ KBUILD_CFLAGS_KERNEL :=3D KBUILD_AFLAGS_MODULE :=3D -DMODULE KBUILD_CFLAGS_MODULE :=3D -DMODULE KBUILD_LDFLAGS_MODULE :=3D -T $(srctree)/scripts/module-common.lds +LDFLAGS :=3D GCC_PLUGINS_CFLAGS :=3D CLANG_FLAGS :=3D