From mboxrd@z Thu Jan 1 00:00:00 1970 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 2EC0BE7C4EB for ; Wed, 4 Oct 2023 18:33:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244301AbjJDSd1 (ORCPT ); Wed, 4 Oct 2023 14:33:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244378AbjJDSd1 (ORCPT ); Wed, 4 Oct 2023 14:33:27 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1326FAD for ; Wed, 4 Oct 2023 11:33:23 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A45AC433CD; Wed, 4 Oct 2023 18:33:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1696444402; bh=3E0KE6SXcb+xDQ0j3J8yAs6FWP8f/HU3ixEcYsz3s/0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Zs98LXXLTsEaLDq04VsMfnchJHzqzCZ5mvuitUJTLiecDQXxSPw15x6kfJswVns2x G+cb5h/wcmizjRLAYIHAsAnYnIEs5JjlEi0vYAImA9Y5GU0k5WisGiYGfP94sewxG9 PX8lOr+Prr6ZxbVnb4Kqqpa3AzxYgzGB99S4Tv3w= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Adrian Hunter , Ian Rogers , Jiri Olsa , Namhyung Kim , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 6.5 237/321] perf build: Define YYNOMEM as YYNOABORT for bison < 3.81 Date: Wed, 4 Oct 2023 19:56:22 +0200 Message-ID: <20231004175240.216337321@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231004175229.211487444@linuxfoundation.org> References: <20231004175229.211487444@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 6.5-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnaldo Carvalho de Melo [ Upstream commit 88cc47e24597971b05b6e94c28a2fc81d2a8d61a ] YYNOMEM was introduced in bison 3.81, so define it as YYABORT for older versions, which should provide the previous perf behaviour. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/util/Build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/perf/util/Build b/tools/perf/util/Build index 96f4ea1d45c56..9c6c4475524b9 100644 --- a/tools/perf/util/Build +++ b/tools/perf/util/Build @@ -301,6 +301,12 @@ ifeq ($(BISON_GE_35),1) else bison_flags += -w endif + +BISON_LT_381 := $(shell expr $(shell $(BISON) --version | grep bison | sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/\1\2\3/g') \< 381) +ifeq ($(BISON_LT_381),1) + bison_flags += -DYYNOMEM=YYABORT +endif + CFLAGS_parse-events-bison.o += $(bison_flags) CFLAGS_pmu-bison.o += -DYYLTYPE_IS_TRIVIAL=0 $(bison_flags) CFLAGS_expr-bison.o += -DYYLTYPE_IS_TRIVIAL=0 $(bison_flags) -- 2.40.1