diff --git a/0001-Use-Fedora-command-names.patch b/0001-Use-Fedora-command-names.patch index ac2d474..99c17ec 100644 --- a/0001-Use-Fedora-command-names.patch +++ b/0001-Use-Fedora-command-names.patch @@ -1,7 +1,7 @@ From d12f535f6e41d821d7ddb3f24677ce2b071ba590 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 7 Jun 2019 20:55:25 -0400 -Subject: [PATCH 1/4] Use Fedora command names. +Subject: [PATCH 1/5] Use Fedora command names. Signed-off-by: Elliott Sales de Andrade --- diff --git a/0002-Skip-ARM-Linux-tests.patch b/0002-Skip-ARM-Linux-tests.patch index 347c576..74cbf61 100644 --- a/0002-Skip-ARM-Linux-tests.patch +++ b/0002-Skip-ARM-Linux-tests.patch @@ -1,7 +1,7 @@ From af52d3bdf25e9f318003c4fc39845fc3e9257a43 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 12 Jun 2019 04:28:55 -0400 -Subject: [PATCH 2/4] Skip ARM Linux tests. +Subject: [PATCH 2/5] Skip ARM Linux tests. We don't have the C library to do this. diff --git a/0003-Skip-STM32-tests.patch b/0003-Skip-STM32-tests.patch index bdd50fe..99972c6 100644 --- a/0003-Skip-STM32-tests.patch +++ b/0003-Skip-STM32-tests.patch @@ -1,7 +1,7 @@ From 307770eb5da848e0f62fc8d02ff51b5ea8767bb7 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 13 Jun 2019 02:50:40 -0400 -Subject: [PATCH 3/4] Skip STM32 tests. +Subject: [PATCH 3/5] Skip STM32 tests. We can't ship the STM32 .svd files due to their odd license. diff --git a/0004-Skip-WASI-tests.patch b/0004-Skip-WASI-tests.patch index feaaf83..b311522 100644 --- a/0004-Skip-WASI-tests.patch +++ b/0004-Skip-WASI-tests.patch @@ -1,7 +1,7 @@ From 82d01abd2fe82e0e19678721388d4068fe0de7d0 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 15 Dec 2020 05:06:04 -0500 -Subject: [PATCH 4/4] Skip WASI tests. +Subject: [PATCH 4/5] Skip WASI tests. We do not have wasmtime available. diff --git a/0005-Only-run-i386-tests-on-GOARCH-386-systems.patch b/0005-Only-run-i386-tests-on-GOARCH-386-systems.patch new file mode 100644 index 0000000..3eb1bf0 --- /dev/null +++ b/0005-Only-run-i386-tests-on-GOARCH-386-systems.patch @@ -0,0 +1,35 @@ +From 989c5abeeb8fe05bd164b3794f31c470d497ae41 Mon Sep 17 00:00:00 2001 +From: Elliott Sales de Andrade +Date: Thu, 17 Dec 2020 05:05:47 -0500 +Subject: [PATCH 5/5] Only run i386 tests on GOARCH=386 systems. + +Builds on koji do not work for this because it does not support +multilib. + +Signed-off-by: Elliott Sales de Andrade +--- + main_test.go | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/main_test.go b/main_test.go +index d2cbba3..524d653 100644 +--- a/main_test.go ++++ b/main_test.go +@@ -78,9 +78,11 @@ func TestCompiler(t *testing.T) { + } + + if runtime.GOOS == "linux" { +- t.Run("X86Linux", func(t *testing.T) { +- runPlatTests("i386--linux-gnu", matches, t) +- }) ++ if runtime.GOARCH == "386" { ++ t.Run("X86Linux", func(t *testing.T) { ++ runPlatTests("i386--linux-gnu", matches, t) ++ }) ++ } + goVersion, err := goenv.GorootVersionString(goenv.Get("GOROOT")) + if err != nil { + t.Error("could not get Go version:", err) +-- +2.29.2 + diff --git a/tinygo.spec b/tinygo.spec index e95bef4..70b0fa1 100644 --- a/tinygo.spec +++ b/tinygo.spec @@ -66,6 +66,8 @@ Patch0002: 0002-Skip-ARM-Linux-tests.patch Patch0003: 0003-Skip-STM32-tests.patch # We don't have wasmtime to run these. Patch0004: 0004-Skip-WASI-tests.patch +# koji does not support multilib. +Patch0005: 0005-Only-run-i386-tests-on-GOARCH-386-systems.patch # Not supported upstream yet. ExcludeArch: armv7hl ppc64le s390x @@ -86,10 +88,6 @@ BuildRequires: golang(tinygo.org/x/go-llvm) BuildRequires: avr-gcc BuildRequires: avr-libc -BuildRequires: glibc-devel -%ifarch x86_64 -BuildRequires: glibc-devel(x86-32) -%endif # We don't have glibc for arm, so skip these. #BuildRequires: gcc-arm-linux-gnu #BuildRequires: gcc-aarch64-linux-gnu @@ -118,6 +116,7 @@ Recommends: qemu-system-arm-core %patch0002 -p1 %patch0003 -p1 %patch0004 -p1 +%patch0005 -p1 tar -C lib -xf %{SOURCE2} rmdir lib/CMSIS