Skip to content

Commit ca1bf93

Browse files
committed
Add patch for building lrslib in GCC 15
[ci skip]
1 parent 8c92546 commit ca1bf93

File tree

3 files changed

+47
-1
lines changed

3 files changed

+47
-1
lines changed

M2/cmake/build-libraries.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -871,6 +871,7 @@ ExternalProject_Add(build-lrslib
871871
SOURCE_DIR libraries/lrslib/build
872872
DOWNLOAD_DIR ${CMAKE_SOURCE_DIR}/BUILD/tarfiles
873873
BUILD_IN_SOURCE ON
874+
PATCH_COMMAND patch --batch -p1 < ${CMAKE_SOURCE_DIR}/libraries/lrslib/patch-073
874875
CONFIGURE_COMMAND true
875876
BUILD_COMMAND ${MAKE} -j${PARALLEL_JOBS} prefix=${M2_HOST_PREFIX} lrs # all-shared
876877
INCLUDEDIR=${GMP_INCLUDE_DIRS}

M2/libraries/lrslib/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
HOMEPAGE = http://www-cgrl.cs.mcgill.ca/~avis/C/lrs.html
77
URL = https://cgm.cs.mcgill.ca/~avis/C/lrslib/archive
88
VERSION = 073
9-
# PATCHFILE = @abs_srcdir@/patch-$(VERSION)
9+
PATCHFILE = @abs_srcdir@/patch-$(VERSION)
1010
TARFILE = lrslib-$(VERSION).tar.gz
1111
#PROGRAMS = lrs redund lra1 redund1 nash setupnash setupnash2 fourier buffer 2nash
1212
PROGRAMS = lrs #redund lrs1 redund1 setnash setnash2 2nash

M2/libraries/lrslib/patch-073

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
Description: Fix incompatible pointer type errors in GCC 15
2+
Origin: https://src.fedoraproject.org/rpms/lrslib/blob/rawhide/f/lrslib-fixes.patch
3+
4+
--- a/lrslib.c
5+
+++ lrslib-073/lrslib.c
6+
@@ -84,10 +84,10 @@ char *lrs_basename(char *path);
7+
/* signals handling */
8+
/*******************************/
9+
#ifndef SIGNALS
10+
-static void checkpoint ();
11+
-static void die_gracefully ();
12+
+static void checkpoint (int signum);
13+
+static void die_gracefully (int signum);
14+
static void setup_signals (void);
15+
-static void timecheck ();
16+
+static void timecheck (int signum);
17+
#endif
18+
19+
/*******************************/
20+
@@ -6368,7 +6368,7 @@ setup_signals ()
21+
}
22+
23+
static void
24+
-timecheck ()
25+
+timecheck (int signum)
26+
{
27+
lrs_dump_state ();
28+
errcheck ("signal", signal (SIGALRM, timecheck));
29+
@@ -6376,14 +6376,14 @@ timecheck ()
30+
}
31+
32+
static void
33+
-checkpoint ()
34+
+checkpoint (int signum)
35+
{
36+
lrs_dump_state ();
37+
errcheck ("signal", signal (SIGUSR1, checkpoint));
38+
}
39+
40+
static void
41+
-die_gracefully ()
42+
+die_gracefully (int signum)
43+
{
44+
lrs_dump_state ();
45+

0 commit comments

Comments
 (0)