- 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
This commit is contained in:
Martin Liška 2022-08-01 05:35:49 +00:00 committed by Git OBS Bridge
parent 82bd458f3e
commit dea666a05b
3 changed files with 35 additions and 1 deletions

28
fix-tests.patch Normal file
View File

@ -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 <<EOF | $CXX -c -o $t/a.o -xc++ -
int one() { return 1; }

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Aug 1 05:35:29 UTC 2022 - Martin Liška <mliska@suse.cz>
- Add fix-tests.patch which fixes tests on i586 and ARM targets.
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jul 1 09:13:58 UTC 2022 - Martin Liška <mliska@suse.cz> Fri Jul 1 09:13:58 UTC 2022 - Martin Liška <mliska@suse.cz>

View File

@ -24,7 +24,8 @@ License: AGPL-3.0-or-later
Group: Development/Tools/Building Group: Development/Tools/Building
URL: https://github.com/rui314/mold URL: https://github.com/rui314/mold
Source: https://github.com/rui314/mold/archive/v%{version}/mold-%{version}.tar.gz 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 BuildRequires: cmake
%if %{suse_version} < 1550 %if %{suse_version} < 1550
BuildRequires: gcc10-c++ BuildRequires: gcc10-c++