mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-01 21:23:51 -09:00
package/lrzsz: fix build with gcc >= 14.x
Fixes:
https://autobuild.buildroot.net/results/2e3/2e33c61e1c9bee099f973c1e43b696c63e5eed4b/
Building lrzsz with this defconfig works:
BR2_GCC_VERSION_13_X=y
BR2_PACKAGE_LRZSZ=y
and gets broken when switched to gcc 14:
BR2_PACKAGE_LRZSZ=y
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
(cherry picked from commit 28e52cde51)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
committed by
Thomas Perale
parent
c304683bf9
commit
e3ccc1eaed
55
package/lrzsz/0007-configure-fix-for-gcc-14.x.patch
Normal file
55
package/lrzsz/0007-configure-fix-for-gcc-14.x.patch
Normal file
@@ -0,0 +1,55 @@
|
||||
From 791b757537d48a9e6beec4a1551d277b79b95f37 Mon Sep 17 00:00:00 2001
|
||||
From: Bernd Kuhls <bernd@kuhls.net>
|
||||
Date: Mon, 2 Mar 2026 20:09:25 +0100
|
||||
Subject: [PATCH] configure: fix for gcc >= 14.x
|
||||
|
||||
The pre-generated configure script has a check that doesn't work with
|
||||
GCC >= 14.x:
|
||||
|
||||
configure:1932: checking for ANSI C header files
|
||||
configure:1945: /home/bernd/buildroot/output/per-package/lrzsz/host/bin/i586-buildroot-linux-gnu-cpp -D_LARGEFILE_SOURCE -D_LARGEFILE64_S
|
||||
OURCE -D_FILE_OFFSET_BITS=64 conftest.c >/dev/null 2>conftest.out
|
||||
configure:2012: /home/bernd/buildroot/output/per-package/lrzsz/host/bin/i586-buildroot-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_L
|
||||
ARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g0 -D_FORTIFY_SOURCE=1 -std=gnu17 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BIT
|
||||
S=64 conftest.c 1>&5
|
||||
configure: In function 'main':
|
||||
configure:2007:67: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
|
||||
2007 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
|
||||
| ^~~~
|
||||
configure:2003:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
|
||||
2002 | #include <ctype.h>
|
||||
+++ |+#include <stdlib.h>
|
||||
|
||||
Doing AUTORECONF = YES doesn't work as the configure.in is very old, so
|
||||
let's fix the configure script directly.
|
||||
|
||||
Upstream: N/A, patching generated file
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
---
|
||||
configure | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 16a259a..8601361 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -1572,6 +1572,7 @@ else
|
||||
#line 1573 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <ctype.h>
|
||||
+#include <stdlib.h>
|
||||
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
||||
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
|
||||
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
|
||||
@@ -2000,6 +2001,7 @@ else
|
||||
#line 2001 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <ctype.h>
|
||||
+#include <stdlib.h>
|
||||
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
||||
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
|
||||
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
|
||||
--
|
||||
2.47.3
|
||||
|
||||
Reference in New Issue
Block a user