From patchwork Mon Oct 30 08:32:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Michal_Such=C3=A1nek?= X-Patchwork-Id: 159556 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp2059113vqb; Mon, 30 Oct 2023 01:33:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEzJn8tYgLp2XNjO0kWzL6XniZXwcxHY/BgLZOQnzP9zPy1KJYg28SLWc2xNTkM2c2cNGCe X-Received: by 2002:a05:6870:b603:b0:1e9:de37:a761 with SMTP id cm3-20020a056870b60300b001e9de37a761mr9742567oab.22.1698654785253; Mon, 30 Oct 2023 01:33:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698654785; cv=none; d=google.com; s=arc-20160816; b=UZz9olis0SGrJNRH3hS9lnv/gfYn6VJCeZJ4w8SWc0InCcdWzN0xb+DlNTtqS56ICl lIwtNQ58ry1vgFDTiUD+SDBiOZuelH7O2WnbwEtLI/Q+LvtEu+RFnlIjSILFF2MZipZh h+fxuN9H4St3AchSZkjCD5EBkQiq7jZ6eSQqS3jAE3JproFsTGqxsifVpXq7ZJjLyvrQ UaUoXzmhjoTFsMy0cIv8DcxP8J2BYKTNWwFfTnDsBJ1V1pgtelobcaIAbPz1Nbpwv3tl U4EREqOu6wycbKhkrHew6L8/UagzE0klgj+VmUE4M/RtaL1T6dwek1hKCgHTkUya77WH 43Ug== 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; bh=qEQMchwW7w25QfQSfYJX/WTD7wtwP0oC/61V8zh/rYA=; fh=FteGPjkzps8DQ1zeZDgoR4sE63N+Xu/bpO4v2v6eP5U=; b=xfnS7bgm/jFYBbzUr5ANSEtf0FO3ESJXa0Uc+pyN81bhUsIyHInA9H3c02xZhQEUM6 txGHb1nn6rtVwcIwf4zd0gqYabLOJavtPI8nLs8ahref91JLj5QiXJcXld33nbZ1WMtO Wh9Pghie/8QMtXzMBdmSkddhNoVCi4b6WEPS8vJbIM3HUKLW2Gkvuexd01TKGhLXZwc9 FKtrrBuLFgd0DimaEjdpwGQclOeg9A6gICH7BEMfrfDxKr3yxo8yfO403AB5xp0RzA3J K6Ng/FLcFRbFG0Fvaw2J1wNh9fiX3I88V8Pn8W5ZwEbpuOdDecznNIiXtd116p2gR7CT IJjg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id j186-20020a638bc3000000b005aaab9e7bcfsi4716603pge.388.2023.10.30.01.33.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 01:33:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id C6A55805C14C; Mon, 30 Oct 2023 01:33:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232089AbjJ3Icf (ORCPT + 31 others); Mon, 30 Oct 2023 04:32:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229517AbjJ3Icd (ORCPT ); Mon, 30 Oct 2023 04:32:33 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DE51A7; Mon, 30 Oct 2023 01:32:31 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 88B1E21981; Mon, 30 Oct 2023 08:32:29 +0000 (UTC) Received: from kitsune.suse.cz (kitsune.suse.cz [10.100.12.127]) by relay2.suse.de (Postfix) with ESMTP id C0B232CAD5; Mon, 30 Oct 2023 08:32:26 +0000 (UTC) From: Michal Suchanek To: linux-kbuild@vger.kernel.org Cc: Michal Suchanek , Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , Christophe Leroy , Naveen N Rao , Michael Ellerman , linux-kernel@vger.kernel.org Subject: [PATCH] kbuild: dummy-tools: Add support for -fpatchable-function-entry Date: Mon, 30 Oct 2023 09:32:18 +0100 Message-ID: <20231030083222.28509-1-msuchanek@suse.de> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Spamd-Bar: +++++ Authentication-Results: smtp-out1.suse.de; dkim=none; dmarc=none; spf=softfail (smtp-out1.suse.de: 149.44.160.134 is neither permitted nor denied by domain of msuchanek@suse.de) smtp.mailfrom=msuchanek@suse.de X-Rspamd-Server: rspamd2 X-Spamd-Result: default: False [5.49 / 50.00]; ARC_NA(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[149.44.160.134:from]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; NEURAL_HAM_LONG(-3.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.20)[suse.de]; BROKEN_CONTENT_TYPE(1.50)[]; R_SPF_SOFTFAIL(0.60)[~all:c]; TO_MATCH_ENVRCPT_SOME(0.00)[]; VIOLATED_DIRECT_SPF(3.50)[]; MX_GOOD(-0.01)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_SEVEN(0.00)[10]; MID_CONTAINS_FROM(1.00)[]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.20)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; BAYES_HAM(-0.00)[13.15%] X-Spam-Score: 5.49 X-Rspamd-Queue-Id: 88B1E21981 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 30 Oct 2023 01:33:02 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781168639906177095 X-GMAIL-MSGID: 1781168639906177095 dummy-gcc does not produce the output gcc-check-fpatchable-function-entry.sh expects. Add a base64 encoded output of the second test. Fixes: 0f71dcfb4aef ("powerpc/ftrace: Add support for -fpatchable-function-entry") Signed-off-by: Michal Suchanek --- scripts/dummy-tools/gcc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/scripts/dummy-tools/gcc b/scripts/dummy-tools/gcc index 07f6dc4c5cf6..8ab81a905cc2 100755 --- a/scripts/dummy-tools/gcc +++ b/scripts/dummy-tools/gcc @@ -73,6 +73,25 @@ if arg_contain -Wa,--version "$@"; then exit 0 fi +if arg_contain -fpatchable-function-entry=2 "$@"; then + base64 -d <<-EOF + CS5maWxlCSI8c3RkaW4+IgoJLm1hY2hpbmUgcG93ZXI4CgkuYWJpd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