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 1/6] - 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++ From c413ec24a6c587b7b87d4bc298e0921da63f88132c732c2ad809517c5d90d342 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Li=C5=A1ka?= Date: Mon, 1 Aug 2022 08:39:31 +0000 Subject: [PATCH 2/6] Add identification of machine. OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/mold?expand=0&rev=54 --- mold.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/mold.spec b/mold.spec index cab9f41..6144ebb 100644 --- a/mold.spec +++ b/mold.spec @@ -64,6 +64,7 @@ build time especially in rapid debug-edit-rebuild cycles. %prep %autosetup -p1 +machine -m %build %if %{suse_version} < 1550 From 468c496c8276070e09ad503c0861e077e18dfa13b8855d22005896df5dd5825a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Li=C5=A1ka?= Date: Mon, 1 Aug 2022 08:42:30 +0000 Subject: [PATCH 3/6] Use uname. OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/mold?expand=0&rev=55 --- mold.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mold.spec b/mold.spec index 6144ebb..5fd33ab 100644 --- a/mold.spec +++ b/mold.spec @@ -64,7 +64,7 @@ build time especially in rapid debug-edit-rebuild cycles. %prep %autosetup -p1 -machine -m +uname -m %build %if %{suse_version} < 1550 From 5781c2aea9c5f11b906c1c1bb923deab7d6edcec41d0058275bde43153accc2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Li=C5=A1ka?= Date: Mon, 1 Aug 2022 08:47:05 +0000 Subject: [PATCH 4/6] Fix skipping of mold-wrapper.sh for ARM targets. OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/mold?expand=0&rev=56 --- fix-tests.patch | 4 ++-- mold.spec | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fix-tests.patch b/fix-tests.patch index f4c8031..6aad73c 100644 --- a/fix-tests.patch +++ b/fix-tests.patch @@ -1,5 +1,5 @@ diff --git a/test/elf/mold-wrapper.sh b/test/elf/mold-wrapper.sh -index 077cc43..58da342 100755 +index 077cc43..dcffbb6 100755 --- a/test/elf/mold-wrapper.sh +++ b/test/elf/mold-wrapper.sh @@ -13,6 +13,10 @@ cd "$(dirname "$0")"/../.. @@ -8,7 +8,7 @@ index 077cc43..58da342 100755 +# Skip if target is ARM +# https://github.com/rui314/mold/issues/442 -+[ $MACHINE = arm ] && { echo skipped; exit; } ++[[ $MACHINE = "arm"* ]] && { echo skipped; exit; } + [ "$CC" = cc ] || { echo skipped; exit; } diff --git a/mold.spec b/mold.spec index 5fd33ab..cab9f41 100644 --- a/mold.spec +++ b/mold.spec @@ -64,7 +64,6 @@ build time especially in rapid debug-edit-rebuild cycles. %prep %autosetup -p1 -uname -m %build %if %{suse_version} < 1550 From cbc179fa0a5f38a3eff646635d5744481ba97ff5d054460a0be74d66a8165708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Li=C5=A1ka?= Date: Mon, 1 Aug 2022 10:58:15 +0000 Subject: [PATCH 5/6] Remove ARM-related hunk. OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/mold?expand=0&rev=57 --- fix-tests.patch | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/fix-tests.patch b/fix-tests.patch index 6aad73c..dede9f0 100644 --- a/fix-tests.patch +++ b/fix-tests.patch @@ -1,18 +1,3 @@ -diff --git a/test/elf/mold-wrapper.sh b/test/elf/mold-wrapper.sh -index 077cc43..dcffbb6 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 From 4586013f4d5606e20ff318a8c1d6d1ba7ff4a9e4b4cc0676da581e5bcee7688d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Li=C5=A1ka?= Date: Mon, 1 Aug 2022 10:58:27 +0000 Subject: [PATCH 6/6] - Add fix-tests.patch which fixes tests on i586. OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/mold?expand=0&rev=58 --- mold.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mold.changes b/mold.changes index 0fa9cb3..9c61108 100644 --- a/mold.changes +++ b/mold.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Mon Aug 1 05:35:29 UTC 2022 - Martin Liška -- Add fix-tests.patch which fixes tests on i586 and ARM targets. +- Add fix-tests.patch which fixes tests on i586. ------------------------------------------------------------------- Fri Jul 1 09:13:58 UTC 2022 - Martin Liška