Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2627769ioo; Sat, 28 May 2022 21:26:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbuJ12LMaP4wuUmWZcDTu4CP+VZ1z9ZCqXoTTEDf7YkiHnVWXAHfRFtUNbEvk7ROSDDRw0 X-Received: by 2002:a63:cc4f:0:b0:3c5:fc22:f6a with SMTP id q15-20020a63cc4f000000b003c5fc220f6amr43164856pgi.67.1653798379977; Sat, 28 May 2022 21:26:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653798379; cv=none; d=google.com; s=arc-20160816; b=u2q1ZkpuNXXtEba6/TrpJX1HfxCklXMY9Xzs/887MuYIFMPBvVZN3A883NDxEVFosU C0wg9va/ZQXEbQ8X+Xxib1oASO63y5A+Q4Kw5iu85xNWa6rh17ziP7WyjDHgq/nbOqoC Nfc391xSqmDIogdaerwKUJ45e4sq4dXWcAE2ArCiWTOAOgaQsUy35VqG27eYkB7ux+Cl wlflWvR4VADKJKOjSrxthzKt+jnJugBH6ygcp9mTPQSurFxRy+8Tzftby4mJQuGTU4Ps ZkHRofjJtqEI9B0XYaRJVO7/6/4ajdtSINmBUhpBx30FiPBqrVjg86xEwfe4LGkak122 /n7Q== 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 :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=WgaQtVymYkfxno5Ib+Fa54x8BPz4yryvYeF7xl9EODg=; b=awW1iqJwqP6nH4pSw5CQf6Ol0OjGPgliwCDT1O9lp1Nnjhzo9OyV7iK5cvZLlncvqY cSb05+A5whE/v3pvQhEaEwmaMrcz4ezaSZ8p3PILpnEx0l4gSq8TKN+gXO7asM1sFpPQ AsJPgrsSlRxAOsm7HQMgVT9MooubuqNZC+ypvkFbmRVmXK8Xb05UlgSSoAi/LG8pUBHG +8MZLEKS3DN675s4tv2/LUpLBovp+/clLMVgkbKEg2opfiCLDFqSg6NYK5SLUf51V5Uz bFlrywfM4lkpX7r0ki+DEEy+h2MSZpQSaSdNiPfh0NEVk0St2c2Xm9Jqxjp0AhLrESzC VJrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=zsV8tR9z; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id be3-20020a170902aa0300b00158d6f07b2esi11612003plb.85.2022.05.28.21.26.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 21:26:19 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=zsV8tR9z; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F297FB0D2A; Sat, 28 May 2022 21:26:16 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230309AbiE2E0M (ORCPT + 99 others); Sun, 29 May 2022 00:26:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229646AbiE2E0L (ORCPT ); Sun, 29 May 2022 00:26:11 -0400 Received: from conuserg-10.nifty.com (conuserg-10.nifty.com [210.131.2.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E00F7DE33; Sat, 28 May 2022 21:26:09 -0700 (PDT) Received: from grover.sesame (133-32-177-133.west.xps.vectant.ne.jp [133.32.177.133]) (authenticated) by conuserg-10.nifty.com with ESMTP id 24T4OKH3029656; Sun, 29 May 2022 13:24:20 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com 24T4OKH3029656 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1653798261; bh=WgaQtVymYkfxno5Ib+Fa54x8BPz4yryvYeF7xl9EODg=; h=From:To:Cc:Subject:Date:From; b=zsV8tR9zXqniwmpEJ/qCn03wSp3qPltpelAdYMS/qCxo/YX3OoWDgsgmCVSiI1xXg GEYty+3PUM+eDQuA0GOm3AgEx7KISitDWgJmPD5AzHxPqj1ITv+NFIA+bbsshioT+Y 7mxe4q6FiaXuoXjtZYIpFke8iPVe5EnQEOA+a94FgOmAcnMwofNPbioBvw55jk7CYd 9VpqKSA8wX2upuxxrV1SaO0lcvkM1WvRUDIWS8qj57Bc4fgetKaCyjYiKHfi8z6oi/ 5yHHYo1YSsrRk1J55fYIH1E00sk3F1G/Ey/k5PbPW8sun2pPkxH2ovZ1lagNJSvKnh bi8FKgxiCHGmQ== X-Nifty-SrcIP: [133.32.177.133] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Guenter Roeck , Masahiro Yamada , Guo Ren , Michal Marek , Nick Desaulniers , Nicolas Schier , Sami Tolvanen , linux-csky@vger.kernel.org Subject: [PATCH] kbuild: ignore *.cmd files for objects that come from libgcc.a Date: Sun, 29 May 2022 13:23:18 +0900 Message-Id: <20220529042318.2630379-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no 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 Guenter Roeck reported the build breakage for parisc and csky. I confirmed nios2 and openrisc are broken as well. The reason is that they borrow libgcc.a from the toolchains. For example, see this line in arch/parisc/Makefile: LIBGCC := $(shell $(CC) -print-libgcc-file-name) Some objects in libgcc.a are linked to vmlinux.o, but they do not have .*.cmd files. Obviously, there is no EXPORT_SYMBOL in external objects. Ignore them. (Most of the architectures import library code into the kernel tree. Perhaps those 4 architectures can do similar, but I am not sure.) Fixes: f292d875d0dc ("modpost: extract symbol versions from *.cmd files") Link: https://lore.kernel.org/linux-kbuild/20220528224745.GA2501857@roeck-us.net/T/#mac65c20c71c3e272db0350ecfba53fcd8905b0a0 Reported-by: Guenter Roeck Signed-off-by: Masahiro Yamada --- scripts/link-vmlinux.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index a7f6196c7e41..68e4be463a76 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -344,9 +344,16 @@ ${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init need-builtin=1 modpost_link vmlinux.o objtool_link vmlinux.o -# Generate the list of objects in vmlinux +# Generate the list of in-tree objects in vmlinux +# +# This is used to retrieve symbol versions generated by genksyms. for f in ${KBUILD_VMLINUX_OBJS} ${KBUILD_VMLINUX_LIBS}; do case ${f} in + *libgcc.a) + # Some architectures do '$(CC) --print-libgcc-file-name' to + # borrow libgcc.a from the toolchain. + # There is no EXPORT_SYMBOL in external objects. Ignore this. + ;; *.a) ${AR} t ${f} ;; *) -- 2.32.0