Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5396945rwb; Mon, 14 Nov 2022 04:12:22 -0800 (PST) X-Google-Smtp-Source: AA0mqf7bYeoZ2dTqZB6i38TSBk+4mQ76SqaYFop/16zKwn1hQvStUF6m0TRYVjPUQwb79+Q8TMMQ X-Received: by 2002:a50:8ac8:0:b0:463:c5f7:fae with SMTP id k8-20020a508ac8000000b00463c5f70faemr10511319edk.152.1668427942754; Mon, 14 Nov 2022 04:12:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668427942; cv=none; d=google.com; s=arc-20160816; b=QsxOrmX18KeciEXzf03r/1qFIiDc4rhalj4GY9Dm4+qyN/EhuXElPl8h9uMmcX+ziw WFWkYPeLkGIBtbNlp9N7sBqomGJ5Uwi1vbJgP+KpRC31PEN9TABr4uckJ+RUIWr+VOLY dthtCNTrmCw1xz7h7IYm7o/jz9w0H+GduVKRWD5T/eyJYtrSghSZQ8uYP483wB5orVBy vvuURlNAyLCH3FPXKHG6wQkMZ0OC6SX3kZ7tQv40i0qtpFu9farWaX7vs3WtbSQQXgl+ 7vm1BIUVI7/LYxisnpLdXeLWZZt9ZvJc8KsH4/MSZnHvI7WhkI/lfZFMjk6N0TlJwpuF bIMA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zyzEZJkczXCXC33g/IrrQvUIU/CJoxCCzjqlntwC3yo=; b=c37XZX3i8RtXa01aXoPM6OkIP+Udv07YkvDewfeZD3bCPdKl3UN/oZA3KmS82hPN7H uZ4+TyGpSRn7fr37AgccmUw2QKg7CL7BFDEJ/hHFRTjq1aGLEFSKMCjQX7U+A+1+iZ1q WWziIuO2GcV5kIMzwt9RiURSAVOvuZiQ3n+jmmDg1qn827Y6p+gadxT4RGY4tgtqRM8T x+luCGlCoUrVTAamSMZhUYKhVonH3l1XJLD0/ez4ysj0Tu25PGPSoBTI3PRqWDE8rctv XEMjO/AL0YLnpfuVCn6oqISK98DeYBgw2QbdM68kihRfnEyR9FlFvoy/GMDFWjqvyJmY cOdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WhEo3a5L; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h19-20020aa7cdd3000000b00461ebe2a168si7544899edw.447.2022.11.14.04.12.00; Mon, 14 Nov 2022 04:12:22 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=WhEo3a5L; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236269AbiKNLsO (ORCPT + 88 others); Mon, 14 Nov 2022 06:48:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236931AbiKNLr3 (ORCPT ); Mon, 14 Nov 2022 06:47:29 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5010222508; Mon, 14 Nov 2022 03:45:28 -0800 (PST) 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 sin.source.kernel.org (Postfix) with ESMTPS id DFF2ACE0F52; Mon, 14 Nov 2022 11:45:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66E11C433D7; Mon, 14 Nov 2022 11:45:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668426323; bh=2VZ4ODzq0c+qrTqaRhf/GBj3Hij1v5FmA5K2QGdY/7A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WhEo3a5Lx3UZZADPhb5Wp70Y2vIT2YeqX9rt3iHUK9eS+k/5sSbR2h9BZZZHUn7OB t3cI5HGlUnqznWOwYP2wjqyreX+9nSEH+r97DCMAmR1B5BZZnM02A97aSEpHsDmnGV Q6iV21VOlcdoSFRKninhJTHK3XUoCvEKM3s7HXBrOWaCLmbDxs7EIB8U/yIKLMLd74 iUwYaDPgNw9YryLoADxfO/+sdnwJr69IK7wRzQsrU1h6X+1yMqSZG9CgBE0Uxv9NNM FNtdG/7I+sxoMD3Gk6bglBTDaKot5bWBlP5pfqsDQ48tN8Hyt83yGvoh4IeUp4VSxB tJO24okcYNl3w== From: "Jiri Slaby (SUSE)" To: linux-kernel@vger.kernel.org Cc: Andi Kleen , Masahiro Yamada , Michal Marek , Nick Desaulniers , linux-kbuild@vger.kernel.org, Martin Liska , Jiri Slaby Subject: [PATCH 35/46] Kbuild, lto: disable gcc LTO for bounds+asm-offsets Date: Mon, 14 Nov 2022 12:43:33 +0100 Message-Id: <20221114114344.18650-36-jirislaby@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221114114344.18650-1-jirislaby@kernel.org> References: <20221114114344.18650-1-jirislaby@kernel.org> MIME-Version: 1.0 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 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: Andi Kleen Disable LTO when generating the bounds+asm-offsets.s files which are scanned for C constants. With a LTO build, the file would contain the gcc IR in assembler form, which breaks the scanning scripts. Cc: Masahiro Yamada Cc: Michal Marek Cc: Nick Desaulniers Cc: linux-kbuild@vger.kernel.org Signed-off-by: Andi Kleen Signed-off-by: Martin Liska Signed-off-by: Jiri Slaby --- Kbuild | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Kbuild b/Kbuild index 464b34a08f51..40744d76d416 100644 --- a/Kbuild +++ b/Kbuild @@ -11,6 +11,8 @@ bounds-file := include/generated/bounds.h targets := kernel/bounds.s +kernel/bounds.s: KBUILD_CFLAGS += $(DISABLE_LTO_GCC) + $(bounds-file): kernel/bounds.s FORCE $(call filechk,offsets,__LINUX_BOUNDS_H__) @@ -30,6 +32,7 @@ offsets-file := include/generated/asm-offsets.h targets += arch/$(SRCARCH)/kernel/asm-offsets.s arch/$(SRCARCH)/kernel/asm-offsets.s: $(timeconst-file) $(bounds-file) +arch/$(SRCARCH)/kernel/asm-offsets.s: KBUILD_CFLAGS += $(DISABLE_LTO_GCC) $(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s FORCE $(call filechk,offsets,__ASM_OFFSETS_H__) -- 2.38.1