From dea666a05b44778b678b7fad7a1692da2b1fe95380a9034fa5cb11117b162589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Li=C5=A1ka?= Date: Mon, 1 Aug 2022 05:35:49 +0000 Subject: [PATCH] - Add fix-tests.patch which fixes tests on i586 and ARM targets. OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/mold?expand=0&rev=53 --- fix-tests.patch | 28 ++++++++++++++++++++++++++++ mold.changes | 5 +++++ mold.spec | 3 ++- 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 fix-tests.patch diff --git a/fix-tests.patch b/fix-tests.patch new file mode 100644 index 0000000..f4c8031 --- /dev/null +++ b/fix-tests.patch @@ -0,0 +1,28 @@ +diff --git a/test/elf/mold-wrapper.sh b/test/elf/mold-wrapper.sh +index 077cc43..58da342 100755 +--- a/test/elf/mold-wrapper.sh ++++ b/test/elf/mold-wrapper.sh +@@ -13,6 +13,10 @@ cd "$(dirname "$0")"/../.. + t=out/test/elf/$testname + mkdir -p $t + ++# Skip if target is ARM ++# https://github.com/rui314/mold/issues/442 ++[ $MACHINE = arm ] && { echo skipped; exit; } ++ + [ "$CC" = cc ] || { echo skipped; exit; } + + ldd mold-wrapper.so | grep -q libasan && { echo skipped; exit; } +diff --git a/test/elf/relocatable.sh b/test/elf/relocatable.sh +index 0065479..c5fe661 100755 +--- a/test/elf/relocatable.sh ++++ b/test/elf/relocatable.sh +@@ -14,7 +14,7 @@ t=out/test/elf/$testname + mkdir -p $t + + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98667 +-[ $MACHINE = i386 ] && { echo skipped; exit; } ++[ $MACHINE = i386 -o $MACHINE = i686 ] && { echo skipped; exit; } + + cat < + +- Add fix-tests.patch which fixes tests on i586 and ARM targets. + ------------------------------------------------------------------- Fri Jul 1 09:13:58 UTC 2022 - Martin Liška diff --git a/mold.spec b/mold.spec index e78d7fb..cab9f41 100644 --- a/mold.spec +++ b/mold.spec @@ -24,7 +24,8 @@ License: AGPL-3.0-or-later Group: Development/Tools/Building URL: https://github.com/rui314/mold Source: https://github.com/rui314/mold/archive/v%{version}/mold-%{version}.tar.gz -ExclusiveArch: aarch64 %arm x86_64 aarch64 riscv64 +Patch0: fix-tests.patch +ExclusiveArch: aarch64 %arm %ix86 x86_64 aarch64 riscv64 BuildRequires: cmake %if %{suse_version} < 1550 BuildRequires: gcc10-c++