From patchwork Mon Nov 14 11:43:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 19763 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2098355wru; Mon, 14 Nov 2022 03:49:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf7FMFgWbqlT6lBL5UPLXeNxULnuG4eNymkWGlXpZpjZFf8h12+H6l0/LVvOADRv/Jlv0/eI X-Received: by 2002:a17:906:a015:b0:7ad:b868:f096 with SMTP id p21-20020a170906a01500b007adb868f096mr9669492ejy.295.1668426588207; Mon, 14 Nov 2022 03:49:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668426588; cv=none; d=google.com; s=arc-20160816; b=qg+Sh/ERZ2LWI2ovttfBz7HVi+Huy8bDLQquWV2MayD21ctioqIEJXfJvINrPAWlI8 jmk2Sy7+y3McMEDSk1DP5jal2JxpDFeTIqLXezLStadqmeOQ97evG6bn1EKWe8NvMUta Vkbg0Y2pusZGZ8CixKa2vCMf2BLKp9VIr391AtWvjNI8p0I61+9nK9BEnBoKPYslbS2w eJwKByol449xW7NkTHJp4zsLbYwEZ3lYLkCixNswjuWceXW/u7Q+jEGpLNFnQDGFFj6w CAza8CydySkx9YnPdoqA1j1IRuDPZKgA22avboqj1cbHlTLw2wkmcqxcuRBd6q/jxThB iiNg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n11-20020aa7c78b000000b0045a0e39062esi8025738eds.76.2022.11.14.03.49.24; Mon, 14 Nov 2022 03:49:48 -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 + 99 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749472078398713351?= X-GMAIL-MSGID: =?utf-8?q?1749472078398713351?= 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__)