summaryrefslogtreecommitdiff
path: root/sys-devel/mold/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-05-01 00:00:05 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-05-01 00:00:05 +0100
commit3d12b65aa1b4bb8b02b1f8d3e77bccf230b79a09 (patch)
treecb6347688c91bfbdebe49a78a55dad3d72cc193e /sys-devel/mold/files
parent4c2b70adc6484c35ff05e412de08a7b7f50cfb34 (diff)
gentoo auto-resync : 01:05:2024 - 00:00:04
Diffstat (limited to 'sys-devel/mold/files')
-rw-r--r--sys-devel/mold/files/mold-2.30.0-gcc14.patch76
-rw-r--r--sys-devel/mold/files/mold-2.30.0-which-hunt.patch31
2 files changed, 107 insertions, 0 deletions
diff --git a/sys-devel/mold/files/mold-2.30.0-gcc14.patch b/sys-devel/mold/files/mold-2.30.0-gcc14.patch
new file mode 100644
index 000000000000..74e7f5081eeb
--- /dev/null
+++ b/sys-devel/mold/files/mold-2.30.0-gcc14.patch
@@ -0,0 +1,76 @@
+https://github.com/rui314/mold/issues/1244
+https://github.com/rui314/mold/commit/002d619b11f38438514f4714f9eb89e8015ba1b6
+https://github.com/rui314/mold/commit/14952546a489c23236f50adc5ef9c8ada4f4e31a
+
+From 002d619b11f38438514f4714f9eb89e8015ba1b6 Mon Sep 17 00:00:00 2001
+From: Rui Ueyama <ruiu@cs.stanford.edu>
+Date: Thu, 25 Apr 2024 16:58:09 +0900
+Subject: [PATCH] Attempt to fix a test failure
+
+I believe some version of objcopy corrupts an object file when
+renaming a section. In this change, I use sed instead of objcopy
+as a workaround.
+
+Fixes https://github.com/rui314/mold/issues/1244
+---
+ test/elf/exception-multiple-ehframe.sh | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/test/elf/exception-multiple-ehframe.sh b/test/elf/exception-multiple-ehframe.sh
+index ca1d1a1c0..a9b360b09 100755
+--- a/test/elf/exception-multiple-ehframe.sh
++++ b/test/elf/exception-multiple-ehframe.sh
+@@ -28,9 +28,9 @@ int bar() {
+ }
+ EOF
+
+-$OBJCOPY --rename-section .eh_frame=.eh_frame2 $t/a.o
++sed -i 's/\.eh_frame/.EH_FRAME/g' $t/a.o
+ ./mold -r -o $t/c.o $t/a.o $t/b.o
+-$OBJCOPY --rename-section .eh_frame2=.eh_frame $t/c.o
++sed -i 's/\.EH_FRAME/.eh_frame/g' $t/c.o
+
+ cat <<EOF | $CXX -o $t/d.o -c -xc++ -
+ #include <stdio.h>
+@@ -44,5 +44,4 @@ int main() {
+ EOF
+
+ $CXX -B. -o $t/exe1 $t/d.o $t/c.o
+-$QEMU $t/exe1
+ $QEMU $t/exe1 | grep -q '^1 3$'
+
+From 14952546a489c23236f50adc5ef9c8ada4f4e31a Mon Sep 17 00:00:00 2001
+From: Rui Ueyama <ruiu@cs.stanford.edu>
+Date: Sun, 28 Apr 2024 13:04:43 +0900
+Subject: [PATCH] Do not edit binary files with sed
+
+Fixes https://github.com/rui314/mold/issues/1244
+---
+ test/elf/exception-multiple-ehframe.sh | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/test/elf/exception-multiple-ehframe.sh b/test/elf/exception-multiple-ehframe.sh
+index a9b360b09..8cc31624a 100755
+--- a/test/elf/exception-multiple-ehframe.sh
++++ b/test/elf/exception-multiple-ehframe.sh
+@@ -3,6 +3,8 @@
+
+ nm mold | grep -q '__tsan_init' && skip
+
++which perl > /dev/null || skip
++
+ [ $MACHINE = m68k ] && skip
+ [ $MACHINE = sh4 ] && skip
+
+@@ -28,9 +30,9 @@ int bar() {
+ }
+ EOF
+
+-sed -i 's/\.eh_frame/.EH_FRAME/g' $t/a.o
++perl -i -0777 -pe 's/\.eh_frame/.EH_FRAME/g' $t/a.o
+ ./mold -r -o $t/c.o $t/a.o $t/b.o
+-sed -i 's/\.EH_FRAME/.eh_frame/g' $t/c.o
++perl -i -0777 -pe 's/\.EH_FRAME/.eh_frame/g' $t/c.o
+
+ cat <<EOF | $CXX -o $t/d.o -c -xc++ -
+ #include <stdio.h>
diff --git a/sys-devel/mold/files/mold-2.30.0-which-hunt.patch b/sys-devel/mold/files/mold-2.30.0-which-hunt.patch
new file mode 100644
index 000000000000..d8558091c4bc
--- /dev/null
+++ b/sys-devel/mold/files/mold-2.30.0-which-hunt.patch
@@ -0,0 +1,31 @@
+https://github.com/rui314/mold/pull/1246
+
+From ec0a9d09ddff8b1796ff1822d5381442cd28acb1 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 30 Apr 2024 07:54:40 +0100
+Subject: [PATCH] test: use `command -v`, not non-portable `which`
+
+`which` isn't in POSIX and several Linux distributions are trying to
+remove it from their base system, see e.g. https://lwn.net/Articles/874049/.
+
+Just use `command -v` which is POSIX.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ test/elf/exception-multiple-ehframe.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/elf/exception-multiple-ehframe.sh b/test/elf/exception-multiple-ehframe.sh
+index 8cc31624a..1b9f434a4 100755
+--- a/test/elf/exception-multiple-ehframe.sh
++++ b/test/elf/exception-multiple-ehframe.sh
+@@ -3,7 +3,7 @@
+
+ nm mold | grep -q '__tsan_init' && skip
+
+-which perl > /dev/null || skip
++command -v perl > /dev/null || skip
+
+ [ $MACHINE = m68k ] && skip
+ [ $MACHINE = sh4 ] && skip
+