diff --git a/.gitignore b/.gitignore index 8f9b359..198349d 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ /picolibc-80528c684b10aaee977397e7eb40c4784e6dc433.tar.gz /tinygo-0.13.1.tar.gz /tinygo-0.14.0.tar.gz +/tinygo-0.14.1.tar.gz diff --git a/0001-Use-Fedora-command-names.patch b/0001-Use-Fedora-command-names.patch index 39b9abc..1782a26 100644 --- a/0001-Use-Fedora-command-names.patch +++ b/0001-Use-Fedora-command-names.patch @@ -1,7 +1,7 @@ -From c81ab9b109a37eab29b4b109d913e53c81eae9b0 Mon Sep 17 00:00:00 2001 +From 53621b8f63cf33bf0434787a2e0a04eb41ddf6c3 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 7 Jun 2019 20:55:25 -0400 -Subject: [PATCH 1/5] Use Fedora command names. +Subject: [PATCH 1/3] 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 d5a096b..5241c6f 100644 --- a/0002-Skip-ARM-Linux-tests.patch +++ b/0002-Skip-ARM-Linux-tests.patch @@ -1,7 +1,7 @@ -From 6b902b8063d831dd13542254df8709e13744e85c Mon Sep 17 00:00:00 2001 +From 65cc18f689ccac86e6b37e98668681bd4de3bb5a Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 12 Jun 2019 04:28:55 -0400 -Subject: [PATCH 2/5] Skip ARM Linux tests. +Subject: [PATCH 2/3] 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 eb934a5..6b13b1d 100644 --- a/0003-Skip-STM32-tests.patch +++ b/0003-Skip-STM32-tests.patch @@ -1,7 +1,7 @@ -From dec3e5cbd6dc805ebf1dcbf83a7160512b4cce56 Mon Sep 17 00:00:00 2001 +From a185686f815ac98b75fa8167438c04e0fac8ffe1 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 13 Jun 2019 02:50:40 -0400 -Subject: [PATCH 3/5] Skip STM32 tests. +Subject: [PATCH 3/3] Skip STM32 tests. We can't ship the STM32 .svd files due to their odd license. @@ -11,7 +11,7 @@ Signed-off-by: Elliott Sales de Andrade 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/Makefile b/Makefile -index 4691d12..8d4408e 100644 +index 425a0cf..6f52722 100644 --- a/Makefile +++ b/Makefile @@ -118,7 +118,7 @@ fmt-check: diff --git a/0004-Allow-Go-1.15.patch b/0004-Allow-Go-1.15.patch deleted file mode 100644 index 418a59c..0000000 --- a/0004-Allow-Go-1.15.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 842bd697367563511df10969f551682ee6462f45 Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -Date: Sun, 2 Aug 2020 05:42:37 -0400 -Subject: [PATCH 4/5] Allow Go 1.15. - -Signed-off-by: Elliott Sales de Andrade ---- - .circleci/config.yml | 7 +++++++ - builder/config.go | 4 ++-- - 2 files changed, 9 insertions(+), 2 deletions(-) - -diff --git a/.circleci/config.yml b/.circleci/config.yml -index bee7e9a..9fef5bf 100644 ---- a/.circleci/config.yml -+++ b/.circleci/config.yml -@@ -387,6 +387,12 @@ jobs: - steps: - - test-linux: - llvm: "10" -+ test-llvm10-go115: -+ docker: -+ - image: circleci/golang:1.15-rc-buster -+ steps: -+ - test-linux: -+ llvm: "10" - assert-test-linux: - docker: - - image: circleci/golang:1.14-stretch -@@ -418,6 +424,7 @@ workflows: - - test-llvm10-go112 - - test-llvm10-go113 - - test-llvm10-go114 -+ - test-llvm10-go115 - - build-linux - - build-macos - - assert-test-linux -diff --git a/builder/config.go b/builder/config.go -index 3a83f7f..a1adfa1 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 > 14 { -- return nil, fmt.Errorf("requires go version 1.11, 1.12, 1.13, or 1.14, got go%d.%d", major, minor) -+ if major != 1 || minor < 11 || minor > 15 { -+ return nil, fmt.Errorf("requires go version 1.11, 1.12, 1.13, 1.14, or 1.15, got go%d.%d", major, minor) - } - clangHeaderPath := getClangHeaderPath(goenv.Get("TINYGOROOT")) - return &compileopts.Config{ --- -2.26.2 - diff --git a/0005-internal-bytealg-naive-attempt-to-copy-the-main-Go-1.patch b/0005-internal-bytealg-naive-attempt-to-copy-the-main-Go-1.patch deleted file mode 100644 index bc659e7..0000000 --- a/0005-internal-bytealg-naive-attempt-to-copy-the-main-Go-1.patch +++ /dev/null @@ -1,150 +0,0 @@ -From 86dedd0fda283a3ab6b364c1743f2b7b6ce3eacf Mon Sep 17 00:00:00 2001 -From: deadprogram -Date: Fri, 14 Aug 2020 22:21:04 +0200 -Subject: [PATCH 5/5] internal/bytealg: naive attempt to copy the main Go 1.15 - implementatation - -Signed-off-by: deadprogram -Signed-off-by: Elliott Sales de Andrade ---- - src/internal/bytealg/bytealg.go | 127 ++++++++++++++++++++++++++++++++ - 1 file changed, 127 insertions(+) - -diff --git a/src/internal/bytealg/bytealg.go b/src/internal/bytealg/bytealg.go -index f52b507..0169fbb 100644 ---- a/src/internal/bytealg/bytealg.go -+++ b/src/internal/bytealg/bytealg.go -@@ -124,3 +124,130 @@ func IndexString(str, sub string) int { - } - return -1 - } -+ -+// Copyright 2020 The Go Authors. All rights reserved. -+// Use of this source code is governed by a BSD-style -+// license that can be found in the LICENSE file. -+ -+// The following code has been copied from the Go 1.15 release tree. -+ -+// PrimeRK is the prime base used in Rabin-Karp algorithm. -+const PrimeRK = 16777619 -+ -+// HashStrBytes returns the hash and the appropriate multiplicative -+// factor for use in Rabin-Karp algorithm. -+func HashStrBytes(sep []byte) (uint32, uint32) { -+ hash := uint32(0) -+ for i := 0; i < len(sep); i++ { -+ hash = hash*PrimeRK + uint32(sep[i]) -+ } -+ var pow, sq uint32 = 1, PrimeRK -+ for i := len(sep); i > 0; i >>= 1 { -+ if i&1 != 0 { -+ pow *= sq -+ } -+ sq *= sq -+ } -+ return hash, pow -+} -+ -+// HashStr returns the hash and the appropriate multiplicative -+// factor for use in Rabin-Karp algorithm. -+func HashStr(sep string) (uint32, uint32) { -+ hash := uint32(0) -+ for i := 0; i < len(sep); i++ { -+ hash = hash*PrimeRK + uint32(sep[i]) -+ } -+ var pow, sq uint32 = 1, PrimeRK -+ for i := len(sep); i > 0; i >>= 1 { -+ if i&1 != 0 { -+ pow *= sq -+ } -+ sq *= sq -+ } -+ return hash, pow -+} -+ -+// HashStrRevBytes returns the hash of the reverse of sep and the -+// appropriate multiplicative factor for use in Rabin-Karp algorithm. -+func HashStrRevBytes(sep []byte) (uint32, uint32) { -+ hash := uint32(0) -+ for i := len(sep) - 1; i >= 0; i-- { -+ hash = hash*PrimeRK + uint32(sep[i]) -+ } -+ var pow, sq uint32 = 1, PrimeRK -+ for i := len(sep); i > 0; i >>= 1 { -+ if i&1 != 0 { -+ pow *= sq -+ } -+ sq *= sq -+ } -+ return hash, pow -+} -+ -+// HashStrRev returns the hash of the reverse of sep and the -+// appropriate multiplicative factor for use in Rabin-Karp algorithm. -+func HashStrRev(sep string) (uint32, uint32) { -+ hash := uint32(0) -+ for i := len(sep) - 1; i >= 0; i-- { -+ hash = hash*PrimeRK + uint32(sep[i]) -+ } -+ var pow, sq uint32 = 1, PrimeRK -+ for i := len(sep); i > 0; i >>= 1 { -+ if i&1 != 0 { -+ pow *= sq -+ } -+ sq *= sq -+ } -+ return hash, pow -+} -+ -+// IndexRabinKarpBytes uses the Rabin-Karp search algorithm to return the index of the -+// first occurence of substr in s, or -1 if not present. -+func IndexRabinKarpBytes(s, sep []byte) int { -+ // Rabin-Karp search -+ hashsep, pow := HashStrBytes(sep) -+ n := len(sep) -+ var h uint32 -+ for i := 0; i < n; i++ { -+ h = h*PrimeRK + uint32(s[i]) -+ } -+ if h == hashsep && Equal(s[:n], sep) { -+ return 0 -+ } -+ for i := n; i < len(s); { -+ h *= PrimeRK -+ h += uint32(s[i]) -+ h -= pow * uint32(s[i-n]) -+ i++ -+ if h == hashsep && Equal(s[i-n:i], sep) { -+ return i - n -+ } -+ } -+ return -1 -+} -+ -+// IndexRabinKarp uses the Rabin-Karp search algorithm to return the index of the -+// first occurence of substr in s, or -1 if not present. -+func IndexRabinKarp(s, substr string) int { -+ // Rabin-Karp search -+ hashss, pow := HashStr(substr) -+ n := len(substr) -+ var h uint32 -+ for i := 0; i < n; i++ { -+ h = h*PrimeRK + uint32(s[i]) -+ } -+ if h == hashss && s[:n] == substr { -+ return 0 -+ } -+ for i := n; i < len(s); { -+ h *= PrimeRK -+ h += uint32(s[i]) -+ h -= pow * uint32(s[i-n]) -+ i++ -+ if h == hashss && s[i-n:i] == substr { -+ return i - n -+ } -+ } -+ return -1 -+} --- -2.26.2 - diff --git a/sources b/sources index 3d055e8..dd69202 100644 --- a/sources +++ b/sources @@ -1,8 +1 @@ -SHA512 (tinygo-0.14.0.tar.gz) = ed3a0d8a451ecd96e8df3f8975573db7cb908841d891daafa97d708a804bbd98a4d14fbb52ea99b5a5ab14225a3aea1c84b2ea51f7c0ddc0a4c5824052104a3a -SHA512 (avr-6624554c02b237b23dc17d53e992bf54033fc228.tar.gz) = 1aa157bd761db38f8680614fa1cf47d7009508f65291b7eaaa5aba1ae76d35103f68a42947b7269a170d2f1cf8fb09941a5d74070fe6d204b68dd15a9ad2ed29 -SHA512 (cmsis-9fe411cef1cef5de58e5957b89760759de44e393-clean.tar.xz) = f131fc241f61982c49f334eb502c2f13da61eb7bdaa641ee84a8de30c4d576b735b8aadeafd7d75351473a2df6a42de6a236ecc5dcc616ee6cfcc07af29446f9 -SHA512 (cmsis_svd-a155cfd832c9e6ddf193244d8d90489f4d089cc7-clean.tar.xz) = 8af239f006b22f36e256602ab75aebdf71b0232b86332dcb3cbdeb29c5c6868623aa63340cef20aed3625628efa7168b973dc6479c56d851ed3c89b7c6f04e37 -SHA512 (compiler-rt-9.0.0.src.tar.xz) = a7bb0a67165d29317cee58c22ed79f0d6a9cb9279dcd355d4267f3cd6c531a7be455a28267c591d6e2c0f9c56e363d40c10a405391e07d02ab3e30f00ffef2a8 -SHA512 (nrfx-3ab39a9d457bfe627473ed0e03a7f1161d9e4f27.tar.gz) = 95b5293c9b707aeb4d8ad13643619c053ba0fa9423053a12f9a65b0ed8febc2aab87cd832e6ac73e9673987b7cb73f85cce68cb85ce4ca5bd607afee1098f9e9 -SHA512 (picolibc-80528c684b10aaee977397e7eb40c4784e6dc433.tar.gz) = d7cdddf4ba2c4c4a447864e899c9e92674438358e8c1123c80d38b0c1d57cb35fdaaa60a73a16331637884d23207fdc9f06d7f28dc5920c76e25808869e2c7b1 -SHA512 (wasi-libc-a280fead2ae71b9a230d3b48c1f95867431888e4.tar.gz) = 6202fc2c005171b3f34aaa61be242fafb8df65874df4055e84436ed35b0af40c657437a3bfc8e7a0606211bb87564f56b97c45cc41d9878285e057ff76878757 +SHA512 (tinygo-0.14.1.tar.gz) = 0e61178a4ecb112d49c89f2bd1134335e6991df5aa255fe2edcbe8ab0b6b8a343586950df2025b5012662582f467d4b5f61d7ec7a89fdb990020a675a501113e diff --git a/tinygo.spec b/tinygo.spec index 406e898..ddbcde6 100644 --- a/tinygo.spec +++ b/tinygo.spec @@ -6,7 +6,7 @@ # https://github.com/tinygo-org/tinygo %global goipath github.com/tinygo-org/tinygo -Version: 0.14.0 +Version: 0.14.1 %global CMSIS_commit 9fe411cef1cef5de58e5957b89760759de44e393 %global avr_commit 6624554c02b237b23dc17d53e992bf54033fc228 @@ -65,10 +65,6 @@ Patch0001: 0001-Use-Fedora-command-names.patch 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 -# https://github.com/tinygo-org/tinygo/pull/1276 -Patch0004: 0004-Allow-Go-1.15.patch -# https://github.com/tinygo-org/tinygo/pull/1293 -Patch0005: 0005-internal-bytealg-naive-attempt-to-copy-the-main-Go-1.patch # Not supported upstream yet. ExcludeArch: armv7hl ppc64le s390x @@ -110,10 +106,6 @@ Recommends: qemu-system-arm-core %patch0001 -p1 %patch0002 -p1 %patch0003 -p1 -%patch0004 -p1 -%if %{fedora} >= 33 -%patch0005 -p1 -%endif tar -C lib -xf %{SOURCE2} rmdir lib/CMSIS @@ -227,6 +219,9 @@ PATH=%{buildroot}%{_bindir}:$PATH GO111MODULE=off make smoketest %changelog +* Sat Aug 22 2020 Elliott Sales de Andrade - 0.14.1-3 +- Update to latest version (#1866183) + * Sun Aug 02 2020 Elliott Sales de Andrade - 0.13.1-3 - Patch to allow Go 1.15