From 4ce2174a9a4835e88ebfa4e48d294aaefad58a63 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 29 Nov 2021 05:49:40 -0500 Subject: [PATCH] Update to 0.20.0 (#1978517) --- .gitignore | 1 + 0001-Skip-WASI-tests.patch | 17 ++++++++--------- ...native-Linux-tests-on-their-own-GOARCH.patch | 12 ++++++------ 0003-Use-clang-to-do-linking.patch | 8 ++++---- clean_tarballs.sh | 3 ++- sources | 4 ++-- tinygo.spec | 6 +++--- 7 files changed, 26 insertions(+), 25 deletions(-) diff --git a/.gitignore b/.gitignore index 5292c88..dcf20a6 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ /tinygo-0.17.0.tar.gz /tinygo-0.18.0.tar.gz /tinygo-0.19.0.tar.gz +/tinygo-0.20.0.tar.gz diff --git a/0001-Skip-WASI-tests.patch b/0001-Skip-WASI-tests.patch index 28d291c..30f6d29 100644 --- a/0001-Skip-WASI-tests.patch +++ b/0001-Skip-WASI-tests.patch @@ -1,4 +1,4 @@ -From e5e3be1140751de5175932c2b6c9b7bcf8d550be Mon Sep 17 00:00:00 2001 +From 370c2cd8a92ff431503bfb823b15b30478767ffb Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 15 Dec 2020 05:06:04 -0500 Subject: [PATCH 1/4] Skip WASI tests. @@ -7,18 +7,17 @@ We do not have wasmtime available. Signed-off-by: Elliott Sales de Andrade --- - main_test.go | 4 ---- - 1 file changed, 4 deletions(-) + main_test.go | 3 --- + 1 file changed, 3 deletions(-) diff --git a/main_test.go b/main_test.go -index 51fd21fd..662fca66 100644 +index 7ebf8eb0..cdba1c3f 100644 --- a/main_test.go +++ b/main_test.go -@@ -108,10 +108,6 @@ func TestCompiler(t *testing.T) { - runPlatTests("wasm", tests, t) - }) - } -- +@@ -106,9 +106,6 @@ func TestCompiler(t *testing.T) { + t.Run("WebAssembly", func(t *testing.T) { + runPlatTests("wasm", tests, t) + }) - t.Run("WASI", func(t *testing.T) { - runPlatTests("wasi", tests, t) - }) diff --git a/0002-Only-run-native-Linux-tests-on-their-own-GOARCH.patch b/0002-Only-run-native-Linux-tests-on-their-own-GOARCH.patch index 06764a8..910762a 100644 --- a/0002-Only-run-native-Linux-tests-on-their-own-GOARCH.patch +++ b/0002-Only-run-native-Linux-tests-on-their-own-GOARCH.patch @@ -1,4 +1,4 @@ -From 4ac1cf8c54dd56d935bce8dc0b1863ff347345f4 Mon Sep 17 00:00:00 2001 +From 64dc7032e3e942a26a4a3a8f24c6b1fce4f36f04 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 21 Dec 2020 04:26:02 -0500 Subject: [PATCH 2/4] Only run native Linux tests on their own GOARCH. @@ -12,10 +12,10 @@ Signed-off-by: Elliott Sales de Andrade 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/main_test.go b/main_test.go -index 662fca66..aa2073fb 100644 +index cdba1c3f..beb65994 100644 --- a/main_test.go +++ b/main_test.go -@@ -85,15 +85,24 @@ func TestCompiler(t *testing.T) { +@@ -94,15 +94,24 @@ func TestCompiler(t *testing.T) { } if runtime.GOOS == "linux" { @@ -46,9 +46,9 @@ index 662fca66..aa2073fb 100644 + runPlatTests("aarch64--linux-gnu", tests, t) + }) + } - goVersion, err := goenv.GorootVersionString(goenv.Get("GOROOT")) - if err != nil { - t.Error("could not get Go version:", err) + t.Run("WebAssembly", func(t *testing.T) { + runPlatTests("wasm", tests, t) + }) -- 2.31.1 diff --git a/0003-Use-clang-to-do-linking.patch b/0003-Use-clang-to-do-linking.patch index c7927d9..02df169 100644 --- a/0003-Use-clang-to-do-linking.patch +++ b/0003-Use-clang-to-do-linking.patch @@ -1,4 +1,4 @@ -From bc8ebbf8b8f7b4e83f34a7fd90fbf64a8108f539 Mon Sep 17 00:00:00 2001 +From ebec9ce9c029ce56820b6b07051cd6ad76988e30 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 21 Dec 2020 04:28:59 -0500 Subject: [PATCH 3/4] Use clang to do linking. @@ -13,10 +13,10 @@ Signed-off-by: Elliott Sales de Andrade 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/compileopts/target.go b/compileopts/target.go -index ba5f7382..411d99d9 100644 +index a84896c9..cf654748 100644 --- a/compileopts/target.go +++ b/compileopts/target.go -@@ -247,9 +247,10 @@ func defaultTarget(goos, goarch, triple string) (*TargetSpec, error) { +@@ -248,9 +248,10 @@ func defaultTarget(goos, goarch, triple string) (*TargetSpec, error) { GOARCH: goarch, BuildTags: []string{goos, goarch}, Scheduler: "tasks", @@ -28,7 +28,7 @@ index ba5f7382..411d99d9 100644 GDB: []string{"gdb"}, PortReset: "false", } -@@ -268,18 +269,12 @@ func defaultTarget(goos, goarch, triple string) (*TargetSpec, error) { +@@ -272,18 +273,12 @@ func defaultTarget(goos, goarch, triple string) (*TargetSpec, error) { spec.GDB = []string{"gdb-multiarch"} if goarch == "arm" && goos == "linux" { spec.CFlags = append(spec.CFlags, "--sysroot=/usr/arm-linux-gnueabihf") diff --git a/clean_tarballs.sh b/clean_tarballs.sh index 50598f1..84b74a5 100755 --- a/clean_tarballs.sh +++ b/clean_tarballs.sh @@ -1,7 +1,7 @@ #!/bin/bash -e CMSIS_VERSION=9fe411cef1cef5de58e5957b89760759de44e393 -CMSIS_SVD_VERSION=9c35b6d9df1f9eeecfcc33fc6f98719dbaaa30ce +CMSIS_SVD_VERSION=df75ff974c76a911fc2815e29807f5ecaae06fc2 if [ -e "cmsis-${CMSIS_VERSION}-clean.tar.xz" ]; then echo "Not downloading cmsis-${CMSIS_VERSION}-clean.tar.xz again!" @@ -27,6 +27,7 @@ wget -nc https://github.com/tinygo-org/cmsis-svd/archive/${CMSIS_SVD_VERSION}/cm tar xf cmsis_svd-${CMSIS_SVD_VERSION}.tar.gz tar cJf cmsis_svd-${CMSIS_SVD_VERSION}-clean.tar.xz \ cmsis-svd-${CMSIS_SVD_VERSION}/data/Atmel/ \ + cmsis-svd-${CMSIS_SVD_VERSION}/data/Espressif/ \ cmsis-svd-${CMSIS_SVD_VERSION}/data/Espressif-Community/ \ cmsis-svd-${CMSIS_SVD_VERSION}/data/Kendryte-Community/ \ cmsis-svd-${CMSIS_SVD_VERSION}/data/SiFive-Community/ \ diff --git a/sources b/sources index d343345..a08cd59 100644 --- a/sources +++ b/sources @@ -1,7 +1,7 @@ -SHA512 (tinygo-0.19.0.tar.gz) = 2decbf3f74318387b1cf22ca33240c8942237992de145f29bf548bfac04e95c73980c0f722be075f7e65a637d44c9a31fe22a253e5f168046d120d4a55bcfdf7 +SHA512 (tinygo-0.20.0.tar.gz) = 6a675c306badf11fe25ff968491693d3d9ac6116df5c99ec4fa32bb484217faf0d7160f9899ce7ac2c78e4eb680fbff20b1b0815c4038987f7becabef9a0a65a SHA512 (avr-6624554c02b237b23dc17d53e992bf54033fc228.tar.gz) = 1aa157bd761db38f8680614fa1cf47d7009508f65291b7eaaa5aba1ae76d35103f68a42947b7269a170d2f1cf8fb09941a5d74070fe6d204b68dd15a9ad2ed29 SHA512 (cmsis-9fe411cef1cef5de58e5957b89760759de44e393-clean.tar.xz) = f131fc241f61982c49f334eb502c2f13da61eb7bdaa641ee84a8de30c4d576b735b8aadeafd7d75351473a2df6a42de6a236ecc5dcc616ee6cfcc07af29446f9 -SHA512 (cmsis_svd-9c35b6d9df1f9eeecfcc33fc6f98719dbaaa30ce-clean.tar.xz) = 27e8d725944d15e3fac27154a695d9722062f217c183ac86e28e525c838b969809252f0932f739d205177f73f5ba23ef6467476127edb354b61ddddd7f0885d4 +SHA512 (cmsis_svd-df75ff974c76a911fc2815e29807f5ecaae06fc2-clean.tar.xz) = 8abbc6f366aed9571a74a4b6e7065ed2d6a59e0495c3745681d9a654d61edd136319788741f7afc781211adb64ed1faeafe9d6acc6be5a16d9ee48e98c5ddeb1 SHA512 (compiler-rt-9.0.0.src.tar.xz) = a7bb0a67165d29317cee58c22ed79f0d6a9cb9279dcd355d4267f3cd6c531a7be455a28267c591d6e2c0f9c56e363d40c10a405391e07d02ab3e30f00ffef2a8 SHA512 (nrfx-d779b49fc59c7a165e7da1d7cd7d57b28a059f16.tar.gz) = 31c7fc6fd88d4a74e5739b29659cb717a4629480d17d84e491d61c36c435aba16d38ef63d1036e508666a17eeaac5f11a5ff83211f88410f30cc2e152146ee83 SHA512 (picolibc-80528c684b10aaee977397e7eb40c4784e6dc433.tar.gz) = d7cdddf4ba2c4c4a447864e899c9e92674438358e8c1123c80d38b0c1d57cb35fdaaa60a73a16331637884d23207fdc9f06d7f28dc5920c76e25808869e2c7b1 diff --git a/tinygo.spec b/tinygo.spec index 7c8277d..c15e9fc 100644 --- a/tinygo.spec +++ b/tinygo.spec @@ -6,12 +6,12 @@ # https://github.com/tinygo-org/tinygo %global goipath github.com/tinygo-org/tinygo -Version: 0.19.0 +Version: 0.20.0 %global CMSIS_commit 9fe411cef1cef5de58e5957b89760759de44e393 %global avr_commit 6624554c02b237b23dc17d53e992bf54033fc228 %global clang_llvm_version 11 -%global cmsis_svd_commit 9c35b6d9df1f9eeecfcc33fc6f98719dbaaa30ce +%global cmsis_svd_commit df75ff974c76a911fc2815e29807f5ecaae06fc2 %global compiler_rt_version 9.0.0 %global nrfx_commit d779b49fc59c7a165e7da1d7cd7d57b28a059f16 %global picolibc_commit 80528c684b10aaee977397e7eb40c4784e6dc433 @@ -77,7 +77,7 @@ BuildRequires: golang(github.com/marcinbor85/gohex) BuildRequires: golang(github.com/mattn/go-colorable) >= 0.1.8 BuildRequires: golang(go.bug.st/serial) >= 1.1.2 BuildRequires: golang(golang.org/x/tools/go/ast/astutil) -BuildRequires: golang(golang.org/x/tools/go/ssa) +BuildRequires: golang(golang.org/x/tools/go/ssa) >= 0.1.7 BuildRequires: golang(tinygo.org/x/go-llvm) BuildRequires: llvm-devel(major) = %{clang_llvm_version} BuildRequires: make