Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3462795rwa; Tue, 23 Aug 2022 05:17:49 -0700 (PDT) X-Google-Smtp-Source: AA6agR79/WXq3Nw3+a6oa2VhAUJaTWS391dcohL/a9fi4NQtBh10/uYcCmWX8Myldv8QaBuS+0mT X-Received: by 2002:a63:147:0:b0:42a:5157:c083 with SMTP id 68-20020a630147000000b0042a5157c083mr14947159pgb.269.1661257068933; Tue, 23 Aug 2022 05:17:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661257068; cv=none; d=google.com; s=arc-20160816; b=V1jkxEj+dCYdOFHt6q3naDPNxjBBbnRpbMAT/BzEMAbUWIrclSSrVkkO8Z9dGLkKbA 1Yi9vWSHBxg7Qinmt75h1rwNzdbD1SVQ5SN41Ey4EyfVah3Ctnh1mn+Nzdv8QgbYVdFQ 9VYzFUQ7FPOd05u7SNdkEOUcDOEgBXvhUTm5Q0G3Vm7KSJvvPT4v5PdicKC7usFpYcGh N9BeXfP6nkXXdsk3J0mezt7y+s2nfNpdMhtH1dmighwOXQRIdGkbHgO/8oG4hhEAn9tc CYx5/FuYWvu5xURCRfxzE97ulG3kL3y9KzSWuNRWMJDqK0QIQI/oyUX9JzTmQhMwXz8y t2Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=OG3t4nvBSaImb884RvSv91xd8NgscO8rdVwALRFYm2Y=; b=Jlz2y0uJkGVyvf6FhAl/Szr1zYXgBWJ4GceVzgdVgP5qYRk9KMHBSptpWsjgizVfbr P6Hu0SqsRj2+ryk9CCZYiLnUGhqVIqHbUkFY62Ie3pDo0+Ics/v2snBtnlLn0+v8xnxz EH1oWfUhq22wRvqD+rRey6U20+yK1xtcfde4QgoKlbMy+WjH889M+FCBkLx2OvCLjw3F fAGkg1otCF6iqZ431hN2QEfw8YxrjP8IJ0fHphH8x1OjuykkNkBGWTgEH4bDKlCZiRke /1QJDMF7Nn1ERuZjQGkDhybNllHS2rOjeZTGHXkLe0nMwxDTdyC+JOxlaf59sNfxwdLs Dx6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rZcXDAF6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a187-20020a6390c4000000b00429de649127si15119627pge.476.2022.08.23.05.17.37; Tue, 23 Aug 2022 05:17:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rZcXDAF6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354090AbiHWKUS (ORCPT + 99 others); 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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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=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 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 := KBUILD_AFLAGS_MODULE := -DMODULE KBUILD_CFLAGS_MODULE := -DMODULE KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds +LDFLAGS := GCC_PLUGINS_CFLAGS := CLANG_FLAGS :=