From 9c53a3ef95d1217f01794a16fe2f60a91fb4575e Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Aug 02 2020 09:46:35 +0000 Subject: Add a patch that allows Go 1.15. --- diff --git a/0001-Use-Fedora-command-names.patch b/0001-Use-Fedora-command-names.patch index 8525017..b8662f7 100644 --- a/0001-Use-Fedora-command-names.patch +++ b/0001-Use-Fedora-command-names.patch @@ -1,7 +1,7 @@ From d1ee3f77dfc92f9168f8826ecb8fc0a4d414d031 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 7 Jun 2019 20:55:25 -0400 -Subject: [PATCH 1/3] Use Fedora command names. +Subject: [PATCH 1/4] Use Fedora command names. Signed-off-by: Elliott Sales de Andrade --- @@ -51,5 +51,5 @@ index ec7f708..092b765 100644 t.Run("ARM64Linux", func(t *testing.T) { runPlatTests("aarch64--linux-gnu", matches, t) -- -2.21.1 +2.25.4 diff --git a/0002-Skip-ARM-Linux-tests.patch b/0002-Skip-ARM-Linux-tests.patch index ff67137..181ca6a 100644 --- a/0002-Skip-ARM-Linux-tests.patch +++ b/0002-Skip-ARM-Linux-tests.patch @@ -1,7 +1,7 @@ From 4eb4a10582f059b1815f4adffbc8c9af9d25b137 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 12 Jun 2019 04:28:55 -0400 -Subject: [PATCH 2/3] Skip ARM Linux tests. +Subject: [PATCH 2/4] Skip ARM Linux tests. We don't have the C library to do this. @@ -28,5 +28,5 @@ index 092b765..992ef5f 100644 if err != nil { t.Error("could not get Go version:", err) -- -2.21.1 +2.25.4 diff --git a/0003-Skip-STM32-tests.patch b/0003-Skip-STM32-tests.patch index a2e4426..4bf5275 100644 --- a/0003-Skip-STM32-tests.patch +++ b/0003-Skip-STM32-tests.patch @@ -1,7 +1,7 @@ From 5fa41b7124a3049ffdd5a81472be8a74d390a1ed Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 13 Jun 2019 02:50:40 -0400 -Subject: [PATCH 3/3] Skip STM32 tests. +Subject: [PATCH 3/4] Skip STM32 tests. We can't ship the STM32 .svd files due to their odd license. @@ -53,5 +53,5 @@ index bacd9b5..11103a5 100644 @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=x9pro examples/blinky1 -- -2.21.1 +2.25.4 diff --git a/0004-Allow-Go-1.15.patch b/0004-Allow-Go-1.15.patch new file mode 100644 index 0000000..2e35a70 --- /dev/null +++ b/0004-Allow-Go-1.15.patch @@ -0,0 +1,54 @@ +From 7448970ea8965d6fb5e6607c3e33fc24a4ee4c9f Mon Sep 17 00:00:00 2001 +From: Elliott Sales de Andrade +Date: Sun, 2 Aug 2020 05:42:37 -0400 +Subject: [PATCH 4/4] 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 4988610..f419178 100644 +--- a/.circleci/config.yml ++++ b/.circleci/config.yml +@@ -333,6 +333,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 +@@ -359,6 +365,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 aabf82a..b0d262e 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.25.4 + diff --git a/tinygo.spec b/tinygo.spec index 0c12a98..c1614ec 100644 --- a/tinygo.spec +++ b/tinygo.spec @@ -65,6 +65,8 @@ 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 # Not supported upstream yet. ExcludeArch: armv7hl ppc64le s390x @@ -106,6 +108,7 @@ Recommends: qemu-system-arm-core %patch0001 -p1 %patch0002 -p1 %patch0003 -p1 +%patch0004 -p1 tar -C lib -xf %{SOURCE2} rmdir lib/CMSIS @@ -219,6 +222,9 @@ PATH=%{buildroot}%{_bindir}:$PATH make smoketest %changelog +* Sun Aug 02 2020 Elliott Sales de Andrade - 0.13.1-3 +- Patch to allow Go 1.15 + * Sat Aug 01 2020 Fedora Release Engineering - 0.13.1-3 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild