mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-10-01 06:21:56 -09:00
package/lmbench: prepare for GCC 15.x compatibility
GCC-15 requires function definitions to have proper arguments. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
committed by
Thomas Petazzoni
parent
fd914e9e4c
commit
6fd3e498af
130
package/lmbench/0006-Add-signum-param-to-signal-handlers.patch
Normal file
130
package/lmbench/0006-Add-signum-param-to-signal-handlers.patch
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
From ed4f31bb09bc6355b2b642a89a1f1017de46f26e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Charlie Jenkins <charlie@rivosinc.com>
|
||||||
|
Date: Fri, 4 Apr 2025 15:35:08 -0700
|
||||||
|
Subject: [PATCH] Add signum param to signal handlers
|
||||||
|
|
||||||
|
A signal handler is required to have a signum parameter that is an
|
||||||
|
integer.
|
||||||
|
|
||||||
|
Upstream: dead
|
||||||
|
Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
|
||||||
|
---
|
||||||
|
src/lat_udp.c | 4 ++--
|
||||||
|
src/lmdd.c | 14 +++++++-------
|
||||||
|
src/lmhttp.c | 4 ++--
|
||||||
|
3 files changed, 11 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/lat_udp.c b/src/lat_udp.c
|
||||||
|
index cdd2e9b..4b4441b 100644
|
||||||
|
--- a/src/lat_udp.c
|
||||||
|
+++ b/src/lat_udp.c
|
||||||
|
@@ -19,7 +19,7 @@ char *id = "$Id$\n";
|
||||||
|
|
||||||
|
void client_main(int ac, char **av);
|
||||||
|
void server_main();
|
||||||
|
-void timeout();
|
||||||
|
+void timeout(int signum);
|
||||||
|
void init(iter_t iterations, void* cookie);
|
||||||
|
void cleanup(iter_t iterations, void* cookie);
|
||||||
|
void doit(iter_t iterations, void* cookie);
|
||||||
|
@@ -164,7 +164,7 @@ cleanup(iter_t iterations, void* cookie)
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
-timeout()
|
||||||
|
+timeout(int signum)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "Recv timed out\n");
|
||||||
|
exit(1);
|
||||||
|
diff --git a/src/lmdd.c b/src/lmdd.c
|
||||||
|
index dee37b4..529ae21 100644
|
||||||
|
--- a/src/lmdd.c
|
||||||
|
+++ b/src/lmdd.c
|
||||||
|
@@ -148,7 +148,7 @@ char *cmds[] = {
|
||||||
|
|
||||||
|
|
||||||
|
void error(char *);
|
||||||
|
-void done();
|
||||||
|
+void done(int signum);
|
||||||
|
#ifdef DBG
|
||||||
|
extern int dbg;
|
||||||
|
#endif
|
||||||
|
@@ -332,7 +332,7 @@ main(int ac, char **av)
|
||||||
|
register int moved;
|
||||||
|
|
||||||
|
if (gotcnt && count-- <= 0) {
|
||||||
|
- done();
|
||||||
|
+ done(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
@@ -445,7 +445,7 @@ main(int ac, char **av)
|
||||||
|
perror("read");
|
||||||
|
}
|
||||||
|
if (moved <= 0) {
|
||||||
|
- done();
|
||||||
|
+ done(0);
|
||||||
|
}
|
||||||
|
if (inpat != -1) {
|
||||||
|
register int foo, cnt;
|
||||||
|
@@ -458,7 +458,7 @@ main(int ac, char **av)
|
||||||
|
(uint)(off + foo*sizeof(int)),
|
||||||
|
buf[foo]);
|
||||||
|
if (mismatch != -1 && --misses == 0) {
|
||||||
|
- done();
|
||||||
|
+ done(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -523,7 +523,7 @@ main(int ac, char **av)
|
||||||
|
if (moved2 != moved) {
|
||||||
|
fprintf(stderr, "write: wanted=%d got=%d\n",
|
||||||
|
moved, moved2);
|
||||||
|
- done();
|
||||||
|
+ done(0);
|
||||||
|
}
|
||||||
|
if ((Wtmax != -1) || (Wtmin != -1)) {
|
||||||
|
int mics = stop(&start_tv, &stop_tv);
|
||||||
|
@@ -560,7 +560,7 @@ main(int ac, char **av)
|
||||||
|
perror("write");
|
||||||
|
}
|
||||||
|
if (moved2 != moved) {
|
||||||
|
- done();
|
||||||
|
+ done(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (touch) {
|
||||||
|
@@ -626,7 +626,7 @@ chkarg(char *arg)
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
-done(void)
|
||||||
|
+done(int signum)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
int step;
|
||||||
|
diff --git a/src/lmhttp.c b/src/lmhttp.c
|
||||||
|
index 41d9949..9b5d665 100644
|
||||||
|
--- a/src/lmhttp.c
|
||||||
|
+++ b/src/lmhttp.c
|
||||||
|
@@ -26,7 +26,7 @@ char *buf;
|
||||||
|
char *bufs[3];
|
||||||
|
int Dflg, dflg, nflg, lflg, fflg, zflg;
|
||||||
|
int data, logfile;
|
||||||
|
-void die();
|
||||||
|
+void die(int signum);
|
||||||
|
void worker();
|
||||||
|
char *http_time(void);
|
||||||
|
char *date(time_t *tt);
|
||||||
|
@@ -387,7 +387,7 @@ logit(int sock, char *name, int size)
|
||||||
|
nbytes += len;
|
||||||
|
}
|
||||||
|
|
||||||
|
-void die()
|
||||||
|
+void die(int signum)
|
||||||
|
{
|
||||||
|
if (nbytes) {
|
||||||
|
write(logfile, logbuf, nbytes);
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
115
package/lmbench/0008-Fixup-function-declarations.patch
Normal file
115
package/lmbench/0008-Fixup-function-declarations.patch
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
From 6255495abf4ea516aad3b447cc32d1b244229878 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Charlie Jenkins <charlie@rivosinc.com>
|
||||||
|
Date: Fri, 4 Apr 2025 15:48:07 -0700
|
||||||
|
Subject: [PATCH] Fixup function declarations
|
||||||
|
|
||||||
|
GCC-15 requires function declarations to be properly typed.
|
||||||
|
|
||||||
|
Upstream: dead
|
||||||
|
Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
|
||||||
|
---
|
||||||
|
src/bench.h | 4 ++--
|
||||||
|
src/lat_rpc.c | 18 +++++++-----------
|
||||||
|
src/lmdd.c | 4 ++--
|
||||||
|
3 files changed, 11 insertions(+), 15 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/bench.h b/src/bench.h
|
||||||
|
index 597d068..b1624c5 100644
|
||||||
|
--- a/src/bench.h
|
||||||
|
+++ b/src/bench.h
|
||||||
|
@@ -345,7 +345,7 @@ extern int sched_pin(int cpu);
|
||||||
|
#define XACT_VERS ((u_long)1)
|
||||||
|
#define RPC_XACT ((u_long)1)
|
||||||
|
#define RPC_EXIT ((u_long)2)
|
||||||
|
-extern char *rpc_xact_1();
|
||||||
|
-extern char *client_rpc_xact_1();
|
||||||
|
+extern char *rpc_xact_1(char *msg, register SVCXPRT *transp);
|
||||||
|
+extern char *client_rpc_xact_1(char *argp, CLIENT *clnt);
|
||||||
|
|
||||||
|
#endif /* _BENCH_H */
|
||||||
|
diff --git a/src/lat_rpc.c b/src/lat_rpc.c
|
||||||
|
index ff4380f..dcc24df 100644
|
||||||
|
--- a/src/lat_rpc.c
|
||||||
|
+++ b/src/lat_rpc.c
|
||||||
|
@@ -187,16 +187,14 @@ client_rpc_xact_1(char *argp, CLIENT *clnt)
|
||||||
|
*/
|
||||||
|
/* ARGSUSED */
|
||||||
|
char *
|
||||||
|
-rpc_xact_1(msg, transp)
|
||||||
|
- char *msg;
|
||||||
|
- register SVCXPRT *transp;
|
||||||
|
+rpc_xact_1(char *msg, register SVCXPRT *transp)
|
||||||
|
{
|
||||||
|
static char r = 123;
|
||||||
|
|
||||||
|
return &r;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static void xact_prog_1();
|
||||||
|
+static void xact_prog_1(struct svc_req *rqstp, register SVCXPRT *transp);
|
||||||
|
|
||||||
|
void
|
||||||
|
server_main()
|
||||||
|
@@ -234,16 +232,14 @@ server_main()
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
-xact_prog_1(rqstp, transp)
|
||||||
|
- struct svc_req *rqstp;
|
||||||
|
- register SVCXPRT *transp;
|
||||||
|
+xact_prog_1(struct svc_req *rqstp, register SVCXPRT *transp)
|
||||||
|
{
|
||||||
|
union {
|
||||||
|
char rpc_xact_1_arg;
|
||||||
|
} argument;
|
||||||
|
char *result;
|
||||||
|
- bool_t (*xdr_argument)(), (*xdr_result)();
|
||||||
|
- char *(*local)();
|
||||||
|
+ bool_t (*xdr_argument)(XDR *, char *), (*xdr_result)(XDR *, char *);
|
||||||
|
+ char *(*local)(char *, struct svc_req *);
|
||||||
|
|
||||||
|
switch (rqstp->rq_proc) {
|
||||||
|
case NULLPROC:
|
||||||
|
@@ -253,7 +249,7 @@ xact_prog_1(rqstp, transp)
|
||||||
|
case RPC_XACT:
|
||||||
|
xdr_argument = xdr_char;
|
||||||
|
xdr_result = xdr_char;
|
||||||
|
- local = (char *(*)()) rpc_xact_1;
|
||||||
|
+ local = (char *(*)(char *, struct svc_req *)) rpc_xact_1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RPC_EXIT:
|
||||||
|
@@ -270,7 +266,7 @@ xact_prog_1(rqstp, transp)
|
||||||
|
svcerr_decode(transp);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
- result = (*local)(&argument, rqstp);
|
||||||
|
+ result = (*local)((char *)&argument, rqstp);
|
||||||
|
if (result != NULL && !svc_sendreply(transp, (xdrproc_t)xdr_result, result)) {
|
||||||
|
svcerr_systemerr(transp);
|
||||||
|
}
|
||||||
|
diff --git a/src/lmdd.c b/src/lmdd.c
|
||||||
|
index 529ae21..197ac46 100644
|
||||||
|
--- a/src/lmdd.c
|
||||||
|
+++ b/src/lmdd.c
|
||||||
|
@@ -76,7 +76,7 @@ int norepeats = -1;
|
||||||
|
bds_msg *m1, *m2;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-uint64 getarg();
|
||||||
|
+uint64 getarg(char *s, int ac, char **av);
|
||||||
|
int been_there(uint64 off);
|
||||||
|
int getfile(char *s, int ac, char **av);
|
||||||
|
|
||||||
|
@@ -162,7 +162,7 @@ main(int ac, char **av)
|
||||||
|
int Fork, misses, mismatch, outpat, inpat, in, timeopen, gotcnt;
|
||||||
|
int slp;
|
||||||
|
uint64 skip, size, count;
|
||||||
|
- void chkarg();
|
||||||
|
+ void chkarg(char *arg);
|
||||||
|
int i;
|
||||||
|
uint64 off = 0;
|
||||||
|
int touch;
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
Reference in New Issue
Block a user