summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/daemontools-gcc14.patch561
-rw-r--r--gnu/packages/patches/libgcrypt-arm32-register-pressure.patch133
-rw-r--r--gnu/packages/patches/pcsxr-find-harfbuzz.patch21
-rw-r--r--gnu/packages/patches/pcsxr-fix-definitions.patch137
4 files changed, 852 insertions, 0 deletions
diff --git a/gnu/packages/patches/daemontools-gcc14.patch b/gnu/packages/patches/daemontools-gcc14.patch
new file mode 100644
index 0000000000..00b772bc3b
--- /dev/null
+++ b/gnu/packages/patches/daemontools-gcc14.patch
@@ -0,0 +1,561 @@
+Taken from Debian, see
+https://salsa.debian.org/debian/daemontools/-/blob/6b5584ccae6bd7c8cb6f47dd71062e3b1cd0a038/debian/patches/0005-fix-ftbfs.patch
+
+From: =?utf-8?b?SmFuIE1vasW+w63FoQ==?= <jan.mojzis@gmail.com>
+Date: Sat, 30 Mar 2024 10:15:13 +0100
+Subject: fix ftbfs
+
+Forwarded: no
+---
+ daemontools-0.76/src/chkshsgr.c | 3 ++-
+ daemontools-0.76/src/envdir.c | 2 +-
+ daemontools-0.76/src/envuidgid.c | 2 +-
+ daemontools-0.76/src/fghack.c | 6 ++++--
+ daemontools-0.76/src/matchtest.c | 1 +
+ daemontools-0.76/src/multilog.c | 3 ++-
+ daemontools-0.76/src/pathexec.h | 4 ++--
+ daemontools-0.76/src/pathexec_env.c | 6 +++---
+ daemontools-0.76/src/pathexec_run.c | 3 ++-
+ daemontools-0.76/src/pgrphack.c | 2 +-
+ daemontools-0.76/src/prot.c | 4 +++-
+ daemontools-0.76/src/seek_set.c | 1 +
+ daemontools-0.76/src/setlock.c | 2 +-
+ daemontools-0.76/src/setuidgid.c | 2 +-
+ daemontools-0.76/src/sgetopt.c | 2 +-
+ daemontools-0.76/src/sgetopt.h | 2 +-
+ daemontools-0.76/src/softlimit.c | 2 +-
+ daemontools-0.76/src/subgetopt.c | 2 +-
+ daemontools-0.76/src/subgetopt.h | 2 +-
+ daemontools-0.76/src/supervise.c | 6 ++++--
+ daemontools-0.76/src/svc.c | 2 +-
+ daemontools-0.76/src/svscan.c | 2 +-
+ daemontools-0.76/src/trycpp.c | 3 +++
+ daemontools-0.76/src/tryflock.c | 2 +-
+ daemontools-0.76/src/trypoll.c | 1 +
+ daemontools-0.76/src/trysgact.c | 2 +-
+ daemontools-0.76/src/trysgprm.c | 2 +-
+ daemontools-0.76/src/tryshsgr.c | 13 ++++++++-----
+ daemontools-0.76/src/tryulong64.c | 5 ++++-
+ daemontools-0.76/src/trywaitp.c | 2 +-
+ daemontools-0.76/src/uint64.h1 | 2 +-
+ daemontools-0.76/src/uint64.h2 | 5 +++--
+ daemontools-0.76/src/x86cpuid.c | 2 ++
+ 33 files changed, 62 insertions(+), 38 deletions(-)
+
+diff --git a/daemontools-0.76/src/chkshsgr.c b/daemontools-0.76/src/chkshsgr.c
+index 38c352d..470f565 100644
+--- a/daemontools-0.76/src/chkshsgr.c
++++ b/daemontools-0.76/src/chkshsgr.c
+@@ -1,12 +1,13 @@
+ /* Public domain. */
+
+ #include <unistd.h>
++#include <grp.h>
+
+ int main()
+ {
+ short x[4];
+
+ x[0] = x[1] = 0;
+- if (getgroups(1,x) == 0) if (setgroups(1,x) == -1) _exit(1);
++ if (getgroups(1,(gid_t *)x) == 0) if (setgroups(1,(gid_t *)x) == -1) _exit(1);
+ _exit(0);
+ }
+diff --git a/daemontools-0.76/src/envdir.c b/daemontools-0.76/src/envdir.c
+index beb1b1f..d02bc63 100644
+--- a/daemontools-0.76/src/envdir.c
++++ b/daemontools-0.76/src/envdir.c
+@@ -21,7 +21,7 @@ void nomem(void)
+
+ static stralloc sa;
+
+-int main(int argc,const char *const *argv)
++int main(int argc,char **argv)
+ {
+ int fdorigdir;
+ const char *fn;
+diff --git a/daemontools-0.76/src/envuidgid.c b/daemontools-0.76/src/envuidgid.c
+index 294960a..f097db1 100644
+--- a/daemontools-0.76/src/envuidgid.c
++++ b/daemontools-0.76/src/envuidgid.c
+@@ -15,7 +15,7 @@ char strnum[FMT_ULONG];
+ const char *account;
+ struct passwd *pw;
+
+-int main(int argc,const char *const *argv)
++int main(int argc,char **argv)
+ {
+ account = *++argv;
+ if (!account || !*++argv)
+diff --git a/daemontools-0.76/src/fghack.c b/daemontools-0.76/src/fghack.c
+index 34ca1db..262876a 100644
+--- a/daemontools-0.76/src/fghack.c
++++ b/daemontools-0.76/src/fghack.c
+@@ -9,12 +9,13 @@
+
+ int pid;
+
+-int main(int argc,const char * const *argv,const char * const *envp)
++int main(int argc,char **argv,char **envp)
+ {
+ char ch;
+ int wstat;
+ int pi[2];
+ int i;
++ int dummy;
+
+ if (!argv[1])
+ strerr_die1x(100,"fghack: usage: fghack child");
+@@ -28,7 +29,8 @@ int main(int argc,const char * const *argv,const char * const *envp)
+ case 0:
+ close(pi[0]);
+ for (i = 0;i < 30;++i)
+- dup(pi[1]);
++ dummy = dup(pi[1]);
++ (void) dummy;
+ pathexec_run(argv[1],argv + 1,envp);
+ strerr_die4sys(111,FATAL,"unable to run ",argv[1],": ");
+ }
+diff --git a/daemontools-0.76/src/matchtest.c b/daemontools-0.76/src/matchtest.c
+index 980dd1c..1bd4bbc 100644
+--- a/daemontools-0.76/src/matchtest.c
++++ b/daemontools-0.76/src/matchtest.c
+@@ -1,3 +1,4 @@
++#include <unistd.h>
+ #include "match.h"
+ #include "buffer.h"
+ #include "str.h"
+diff --git a/daemontools-0.76/src/multilog.c b/daemontools-0.76/src/multilog.c
+index be27a6a..ea02909 100644
+--- a/daemontools-0.76/src/multilog.c
++++ b/daemontools-0.76/src/multilog.c
+@@ -1,6 +1,7 @@
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <stdio.h>
+ #include "direntry.h"
+ #include "alloc.h"
+ #include "buffer.h"
+@@ -172,7 +173,7 @@ void finish(struct cyclog *d,const char *file,const char *code)
+
+ void startprocessor(struct cyclog *d)
+ {
+- const char *args[4];
++ char *args[4];
+ int fd;
+
+ sig_uncatch(sig_term);
+diff --git a/daemontools-0.76/src/pathexec.h b/daemontools-0.76/src/pathexec.h
+index 61da922..f984f77 100644
+--- a/daemontools-0.76/src/pathexec.h
++++ b/daemontools-0.76/src/pathexec.h
+@@ -3,8 +3,8 @@
+ #ifndef PATHEXEC_H
+ #define PATHEXEC_H
+
+-extern void pathexec_run(const char *,const char * const *,const char * const *);
++extern void pathexec_run(const char *,char **,char **);
+ extern int pathexec_env(const char *,const char *);
+-extern void pathexec(const char * const *);
++extern void pathexec(char **);
+
+ #endif
+diff --git a/daemontools-0.76/src/pathexec_env.c b/daemontools-0.76/src/pathexec_env.c
+index 2cb101c..a1404ad 100644
+--- a/daemontools-0.76/src/pathexec_env.c
++++ b/daemontools-0.76/src/pathexec_env.c
+@@ -22,9 +22,9 @@ int pathexec_env(const char *s,const char *t)
+ return stralloc_cat(&plus,&tmp);
+ }
+
+-void pathexec(const char *const *argv)
++void pathexec(char **argv)
+ {
+- const char **e;
++ char **e;
+ unsigned int elen;
+ unsigned int i;
+ unsigned int j;
+@@ -40,7 +40,7 @@ void pathexec(const char *const *argv)
+ if (!plus.s[i])
+ ++elen;
+
+- e = (const char **) alloc((elen + 1) * sizeof(char *));
++ e = (char **) alloc((elen + 1) * sizeof(char *));
+ if (!e) return;
+
+ elen = 0;
+diff --git a/daemontools-0.76/src/pathexec_run.c b/daemontools-0.76/src/pathexec_run.c
+index 1770ac7..7929144 100644
+--- a/daemontools-0.76/src/pathexec_run.c
++++ b/daemontools-0.76/src/pathexec_run.c
+@@ -1,5 +1,6 @@
+ /* Public domain. */
+
++#include <unistd.h>
+ #include "error.h"
+ #include "stralloc.h"
+ #include "str.h"
+@@ -8,7 +9,7 @@
+
+ static stralloc tmp;
+
+-void pathexec_run(const char *file,const char * const *argv,const char * const *envp)
++void pathexec_run(const char *file,char **argv,char **envp)
+ {
+ const char *path;
+ unsigned int split;
+diff --git a/daemontools-0.76/src/pgrphack.c b/daemontools-0.76/src/pgrphack.c
+index 9aa10dc..6b06a84 100644
+--- a/daemontools-0.76/src/pgrphack.c
++++ b/daemontools-0.76/src/pgrphack.c
+@@ -4,7 +4,7 @@
+
+ #define FATAL "pgrphack: fatal: "
+
+-int main(int argc,const char * const *argv,const char * const *envp)
++int main(int argc,char **argv,char **envp)
+ {
+ if (!argv[1]) strerr_die1x(100,"pgrphack: usage: pgrphack child");
+ setsid(); /* shouldn't fail; if it does, too bad */
+diff --git a/daemontools-0.76/src/prot.c b/daemontools-0.76/src/prot.c
+index 79a88c5..45af0ef 100644
+--- a/daemontools-0.76/src/prot.c
++++ b/daemontools-0.76/src/prot.c
+@@ -1,5 +1,7 @@
+ /* Public domain. */
+
++#include <unistd.h>
++#include <grp.h>
+ #include "hasshsgr.h"
+ #include "prot.h"
+
+@@ -8,7 +10,7 @@ int prot_gid(int gid)
+ #ifdef HASSHORTSETGROUPS
+ short x[2];
+ x[0] = gid; x[1] = 73; /* catch errors */
+- if (setgroups(1,x) == -1) return -1;
++ if (setgroups(1,(gid_t *)x) == -1) return -1;
+ #else
+ if (setgroups(1,&gid) == -1) return -1;
+ #endif
+diff --git a/daemontools-0.76/src/seek_set.c b/daemontools-0.76/src/seek_set.c
+index 19b8265..5299201 100644
+--- a/daemontools-0.76/src/seek_set.c
++++ b/daemontools-0.76/src/seek_set.c
+@@ -1,5 +1,6 @@
+ /* Public domain. */
+
++#include <unistd.h>
+ #include <sys/types.h>
+ #include "seek.h"
+
+diff --git a/daemontools-0.76/src/setlock.c b/daemontools-0.76/src/setlock.c
+index eec2192..d900540 100644
+--- a/daemontools-0.76/src/setlock.c
++++ b/daemontools-0.76/src/setlock.c
+@@ -14,7 +14,7 @@ void usage() {
+ int flagndelay = 0;
+ int flagx = 0;
+
+-int main(int argc,const char *const *argv,const char *const *envp)
++int main(int argc,char **argv,char **envp)
+ {
+ int opt;
+ int fd;
+diff --git a/daemontools-0.76/src/setuidgid.c b/daemontools-0.76/src/setuidgid.c
+index 8c683de..90485e9 100644
+--- a/daemontools-0.76/src/setuidgid.c
++++ b/daemontools-0.76/src/setuidgid.c
+@@ -9,7 +9,7 @@
+ const char *account;
+ struct passwd *pw;
+
+-int main(int argc,const char *const *argv,const char *const *envp)
++int main(int argc,char **argv,char **envp)
+ {
+ account = *++argv;
+ if (!account || !*++argv)
+diff --git a/daemontools-0.76/src/sgetopt.c b/daemontools-0.76/src/sgetopt.c
+index 8bb608f..1d6d9f4 100644
+--- a/daemontools-0.76/src/sgetopt.c
++++ b/daemontools-0.76/src/sgetopt.c
+@@ -27,7 +27,7 @@ Documentation in sgetopt.3.
+ int opterr = 1;
+ const char *optprogname = 0;
+
+-int getopt(int argc,const char *const *argv,const char *opts)
++int getopt(int argc,char **argv,const char *opts)
+ {
+ int c;
+ const char *s;
+diff --git a/daemontools-0.76/src/sgetopt.h b/daemontools-0.76/src/sgetopt.h
+index bf8bce6..6a6e111 100644
+--- a/daemontools-0.76/src/sgetopt.h
++++ b/daemontools-0.76/src/sgetopt.h
+@@ -16,7 +16,7 @@
+
+ #include "subgetopt.h"
+
+-extern int sgetoptmine(int,const char *const *,const char *);
++extern int sgetoptmine(int,char **,const char *);
+ extern int sgetopterr;
+ extern const char *sgetoptprogname;
+
+diff --git a/daemontools-0.76/src/softlimit.c b/daemontools-0.76/src/softlimit.c
+index 8be40b8..4d9f81e 100644
+--- a/daemontools-0.76/src/softlimit.c
++++ b/daemontools-0.76/src/softlimit.c
+@@ -36,7 +36,7 @@ void doit(int resource,const char *arg)
+ strerr_die2sys(111,FATAL,"setrlimit failed: ");
+ }
+
+-int main(int argc,const char *const *argv,const char *const *envp)
++int main(int argc,char **argv,char **envp)
+ {
+ int opt;
+
+diff --git a/daemontools-0.76/src/subgetopt.c b/daemontools-0.76/src/subgetopt.c
+index 266e72a..bbbbb6c 100644
+--- a/daemontools-0.76/src/subgetopt.c
++++ b/daemontools-0.76/src/subgetopt.c
+@@ -16,7 +16,7 @@ const char *optarg = 0;
+ int optproblem = 0;
+ int optdone = SUBGETOPTDONE;
+
+-int sgopt(int argc,const char *const *argv,const char *opts)
++int sgopt(int argc,char **argv,const char *opts)
+ {
+ int c;
+ const char *s;
+diff --git a/daemontools-0.76/src/subgetopt.h b/daemontools-0.76/src/subgetopt.h
+index 41ad26a..7e5636e 100644
+--- a/daemontools-0.76/src/subgetopt.h
++++ b/daemontools-0.76/src/subgetopt.h
+@@ -15,7 +15,7 @@
+
+ #define SUBGETOPTDONE -1
+
+-extern int subgetopt(int,const char *const *,const char *);
++extern int subgetopt(int,char **,const char *);
+ extern const char *subgetoptarg;
+ extern int subgetoptind;
+ extern int subgetoptpos;
+diff --git a/daemontools-0.76/src/supervise.c b/daemontools-0.76/src/supervise.c
+index 483e9a2..3a27f42 100644
+--- a/daemontools-0.76/src/supervise.c
++++ b/daemontools-0.76/src/supervise.c
+@@ -2,6 +2,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <signal.h>
++#include <stdio.h>
+ #include "sig.h"
+ #include "strerr.h"
+ #include "error.h"
+@@ -81,10 +82,11 @@ void announce(void)
+
+ void trigger(void)
+ {
+- write(selfpipe[1],"",1);
++ int dummy = write(selfpipe[1],"",1);
++ (void) dummy;
+ }
+
+-const char *run[2] = { "./run", 0 };
++char *run[2] = { "./run", 0 };
+
+ int flagfailed = 0;
+
+diff --git a/daemontools-0.76/src/svc.c b/daemontools-0.76/src/svc.c
+index 08e9a5c..aae2d9d 100644
+--- a/daemontools-0.76/src/svc.c
++++ b/daemontools-0.76/src/svc.c
+@@ -19,7 +19,7 @@ char bspace[1];
+
+ int fdorigdir;
+
+-int main(int argc,const char *const *argv)
++int main(int argc,char **argv)
+ {
+ int opt;
+ int fd;
+diff --git a/daemontools-0.76/src/svscan.c b/daemontools-0.76/src/svscan.c
+index 15a8c89..39b8887 100644
+--- a/daemontools-0.76/src/svscan.c
++++ b/daemontools-0.76/src/svscan.c
+@@ -36,7 +36,7 @@ void start(char *fn)
+ struct stat st;
+ int child;
+ int i;
+- const char *args[3];
++ char *args[3];
+
+ if (fn[0] == '.') return;
+
+diff --git a/daemontools-0.76/src/trycpp.c b/daemontools-0.76/src/trycpp.c
+index e4503d4..70bc8d6 100644
+--- a/daemontools-0.76/src/trycpp.c
++++ b/daemontools-0.76/src/trycpp.c
+@@ -1,5 +1,8 @@
+ /* Public domain. */
+
++#include <stdio.h>
++#include <stdlib.h>
++
+ int main()
+ {
+ #ifdef NeXT
+diff --git a/daemontools-0.76/src/tryflock.c b/daemontools-0.76/src/tryflock.c
+index a82ffc2..68599d3 100644
+--- a/daemontools-0.76/src/tryflock.c
++++ b/daemontools-0.76/src/tryflock.c
+@@ -4,7 +4,7 @@
+ #include <sys/file.h>
+ #include <fcntl.h>
+
+-main()
++int main()
+ {
+ flock(0,LOCK_EX | LOCK_UN | LOCK_NB);
+ }
+diff --git a/daemontools-0.76/src/trypoll.c b/daemontools-0.76/src/trypoll.c
+index 6506617..a7b26df 100644
+--- a/daemontools-0.76/src/trypoll.c
++++ b/daemontools-0.76/src/trypoll.c
+@@ -3,6 +3,7 @@
+ #include <sys/types.h>
+ #include <fcntl.h>
+ #include <poll.h>
++#include <unistd.h>
+
+ int main()
+ {
+diff --git a/daemontools-0.76/src/trysgact.c b/daemontools-0.76/src/trysgact.c
+index e264ef2..841b88a 100644
+--- a/daemontools-0.76/src/trysgact.c
++++ b/daemontools-0.76/src/trysgact.c
+@@ -2,7 +2,7 @@
+
+ #include <signal.h>
+
+-main()
++int main()
+ {
+ struct sigaction sa;
+ sa.sa_handler = 0;
+diff --git a/daemontools-0.76/src/trysgprm.c b/daemontools-0.76/src/trysgprm.c
+index a46c82c..3e78a82 100644
+--- a/daemontools-0.76/src/trysgprm.c
++++ b/daemontools-0.76/src/trysgprm.c
+@@ -2,7 +2,7 @@
+
+ #include <signal.h>
+
+-main()
++int main()
+ {
+ sigset_t ss;
+
+diff --git a/daemontools-0.76/src/tryshsgr.c b/daemontools-0.76/src/tryshsgr.c
+index c5ed6d6..ba298a7 100644
+--- a/daemontools-0.76/src/tryshsgr.c
++++ b/daemontools-0.76/src/tryshsgr.c
+@@ -1,16 +1,19 @@
+ /* Public domain. */
+
++#include <unistd.h>
++#include <grp.h>
++
+ int main()
+ {
+ short x[4];
+-
++
+ x[0] = x[1] = 1;
+- if (getgroups(1,x) == 0) if (setgroups(1,x) == -1) _exit(1);
+-
+- if (getgroups(1,x) == -1) _exit(1);
++ if (getgroups(1,(gid_t *)x) == 0) if (setgroups(1,(gid_t *)x) == -1) _exit(1);
++
++ if (getgroups(1,(gid_t *)x) == -1) _exit(1);
+ if (x[1] != 1) _exit(1);
+ x[1] = 2;
+- if (getgroups(1,x) == -1) _exit(1);
++ if (getgroups(1,(gid_t *)x) == -1) _exit(1);
+ if (x[1] != 2) _exit(1);
+ _exit(0);
+ }
+diff --git a/daemontools-0.76/src/tryulong64.c b/daemontools-0.76/src/tryulong64.c
+index 003548a..f3b111d 100644
+--- a/daemontools-0.76/src/tryulong64.c
++++ b/daemontools-0.76/src/tryulong64.c
+@@ -1,8 +1,11 @@
+ /* Public domain. */
+
++#include <unistd.h>
++#include <stdint.h>
++
+ int main()
+ {
+- unsigned long u;
++ uint64_t u;
+ u = 1;
+ u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u;
+ u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u;
+diff --git a/daemontools-0.76/src/trywaitp.c b/daemontools-0.76/src/trywaitp.c
+index 319b81f..76b3329 100644
+--- a/daemontools-0.76/src/trywaitp.c
++++ b/daemontools-0.76/src/trywaitp.c
+@@ -3,7 +3,7 @@
+ #include <sys/types.h>
+ #include <sys/wait.h>
+
+-main()
++int main()
+ {
+ waitpid(0,0,0);
+ }
+diff --git a/daemontools-0.76/src/uint64.h1 b/daemontools-0.76/src/uint64.h1
+index 486a380..fde25ca 100644
+--- a/daemontools-0.76/src/uint64.h1
++++ b/daemontools-0.76/src/uint64.h1
+@@ -3,7 +3,7 @@
+ #ifndef UINT64_H
+ #define UINT64_H
+
+-/* sysdep: -ulong64 */
++/* sysdep: -uint64_t */
+
+ typedef unsigned long long uint64;
+
+diff --git a/daemontools-0.76/src/uint64.h2 b/daemontools-0.76/src/uint64.h2
+index 8869e43..fd134f2 100644
+--- a/daemontools-0.76/src/uint64.h2
++++ b/daemontools-0.76/src/uint64.h2
+@@ -3,8 +3,9 @@
+ #ifndef UINT64_H
+ #define UINT64_H
+
+-/* sysdep: +ulong64 */
++/* sysdep: +uint64_t */
+
+-typedef unsigned long uint64;
++#include <stdint.h>
++typedef uint64_t uint64;
+
+ #endif
+diff --git a/daemontools-0.76/src/x86cpuid.c b/daemontools-0.76/src/x86cpuid.c
+index f81c593..122eed1 100644
+--- a/daemontools-0.76/src/x86cpuid.c
++++ b/daemontools-0.76/src/x86cpuid.c
+@@ -1,6 +1,8 @@
+ /* Public domain. */
+
+ #include <signal.h>
++#include <stdlib.h>
++#include <stdio.h>
+
+ void nope()
+ {
diff --git a/gnu/packages/patches/libgcrypt-arm32-register-pressure.patch b/gnu/packages/patches/libgcrypt-arm32-register-pressure.patch
new file mode 100644
index 0000000000..9eff5c42e1
--- /dev/null
+++ b/gnu/packages/patches/libgcrypt-arm32-register-pressure.patch
@@ -0,0 +1,133 @@
+This patch is from upstream and probably can be dropped with any version
+after 1.11.0.
+
+From 9c93b4607adcf9b3efd53aba43e2d33bf5aef9df Mon Sep 17 00:00:00 2001
+From: Jussi Kivilinna <jussi.kivilinna@iki.fi>
+Date: Sun, 4 Aug 2024 18:04:49 +0300
+Subject: [PATCH] mpi/ec-inline: reduce register pressure on 32-bit ARM
+
+* mpi/ec-inline.h [HAVE_COMPATIBLE_GCC_ARM_PLATFORM_AS] (ADD4_LIMB32)
+(ADD6_LIMB32, SUB4_LIMB32, SUB6_LIMB32): Reuse input registers
+as output (use just two unique operators).
+--
+
+This fixes building ec-nist.c with GCC-14 on 32-bit ARM.
+
+GnuPG-bug-id: 7226
+Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
+---
+ mpi/ec-inline.h | 63 ++++++++++++++++++++++++-------------------------
+ 1 file changed, 31 insertions(+), 32 deletions(-)
+
+diff --git a/mpi/ec-inline.h b/mpi/ec-inline.h
+index c24d5352..3a526246 100644
+--- a/mpi/ec-inline.h
++++ b/mpi/ec-inline.h
+@@ -836,18 +836,18 @@ LIMB64_HILO(mpi_limb_t hi, mpi_limb_t lo)
+ #ifdef HAVE_COMPATIBLE_GCC_ARM_PLATFORM_AS
+
+ #define ADD4_LIMB32(A3, A2, A1, A0, B3, B2, B1, B0, C3, C2, C1, C0) \
+- __asm__ ("adds %3, %7, %11\n" \
+- "adcs %2, %6, %10\n" \
+- "adcs %1, %5, %9\n" \
+- "adc %0, %4, %8\n" \
++ __asm__ ("adds %3, %3, %11\n" \
++ "adcs %2, %2, %10\n" \
++ "adcs %1, %1, %9\n" \
++ "adc %0, %0, %8\n" \
+ : "=r" (A3), \
+ "=&r" (A2), \
+ "=&r" (A1), \
+ "=&r" (A0) \
+- : "r" ((mpi_limb_t)(B3)), \
+- "r" ((mpi_limb_t)(B2)), \
+- "r" ((mpi_limb_t)(B1)), \
+- "r" ((mpi_limb_t)(B0)), \
++ : "0" ((mpi_limb_t)(B3)), \
++ "1" ((mpi_limb_t)(B2)), \
++ "2" ((mpi_limb_t)(B1)), \
++ "3" ((mpi_limb_t)(B0)), \
+ "Ir" ((mpi_limb_t)(C3)), \
+ "Ir" ((mpi_limb_t)(C2)), \
+ "Ir" ((mpi_limb_t)(C1)), \
+@@ -857,18 +857,18 @@ LIMB64_HILO(mpi_limb_t hi, mpi_limb_t lo)
+ #define ADD6_LIMB32(A5, A4, A3, A2, A1, A0, B5, B4, B3, B2, B1, B0, \
+ C5, C4, C3, C2, C1, C0) do { \
+ mpi_limb_t __carry6_32; \
+- __asm__ ("adds %3, %7, %10\n" \
+- "adcs %2, %6, %9\n" \
+- "adcs %1, %5, %8\n" \
+- "adc %0, %4, %4\n" \
++ __asm__ ("adds %3, %3, %10\n" \
++ "adcs %2, %2, %9\n" \
++ "adcs %1, %1, %8\n" \
++ "adc %0, %0, %0\n" \
+ : "=r" (__carry6_32), \
+ "=&r" (A2), \
+ "=&r" (A1), \
+ "=&r" (A0) \
+- : "r" ((mpi_limb_t)(0)), \
+- "r" ((mpi_limb_t)(B2)), \
+- "r" ((mpi_limb_t)(B1)), \
+- "r" ((mpi_limb_t)(B0)), \
++ : "0" ((mpi_limb_t)(0)), \
++ "1" ((mpi_limb_t)(B2)), \
++ "2" ((mpi_limb_t)(B1)), \
++ "3" ((mpi_limb_t)(B0)), \
+ "Ir" ((mpi_limb_t)(C2)), \
+ "Ir" ((mpi_limb_t)(C1)), \
+ "Ir" ((mpi_limb_t)(C0)) \
+@@ -878,18 +878,18 @@ LIMB64_HILO(mpi_limb_t hi, mpi_limb_t lo)
+ } while (0)
+
+ #define SUB4_LIMB32(A3, A2, A1, A0, B3, B2, B1, B0, C3, C2, C1, C0) \
+- __asm__ ("subs %3, %7, %11\n" \
+- "sbcs %2, %6, %10\n" \
+- "sbcs %1, %5, %9\n" \
+- "sbc %0, %4, %8\n" \
++ __asm__ ("subs %3, %3, %11\n" \
++ "sbcs %2, %2, %10\n" \
++ "sbcs %1, %1, %9\n" \
++ "sbc %0, %0, %8\n" \
+ : "=r" (A3), \
+ "=&r" (A2), \
+ "=&r" (A1), \
+ "=&r" (A0) \
+- : "r" ((mpi_limb_t)(B3)), \
+- "r" ((mpi_limb_t)(B2)), \
+- "r" ((mpi_limb_t)(B1)), \
+- "r" ((mpi_limb_t)(B0)), \
++ : "0" ((mpi_limb_t)(B3)), \
++ "1" ((mpi_limb_t)(B2)), \
++ "2" ((mpi_limb_t)(B1)), \
++ "3" ((mpi_limb_t)(B0)), \
+ "Ir" ((mpi_limb_t)(C3)), \
+ "Ir" ((mpi_limb_t)(C2)), \
+ "Ir" ((mpi_limb_t)(C1)), \
+@@ -899,18 +899,17 @@ LIMB64_HILO(mpi_limb_t hi, mpi_limb_t lo)
+ #define SUB6_LIMB32(A5, A4, A3, A2, A1, A0, B5, B4, B3, B2, B1, B0, \
+ C5, C4, C3, C2, C1, C0) do { \
+ mpi_limb_t __borrow6_32; \
+- __asm__ ("subs %3, %7, %10\n" \
+- "sbcs %2, %6, %9\n" \
+- "sbcs %1, %5, %8\n" \
+- "sbc %0, %4, %4\n" \
++ __asm__ ("subs %3, %3, %9\n" \
++ "sbcs %2, %2, %8\n" \
++ "sbcs %1, %1, %7\n" \
++ "sbc %0, %0, %0\n" \
+ : "=r" (__borrow6_32), \
+ "=&r" (A2), \
+ "=&r" (A1), \
+ "=&r" (A0) \
+- : "r" ((mpi_limb_t)(0)), \
+- "r" ((mpi_limb_t)(B2)), \
+- "r" ((mpi_limb_t)(B1)), \
+- "r" ((mpi_limb_t)(B0)), \
++ : "1" ((mpi_limb_t)(B2)), \
++ "2" ((mpi_limb_t)(B1)), \
++ "3" ((mpi_limb_t)(B0)), \
+ "Ir" ((mpi_limb_t)(C2)), \
+ "Ir" ((mpi_limb_t)(C1)), \
+ "Ir" ((mpi_limb_t)(C0)) \
+--
diff --git a/gnu/packages/patches/pcsxr-find-harfbuzz.patch b/gnu/packages/patches/pcsxr-find-harfbuzz.patch
new file mode 100644
index 0000000000..69932d719e
--- /dev/null
+++ b/gnu/packages/patches/pcsxr-find-harfbuzz.patch
@@ -0,0 +1,21 @@
+The .cmake files this project includes don't play well with harfbuzz's internal .cmake file.
+This patch works around the issues present in the project's CMake configuration.
+
+diff --git a/cmake/FindPango.cmake b/cmake/FindPango.cmake
+index 2a7da99d..c08fbaab 100644
+--- a/cmake/FindPango.cmake
++++ b/cmake/FindPango.cmake
+@@ -74,6 +74,13 @@ foreach(pango_dep ${Pango_DEPS})
+ set_property (TARGET "${Pango}" APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${${pango_dep}}")
+ endforeach(pango_dep)
+
++if(NOT HARFBUZZ_INCLUDE_DIR)
++find_package(harfbuzz)
++endif()
++
++list(APPEND Pango_INCLUDE_DIRS ${HARFBUZZ_INCLUDE_DIR})
++set_property (TARGET "${Pango}" APPEND PROPERTY INTERFACE_LINK_LIBRARIES "harfbuzz::harfbuzz")
++
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(Pango
+ REQUIRED_VARS
diff --git a/gnu/packages/patches/pcsxr-fix-definitions.patch b/gnu/packages/patches/pcsxr-fix-definitions.patch
new file mode 100644
index 0000000000..8ec389ec09
--- /dev/null
+++ b/gnu/packages/patches/pcsxr-fix-definitions.patch
@@ -0,0 +1,137 @@
+There are a lot of global variable definitions that aren't valid on modern compilers. According to upstream's Dockerfile,
+this project is meant to compile with GCC 6! So there are some declarations that need to be changed.
+
+diff --git a/gui/Linux.h b/gui/Linux.h
+index 2a939050..99404d93 100644
+--- a/gui/Linux.h
++++ b/gui/Linux.h
+@@ -44,8 +44,8 @@
+
+ extern gboolean UseGui;
+ extern int StatesC;
+-char cfgfile[MAXPATHLEN]; /* ADB Comment this out - make a local var, or at least use gchar funcs */
+-char cfgfile_basename[MAXPATHLEN]; /* ADB Comment this out - make a local var, or at least use gchar funcs */
++extern char cfgfile[MAXPATHLEN]; /* ADB Comment this out - make a local var, or at least use gchar funcs */
++extern char cfgfile_basename[MAXPATHLEN]; /* ADB Comment this out - make a local var, or at least use gchar funcs */
+
+ int LoadConfig();
+ void SaveConfig();
+diff --git a/gui/LnxMain.c b/gui/LnxMain.c
+index d6dd9316..02002bc1 100644
+--- a/gui/LnxMain.c
++++ b/gui/LnxMain.c
+@@ -49,6 +49,9 @@ enum {
+
+ gboolean UseGui = TRUE;
+
++char cfgfile[MAXPATHLEN] = {0};
++char cfgfile_basename[MAXPATHLEN] = {0};
++
+ static void CreateMemcard(char *filename, char *conf_mcd) {
+ gchar *mcd;
+ struct stat buf;
+diff --git a/plugins/bladesio1/sio1.c b/plugins/bladesio1/sio1.c
+index 17ac4b65..c6fd585a 100644
+--- a/plugins/bladesio1/sio1.c
++++ b/plugins/bladesio1/sio1.c
+@@ -55,8 +55,6 @@ static const unsigned char build = 1;
+
+ static void (CALLBACK *irqCallback)(void) = 0;
+
+-Settings settings;
+-
+ /* sio status flags.
+ */
+ enum {
+diff --git a/plugins/dfinput/pad.h b/plugins/dfinput/pad.h
+index 8337fe7e..6d44851d 100644
+--- a/plugins/dfinput/pad.h
++++ b/plugins/dfinput/pad.h
+@@ -151,7 +151,7 @@ typedef struct tagKeyDef {
+ enum { ANALOG_XP = 0, ANALOG_XM, ANALOG_YP, ANALOG_YM };
+
+ #if SDL_VERSION_ATLEAST(2,0,0)
+-SDL_GameControllerButton controllerMap[DKEY_TOTAL];
++extern SDL_GameControllerButton controllerMap[DKEY_TOTAL];
+ #endif
+
+ typedef struct tagPadDef {
+diff --git a/plugins/dfnet/cfg.c b/plugins/dfnet/cfg.c
+index 921efbe3..1057426a 100644
+--- a/plugins/dfnet/cfg.c
++++ b/plugins/dfnet/cfg.c
+@@ -11,6 +11,8 @@
+
+ #include "dfnet.h"
+
++Config conf;
++
+ #define CFG_FILENAME "dfnet.cfg"
+
+ void SaveConf() {
+diff --git a/plugins/dfnet/dfnet.c b/plugins/dfnet/dfnet.c
+index 6c6ec5f9..ddc92169 100644
+--- a/plugins/dfnet/dfnet.c
++++ b/plugins/dfnet/dfnet.c
+@@ -24,6 +24,9 @@ const unsigned char build = 3; // increase that with each version
+
+ static char *libraryName = N_("Socket Driver");
+
++fd_set rset;
++fd_set wset;
++
+ unsigned long CALLBACK PSEgetLibType(void) {
+ return PSE_LT_NET;
+ }
+diff --git a/plugins/dfnet/dfnet.h b/plugins/dfnet/dfnet.h
+index 937814f5..e2699ad3 100644
+--- a/plugins/dfnet/dfnet.h
++++ b/plugins/dfnet/dfnet.h
+@@ -56,7 +56,7 @@ __private_extern char* PLUGLOC(char* toloc);
+
+ typedef void* HWND;
+
+-struct timeval tm;
++extern struct timeval tm;
+
+ #define CALLBACK
+
+@@ -70,24 +70,24 @@ typedef struct {
+ char ipAddress[32];
+ } Config;
+
+-Config conf;
++extern Config conf;
+
+ void LoadConf(void);
+ void SaveConf(void);
+
+-int sock;
+-char *PadSendData;
+-char *PadRecvData;
+-char PadSendSize;
+-char PadRecvSize;
+-char PadSize[2];
+-int PadCount;
+-int PadCountMax;
+-int PadInit;
+-int Ping;
+-volatile int WaitCancel;
+-fd_set rset;
+-fd_set wset;
++extern int sock;
++extern char *PadSendData;
++extern char *PadRecvData;
++extern char PadSendSize;
++extern char PadRecvSize;
++extern char PadSize[2];
++extern int PadCount;
++extern int PadCountMax;
++extern int PadInit;
++extern int Ping;
++extern volatile int WaitCancel;
++extern fd_set rset;
++extern fd_set wset;
+
+ long sockInit(void);
+ long sockShutdown(void);