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 smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 867DEC3ABD8 for ; Sun, 18 May 2025 08:11:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 809A060D68; Sun, 18 May 2025 08:11:24 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id AVEovf253Nbk; Sun, 18 May 2025 08:11:22 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 558FA60C22 Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id 558FA60C22; Sun, 18 May 2025 08:11:22 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists1.osuosl.org (Postfix) with ESMTP id EBEC2E4 for ; Sun, 18 May 2025 08:11:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id D8CD1820A6 for ; Sun, 18 May 2025 08:11:18 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 7SWAd_r9IEPH for ; Sun, 18 May 2025 08:11:18 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2001:4b98:dc4:8::229; helo=relay9-d.mail.gandi.net; envelope-from=peko@korsgaard.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 6154F8113C DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 6154F8113C Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::229]) by smtp1.osuosl.org (Postfix) with ESMTPS id 6154F8113C for ; Sun, 18 May 2025 08:11:17 +0000 (UTC) Received: by mail.gandi.net (Postfix) with ESMTPSA id DE72F431EB; Sun, 18 May 2025 08:11:13 +0000 (UTC) Received: from peko by dell.be.48ers.dk with local (Exim 4.96) (envelope-from ) id 1uGZ73-00GhSo-1H; Sun, 18 May 2025 10:11:13 +0200 From: Peter Korsgaard To: buildroot@buildroot.org Date: Sun, 18 May 2025 10:11:11 +0200 Message-Id: <20250518081112.3980310-1-peter@korsgaard.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 X-GND-State: clean X-GND-Score: 0 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdefudejleelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecunecujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomheprfgvthgvrhcumfhorhhsghgrrghrugcuoehpvghtvghrsehkohhrshhgrggrrhgurdgtohhmqeenucggtffrrghtthgvrhhnpeelgeeuvefhjeegkeetkeeghfdvheehieevffduhefhuddvleduiedvfeegfeetffenucffohhmrghinhepsghuihhlughrohhothdrnhgvthdpghhnuhdrohhrghdpghhithhhuhgsrdgtohhmnecukfhppedvrgdtvdemkeegvdgrmeeghegrtgemleegtddumeejiegukeemfegvfhhfmehfvggsfeemgegssgehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdgrtddvmeekgedvrgemgeehrggtmeelgedtudemjeeiugekmeefvghffhemfhgvsgefmeegsggshedphhgvlhhopeguvghllhdrsggvrdegkegvrhhsrdgukhdpmhgrihhlfhhrohhmpehpvghkoheskhhorhhsghgrrghrugdrtghomhdpnhgspghrtghpthhtohepvddprhgtphhtthhopegsuhhilhgurhhoohhtsegsuhhilhgurhhoohhtrdhorhhgpdhrtghpthhtohepphgvthgvrheskhhorhhsghgrrghrugdrtghomh X-GND-Sasl: peter@korsgaard.com X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=none (p=none dis=none) header.from=korsgaard.com Subject: [Buildroot] [PATCH] package/flex: fix GCC 15.x build issue X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Fixes: https://autobuild.buildroot.net/results/924b1015d4b81385409ef00f1a14be3ca1959c8e/ As part of building flex for the target a few files are built for the host, including a rpl_malloc() implementation containing a malloc() forward declaration without any function parameters. GCC 15 defaults to -std=gnu23, which handles function declarations without parameters differently from earlier C standards leading to compilation errors: ../lib/malloc.c:6:12: warning: conflicting types for built-in function 'malloc'; expected 'void *(long unsigned int)' [-Wbuiltin-declaration-mismatch] 6 | void *malloc (); | ^~~~~~ ../lib/malloc.c:5:1: note: 'malloc' is declared in header '' 4 | #include +++ |+#include 5 | ../lib/malloc.c: In function 'rpl_malloc': ../lib/malloc.c:16:15: error: too many arguments to function 'malloc'; expected 0, have 1 https://gcc.gnu.org/gcc-15/porting_to.html#c23-fn-decls-without-parameters Add a patch submitted upstream to correct the prototype. Signed-off-by: Peter Korsgaard --- ...04-Match-malloc-signature-to-its-use.patch | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 package/flex/0004-Match-malloc-signature-to-its-use.patch diff --git a/package/flex/0004-Match-malloc-signature-to-its-use.patch b/package/flex/0004-Match-malloc-signature-to-its-use.patch new file mode 100644 index 0000000000..ac57e3b4c8 --- /dev/null +++ b/package/flex/0004-Match-malloc-signature-to-its-use.patch @@ -0,0 +1,27 @@ +From 4b142954b54a57a9b0af0a9661056a9c39a8fa95 Mon Sep 17 00:00:00 2001 +From: Richard Barnes +Date: Wed, 2 Oct 2024 10:35:09 -0700 +Subject: [PATCH] Match `malloc` signature to its use + +Upstream: https://github.com/westes/flex/pull/674 +Signed-off-by: Peter Korsgaard +--- + lib/malloc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/malloc.c b/lib/malloc.c +index 75e8ef9..701b9b3 100755 +--- a/lib/malloc.c ++++ b/lib/malloc.c +@@ -3,7 +3,7 @@ + + #include + +- void *malloc (); ++ void *malloc (size_t n); + + /* Allocate an N-byte block of memory from the heap. + If N is zero, allocate a 1-byte block. */ +-- +2.39.5 + -- 2.39.5 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot