diff options
Diffstat (limited to 'gnu/packages/patches')
4 files changed, 226 insertions, 169 deletions
diff --git a/gnu/packages/patches/fpc-glibc-2.34-compat.patch b/gnu/packages/patches/fpc-glibc-2.34-compat.patch new file mode 100644 index 0000000000..4d78d6e028 --- /dev/null +++ b/gnu/packages/patches/fpc-glibc-2.34-compat.patch @@ -0,0 +1,190 @@ +https://sources.debian.org/data/main/f/fpc/3.2.2%2Bdfsg-22/debian/patches/glibc2.34.patch + +Description: Adjust startup code for glibc 2.34 + Based on the corresponding changes made in glibc: + https://sourceware.org/git/?p=glibc.git;a=commit;h=035c012e32c11e84d64905efaf55e74f704d3668 +Bug: https://gitlab.com/freepascal.org/fpc/source/-/issues/39295 +Author: Graham Inggs <ginggs@debian.org> +Last-Update: 2022-08-12 + +--- a/fpcsrc/rtl/linux/powerpc64/cprt0.as ++++ b/fpcsrc/rtl/linux/powerpc64/cprt0.as +@@ -351,8 +351,8 @@ + start_addresses: + .quad 0 /* was _SDA_BASE_ but not in 64-bit ABI*/ + .quad main_stub +- .quad __libc_csu_init +- .quad __libc_csu_fini ++ .quad 0 ++ .quad 0 + .size start_adresses, .-start_addresses + + /* +--- a/fpcsrc/rtl/linux/powerpc64/gprt0.as ++++ b/fpcsrc/rtl/linux/powerpc64/gprt0.as +@@ -351,8 +351,8 @@ + start_addresses: + .quad 0 /* was _SDA_BASE_ but not in 64-bit ABI*/ + .quad main_stub +- .quad __libc_csu_init +- .quad __libc_csu_fini ++ .quad 0 ++ .quad 0 + .size start_adresses, .-start_addresses + + /* +--- a/fpcsrc/rtl/linux/aarch64/cprt0.as ++++ b/fpcsrc/rtl/linux/aarch64/cprt0.as +@@ -41,10 +41,8 @@ + init, fini, rtld_fini, stack_end) */ + adrp x0,:got:PASCALMAIN + ldr x0,[x0,#:got_lo12:PASCALMAIN] +- adrp x3,:got:__libc_csu_init +- ldr x3,[x3,#:got_lo12:__libc_csu_init] +- adrp x4,:got:__libc_csu_fini +- ldr x4,[x4,#:got_lo12:__libc_csu_fini] ++ mov x3, #0 ++ mov x4, #0 + bl __libc_start_main + + /* This should never happen */ +--- a/fpcsrc/rtl/linux/i386/si_c21.inc ++++ b/fpcsrc/rtl/linux/i386/si_c21.inc +@@ -35,8 +35,6 @@ + + {$asmmode att} + +-procedure __libc_csu_init; cdecl; external; +-procedure __libc_csu_fini; cdecl; external; + procedure libc_start_main; external name '__libc_start_main'; + procedure libc_exit(code: longint); cdecl; external name 'exit'; + +@@ -93,8 +91,8 @@ + pushl %esp { stack_end } + pushl %edx { function to be registered with + atexit(), passed by loader } +- pushl $__libc_csu_fini +- pushl $__libc_csu_init ++ pushl $0 ++ pushl $0 + pushl %esi { Push second argument: argv. } + pushl %ecx { Push first argument: argc. } + +--- a/fpcsrc/rtl/linux/x86_64/cprt0.as ++++ b/fpcsrc/rtl/linux/x86_64/cprt0.as +@@ -61,9 +61,8 @@ + which grow downwards). */ + pushq %rsp + +- /* Pass address of our own entry points to .fini and .init. */ +- movq __libc_csu_init@GOTPCREL(%rip), %rcx +- movq __libc_csu_fini@GOTPCREL(%rip), %r8 ++ xorl %r8d, %r8d ++ xorl %ecx, %ecx + + movq main_stub@GOTPCREL(%rip), %rdi + +--- a/fpcsrc/rtl/linux/arm/cprt0.as ++++ b/fpcsrc/rtl/linux/arm/cprt0.as +@@ -82,10 +82,10 @@ + + /* Set up the other arguments in registers */ + ldr a1, =PASCALMAIN +- ldr a4, =_init ++ ldr a4, = #0 + + /* Push fini */ +- str ip, [sp, #-4]! ++ str a4, [sp, #-4]! + + /* __libc_start_main (main, argc, argv, init, fini, rtld_fini, stack_end) */ + +--- a/fpcsrc/rtl/linux/powerpc64/si_g.inc ++++ b/fpcsrc/rtl/linux/powerpc64/si_g.inc +@@ -657,9 +657,6 @@ + Process start/halt + ******************************************************************************} + +-procedure __libc_csu_init; cdecl; external; +-procedure __libc_csu_fini; cdecl; external; +- + procedure __libc_start_main(r3,r4,r5,r6,r7,r8,r9: pointer); cdecl; external; + + type +@@ -745,8 +742,8 @@ + end + = (sda_base: nil; {* was _SDA_BASE_ but not in 64-bit ABI } + main: @main_stub; +- libc_csu_init: @__libc_csu_init; +- libc_csu_fini: @__libc_csu_fini ++ libc_csu_init: pointer(0); ++ libc_csu_fini: pointer(0) + ); + + procedure call_libc_start_main(r3,r4,r5,r6,r7,r8,r9: pointer); cdecl; +--- a/fpcsrc/rtl/linux/powerpc64/si_c.inc ++++ b/fpcsrc/rtl/linux/powerpc64/si_c.inc +@@ -657,9 +657,6 @@ + Process start/halt + ******************************************************************************} + +-procedure __libc_csu_init; cdecl; external; +-procedure __libc_csu_fini; cdecl; external; +- + procedure __libc_start_main(r3,r4,r5,r6,r7,r8,r9: pointer); cdecl; external; + + var +@@ -724,8 +721,8 @@ + end + = (sda_base: nil; {* was _SDA_BASE_ but not in 64-bit ABI } + main: @main_stub; +- libc_csu_init: @__libc_csu_init; +- libc_csu_fini: @__libc_csu_fini ++ libc_csu_init: pointer(0); ++ libc_csu_fini: pointer(0) + ); + + +--- a/fpcsrc/rtl/linux/powerpc/cprt0.as ++++ b/fpcsrc/rtl/linux/powerpc/cprt0.as +@@ -35,8 +35,8 @@ + start_addresses: + .long _SDA_BASE_ + .long main_stub +- .long __libc_csu_init +- .long __libc_csu_fini ++ .long 0 ++ .long 0 + .size start_adresses, .-start_addresses + + .section ".text" +--- a/fpcsrc/rtl/linux/mips/cprt0.as ++++ b/fpcsrc/rtl/linux/mips/cprt0.as +@@ -113,10 +113,9 @@ + and $29, -2 * 4 + subu $29, 32 + +- lw $7,%got(__libc_csu_init)($gp) /* init */ +- lw $8,%got(__libc_csu_fini)($gp) /* fini */ ++ move $7, $0 + +- sw $8, 16($29) /* fini */ ++ sw $0, 16($29) + sw $2, 20($29) /* rtld_fini */ + sw $29, 24($29) /* stack_end */ + +--- a/fpcsrc/rtl/linux/m68k/cprt0.as ++++ b/fpcsrc/rtl/linux/m68k/cprt0.as +@@ -41,8 +41,10 @@ + + pea (%sp) /* highest available stack address */ + pea (%a1) /* termination function provided by kernel */ +- pea __libc_csu_fini +- pea __libc_csu_init ++ ++ clr.l -(%sp) ++ clr.l -(%sp) ++ + pea (%a0) /* argv */ + move.l %d0,-(%sp) /* argc */ + pea PASCALMAIN diff --git a/gnu/packages/patches/openmw-assume-nonconst-SIGSTKSZ.patch b/gnu/packages/patches/openmw-assume-nonconst-SIGSTKSZ.patch deleted file mode 100644 index ed35563c2c..0000000000 --- a/gnu/packages/patches/openmw-assume-nonconst-SIGSTKSZ.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 98a7d90ee258ceef9c70b0b2955d0458ec46f048 Mon Sep 17 00:00:00 2001 -From: elsid <elsid.mail@gmail.com> -Date: Fri, 24 Sep 2021 19:40:29 +0200 -Subject: [PATCH] Assume SIGSTKSZ is not a constant - -SIGSTKSZ is not defined as constant since glibc 2.34: -https://sourceware.org/git/?p=glibc.git;a=commit;h=6c57d320484988e87e446e2e60ce42816bf51d53 ---- - components/crashcatcher/crashcatcher.cpp | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/components/crashcatcher/crashcatcher.cpp b/components/crashcatcher/crashcatcher.cpp -index 86571e1e3a..c828e1ca81 100644 ---- a/components/crashcatcher/crashcatcher.cpp -+++ b/components/crashcatcher/crashcatcher.cpp -@@ -56,8 +56,6 @@ static const char exec_err[] = "!!! Failed to exec debug process\n"; - - static char argv0[PATH_MAX]; - --static char altstack[SIGSTKSZ]; -- - - static struct { - int signum; -@@ -475,9 +473,10 @@ int crashCatcherInstallHandlers(int argc, char **argv, int num_signals, int *sig - - /* Set an alternate signal stack so SIGSEGVs caused by stack overflows - * still run */ -+ static char* altstack = new char [SIGSTKSZ]; - altss.ss_sp = altstack; - altss.ss_flags = 0; -- altss.ss_size = sizeof(altstack); -+ altss.ss_size = SIGSTKSZ; - sigaltstack(&altss, nullptr); - - memset(&sa, 0, sizeof(sa)); --- -GitLab - diff --git a/gnu/packages/patches/racket-backport-8.10-rktboot.patch b/gnu/packages/patches/racket-backport-8.10-rktboot.patch deleted file mode 100644 index 834001bd83..0000000000 --- a/gnu/packages/patches/racket-backport-8.10-rktboot.patch +++ /dev/null @@ -1,130 +0,0 @@ -From 5446e36e0685ec5c7b4f812dec5bf7959db4f906 Mon Sep 17 00:00:00 2001 -From: Efraim Flashner <efraim@flashner.co.il> -Date: Thu, 20 Jul 2023 15:56:21 +0300 -Subject: [PATCH 1/2] rktboot: Add support for riscv64. - -(cherry picked from commit f80c5d001d5235556ae9cde617b1e3a1322d0505) ---- - racket/src/rktboot/machine-def.rkt | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/racket/src/rktboot/machine-def.rkt b/racket/src/rktboot/machine-def.rkt -index 8ff0688652..59ebfc88d8 100644 ---- a/racket/src/rktboot/machine-def.rkt -+++ b/racket/src/rktboot/machine-def.rkt -@@ -25,6 +25,7 @@ - [(regexp-match? #rx"^t?arm32" target-machine) "arm32"] - [(regexp-match? #rx"^t?arm64" target-machine) "arm64"] - [(regexp-match? #rx"^t?ppc32" target-machine) "ppc32"] -+ [(regexp-match? #rx"^t?rv64" target-machine) "rv64"] - [(regexp-match? #rx"^t?pb" target-machine) "pb"] - [else (error "machine.def: cannot infer architecture")]))] - [s (regexp-replace* #rx"[$][(]Mend[)]" s - -base-commit: b10ecfb8311fca2d42636eea2ca12aff0b76b208 --- -2.41.0 - - -From 6261c3582c386e770d654ca6a36f112834f35aef Mon Sep 17 00:00:00 2001 -From: Philip McGrath <philip@philipmcgrath.com> -Date: Sun, 16 Jul 2023 15:47:14 -0400 -Subject: [PATCH 2/2] rktboot: improve machene type inference - -Related to https://issues.guix.gnu.org/62231 -Related to https://github.com/racket/racket/issues/3948 - -(cherry picked from commit 005488491cee89e7db38109de4c9dcf2d8d5aef0) ---- - racket/src/rktboot/config.rkt | 73 +++++++++++++++++++++++++++++------ - 1 file changed, 61 insertions(+), 12 deletions(-) - -diff --git a/racket/src/rktboot/config.rkt b/racket/src/rktboot/config.rkt -index 7a969017ed..2b411e002c 100644 ---- a/racket/src/rktboot/config.rkt -+++ b/racket/src/rktboot/config.rkt -@@ -15,20 +15,69 @@ - (path->complete-path scheme-dir)))))) - (hash-set! ht 'make-boot-scheme-dir scheme-dir) - -+(define (infer-target-machine) -+ ;; Compute a native or pbarch machine string for the current platform. -+ ;; Some caveats: -+ ;; 1. A pbarch Racket will always infer a pbarch machine, -+ ;; even if a native machine exists. Hopefully this is an -+ ;; unlikely scenario: if you're running Racket CS, you've -+ ;; bootstrapped Chez somehow, so you could use `re.boot`. -+ ;; 2. A `tpb` or `pb` Racket on a 32-bit platform would still return -+ ;; 64 from `(system-type 'word)`, but, in addition to the above, -+ ;; it is not currently possible or desired to build Racket as -+ ;; `tpb` or `pb` (as opposed to pbarch variants): -+ ;; see <https://github.com/racket/racket/issues/4692>. -+ ;; 3. On a hypothetical platform where Chez supported both the -+ ;; architecture and the OS, but not the combination of the two, -+ ;; (e.g. riscv64 Windows) this code would currently return a -+ ;; non-existent native machine (e.g. trv64nt) instead of a -+ ;; working pbarch machine. Presumably this could be fixed if -+ ;; such a platform came into existence. -+ (define s (path->string (system-library-subpath #f))) -+ (define arch+os -+ (cond -+ [(regexp-match #rx"^([^\\]+)\\\\([^\\]+)$" s) -+ => (λ (m) -+ (reverse (cdr m)))] -+ [(regexp-match #rx"^([^-]+)-(.+)$" s) -+ => cdr] -+ [else -+ (error 'infer-target-machine "unknown format for system library subpath" -+ "produced" (system-library-subpath #f))])) -+ (define arch -+ (case (car arch+os) -+ [("x86_64" "amd64") "a6"] ; https://github.com/racket/racket/issues/4691 -+ [("i386") "i3"] -+ [("aarch64") "arm64"] -+ [("arm") "arm32"] -+ [("ppc") "ppc32"] -+ [("riscv64") "rv64"] -+ [("unknown") #f] ; pb machine types -+ [else #f])) -+ (define os -+ (case (cadr arch+os) -+ [("macosx" "darwin" "ios") "osx"] -+ [("win32" "cygwin") "nt"] -+ [("linux" "android") "le"] -+ [("gnu-hurd") "gnu"] -+ [("freebsd") "fb"] -+ [("openbsd") "ob"] -+ [("netbsd") "nb"] -+ [("solaris") "s2"] ; NOT "sunos4" (I think) -+ [("qnx") "qnx"] -+ [("unknown") #f] ; pb machine types -+ [else #f])) -+ (if (and arch os) -+ (string-append "t" arch os) -+ (format "tpb~a~a" -+ (system-type 'word) -+ (if (system-big-endian?) -+ "b" -+ "l")))) -+ - (define target-machine (or (hash-ref ht 'make-boot-targate-machine #f) - (getenv "MACH") -- (case (system-type) -- [(macosx) (if (eqv? 64 (system-type 'word)) -- "ta6osx" -- "ti3osx")] -- [(windows) (if (eqv? 64 (system-type 'word)) -- "ta6nt" -- "ti3nt")] -- [else -- (case (path->string (system-library-subpath #f)) -- [("x86_64-linux") "ta6le"] -- [("i386-linux") "ti3le"] -- [else #f])]))) -+ (infer-target-machine))) - (hash-set! ht 'make-boot-targate-machine target-machine) - - (define optimize-level-init 3) --- -2.41.0 - diff --git a/gnu/packages/patches/racket-backport-8.11-layered-docs.patch b/gnu/packages/patches/racket-backport-8.11-layered-docs.patch new file mode 100644 index 0000000000..07f105bb24 --- /dev/null +++ b/gnu/packages/patches/racket-backport-8.11-layered-docs.patch @@ -0,0 +1,36 @@ +From 1d8dbdf408db9e99f1382323477561d5148cd451 Mon Sep 17 00:00:00 2001 +From: Philip McGrath <philip@philipmcgrath.com> +Date: Fri, 20 Oct 2023 17:19:50 -0400 +Subject: [PATCH] racket-index: fix release.scrbl for layered installations +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Configure the release notes page to be rendered separately at every +installation layer. Otherwise, rendering documentation for packages +installed in a new layer might try to write to `release/in.sxref` +in the parent layer’s docs directory. + +Related to https://github.com/videolang/video/issues/67 +Related to https://issues.guix.gnu.org/56534 + +(cherry picked from commit 85f21854c0a41564b755fbe180fe6b85de6c4730) +--- + pkgs/racket-index/scribblings/main/info.rkt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pkgs/racket-index/scribblings/main/info.rkt b/pkgs/racket-index/scribblings/main/info.rkt +index 75c507848a..a6a3798f7c 100644 +--- a/pkgs/racket-index/scribblings/main/info.rkt ++++ b/pkgs/racket-index/scribblings/main/info.rkt +@@ -6,4 +6,4 @@ + ("local-redirect.scrbl" (depends-all-main no-depend-on every-main-layer) (omit) "local-redirect" 1 10) + ("license.scrbl" () (omit)) + ("acks.scrbl" () (omit)) +- ("release.scrbl" (depends-all-main no-depend-on) (omit)))) ++ ("release.scrbl" (depends-all-main no-depend-on every-main-layer) (omit)))) + +base-commit: c3a502c0ae9f4d615bfd85fc7d88b781826bbb09 +-- +2.41.0 + |