The package rpms/tinygo.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/tinygo.git/commit/?id=349460a1538....
Change:
+%ifnarch %{ix86} aarch64
Thanks.
Full change:
============
commit 349460a15384bfa3a297cfd8312c7b01e0b5a40b
Author: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
Date: Sun Jan 17 15:15:05 2021 -0500
Update to latest version.
diff --git a/0003-Skip-STM32-tests.patch b/0001-Skip-STM32-tests.patch
similarity index 96%
rename from 0003-Skip-STM32-tests.patch
rename to 0001-Skip-STM32-tests.patch
index 99972c6..65ac848 100644
--- a/0003-Skip-STM32-tests.patch
+++ b/0001-Skip-STM32-tests.patch
@@ -1,7 +1,7 @@
-From 307770eb5da848e0f62fc8d02ff51b5ea8767bb7 Mon Sep 17 00:00:00 2001
+From 132dd9354512d0ab47cf3d939dd94ffc492eda5a Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
Date: Thu, 13 Jun 2019 02:50:40 -0400
-Subject: [PATCH 3/5] Skip STM32 tests.
+Subject: [PATCH 1/7] Skip STM32 tests.
We can't ship the STM32 .svd files due to their odd license.
diff --git a/0001-Use-Fedora-command-names.patch b/0001-Use-Fedora-command-names.patch
deleted file mode 100644
index 99c17ec..0000000
--- a/0001-Use-Fedora-command-names.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From d12f535f6e41d821d7ddb3f24677ce2b071ba590 Mon Sep 17 00:00:00 2001
-From: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
-Date: Fri, 7 Jun 2019 20:55:25 -0400
-Subject: [PATCH 1/5] Use Fedora command names.
-
-Signed-off-by: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
----
- compileopts/target.go | 8 ++++----
- main_test.go | 2 +-
- 2 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/compileopts/target.go b/compileopts/target.go
-index 8b3c68f..53b3b61 100644
---- a/compileopts/target.go
-+++ b/compileopts/target.go
-@@ -174,7 +174,7 @@ func LoadTarget(target string) (*TargetSpec, error) {
- }
- target = llvmarch + "--" + llvmos
- if goarch == "arm" {
-- target += "-gnueabihf"
-+ target += "-none"
- }
- return defaultTarget(goos, goarch, target)
- }
-@@ -254,9 +254,9 @@ func defaultTarget(goos, goarch, triple string) (*TargetSpec, error)
{
- // Some educated guesses as to how to invoke helper programs.
- spec.GDB = "gdb-multiarch"
- if goarch == "arm" && goos == "linux" {
-- spec.CFlags = append(spec.CFlags, "--sysroot=/usr/arm-linux-gnueabihf")
-- spec.Linker = "arm-linux-gnueabihf-gcc"
-- spec.Emulator = []string{"qemu-arm", "-L",
"/usr/arm-linux-gnueabihf"}
-+ spec.CFlags = append(spec.CFlags, "--sysroot=/usr/arm-linux-none")
-+ spec.Linker = "arm-linux-gnu-gcc"
-+ spec.Emulator = []string{"qemu-arm", "-L",
"/usr/arm-linux-none"}
- }
- if goarch == "arm64" && goos == "linux" {
- spec.CFlags = append(spec.CFlags, "--sysroot=/usr/aarch64-linux-gnu")
-diff --git a/main_test.go b/main_test.go
-index a7eca14..f8285a2 100644
---- a/main_test.go
-+++ b/main_test.go
-@@ -82,7 +82,7 @@ func TestCompiler(t *testing.T) {
- runPlatTests("i386--linux-gnu", matches, t)
- })
- t.Run("ARMLinux", func(t *testing.T) {
-- runPlatTests("arm--linux-gnueabihf", matches, t)
-+ runPlatTests("arm--linux-none", matches, t)
- })
- t.Run("ARM64Linux", func(t *testing.T) {
- runPlatTests("aarch64--linux-gnu", matches, t)
---
-2.29.2
-
diff --git a/0002-Skip-ARM-Linux-tests.patch b/0002-Skip-ARM-Linux-tests.patch
deleted file mode 100644
index 74cbf61..0000000
--- a/0002-Skip-ARM-Linux-tests.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From af52d3bdf25e9f318003c4fc39845fc3e9257a43 Mon Sep 17 00:00:00 2001
-From: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
-Date: Wed, 12 Jun 2019 04:28:55 -0400
-Subject: [PATCH 2/5] Skip ARM Linux tests.
-
-We don't have the C library to do this.
-
-Signed-off-by: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
----
- main_test.go | 6 ------
- 1 file changed, 6 deletions(-)
-
-diff --git a/main_test.go b/main_test.go
-index f8285a2..efeb2db 100644
---- a/main_test.go
-+++ b/main_test.go
-@@ -81,12 +81,6 @@ func TestCompiler(t *testing.T) {
- t.Run("X86Linux", func(t *testing.T) {
- runPlatTests("i386--linux-gnu", matches, t)
- })
-- t.Run("ARMLinux", func(t *testing.T) {
-- runPlatTests("arm--linux-none", matches, t)
-- })
-- t.Run("ARM64Linux", func(t *testing.T) {
-- runPlatTests("aarch64--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/0004-Skip-WASI-tests.patch b/0002-Skip-WASI-tests.patch
similarity index 72%
rename from 0004-Skip-WASI-tests.patch
rename to 0002-Skip-WASI-tests.patch
index b311522..1193282 100644
--- a/0004-Skip-WASI-tests.patch
+++ b/0002-Skip-WASI-tests.patch
@@ -1,7 +1,7 @@
-From 82d01abd2fe82e0e19678721388d4068fe0de7d0 Mon Sep 17 00:00:00 2001
+From 965776292ea372cf2cfd3c0c06c4d9a9e0ca6e03 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
Date: Tue, 15 Dec 2020 05:06:04 -0500
-Subject: [PATCH 4/5] Skip WASI tests.
+Subject: [PATCH 2/7] Skip WASI tests.
We do not have wasmtime available.
@@ -11,10 +11,10 @@ Signed-off-by: Elliott Sales de Andrade
<quantum.analyst(a)gmail.com>
1 file changed, 4 deletions(-)
diff --git a/main_test.go b/main_test.go
-index efeb2db..d2cbba3 100644
+index a7eca14..9c1b6e8 100644
--- a/main_test.go
+++ b/main_test.go
-@@ -95,10 +95,6 @@ func TestCompiler(t *testing.T) {
+@@ -101,10 +101,6 @@ func TestCompiler(t *testing.T) {
runPlatTests("wasm", matches, t)
})
}
diff --git a/0003-Only-run-native-Linux-tests-on-their-own-GOARCH.patch
b/0003-Only-run-native-Linux-tests-on-their-own-GOARCH.patch
new file mode 100644
index 0000000..dd9f532
--- /dev/null
+++ b/0003-Only-run-native-Linux-tests-on-their-own-GOARCH.patch
@@ -0,0 +1,54 @@
+From 683e23f406cb59400bc3879eeebef3445666d7bb Mon Sep 17 00:00:00 2001
+From: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
+Date: Mon, 21 Dec 2020 04:26:02 -0500
+Subject: [PATCH 3/7] Only run native Linux tests on their own GOARCH.
+
+We don't have the cross-compiled C libraries to do this. Even 386 builds
+on koji do not work for this because it does not support multilib.
+
+Signed-off-by: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
+---
+ main_test.go | 27 ++++++++++++++++++---------
+ 1 file changed, 18 insertions(+), 9 deletions(-)
+
+diff --git a/main_test.go b/main_test.go
+index 9c1b6e8..b839cef 100644
+--- a/main_test.go
++++ b/main_test.go
+@@ -78,15 +78,24 @@ func TestCompiler(t *testing.T) {
+ }
+
+ if runtime.GOOS == "linux" {
+- t.Run("X86Linux", func(t *testing.T) {
+- runPlatTests("i386--linux-gnu", matches, t)
+- })
+- t.Run("ARMLinux", func(t *testing.T) {
+- runPlatTests("arm--linux-gnueabihf", matches, t)
+- })
+- t.Run("ARM64Linux", func(t *testing.T) {
+- runPlatTests("aarch64--linux-gnu", matches, t)
+- })
++ switch runtime.GOARCH {
++ case "386":
++ t.Run("X86Linux", func(t *testing.T) {
++ runPlatTests("i386--linux-gnu", matches, t)
++ })
++ case "amd64":
++ t.Run("AMD64Linux", func(t *testing.T) {
++ runPlatTests("amd64--linux-gnu", matches, t)
++ })
++ case "arm":
++ t.Run("ARMLinux", func(t *testing.T) {
++ runPlatTests("arm--linux-gnueabihf", matches, t)
++ })
++ case "arm64":
++ t.Run("ARM64Linux", func(t *testing.T) {
++ runPlatTests("aarch64--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/0004-Use-clang-to-do-linking.patch b/0004-Use-clang-to-do-linking.patch
new file mode 100644
index 0000000..ad097f3
--- /dev/null
+++ b/0004-Use-clang-to-do-linking.patch
@@ -0,0 +1,51 @@
+From 99cad3f2957e1698a0c4ab1330354800dce2abdf Mon Sep 17 00:00:00 2001
+From: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
+Date: Mon, 21 Dec 2020 04:28:59 -0500
+Subject: [PATCH 4/7] Use clang to do linking.
+
+This avoids having to guess what the linker name-with-build-triplet is,
+as we can just pass the target to it in the same way as the compilation
+stage.
+
+Signed-off-by: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
+---
+ compileopts/target.go | 9 ++-------
+ 1 file changed, 2 insertions(+), 7 deletions(-)
+
+diff --git a/compileopts/target.go b/compileopts/target.go
+index 8b3c68f..f1aab68 100644
+--- a/compileopts/target.go
++++ b/compileopts/target.go
+@@ -237,8 +237,9 @@ func defaultTarget(goos, goarch, triple string) (*TargetSpec, error)
{
+ GOARCH: goarch,
+ BuildTags: []string{goos, goarch},
+ Compiler: "clang",
+- Linker: "cc",
+ CFlags: []string{"--target=" + triple},
++ Linker: "clang",
++ LDFlags: []string{"--target=" + triple},
+ GDB: "gdb",
+ PortReset: "false",
+ }
+@@ -255,18 +256,12 @@ func defaultTarget(goos, goarch, triple string) (*TargetSpec,
error) {
+ spec.GDB = "gdb-multiarch"
+ if goarch == "arm" && goos == "linux" {
+ spec.CFlags = append(spec.CFlags, "--sysroot=/usr/arm-linux-gnueabihf")
+- spec.Linker = "arm-linux-gnueabihf-gcc"
+ spec.Emulator = []string{"qemu-arm", "-L",
"/usr/arm-linux-gnueabihf"}
+ }
+ if goarch == "arm64" && goos == "linux" {
+ spec.CFlags = append(spec.CFlags, "--sysroot=/usr/aarch64-linux-gnu")
+- spec.Linker = "aarch64-linux-gnu-gcc"
+ spec.Emulator = []string{"qemu-aarch64", "-L",
"/usr/aarch64-linux-gnu"}
+ }
+- if goarch == "386" && runtime.GOARCH == "amd64" {
+- spec.CFlags = append(spec.CFlags, "-m32")
+- spec.LDFlags = append(spec.LDFlags, "-m32")
+- }
+ }
+ return &spec, nil
+ }
+--
+2.29.2
+
diff --git a/0005-Only-run-i386-tests-on-GOARCH-386-systems.patch
b/0005-Only-run-i386-tests-on-GOARCH-386-systems.patch
deleted file mode 100644
index 3eb1bf0..0000000
--- a/0005-Only-run-i386-tests-on-GOARCH-386-systems.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 989c5abeeb8fe05bd164b3794f31c470d497ae41 Mon Sep 17 00:00:00 2001
-From: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
-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 <quantum.analyst(a)gmail.com>
----
- 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/0005-Update-to-current-chromedp.patch
b/0005-Update-to-current-chromedp.patch
new file mode 100644
index 0000000..da6be99
--- /dev/null
+++ b/0005-Update-to-current-chromedp.patch
@@ -0,0 +1,108 @@
+From acb8659710b94063baaa0b2e9efe590c0c23f23f Mon Sep 17 00:00:00 2001
+From: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
+Date: Tue, 22 Dec 2020 05:34:18 -0500
+Subject: [PATCH 5/7] Update to current chromedp.
+
+Signed-off-by: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
+---
+ go.mod | 5 +++--
+ go.sum | 19 +++++++++++++++++++
+ tests/wasm/setup_test.go | 3 ++-
+ 3 files changed, 24 insertions(+), 3 deletions(-)
+
+diff --git a/go.mod b/go.mod
+index bab259a..0d25928 100644
+--- a/go.mod
++++ b/go.mod
+@@ -4,9 +4,10 @@ go 1.11
+
+ require (
+
github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2
+-
github.com/chromedp/cdproto v0.0.0-20200709115526-d1f6fc58448b
+-
github.com/chromedp/chromedp v0.5.4-0.20200303084119-2bb39134ab9e
++
github.com/chromedp/cdproto v0.0.0-20201009231348-1c6a710e77de
++
github.com/chromedp/chromedp v0.5.4
+
github.com/google/shlex v0.0.0-20181106134648-c34317bd91bf
++
github.com/knq/sysutil v0.0.0-20191005231841-15668db23d08 // indirect
+
github.com/marcinbor85/gohex v0.0.0-20200531091804-343a4b548892
+ go.bug.st/serial v1.0.0
+
golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2
+diff --git a/go.sum b/go.sum
+index da50204..33a1425 100644
+--- a/go.sum
++++ b/go.sum
+@@ -3,24 +3,41 @@
github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2/go.mod
h1:PkYb9DJNAw
+
github.com/chromedp/cdproto v0.0.0-20200116234248-4da64dd111ac/go.mod
h1:PfAWWKJqjlGFYJEidUM6aVIWPr0EpobeyVWEEmplX7g=
+
github.com/chromedp/cdproto v0.0.0-20200709115526-d1f6fc58448b
h1:LF+GRwyzxrO3MUzPvejv+yBup0lNG+/QdIRrkxOPseA=
+
github.com/chromedp/cdproto v0.0.0-20200709115526-d1f6fc58448b/go.mod
h1:E6LPWRdIJc11h/di5p0rwvRmUYbhGpBEH7ZbPfzDIOE=
++github.com/chromedp/cdproto v0.0.0-20201009231348-1c6a710e77de
h1:cuPPanKjAp5XBwrD1RkeN4ILGRSffUhS69LKkFqKtIA=
++github.com/chromedp/cdproto v0.0.0-20201009231348-1c6a710e77de/go.mod
h1:zx0YH7hi8sqkYXAa0LZZxpQLDsU8/a2jzbYbK79dQO8=
+
github.com/chromedp/chromedp v0.5.4-0.20200303084119-2bb39134ab9e
h1:Hv0JVyHhbIXb9NiYQe4NsrfgrSofAp0q2FnhhJOXgi8=
+
github.com/chromedp/chromedp v0.5.4-0.20200303084119-2bb39134ab9e/go.mod
h1:vmQMRHFZrY3T+Jv51T0n87OK/i6bK+5P9a+Fg5jPwgQ=
++github.com/chromedp/chromedp v0.5.4 h1:hQC6Wj+0mBu2B+HDF4eoAyTkDo0BnL16sz3gAAmZ8fc=
++github.com/chromedp/chromedp v0.5.4/go.mod
h1:Jl2gvx3U9zl4lS/dMjDVGXX0jZ4qo/vsGreqYME/lqc=
++github.com/chromedp/sysutil v0.0.0-20201009230539-dc95e7e83e8a/go.mod
h1:kgWmDdq8fTzXYcKIBqIYvRRTnYb9aNS9moAV0xufSww=
++github.com/chromedp/sysutil v1.0.0 h1:+ZxhTpfpZlmchB58ih/LBHX52ky7w2VhQVKQMucy3Ic=
++github.com/chromedp/sysutil v1.0.0/go.mod
h1:kgWmDdq8fTzXYcKIBqIYvRRTnYb9aNS9moAV0xufSww=
+
github.com/creack/goselect v0.1.1 h1:tiSSgKE1eJtxs1h/VgGQWuXUP0YS4CDIFMp6vaI1ls0=
+
github.com/creack/goselect v0.1.1/go.mod
h1:a/NhLweNvqIYMuxcMOuWY516Cimucms3DglDzQP3hKY=
+
github.com/davecgh/go-spew v1.1.0/go.mod
h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee
h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0=
+
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod
h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
++github.com/gobwas/httphead v0.0.0-20200921212729-da3d93bc3c58
h1:YyrUZvJaU8Q0QsoVo+xLFBgWDTam29PKea6GYmwvSiQ=
++github.com/gobwas/httphead v0.0.0-20200921212729-da3d93bc3c58/go.mod
h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
+
github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8=
+
github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
++github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og=
++github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
+
github.com/gobwas/ws v1.0.3 h1:ZOigqf7iBxkA4jdQ3am7ATzdlOFp9YzA6NmuvEEZc9g=
+
github.com/gobwas/ws v1.0.3/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
++github.com/gobwas/ws v1.0.4 h1:5eXU1CZhpQdq5kXbKb+sECH5Ia5KiO6CYzIzdlVx6Bs=
++github.com/gobwas/ws v1.0.4/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
+
github.com/google/shlex v0.0.0-20181106134648-c34317bd91bf
h1:7+FW5aGwISbqUtkfmIpZJGRgNFg2ioYPvFaUxdqpDsg=
+
github.com/google/shlex v0.0.0-20181106134648-c34317bd91bf/go.mod
h1:RpwtwJQFrIEPstU94h88MWPXP2ektJZ8cZ0YntAmXiE=
++github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
++github.com/josharian/intern v1.0.0/go.mod
h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
+
github.com/knq/sysutil v0.0.0-20191005231841-15668db23d08
h1:V0an7KRw92wmJysvFvtqtKMAPmvS5O0jtB0nYo6t+gs=
+
github.com/knq/sysutil v0.0.0-20191005231841-15668db23d08/go.mod
h1:dFWs1zEqDjFtnBXsd1vPOZaLsESovai349994nHx3e0=
+
github.com/mailru/easyjson v0.7.0/go.mod
h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
+
github.com/mailru/easyjson v0.7.1 h1:mdxE1MF9o53iCb2Ghj1VfWvh7ZOwHpnVG/xwXrV90U8=
+
github.com/mailru/easyjson v0.7.1/go.mod
h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
++github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA=
++github.com/mailru/easyjson v0.7.6/go.mod
h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
+
github.com/marcinbor85/gohex v0.0.0-20200531091804-343a4b548892
h1:6J+qramlHVLmiBOgRiBOnQkno8uprqG6YFFQTt6uYIw=
+
github.com/marcinbor85/gohex v0.0.0-20200531091804-343a4b548892/go.mod
h1:Pb6XcsXyropB9LNHhnqaknG/vEwYztLkQzVCHv8sQ3M=
+
github.com/pmezard/go-difflib v1.0.0/go.mod
h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+@@ -41,6 +58,8 @@
golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9
h1:ZBzSG/7F4eNKz2L3GE9o300RX
+
golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod
h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+
golang.org/x/sys v0.0.0-20200116001909-b77594299b42
h1:vEOn+mP2zCOVzKckCZy6YsCtDblrpj/w7B9nxGNELpg=
+
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod
h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
++golang.org/x/sys v0.0.0-20201202213521-69691e467435
h1:25AvDqqB9PrNqj1FLf2/70I4W0L19qqoaFq3gjNwbKk=
++golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod
h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+
golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2
h1:0sfSpGSa544Fwnbot3Oxq/U6SXqjty6Jy/3wRhVS7ig=
+
golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2/go.mod
h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+diff --git a/tests/wasm/setup_test.go b/tests/wasm/setup_test.go
+index a38b426..6a84983 100644
+--- a/tests/wasm/setup_test.go
++++ b/tests/wasm/setup_test.go
+@@ -16,6 +16,7 @@ import (
+ "time"
+
+ "github.com/chromedp/cdproto/cdp"
++ "github.com/chromedp/cdproto/runtime"
+ "github.com/chromedp/chromedp"
+ )
+
+@@ -166,7 +167,7 @@ func waitInnerTextMatch(sel string, re *regexp.Regexp)
chromedp.QueryAction {
+
+ return chromedp.Query(sel, func(s *chromedp.Selector) {
+
+- chromedp.WaitFunc(func(ctx context.Context, cur *cdp.Frame, ids ...cdp.NodeID)
([]*cdp.Node, error) {
++ chromedp.WaitFunc(func(ctx context.Context, cur *cdp.Frame, execCtx
runtime.ExecutionContextID, ids ...cdp.NodeID) ([]*cdp.Node, error) {
+
+ nodes := make([]*cdp.Node, len(ids))
+ cur.RLock()
+--
+2.29.2
+
diff --git a/0006-Use-httptest-to-serve-wasm-test-files.patch
b/0006-Use-httptest-to-serve-wasm-test-files.patch
new file mode 100644
index 0000000..ddab238
--- /dev/null
+++ b/0006-Use-httptest-to-serve-wasm-test-files.patch
@@ -0,0 +1,210 @@
+From 6bedea1e36176028452010aeebf5bfcde0e73e6e Mon Sep 17 00:00:00 2001
+From: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
+Date: Tue, 22 Dec 2020 17:56:53 -0500
+Subject: [PATCH 6/7] Use httptest to serve wasm test files.
+
+This picks a port automatically, so avoids any conflicts that might
+arise from running the tests in parallel.
+
+Signed-off-by: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
+---
+ tests/wasm/chan_test.go | 5 ++++-
+ tests/wasm/event_test.go | 5 ++++-
+ tests/wasm/fmt_test.go | 5 ++++-
+ tests/wasm/fmtprint_test.go | 5 ++++-
+ tests/wasm/log_test.go | 5 ++++-
+ tests/wasm/setup_test.go | 37 ++++++-------------------------------
+ 6 files changed, 26 insertions(+), 36 deletions(-)
+
+diff --git a/tests/wasm/chan_test.go b/tests/wasm/chan_test.go
+index 1cd08e6..c603832 100644
+--- a/tests/wasm/chan_test.go
++++ b/tests/wasm/chan_test.go
+@@ -11,6 +11,9 @@ func TestChan(t *testing.T) {
+
+ t.Parallel()
+
++ wasmTmpDir, server := startServer(t)
++ defer server.Close()
++
+ err := run("tinygo build -o " + wasmTmpDir + "/chan.wasm -target wasm
testdata/chan.go")
+ if err != nil {
+ t.Fatal(err)
+@@ -20,7 +23,7 @@ func TestChan(t *testing.T) {
+ defer cancel()
+
+ err = chromedp.Run(ctx,
+- chromedp.Navigate("http://localhost:8826/run?file=chan.wasm"),
++ chromedp.Navigate(server.URL+"/run?file=chan.wasm"),
+ waitLog(`1
+ 2
+ 4
+diff --git a/tests/wasm/event_test.go b/tests/wasm/event_test.go
+index d2b8340..6ecc535 100644
+--- a/tests/wasm/event_test.go
++++ b/tests/wasm/event_test.go
+@@ -13,6 +13,9 @@ func TestEvent(t *testing.T) {
+
+ t.Parallel()
+
++ wasmTmpDir, server := startServer(t)
++ defer server.Close()
++
+ err := run("tinygo build -o " + wasmTmpDir + "/event.wasm -target wasm
testdata/event.go")
+ if err != nil {
+ t.Fatal(err)
+@@ -23,7 +26,7 @@ func TestEvent(t *testing.T) {
+
+ var log1, log2 string
+ err = chromedp.Run(ctx,
+- chromedp.Navigate("http://localhost:8826/run?file=event.wasm"),
++ chromedp.Navigate(server.URL+"/run?file=event.wasm"),
+ chromedp.WaitVisible("#log"),
+ chromedp.Sleep(time.Second),
+ chromedp.InnerHTML("#log", &log1),
+diff --git a/tests/wasm/fmt_test.go b/tests/wasm/fmt_test.go
+index 8b4fe8c..0f2b928 100644
+--- a/tests/wasm/fmt_test.go
++++ b/tests/wasm/fmt_test.go
+@@ -20,6 +20,9 @@ func TestFmt(t *testing.T) {
+
+ t.Parallel()
+
++ wasmTmpDir, server := startServer(t)
++ defer server.Close()
++
+ err := run("tinygo build -o " + wasmTmpDir + "/fmt.wasm -target wasm
testdata/fmt.go")
+ if err != nil {
+ t.Fatal(err)
+@@ -30,7 +33,7 @@ func TestFmt(t *testing.T) {
+
+ var log1 string
+ err = chromedp.Run(ctx,
+- chromedp.Navigate("http://localhost:8826/run?file=fmt.wasm"),
++ chromedp.Navigate(server.URL+"/run?file=fmt.wasm"),
+ chromedp.Sleep(time.Second),
+ chromedp.InnerHTML("#log", &log1),
+ waitLog(`did not panic`),
+diff --git a/tests/wasm/fmtprint_test.go b/tests/wasm/fmtprint_test.go
+index ebd1ffa..02e9596 100644
+--- a/tests/wasm/fmtprint_test.go
++++ b/tests/wasm/fmtprint_test.go
+@@ -13,6 +13,9 @@ func TestFmtprint(t *testing.T) {
+
+ t.Parallel()
+
++ wasmTmpDir, server := startServer(t)
++ defer server.Close()
++
+ err := run("tinygo build -o " + wasmTmpDir + "/fmtprint.wasm -target
wasm testdata/fmtprint.go")
+ if err != nil {
+ t.Fatal(err)
+@@ -23,7 +26,7 @@ func TestFmtprint(t *testing.T) {
+
+ var log1 string
+ err = chromedp.Run(ctx,
+- chromedp.Navigate("http://localhost:8826/run?file=fmtprint.wasm"),
++ chromedp.Navigate(server.URL+"/run?file=fmtprint.wasm"),
+ chromedp.Sleep(time.Second),
+ chromedp.InnerHTML("#log", &log1),
+ waitLog(`test from fmtprint 1
+diff --git a/tests/wasm/log_test.go b/tests/wasm/log_test.go
+index a9cc1be..655beb0 100644
+--- a/tests/wasm/log_test.go
++++ b/tests/wasm/log_test.go
+@@ -13,6 +13,9 @@ func TestLog(t *testing.T) {
+
+ t.Parallel()
+
++ wasmTmpDir, server := startServer(t)
++ defer server.Close()
++
+ err := run("tinygo build -o " + wasmTmpDir + "/log.wasm -target wasm
testdata/log.go")
+ if err != nil {
+ t.Fatal(err)
+@@ -23,7 +26,7 @@ func TestLog(t *testing.T) {
+
+ var log1 string
+ err = chromedp.Run(ctx,
+- chromedp.Navigate("http://localhost:8826/run?file=log.wasm"),
++ chromedp.Navigate(server.URL+"/run?file=log.wasm"),
+ chromedp.Sleep(time.Second),
+ chromedp.InnerHTML("#log", &log1),
+ waitLogRe(`^..../../.. ..:..:.. log 1
+diff --git a/tests/wasm/setup_test.go b/tests/wasm/setup_test.go
+index 6a84983..5120518 100644
+--- a/tests/wasm/setup_test.go
++++ b/tests/wasm/setup_test.go
+@@ -3,12 +3,10 @@ package wasm
+ import (
+ "context"
+ "errors"
+- "flag"
+ "fmt"
+- "io/ioutil"
+ "log"
+ "net/http"
+- "os"
++ "net/http/httptest"
+ "os/exec"
+ "regexp"
+ "strings"
+@@ -20,29 +18,6 @@ import (
+ "github.com/chromedp/chromedp"
+ )
+
+-var addr = flag.String("addr", ":8826", "Host:port to listen on
for wasm test server")
+-
+-var wasmTmpDir string // set in TestMain to a temp directory for build output
+-
+-func TestMain(m *testing.M) {
+- flag.Parse()
+-
+- os.Exit(func() int {
+-
+- var err error
+- wasmTmpDir, err = ioutil.TempDir("", "wasm_test")
+- if err != nil {
+- log.Fatalf("unable to create temp dir: %v", err)
+- }
+- defer os.RemoveAll(wasmTmpDir) // cleanup even on panic and before os.Exit
+-
+- startServer(wasmTmpDir)
+-
+- return m.Run()
+- }())
+-
+-}
+-
+ func run(cmdline string) error {
+ args := strings.Fields(cmdline)
+ return runargs(args...)
+@@ -70,8 +45,9 @@ func chromectx(timeout time.Duration) (context.Context,
context.CancelFunc) {
+ return ctx, cancel
+ }
+
+-func startServer(tmpDir string) {
++func startServer(t *testing.T) (tmpDir string, server *httptest.Server) {
+
++ tmpDir = t.TempDir()
+ fsh := http.FileServer(http.Dir(tmpDir))
+ h := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+
+@@ -140,11 +116,10 @@ if (wasmSupported) {
+ fsh.ServeHTTP(w, r)
+ })
+
+- log.Printf("Starting server at %q for dir: %s", *addr, tmpDir)
+- go func() {
+- log.Fatal(http.ListenAndServe(*addr, h))
+- }()
++ server = httptest.NewServer(h)
++ log.Printf("Started server at %q for dir: %s", server.URL, tmpDir)
+
++ return tmpDir, server
+ }
+
+ // waitLog blocks until the log output equals the text provided (ignoring whitespace
before and after)
+--
+2.29.2
+
diff --git a/0007-Add-support-for-Go-1.16.patch b/0007-Add-support-for-Go-1.16.patch
new file mode 100644
index 0000000..b961603
--- /dev/null
+++ b/0007-Add-support-for-Go-1.16.patch
@@ -0,0 +1,46 @@
+From 87cb1e65c80f62cf0a56c1bf99d8c1258d84aaa5 Mon Sep 17 00:00:00 2001
+From: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
+Date: Sun, 17 Jan 2021 05:07:17 -0500
+Subject: [PATCH 7/7] Add support for Go 1.16.
+
+Signed-off-by: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
+---
+ builder/config.go | 4 ++--
+ cgo/testdata/errors.out.go | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/builder/config.go b/builder/config.go
+index 9564386..b145ec5 100644
+--- a/builder/config.go
++++ b/builder/config.go
+@@ -25,8 +25,8 @@ func NewConfig(options *compileopts.Options) (*compileopts.Config,
error) {
+ if err != nil {
+ return nil, fmt.Errorf("could not read version from GOROOT (%v): %v",
goroot, err)
+ }
+- if major != 1 || minor < 11 || minor > 15 {
+- return nil, fmt.Errorf("requires go version 1.11 through 1.15, got go%d.%d",
major, minor)
++ if major != 1 || minor < 11 || minor > 16 {
++ return nil, fmt.Errorf("requires go version 1.11 through 1.16, got go%d.%d",
major, minor)
+ }
+ clangHeaderPath := getClangHeaderPath(goenv.Get("TINYGOROOT"))
+ return &compileopts.Config{
+diff --git a/cgo/testdata/errors.out.go b/cgo/testdata/errors.out.go
+index ace2390..b5d6978 100644
+--- a/cgo/testdata/errors.out.go
++++ b/cgo/testdata/errors.out.go
+@@ -4,10 +4,10 @@
+ // testdata/errors.go:13:23: unexpected token )
+
+ // Type checking errors after CGo processing:
+-// testdata/errors.go:102: 2 << 10 (untyped int constant 2048) overflows
uint8
++// testdata/errors.go:102: cannot use 2 << 10 (untyped int constant 2048) as
uint8 value in variable declaration (overflows)
+ // testdata/errors.go:105: unknown field z in struct literal
+ // testdata/errors.go:108: undeclared name: C.SOME_CONST_1
+-// testdata/errors.go:110: C.SOME_CONST_3 (untyped int constant 1234) overflows
byte
++// testdata/errors.go:110: cannot use C.SOME_CONST_3 (untyped int constant 1234) as
byte value in variable declaration (overflows)
+
+ package main
+
+--
+2.29.2
+
diff --git a/tinygo.spec b/tinygo.spec
index 92715dd..f39865d 100644
--- a/tinygo.spec
+++ b/tinygo.spec
@@ -58,16 +58,19 @@ Source5:
https://releases.llvm.org/%{compiler_rt_version}/compiler-rt-%{c
Source6:
https://github.com/NordicSemiconductor/nrfx/archive/%{nrfx_commit}/nrfx-%...
Source7:
https://github.com/keith-packard/picolibc/archive/%{picolibc_commit}/pico...
Source8:
https://github.com/WebAssembly/wasi-libc/archive/%{wasi_libc_commit}/wasi...
-# Fedora-specific.
-Patch0001: 0001-Use-Fedora-command-names.patch
-# We don't have ARM glibc to build these.
-Patch0002: 0002-Skip-ARM-Linux-tests.patch
# We can't include STM32 .svd files because of their weird license.
-Patch0003: 0003-Skip-STM32-tests.patch
+Patch0001: 0001-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
+Patch0002: 0002-Skip-WASI-tests.patch
+# We don't have cross-compiled glibc to build these.
+Patch0003: 0003-Only-run-native-Linux-tests-on-their-own-GOARCH.patch
+#
https://github.com/tinygo-org/tinygo/pull/1538
+Patch0004: 0004-Use-clang-to-do-linking.patch
+#
https://github.com/tinygo-org/tinygo/pull/1540
+Patch0005: 0005-Update-to-current-chromedp.patch
+#
https://github.com/tinygo-org/tinygo/pull/1542
+Patch0006: 0006-Use-httptest-to-serve-wasm-test-files.patch
+Patch0007: 0007-Add-support-for-Go-1.16.patch
# Not supported upstream yet.
ExcludeArch: armv7hl ppc64le s390x
@@ -118,6 +121,10 @@ Recommends: qemu-system-arm-core
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
+%patch0006 -p1
+%if %{fedora} >= 34
+%patch0007 -p1
+%endif
tar -C lib -xf %{SOURCE2}
rmdir lib/CMSIS
@@ -210,7 +217,7 @@ export PATH=%{buildroot}%{_bindir}:$PATH
export GO111MODULE=off
%gocheck -v -d tests/tinygotest
make smoketest XTENSA=0
-%ifnarch %{ix86}
+%ifnarch %{ix86} aarch64
make wasmtest
%endif
%endif
commit 934e871bb617938c015666371ad53e8d18a7c4cf
Author: Tom Stellard <tstellar(a)redhat.com>
Date: Tue Jan 12 00:59:34 2021 +0000
Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
diff --git a/tinygo.spec b/tinygo.spec
index 70b0fa1..92715dd 100644
--- a/tinygo.spec
+++ b/tinygo.spec
@@ -72,6 +72,7 @@ Patch0005: 0005-Only-run-i386-tests-on-GOARCH-386-systems.patch
# Not supported upstream yet.
ExcludeArch: armv7hl ppc64le s390x
+BuildRequires: make
BuildRequires: (clang-devel >= %{clang_version} with clang-devel < %{lua:
print(tonumber(rpm.expand('%{clang_version}')) + 1)})
BuildRequires:
golang(github.com/blakesmith/ar)
%ifnarch %{ix86}