From 4a91ccf9ffe5e64f5783af4ab8afa5afae1280b5 Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Thu, 23 May 2024 07:04:03 +0000 Subject: [PATCH 1/5] tslib: fix gcc-14 build temporary fix until tslib can be updated fixes missing header src/ts_reconfig.c: In function 'ts_reconfig': src/ts_reconfig.c:43:9: error: implicit declaration of function 'memset' [-Wimplicit-function-declaration] 43 | memset(ts, 0, sizeof(struct tsdev)); | ^~~~~~ src/ts_reconfig.c:21:1: note: include '' or provide a declaration of 'memset' 20 | #include "tslib-private.h" +++ |+#include 21 | src/ts_reconfig.c:43:9: warning:incompatible implicit declaration of built-in function 'memset' [-Wbuiltin-declaration-mismatch] 43 | memset(ts, 0, sizeof(struct tsdev)); | ^~~~~~ src/ts_reconfig.c:43:9: note: include '' or provide a declaration of 'memset' --- .../tslib/patches/tslib-40-fix-gcc-14-1.patch | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 packages/addons/addon-depends/tslib/patches/tslib-40-fix-gcc-14-1.patch diff --git a/packages/addons/addon-depends/tslib/patches/tslib-40-fix-gcc-14-1.patch b/packages/addons/addon-depends/tslib/patches/tslib-40-fix-gcc-14-1.patch new file mode 100644 index 00000000000..ebe66e28c96 --- /dev/null +++ b/packages/addons/addon-depends/tslib/patches/tslib-40-fix-gcc-14-1.patch @@ -0,0 +1,10 @@ +--- a/src/ts_reconfig.c 2024-05-23 07:01:59.264165839 +0000 ++++ b/src/ts_reconfig.c 2024-05-23 07:01:54.034129359 +0000 +@@ -16,6 +16,7 @@ + #include + #endif + #include ++#include + + #include "tslib-private.h" + From 37cf54fd4d254df846f7dea5c300e3d215de53a9 Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Thu, 23 May 2024 07:22:15 +0000 Subject: [PATCH 2/5] libretro-picodrive: fix gcc-14 build on arm32 Fix build on arm32 pico/carthw/svp/compiler.c: In function 'ssp_translate_block': pico/carthw/svp/compiler.c:1800:24: error: passing argument 1 of 'rfflush' from incompatible pointer type [-Wincompatible-pointer-types] 1800 | fflush(stdout); | ^~~~~~ | | | FILE * In file included from ./pico/pico_port.h:12, from ./pico/pico_int.h:15, from pico/carthw/svp/compiler.c:9: platform/libretro/libretro-common/include/streams/file_stream_transforms.h:89:25: note: expected 'RFILE *' but argument is of type 'FILE *' 89 | int64_t rfflush(RFILE * stream); | ~~~~~~~~^~~~~~ --- .../patches/picodrive-02-fix-build-gcc-14-1.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 packages/emulation/libretro-picodrive/patches/picodrive-02-fix-build-gcc-14-1.patch diff --git a/packages/emulation/libretro-picodrive/patches/picodrive-02-fix-build-gcc-14-1.patch b/packages/emulation/libretro-picodrive/patches/picodrive-02-fix-build-gcc-14-1.patch new file mode 100644 index 00000000000..64eba3aae01 --- /dev/null +++ b/packages/emulation/libretro-picodrive/patches/picodrive-02-fix-build-gcc-14-1.patch @@ -0,0 +1,11 @@ +--- a/pico/carthw/svp/compiler.c 2024-05-23 07:19:59.237513012 +0000 ++++ b/pico/carthw/svp/compiler.c 2024-05-23 07:19:48.767443545 +0000 +@@ -1797,7 +1797,7 @@ + + if (tcache_ptr - (u32 *)tcache > DRC_TCACHE_SIZE/4) { + elprintf(EL_ANOMALY|EL_STATUS|EL_SVP, "tcache overflow!\n"); +- fflush(stdout); ++ fflush((RFILE *)stdout); + exit(1); + } + From efc9c7e4d18e3a4a569b88feb90800c876666643 Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Thu, 23 May 2024 08:01:53 +0000 Subject: [PATCH 3/5] unclutter: fix gcc-14 build --- .../unclutter-0001-fix-gcc-14-1-build.patch | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 packages/addons/addon-depends/chrome-depends/unclutter/patches/unclutter-0001-fix-gcc-14-1-build.patch diff --git a/packages/addons/addon-depends/chrome-depends/unclutter/patches/unclutter-0001-fix-gcc-14-1-build.patch b/packages/addons/addon-depends/chrome-depends/unclutter/patches/unclutter-0001-fix-gcc-14-1-build.patch new file mode 100644 index 00000000000..bdd48358c43 --- /dev/null +++ b/packages/addons/addon-depends/chrome-depends/unclutter/patches/unclutter-0001-fix-gcc-14-1-build.patch @@ -0,0 +1,74 @@ +--- a/unclutter.c 2007-02-05 23:13:12.000000000 +0000 ++++ b/unclutter.c 2024-05-23 07:41:37.115416042 +0000 +@@ -37,14 +37,15 @@ + #include + #include + #include ++#include + #include "vroot.h" + + char *progname; +-pexit(str)char *str;{ ++int pexit(str)char *str;{ + fprintf(stderr,"%s: %s\n",progname,str); + exit(1); + } +-usage(){ ++void usage(){ + pexit("usage:\n\ + -display \n\ + -idle time between polls to detect idleness.\n\ +@@ -79,6 +80,7 @@ + { + if(error->error_code!=BadWindow) + (*defaulthandler)(display,error); ++ return 0; + } + + char **names; /* -> argv list of names to avoid */ +@@ -87,7 +89,7 @@ + * return true if window has a wm_name and the start of it matches + * one of the given names to avoid + */ +-nameinlist(display,window) ++int nameinlist(display,window) + Display *display; + Window window; + { +@@ -109,7 +111,7 @@ + * return true if window has a wm_name and one of the given names to avoid + * matches anywhere in that string + */ +-matchinlist(display,window) ++int matchinlist(display,window) + Display *display; + Window window; + { +@@ -131,7 +133,7 @@ + /* + * create a small 1x1 cursor with all pixels masked out on the given screen. + */ +-createnullcursor(display,root) ++Cursor createnullcursor(display,root) + Display *display; + Window root; + { +@@ -155,7 +157,7 @@ + return cursor; + } + +-main(argc,argv)char **argv;{ ++int main(argc,argv)int argc;char **argv;{ + Display *display; + int screen,oldx = -99,oldy = -99,numscreens; + int doroot = 0, jitter = 0, idletime = 5, usegrabmethod = 0, waitagain = 0, +--- a/vroot.h 2007-02-05 22:52:40.000000000 +0000 ++++ b/vroot.h 2024-05-23 07:59:50.811488716 +0000 +@@ -40,6 +40,7 @@ + static Window + VirtualRootWindow(dpy, screen) + Display *dpy; ++int screen; + { + static Display *save_dpy = (Display *)0; + static int save_screen = -1; From 5df56b74ea876de4c817af00739e0a08373d4efe Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Thu, 23 May 2024 08:52:38 +0000 Subject: [PATCH 4/5] aom: workaround gcc-14 error on 32-bit targets ref: - https://bugs.chromium.org/p/aomedia/issues/detail?id=3576 --- packages/multimedia/aom/package.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/multimedia/aom/package.mk b/packages/multimedia/aom/package.mk index 50d6d5ccfd0..53468a3f532 100644 --- a/packages/multimedia/aom/package.mk +++ b/packages/multimedia/aom/package.mk @@ -17,6 +17,11 @@ PKG_CMAKE_OPTS_TARGET="-DENABLE_CCACHE=1 \ -DENABLE_TESTS=0 \ -DENABLE_TOOLS=0" +#workaround gcc-14 erroring with neon declarations +if [ "${ARCH}" = "arm" ]; then + TARGET_CFLAGS+=" -Wno-implicit-function-declaration" +fi + if [ "${TARGET_ARCH}" = "x86_64" ]; then PKG_DEPENDS_TARGET+=" nasm:host" elif ! target_has_feature neon; then From 0b387bf22296305e9f19ac65fe437e69bf1721dc Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Sat, 4 May 2024 12:42:19 +0000 Subject: [PATCH 5/5] lcdd: fix gcc-14 build --- .../service/lcdd/patches/lcdd-0.5.6-dm140_henlar_v0.2.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/addons/service/lcdd/patches/lcdd-0.5.6-dm140_henlar_v0.2.patch b/packages/addons/service/lcdd/patches/lcdd-0.5.6-dm140_henlar_v0.2.patch index 999ceeeb312..64f83f92045 100644 --- a/packages/addons/service/lcdd/patches/lcdd-0.5.6-dm140_henlar_v0.2.patch +++ b/packages/addons/service/lcdd/patches/lcdd-0.5.6-dm140_henlar_v0.2.patch @@ -141,7 +141,7 @@ index 0000000..56f9219 + p->gFlags = 0; + p->gDisplayMode = VFD_MODE_NONE; + -+ if ((p->framebuf = (char *) calloc(1, p->height)) == NULL) ++ if ((p->framebuf = (char **) calloc(1, p->height)) == NULL) + { + report(RPT_CRIT, "Allocating memory for framebuffer Failed\n"); + return -1; @@ -362,7 +362,7 @@ new file mode 100644 index 0000000..0bb565c --- /dev/null +++ b/server/drivers/led.c -@@ -0,0 +1,1065 @@ +@@ -0,0 +1,1066 @@ +/* File modified by Henrik Larsson 2007 to interface with LCDproc API + */ + @@ -394,6 +394,7 @@ index 0000000..0bb565c +#include "libvfd.h" +#include "shared/report.h" +#include "dm140.h" ++#include "led.h" + + +//**************************************************************