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: Michal Suchanek X-Patchwork-Id: 13440152 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55DE4C4332F for ; Mon, 30 Oct 2023 08:32:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231789AbjJ3Ice (ORCPT ); Mon, 30 Oct 2023 04:32:34 -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-Rspamd-Queue-Id: 88B1E21981 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org 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 "$@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