From d40e6a24019a7713dbd1ab363c660742b90e7ac1 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sun, 14 Jul 2019 04:42:24 -0400 Subject: [PATCH 1/8] Reduce to older Go macros. --- tinygo.spec | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/tinygo.spec b/tinygo.spec index 1d45f4d..6619fba 100644 --- a/tinygo.spec +++ b/tinygo.spec @@ -23,10 +23,6 @@ Version: 0.6.0 Go compiler for small places. Microcontrollers, WebAssembly, and command-line tools. Based on LLVM.} -#global godocs CHANGELOG.md BUILDING.md CONTRIBUTING.md README.md -#global golicenses LICENSE LICENSE.TXT -#global gosupfiles lib/CMSIS/CMSIS/Include/*.h lib/compiler-rt/lib/builtins/*/*.S lib/nrfx/mdk/*.{ld,S} src/examples/wasm/*/*.js targets/*.{js,json,ld,S} - Name: tinygo Release: 1%{?dist} Summary: Go compiler for small places @@ -80,11 +76,9 @@ Recommends: qemu-system-arm-core %description %{common_description} -#gopkg - %prep -%goprep +%forgesetup %patch0001 -p1 %patch0002 -p1 %patch0003 -p1 @@ -117,19 +111,19 @@ ln -s /usr/lib64/clang/%{clang_version}/include lib/clang/include %build -%gobuild -o %{gobuilddir}/bin/tinygo %{goipath} +%gobuildroot +%gobuild -o _bin/tinygo %{goipath} GO111MODULE=off make gen-device for target in armv6m-none-eabi armv7m-none-eabi armv7em-none-eabi; do TINYGOROOT=$PWD \ - %{gobuilddir}/bin/tinygo \ + _bin/tinygo \ build-builtins -target=$target -o ${target}-compiler-rt.a done %install -#gopkginstall install -vdm 0755 %{buildroot}%{_bindir} -install -vpm 0755 %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ +install -vpm 0755 _bin/* %{buildroot}%{_bindir}/ install -vdm 0755 %{buildroot}%{tinygoroot} install -vdm 0755 %{buildroot}%{tinygoroot}/lib @@ -161,7 +155,7 @@ export GOPATH=%{buildroot}%{tinygoroot} # Fedora LLVM doesn't support AVR yet, so don't run full suite. # https://bugzilla.redhat.com/show_bug.cgi?id=1718492 PATH=%{buildroot}%{_bindir}:$PATH make smoketest-no-avr -%gocheck -v +%gochecks %endif @@ -176,7 +170,6 @@ PATH=%{buildroot}%{_bindir}:$PATH make smoketest-no-avr %license %{tinygoroot}/lib/nrfx/LICENSE %doc %{tinygoroot}/lib/nrfx/README.md -#gopkgfiles %changelog From e27e385162570b300ebec5c1f452b09a5f9111bc Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 24 Sep 2019 20:15:56 -0400 Subject: [PATCH 2/8] Update to latest version. --- .gitignore | 1 + ...tch => 0001-Use-Fedora-command-names.patch | 12 ++-- ...e-system-path-for-TINYGOROOT-default.patch | 41 -------------- ...s.patch => 0002-Skip-ARM-Linux-tests.patch | 6 +- ...tests.patch => 0003-Skip-STM32-tests.patch | 16 ++++-- ...erridding-Python-used-for-generators.patch | 56 +++++++++++++++++++ sources | 7 +-- tinygo.spec | 17 ++++-- 8 files changed, 88 insertions(+), 68 deletions(-) rename 0002-Use-Fedora-command-names.patch => 0001-Use-Fedora-command-names.patch (82%) delete mode 100644 0001-Use-system-path-for-TINYGOROOT-default.patch rename 0003-Skip-ARM-Linux-tests.patch => 0002-Skip-ARM-Linux-tests.patch (87%) rename 0004-Skip-STM32-tests.patch => 0003-Skip-STM32-tests.patch (77%) create mode 100644 0004-Allow-overridding-Python-used-for-generators.patch diff --git a/.gitignore b/.gitignore index 2567ac0..250346d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /tinygo-0.7.0.tar.gz /cmsis_svd-5910f3d115a53ead55c8158da24a8fa8bda1eb50-clean.tar.xz /tinygo-0.7.1.tar.gz +/tinygo-0.8.0.tar.gz diff --git a/0002-Use-Fedora-command-names.patch b/0001-Use-Fedora-command-names.patch similarity index 82% rename from 0002-Use-Fedora-command-names.patch rename to 0001-Use-Fedora-command-names.patch index a55f18f..bdb100c 100644 --- a/0002-Use-Fedora-command-names.patch +++ b/0001-Use-Fedora-command-names.patch @@ -1,7 +1,7 @@ -From ed1e9c66e17e2cf3bc2d21f04208f07a259ffc32 Mon Sep 17 00:00:00 2001 +From 09d3a1157e66bde46f3919142f65e409de7b447b Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 7 Jun 2019 20:55:25 -0400 -Subject: [PATCH 2/4] Use Fedora command names. +Subject: [PATCH 1/4] Use Fedora command names. Signed-off-by: Elliott Sales de Andrade --- @@ -10,7 +10,7 @@ Signed-off-by: Elliott Sales de Andrade 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/main_test.go b/main_test.go -index fa85a82..f0d403c 100644 +index 9b406d2..6a47393 100644 --- a/main_test.go +++ b/main_test.go @@ -70,7 +70,7 @@ func TestCompiler(t *testing.T) { @@ -23,10 +23,10 @@ index fa85a82..f0d403c 100644 } diff --git a/target.go b/target.go -index fc4589b..6c29ce8 100644 +index ad701e8..29ac6a0 100644 --- a/target.go +++ b/target.go -@@ -173,7 +173,7 @@ func LoadTarget(target string) (*TargetSpec, error) { +@@ -181,7 +181,7 @@ func LoadTarget(target string) (*TargetSpec, error) { } target = llvmarch + "--" + llvmos if goarch == "arm" { @@ -35,7 +35,7 @@ index fc4589b..6c29ce8 100644 } return defaultTarget(goos, goarch, target) } -@@ -238,9 +238,9 @@ func defaultTarget(goos, goarch, triple string) (*TargetSpec, error) { +@@ -246,9 +246,9 @@ func defaultTarget(goos, goarch, triple string) (*TargetSpec, error) { if goarch != runtime.GOARCH { // Some educated guesses as to how to invoke helper programs. if goarch == "arm" && goos == "linux" { diff --git a/0001-Use-system-path-for-TINYGOROOT-default.patch b/0001-Use-system-path-for-TINYGOROOT-default.patch deleted file mode 100644 index 0cf6bfe..0000000 --- a/0001-Use-system-path-for-TINYGOROOT-default.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 76d5a1c269245c410458702997c72d64e53afdb3 Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -Date: Fri, 7 Jun 2019 20:53:54 -0400 -Subject: [PATCH 1/4] Use system path for TINYGOROOT default. - -Signed-off-by: Elliott Sales de Andrade ---- - target.go | 17 ++--------------- - 1 file changed, 2 insertions(+), 15 deletions(-) - -diff --git a/target.go b/target.go -index 679fa19..fc4589b 100644 ---- a/target.go -+++ b/target.go -@@ -267,21 +267,8 @@ func sourceDir() string { - return root - } - -- // Find root from executable path. -- path, err := os.Executable() -- if err != nil { -- // Very unlikely. Bail out if it happens. -- panic("could not get executable path: " + err.Error()) -- } -- root = filepath.Dir(filepath.Dir(path)) -- if isSourceDir(root) { -- return root -- } -- -- // Fallback: use the original directory from where it was built -- // https://stackoverflow.com/a/32163888/559350 -- _, path, _, _ = runtime.Caller(0) -- root = filepath.Dir(path) -+ // Use system directory -+ root = "/usr/share/tinygo" - if isSourceDir(root) { - return root - } --- -2.21.0 - diff --git a/0003-Skip-ARM-Linux-tests.patch b/0002-Skip-ARM-Linux-tests.patch similarity index 87% rename from 0003-Skip-ARM-Linux-tests.patch rename to 0002-Skip-ARM-Linux-tests.patch index 5117ea3..1ced3a0 100644 --- a/0003-Skip-ARM-Linux-tests.patch +++ b/0002-Skip-ARM-Linux-tests.patch @@ -1,7 +1,7 @@ -From 8e26941216ff2213ab396ba2bdfe06a370a77553 Mon Sep 17 00:00:00 2001 +From 351e01b09db90ca01a3a70817c7360c986ef7eb7 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 12 Jun 2019 04:28:55 -0400 -Subject: [PATCH 3/4] Skip ARM Linux tests. +Subject: [PATCH 2/4] Skip ARM Linux tests. We don't have the C library to do this. @@ -11,7 +11,7 @@ Signed-off-by: Elliott Sales de Andrade 1 file changed, 6 insertions(+) diff --git a/main_test.go b/main_test.go -index f0d403c..0f28752 100644 +index 6a47393..86e7fd3 100644 --- a/main_test.go +++ b/main_test.go @@ -66,6 +66,9 @@ func TestCompiler(t *testing.T) { diff --git a/0004-Skip-STM32-tests.patch b/0003-Skip-STM32-tests.patch similarity index 77% rename from 0004-Skip-STM32-tests.patch rename to 0003-Skip-STM32-tests.patch index 874e730..7f6cf5e 100644 --- a/0004-Skip-STM32-tests.patch +++ b/0003-Skip-STM32-tests.patch @@ -1,17 +1,17 @@ -From a49998a25be22a56f0f668b77b8994dc4d5987aa Mon Sep 17 00:00:00 2001 +From d195702b68f8fac69fbafcabb490081834d4bb39 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 13 Jun 2019 02:50:40 -0400 -Subject: [PATCH 4/4] Skip STM32 tests. +Subject: [PATCH 3/4] Skip STM32 tests. We can't ship the STM32 .svd files due to their odd license. Signed-off-by: Elliott Sales de Andrade --- - Makefile | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) + Makefile | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Makefile b/Makefile -index 239a2df..c8ece47 100644 +index e1d9061..90c9efc 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ fmt-check: @@ -31,15 +31,19 @@ index 239a2df..c8ece47 100644 tinygo build -size short -o test.elf -target=reelboard examples/blinky1 tinygo build -size short -o test.elf -target=reelboard examples/blinky2 tinygo build -size short -o test.elf -target=pca10056 examples/blinky1 -@@ -121,8 +120,6 @@ smoketest: +@@ -121,12 +120,9 @@ smoketest: tinygo build -size short -o test.elf -target=feather-m0 examples/blinky1 tinygo build -size short -o test.elf -target=trinket-m0 examples/blinky1 tinygo build -size short -o test.elf -target=circuitplay-express examples/blinky1 - tinygo build -size short -o test.elf -target=stm32f4disco examples/blinky1 - tinygo build -size short -o test.elf -target=stm32f4disco examples/blinky2 tinygo build -size short -o test.elf -target=circuitplay-express examples/i2s + tinygo build -size short -o test.elf -target=gameboy-advance examples/gba-display + tinygo build -size short -o test.elf -target=itsybitsy-m4 examples/blinky1 +- tinygo build -size short -o test.elf -target=nucleo-f103rb examples/blinky1 ifneq ($(AVR), 0) tinygo build -size short -o test.elf -target=arduino examples/blinky1 + tinygo build -size short -o test.elf -target=digispark examples/blinky1 -- 2.21.0 diff --git a/0004-Allow-overridding-Python-used-for-generators.patch b/0004-Allow-overridding-Python-used-for-generators.patch new file mode 100644 index 0000000..a8cd80f --- /dev/null +++ b/0004-Allow-overridding-Python-used-for-generators.patch @@ -0,0 +1,56 @@ +From 6156198f2378eee7912a5e5395bd799e13f8aae9 Mon Sep 17 00:00:00 2001 +From: Elliott Sales de Andrade +Date: Tue, 24 Sep 2019 04:50:25 -0400 +Subject: [PATCH 4/4] Allow overridding Python used for generators. + +Signed-off-by: Elliott Sales de Andrade +--- + Makefile | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/Makefile b/Makefile +index 90c9efc..65d407d 100644 +--- a/Makefile ++++ b/Makefile +@@ -3,6 +3,7 @@ + all: tinygo + tinygo: build/tinygo + ++PYTHON ?= python + # Default build and source directories, as created by `make llvm-build`. + LLVM_BUILDDIR ?= llvm-build + CLANG_SRC ?= llvm-project/clang +@@ -44,24 +45,24 @@ fmt-check: + gen-device: gen-device-avr gen-device-nrf gen-device-sam gen-device-sifive + + gen-device-avr: +- ./tools/gen-device-avr.py lib/avr/packs/atmega src/device/avr/ +- ./tools/gen-device-avr.py lib/avr/packs/tiny src/device/avr/ ++ $(PYTHON) ./tools/gen-device-avr.py lib/avr/packs/atmega src/device/avr/ ++ $(PYTHON) ./tools/gen-device-avr.py lib/avr/packs/tiny src/device/avr/ + go fmt ./src/device/avr + + gen-device-nrf: +- ./tools/gen-device-svd.py lib/nrfx/mdk/ src/device/nrf/ --source=https://github.com/NordicSemiconductor/nrfx/tree/master/mdk ++ $(PYTHON) ./tools/gen-device-svd.py lib/nrfx/mdk/ src/device/nrf/ --source=https://github.com/NordicSemiconductor/nrfx/tree/master/mdk + go fmt ./src/device/nrf + + gen-device-sam: +- ./tools/gen-device-svd.py lib/cmsis-svd/data/Atmel/ src/device/sam/ --source=https://github.com/posborne/cmsis-svd/tree/master/data/Atmel ++ $(PYTHON) ./tools/gen-device-svd.py lib/cmsis-svd/data/Atmel/ src/device/sam/ --source=https://github.com/posborne/cmsis-svd/tree/master/data/Atmel + go fmt ./src/device/sam + + gen-device-sifive: +- ./tools/gen-device-svd.py lib/cmsis-svd/data/SiFive-Community/ src/device/sifive/ --source=https://github.com/AdaCore/svd2ada/tree/master/CMSIS-SVD/SiFive-Community ++ $(PYTHON) ./tools/gen-device-svd.py lib/cmsis-svd/data/SiFive-Community/ src/device/sifive/ --source=https://github.com/AdaCore/svd2ada/tree/master/CMSIS-SVD/SiFive-Community + go fmt ./src/device/sifive + + gen-device-stm32: +- ./tools/gen-device-svd.py lib/cmsis-svd/data/STMicro/ src/device/stm32/ --source=https://github.com/posborne/cmsis-svd/tree/master/data/STMicro ++ $(PYTHON) ./tools/gen-device-svd.py lib/cmsis-svd/data/STMicro/ src/device/stm32/ --source=https://github.com/posborne/cmsis-svd/tree/master/data/STMicro + go fmt ./src/device/stm32 + + +-- +2.21.0 + diff --git a/sources b/sources index 32428a0..7aba3e1 100644 --- a/sources +++ b/sources @@ -1,6 +1 @@ -SHA512 (tinygo-0.7.1.tar.gz) = f97b0c3a6bd65bbc8c1ec41a8452fa88e0c6c4b8bbe3216ea25b8014d035a90847c5d1f219b9be9c5476a463e5a5da53128a8254498126ac1f6239959d95bace -SHA512 (avr-6624554c02b237b23dc17d53e992bf54033fc228.tar.gz) = 1aa157bd761db38f8680614fa1cf47d7009508f65291b7eaaa5aba1ae76d35103f68a42947b7269a170d2f1cf8fb09941a5d74070fe6d204b68dd15a9ad2ed29 -SHA512 (cmsis-9fe411cef1cef5de58e5957b89760759de44e393-clean.tar.xz) = f131fc241f61982c49f334eb502c2f13da61eb7bdaa641ee84a8de30c4d576b735b8aadeafd7d75351473a2df6a42de6a236ecc5dcc616ee6cfcc07af29446f9 -SHA512 (cmsis_svd-5910f3d115a53ead55c8158da24a8fa8bda1eb50-clean.tar.xz) = 7187cade0e78bbd6e65a8f38109aa95783e71cc3fad445fc51ac8fca796845b8ad4b9b84335ef3aa725b9abb0c3ed72c768c0f7da5ecc7b14a505a328b625b47 -SHA512 (compiler-rt-8.0.0.src.tar.xz) = fe9f69fe2269fa3d560ae97fdacd462f855fb0b7a5f647f5b8595206ff7febca6496725adc953de411a827c761e2b3ca11a2149f25707d6c62af0722b68ba913 -SHA512 (nrfx-3ab39a9d457bfe627473ed0e03a7f1161d9e4f27.tar.gz) = 95b5293c9b707aeb4d8ad13643619c053ba0fa9423053a12f9a65b0ed8febc2aab87cd832e6ac73e9673987b7cb73f85cce68cb85ce4ca5bd607afee1098f9e9 +SHA512 (tinygo-0.8.0.tar.gz) = 0f3750c3d216033342efc77fc419d9299202880bb9979f6db6c9e7f4c3f7b3792e5d407a0a9543b07c1ed8c08d16d062465e22cf392e5f71227d09afdf7275ea diff --git a/tinygo.spec b/tinygo.spec index 95ce5f3..00064d6 100644 --- a/tinygo.spec +++ b/tinygo.spec @@ -5,7 +5,7 @@ # https://github.com/tinygo-org/tinygo %global goipath github.com/tinygo-org/tinygo -Version: 0.7.1 +Version: 0.8.0 %global CMSIS_commit 9fe411cef1cef5de58e5957b89760759de44e393 %global avr_commit 6624554c02b237b23dc17d53e992bf54033fc228 @@ -43,12 +43,13 @@ Source4: cmsis_svd-%{cmsis_svd_commit}-clean.tar.xz Source5: https://releases.llvm.org/%{compiler_rt_version}/compiler-rt-%{compiler_rt_version}.src.tar.xz Source6: https://github.com/NordicSemiconductor/nrfx/archive/%{nrfx_commit}/nrfx-%{nrfx_commit}.tar.gz # Fedora-specific. -Patch0001: 0001-Use-system-path-for-TINYGOROOT-default.patch -Patch0002: 0002-Use-Fedora-command-names.patch +Patch0001: 0001-Use-Fedora-command-names.patch # We don't have ARM glibc to build these. -Patch0003: 0003-Skip-ARM-Linux-tests.patch +Patch0002: 0002-Skip-ARM-Linux-tests.patch # We can't include STM32 .svd files because of their weird license. -Patch0004: 0004-Skip-STM32-tests.patch +Patch0003: 0003-Skip-STM32-tests.patch +# ... +Patch0004: 0004-Allow-overridding-Python-used-for-generators.patch # Not supported upstream yet. ExcludeArch: %{ix86} armv7hl ppc64le s390x @@ -111,9 +112,10 @@ ln -s /usr/lib64/clang/%{clang_version}/include lib/clang/include %build +export LDFLAGS="-X main.TINYGOROOT=%{tinygoroot} " %gobuildroot %gobuild -o _bin/tinygo %{goipath} -GO111MODULE=off %make_build gen-device +GO111MODULE=off %make_build gen-device PYTHON=%{__python3} for target in armv6m-none-eabi armv7m-none-eabi armv7em-none-eabi; do TINYGOROOT=$PWD \ _bin/tinygo \ @@ -174,6 +176,9 @@ PATH=%{buildroot}%{_bindir}:$PATH make smoketest AVR=0 RISCV=0 %changelog +* Tue Sep 24 2019 Elliott Sales de Andrade - 0.8.0-1 +- Update to latest version + * Sun Aug 04 2019 Elliott Sales de Andrade - 0.7.1-1 - Update to latest version From afb8a60cc7681148f8bfe3344d61b9b574b47cfb Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 24 Sep 2019 20:19:48 -0400 Subject: [PATCH 3/8] Ignore non-clean tarballs as well. --- .gitignore | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 250346d..c875580 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,11 @@ -/avr-6624554c02b237b23dc17d53e992bf54033fc228.tar.gz -/cmsis-9fe411cef1cef5de58e5957b89760759de44e393-clean.tar.xz -/cmsis_svd-b6f0a65ac37760f52d6ade23dd3205424d6c91fa-clean.tar.xz -/compiler-rt-8.0.0.src.tar.xz -/nrfx-3ab39a9d457bfe627473ed0e03a7f1161d9e4f27.tar.gz +/avr-*.tar.gz +/cmsis-*.tar.gz +/cmsis-*-clean.tar.xz +/cmsis_svd-*.tar.gz +/cmsis_svd-*-clean.tar.xz +/compiler-rt-*.src.tar.xz +/nrfx-*.tar.gz /tinygo-0.6.0.tar.gz /tinygo-0.7.0.tar.gz -/cmsis_svd-5910f3d115a53ead55c8158da24a8fa8bda1eb50-clean.tar.xz /tinygo-0.7.1.tar.gz /tinygo-0.8.0.tar.gz From 6398141dc32ff30c20778786b9383c103a1545fa Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 25 Sep 2019 02:25:23 -0400 Subject: [PATCH 4/8] Enable x86 build. --- tinygo.spec | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tinygo.spec b/tinygo.spec index 00064d6..b46733d 100644 --- a/tinygo.spec +++ b/tinygo.spec @@ -14,8 +14,9 @@ Version: 0.8.0 %global compiler_rt_version 8.0.0 %global nrfx_commit 3ab39a9d457bfe627473ed0e03a7f1161d9e4f27 -# To match regular Go's /usr/share/gocode -%global tinygoroot %{_prefix}/share/tinygo +# No longer matching regular Go's /usr/share/gocode because it also provides +# pre-compiled binaries, and symlinks to arch-specific clang headers. +%global tinygoroot %{_libdir}/tinygo %gometa @@ -52,7 +53,7 @@ Patch0003: 0003-Skip-STM32-tests.patch Patch0004: 0004-Allow-overridding-Python-used-for-generators.patch # Not supported upstream yet. -ExcludeArch: %{ix86} armv7hl ppc64le s390x +ExcludeArch: armv7hl ppc64le s390x BuildRequires: clang-devel = %{clang_version} BuildRequires: golang(github.com/blakesmith/ar) @@ -108,7 +109,7 @@ rm lib/nrfx/.gitignore chmod -x lib/nrfx/doc/generate_html_doc.sh mkdir lib/clang -ln -s /usr/lib64/clang/%{clang_version}/include lib/clang/include +ln -s %{_libdir}/clang/%{clang_version}/include lib/clang/include %build @@ -178,6 +179,7 @@ PATH=%{buildroot}%{_bindir}:$PATH make smoketest AVR=0 RISCV=0 %changelog * Tue Sep 24 2019 Elliott Sales de Andrade - 0.8.0-1 - Update to latest version +- Enable x86 build * Sun Aug 04 2019 Elliott Sales de Andrade - 0.7.1-1 - Update to latest version From a13f77fe54e4afffde707a9ce20013dbbe6472a1 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 25 Sep 2019 02:47:00 -0400 Subject: [PATCH 5/8] Add patch reference. --- tinygo.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tinygo.spec b/tinygo.spec index b46733d..0222e01 100644 --- a/tinygo.spec +++ b/tinygo.spec @@ -49,7 +49,7 @@ 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/590 Patch0004: 0004-Allow-overridding-Python-used-for-generators.patch # Not supported upstream yet. From 0976ef17a7c7249b82b42b0e9b640751f47d5ae7 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 25 Sep 2019 03:02:31 -0400 Subject: [PATCH 6/8] Restore missing sources entries. --- sources | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sources b/sources index 7aba3e1..28719c2 100644 --- a/sources +++ b/sources @@ -1 +1,6 @@ SHA512 (tinygo-0.8.0.tar.gz) = 0f3750c3d216033342efc77fc419d9299202880bb9979f6db6c9e7f4c3f7b3792e5d407a0a9543b07c1ed8c08d16d062465e22cf392e5f71227d09afdf7275ea +SHA512 (avr-6624554c02b237b23dc17d53e992bf54033fc228.tar.gz) = 1aa157bd761db38f8680614fa1cf47d7009508f65291b7eaaa5aba1ae76d35103f68a42947b7269a170d2f1cf8fb09941a5d74070fe6d204b68dd15a9ad2ed29 +SHA512 (cmsis-9fe411cef1cef5de58e5957b89760759de44e393-clean.tar.xz) = f131fc241f61982c49f334eb502c2f13da61eb7bdaa641ee84a8de30c4d576b735b8aadeafd7d75351473a2df6a42de6a236ecc5dcc616ee6cfcc07af29446f9 +SHA512 (cmsis_svd-5910f3d115a53ead55c8158da24a8fa8bda1eb50-clean.tar.xz) = 7187cade0e78bbd6e65a8f38109aa95783e71cc3fad445fc51ac8fca796845b8ad4b9b84335ef3aa725b9abb0c3ed72c768c0f7da5ecc7b14a505a328b625b47 +SHA512 (compiler-rt-8.0.0.src.tar.xz) = fe9f69fe2269fa3d560ae97fdacd462f855fb0b7a5f647f5b8595206ff7febca6496725adc953de411a827c761e2b3ca11a2149f25707d6c62af0722b68ba913 +SHA512 (nrfx-3ab39a9d457bfe627473ed0e03a7f1161d9e4f27.tar.gz) = 95b5293c9b707aeb4d8ad13643619c053ba0fa9423053a12f9a65b0ed8febc2aab87cd832e6ac73e9673987b7cb73f85cce68cb85ce4ca5bd607afee1098f9e9 From 7466f18e040e59f2dd5209f8ae9683eb0eaf3795 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 10 Feb 2020 18:05:39 -0500 Subject: [PATCH 7/8] Update to latest version. --- .gitignore | 1 + 0001-Use-Fedora-command-names.patch | 14 ++--- 0002-Skip-ARM-Linux-tests.patch | 10 +-- 0003-Skip-STM32-tests.patch | 61 +++++++++++-------- ...erridding-Python-used-for-generators.patch | 56 ----------------- ...d-expected-path-for-go.bug.st-serial.patch | 56 +++++++++++++++++ clean_tarballs.sh | 2 +- sources | 4 +- tinygo.spec | 12 ++-- 9 files changed, 114 insertions(+), 102 deletions(-) delete mode 100644 0004-Allow-overridding-Python-used-for-generators.patch create mode 100644 0004-Use-go-mod-expected-path-for-go.bug.st-serial.patch diff --git a/.gitignore b/.gitignore index c875580..77366fb 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /tinygo-0.7.0.tar.gz /tinygo-0.7.1.tar.gz /tinygo-0.8.0.tar.gz +/tinygo-0.9.0.tar.gz diff --git a/0001-Use-Fedora-command-names.patch b/0001-Use-Fedora-command-names.patch index bdb100c..2b9764e 100644 --- a/0001-Use-Fedora-command-names.patch +++ b/0001-Use-Fedora-command-names.patch @@ -1,4 +1,4 @@ -From 09d3a1157e66bde46f3919142f65e409de7b447b Mon Sep 17 00:00:00 2001 +From 2b6fe327a7a57a6a0c7740d81591ae0fa207b94d 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. @@ -10,10 +10,10 @@ Signed-off-by: Elliott Sales de Andrade 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/main_test.go b/main_test.go -index 9b406d2..6a47393 100644 +index f0a574b..c65c463 100644 --- a/main_test.go +++ b/main_test.go -@@ -70,7 +70,7 @@ func TestCompiler(t *testing.T) { +@@ -72,7 +72,7 @@ func TestCompiler(t *testing.T) { continue // TODO: improve CGo } t.Run(path, func(t *testing.T) { @@ -23,10 +23,10 @@ index 9b406d2..6a47393 100644 } diff --git a/target.go b/target.go -index ad701e8..29ac6a0 100644 +index 655b5f2..e0c5e21 100644 --- a/target.go +++ b/target.go -@@ -181,7 +181,7 @@ func LoadTarget(target string) (*TargetSpec, error) { +@@ -195,7 +195,7 @@ func LoadTarget(target string) (*TargetSpec, error) { } target = llvmarch + "--" + llvmos if goarch == "arm" { @@ -35,7 +35,7 @@ index ad701e8..29ac6a0 100644 } return defaultTarget(goos, goarch, target) } -@@ -246,9 +246,9 @@ func defaultTarget(goos, goarch, triple string) (*TargetSpec, error) { +@@ -261,9 +261,9 @@ func defaultTarget(goos, goarch, triple string) (*TargetSpec, error) { if goarch != runtime.GOARCH { // Some educated guesses as to how to invoke helper programs. if goarch == "arm" && goos == "linux" { @@ -49,5 +49,5 @@ index ad701e8..29ac6a0 100644 if goarch == "arm64" && goos == "linux" { spec.Linker = "aarch64-linux-gnu-gcc" -- -2.21.0 +2.21.1 diff --git a/0002-Skip-ARM-Linux-tests.patch b/0002-Skip-ARM-Linux-tests.patch index 1ced3a0..523fe22 100644 --- a/0002-Skip-ARM-Linux-tests.patch +++ b/0002-Skip-ARM-Linux-tests.patch @@ -1,4 +1,4 @@ -From 351e01b09db90ca01a3a70817c7360c986ef7eb7 Mon Sep 17 00:00:00 2001 +From 4aef9745a245596f8f8781481f2d734318999074 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. @@ -11,10 +11,10 @@ Signed-off-by: Elliott Sales de Andrade 1 file changed, 6 insertions(+) diff --git a/main_test.go b/main_test.go -index 6a47393..86e7fd3 100644 +index c65c463..46bdbd1 100644 --- a/main_test.go +++ b/main_test.go -@@ -66,6 +66,9 @@ func TestCompiler(t *testing.T) { +@@ -68,6 +68,9 @@ func TestCompiler(t *testing.T) { if runtime.GOOS == "linux" { t.Log("running tests for linux/arm...") for _, path := range matches { @@ -24,7 +24,7 @@ index 6a47393..86e7fd3 100644 if path == filepath.Join("testdata", "cgo")+string(filepath.Separator) { continue // TODO: improve CGo } -@@ -76,6 +79,9 @@ func TestCompiler(t *testing.T) { +@@ -78,6 +81,9 @@ func TestCompiler(t *testing.T) { t.Log("running tests for linux/arm64...") for _, path := range matches { @@ -35,5 +35,5 @@ index 6a47393..86e7fd3 100644 continue // TODO: improve CGo } -- -2.21.0 +2.21.1 diff --git a/0003-Skip-STM32-tests.patch b/0003-Skip-STM32-tests.patch index 7f6cf5e..8e85649 100644 --- a/0003-Skip-STM32-tests.patch +++ b/0003-Skip-STM32-tests.patch @@ -1,4 +1,4 @@ -From d195702b68f8fac69fbafcabb490081834d4bb39 Mon Sep 17 00:00:00 2001 +From 6f7b79ef714cd974cf2a6758e4307fa2b45eb26b 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. @@ -7,14 +7,14 @@ We can't ship the STM32 .svd files due to their odd license. Signed-off-by: Elliott Sales de Andrade --- - Makefile | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) + Makefile | 10 +--------- + 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Makefile b/Makefile -index e1d9061..90c9efc 100644 +index 7fc00df..73391f9 100644 --- a/Makefile +++ b/Makefile -@@ -41,7 +41,7 @@ fmt-check: +@@ -94,7 +94,7 @@ fmt-check: @unformatted=$$(gofmt -l $(FMT_PATHS)); [ -z "$$unformatted" ] && exit 0; echo "Unformatted:"; for fn in $$unformatted; do echo " $$fn"; done; exit 1 @@ -22,28 +22,35 @@ index e1d9061..90c9efc 100644 +gen-device: gen-device-avr gen-device-nrf gen-device-sam gen-device-sifive gen-device-avr: - ./tools/gen-device-avr.py lib/avr/packs/atmega src/device/avr/ -@@ -112,7 +112,6 @@ smoketest: - tinygo build -size short -o test.elf -target=microbit examples/echo - tinygo build -size short -o test.elf -target=nrf52840-mdk examples/blinky1 - tinygo build -size short -o test.elf -target=pca10031 examples/blinky1 -- tinygo build -size short -o test.elf -target=bluepill examples/blinky1 - tinygo build -size short -o test.elf -target=reelboard examples/blinky1 - tinygo build -size short -o test.elf -target=reelboard examples/blinky2 - tinygo build -size short -o test.elf -target=pca10056 examples/blinky1 -@@ -121,12 +120,9 @@ smoketest: - tinygo build -size short -o test.elf -target=feather-m0 examples/blinky1 - tinygo build -size short -o test.elf -target=trinket-m0 examples/blinky1 - tinygo build -size short -o test.elf -target=circuitplay-express examples/blinky1 -- tinygo build -size short -o test.elf -target=stm32f4disco examples/blinky1 -- tinygo build -size short -o test.elf -target=stm32f4disco examples/blinky2 - tinygo build -size short -o test.elf -target=circuitplay-express examples/i2s - tinygo build -size short -o test.elf -target=gameboy-advance examples/gba-display - tinygo build -size short -o test.elf -target=itsybitsy-m4 examples/blinky1 -- tinygo build -size short -o test.elf -target=nucleo-f103rb examples/blinky1 + $(PYTHON) ./tools/gen-device-avr.py lib/avr/packs/atmega src/device/avr/ +@@ -181,8 +181,6 @@ smoketest: + @$(MD5SUM) test.hex + $(TINYGO) build -size short -o test.hex -target=pca10031 examples/blinky1 + @$(MD5SUM) test.hex +- $(TINYGO) build -size short -o test.hex -target=bluepill examples/blinky1 +- @$(MD5SUM) test.hex + $(TINYGO) build -size short -o test.hex -target=reelboard examples/blinky1 + @$(MD5SUM) test.hex + $(TINYGO) build -size short -o test.hex -target=reelboard examples/blinky2 +@@ -199,18 +197,12 @@ smoketest: + @$(MD5SUM) test.hex + $(TINYGO) build -size short -o test.hex -target=circuitplay-express examples/blinky1 + @$(MD5SUM) test.hex +- $(TINYGO) build -size short -o test.hex -target=stm32f4disco examples/blinky1 +- @$(MD5SUM) test.hex +- $(TINYGO) build -size short -o test.hex -target=stm32f4disco examples/blinky2 +- @$(MD5SUM) test.hex + $(TINYGO) build -size short -o test.hex -target=circuitplay-express examples/i2s + @$(MD5SUM) test.hex + $(TINYGO) build -size short -o test.gba -target=gameboy-advance examples/gba-display + @$(MD5SUM) test.gba + $(TINYGO) build -size short -o test.hex -target=itsybitsy-m4 examples/blinky1 + @$(MD5SUM) test.hex +- $(TINYGO) build -size short -o test.hex -target=nucleo-f103rb examples/blinky1 +- @$(MD5SUM) test.hex ifneq ($(AVR), 0) - tinygo build -size short -o test.elf -target=arduino examples/blinky1 - tinygo build -size short -o test.elf -target=digispark examples/blinky1 + $(TINYGO) build -size short -o test.hex -target=arduino examples/blinky1 + @$(MD5SUM) test.hex -- -2.21.0 +2.21.1 diff --git a/0004-Allow-overridding-Python-used-for-generators.patch b/0004-Allow-overridding-Python-used-for-generators.patch deleted file mode 100644 index a8cd80f..0000000 --- a/0004-Allow-overridding-Python-used-for-generators.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 6156198f2378eee7912a5e5395bd799e13f8aae9 Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -Date: Tue, 24 Sep 2019 04:50:25 -0400 -Subject: [PATCH 4/4] Allow overridding Python used for generators. - -Signed-off-by: Elliott Sales de Andrade ---- - Makefile | 13 +++++++------ - 1 file changed, 7 insertions(+), 6 deletions(-) - -diff --git a/Makefile b/Makefile -index 90c9efc..65d407d 100644 ---- a/Makefile -+++ b/Makefile -@@ -3,6 +3,7 @@ - all: tinygo - tinygo: build/tinygo - -+PYTHON ?= python - # Default build and source directories, as created by `make llvm-build`. - LLVM_BUILDDIR ?= llvm-build - CLANG_SRC ?= llvm-project/clang -@@ -44,24 +45,24 @@ fmt-check: - gen-device: gen-device-avr gen-device-nrf gen-device-sam gen-device-sifive - - gen-device-avr: -- ./tools/gen-device-avr.py lib/avr/packs/atmega src/device/avr/ -- ./tools/gen-device-avr.py lib/avr/packs/tiny src/device/avr/ -+ $(PYTHON) ./tools/gen-device-avr.py lib/avr/packs/atmega src/device/avr/ -+ $(PYTHON) ./tools/gen-device-avr.py lib/avr/packs/tiny src/device/avr/ - go fmt ./src/device/avr - - gen-device-nrf: -- ./tools/gen-device-svd.py lib/nrfx/mdk/ src/device/nrf/ --source=https://github.com/NordicSemiconductor/nrfx/tree/master/mdk -+ $(PYTHON) ./tools/gen-device-svd.py lib/nrfx/mdk/ src/device/nrf/ --source=https://github.com/NordicSemiconductor/nrfx/tree/master/mdk - go fmt ./src/device/nrf - - gen-device-sam: -- ./tools/gen-device-svd.py lib/cmsis-svd/data/Atmel/ src/device/sam/ --source=https://github.com/posborne/cmsis-svd/tree/master/data/Atmel -+ $(PYTHON) ./tools/gen-device-svd.py lib/cmsis-svd/data/Atmel/ src/device/sam/ --source=https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - go fmt ./src/device/sam - - gen-device-sifive: -- ./tools/gen-device-svd.py lib/cmsis-svd/data/SiFive-Community/ src/device/sifive/ --source=https://github.com/AdaCore/svd2ada/tree/master/CMSIS-SVD/SiFive-Community -+ $(PYTHON) ./tools/gen-device-svd.py lib/cmsis-svd/data/SiFive-Community/ src/device/sifive/ --source=https://github.com/AdaCore/svd2ada/tree/master/CMSIS-SVD/SiFive-Community - go fmt ./src/device/sifive - - gen-device-stm32: -- ./tools/gen-device-svd.py lib/cmsis-svd/data/STMicro/ src/device/stm32/ --source=https://github.com/posborne/cmsis-svd/tree/master/data/STMicro -+ $(PYTHON) ./tools/gen-device-svd.py lib/cmsis-svd/data/STMicro/ src/device/stm32/ --source=https://github.com/posborne/cmsis-svd/tree/master/data/STMicro - go fmt ./src/device/stm32 - - --- -2.21.0 - diff --git a/0004-Use-go-mod-expected-path-for-go.bug.st-serial.patch b/0004-Use-go-mod-expected-path-for-go.bug.st-serial.patch new file mode 100644 index 0000000..50e8ca8 --- /dev/null +++ b/0004-Use-go-mod-expected-path-for-go.bug.st-serial.patch @@ -0,0 +1,56 @@ +From 74f009b22143b731af1d4262e82e902ad9c5c2a0 Mon Sep 17 00:00:00 2001 +From: Elliott Sales de Andrade +Date: Mon, 10 Feb 2020 17:23:25 -0500 +Subject: [PATCH 4/4] Use go mod expected path for go.bug.st/serial. + +Signed-off-by: Elliott Sales de Andrade +--- + go.mod | 2 +- + go.sum | 4 ++-- + main.go | 2 +- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/go.mod b/go.mod +index 64668f6..cf33dd7 100644 +--- a/go.mod ++++ b/go.mod +@@ -6,7 +6,7 @@ require ( + github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2 + github.com/creack/goselect v0.1.0 // indirect + github.com/marcinbor85/gohex v0.0.0-20180128172054-7a43cd876e46 +- go.bug.st/serial.v1 v0.0.0-20180827123349-5f7892a7bb45 ++ go.bug.st/serial v0.0.0-20180827123349-5f7892a7bb45 + golang.org/x/sys v0.0.0-20191010194322-b09406accb47 // indirect + golang.org/x/tools v0.0.0-20190227180812-8dcc6e70cdef + tinygo.org/x/go-llvm v0.0.0-20190818154551-95bc4ffe1add +diff --git a/go.sum b/go.sum +index 341c3e5..0aaf2cd 100644 +--- a/go.sum ++++ b/go.sum +@@ -5,8 +5,8 @@ github.com/creack/goselect v0.1.0/go.mod h1:gHrIcH/9UZDn2qgeTUeW5K9eZsVYCH6/60J/ + github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= + github.com/marcinbor85/gohex v0.0.0-20180128172054-7a43cd876e46 h1:wXG2bA8fO7Vv7lLk2PihFMTqmbT173Tje39oKzQ50Mo= + github.com/marcinbor85/gohex v0.0.0-20180128172054-7a43cd876e46/go.mod h1:Pb6XcsXyropB9LNHhnqaknG/vEwYztLkQzVCHv8sQ3M= +-go.bug.st/serial.v1 v0.0.0-20180827123349-5f7892a7bb45 h1:mACY1anK6HNCZtm/DK2Rf2ZPHggVqeB0+7rY9Gl6wyI= +-go.bug.st/serial.v1 v0.0.0-20180827123349-5f7892a7bb45/go.mod h1:dRSl/CVCTf56CkXgJMDOdSwNfo2g1orOGE/gBGdvjZw= ++go.bug.st/serial v0.0.0-20180827123349-5f7892a7bb45 h1:mACY1anK6HNCZtm/DK2Rf2ZPHggVqeB0+7rY9Gl6wyI= ++go.bug.st/serial v0.0.0-20180827123349-5f7892a7bb45/go.mod h1:dRSl/CVCTf56CkXgJMDOdSwNfo2g1orOGE/gBGdvjZw= + golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= + golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= + golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +diff --git a/main.go b/main.go +index b35f63b..571959c 100644 +--- a/main.go ++++ b/main.go +@@ -22,7 +22,7 @@ import ( + "github.com/tinygo-org/tinygo/interp" + "github.com/tinygo-org/tinygo/loader" + +- serial "go.bug.st/serial.v1" ++ "go.bug.st/serial" + ) + + // commandError is an error type to wrap os/exec.Command errors. This provides +-- +2.21.1 + diff --git a/clean_tarballs.sh b/clean_tarballs.sh index 53dc185..962f8f8 100755 --- a/clean_tarballs.sh +++ b/clean_tarballs.sh @@ -1,7 +1,7 @@ #!/bin/bash -e CMSIS_VERSION=9fe411cef1cef5de58e5957b89760759de44e393 -CMSIS_SVD_VERSION=5910f3d115a53ead55c8158da24a8fa8bda1eb50 +CMSIS_SVD_VERSION=7d9b4167010feed9e59ac45e56519180295b3813 if [ -e "cmsis-${CMSIS_VERSION}-clean.tar.xz" ]; then echo "Not downloading cmsis-${CMSIS_VERSION}-clean.tar.xz again!" diff --git a/sources b/sources index 28719c2..b02afda 100644 --- a/sources +++ b/sources @@ -1,6 +1,6 @@ -SHA512 (tinygo-0.8.0.tar.gz) = 0f3750c3d216033342efc77fc419d9299202880bb9979f6db6c9e7f4c3f7b3792e5d407a0a9543b07c1ed8c08d16d062465e22cf392e5f71227d09afdf7275ea +SHA512 (tinygo-0.9.0.tar.gz) = 864e7ab0ddf98d77e6b88da6412bed606cde55c3fa82607f79bcb75270d7449980ab6d8f7137c0617122b09bcde81baf96cdc662717033a1c8e78800dc99ce09 SHA512 (avr-6624554c02b237b23dc17d53e992bf54033fc228.tar.gz) = 1aa157bd761db38f8680614fa1cf47d7009508f65291b7eaaa5aba1ae76d35103f68a42947b7269a170d2f1cf8fb09941a5d74070fe6d204b68dd15a9ad2ed29 SHA512 (cmsis-9fe411cef1cef5de58e5957b89760759de44e393-clean.tar.xz) = f131fc241f61982c49f334eb502c2f13da61eb7bdaa641ee84a8de30c4d576b735b8aadeafd7d75351473a2df6a42de6a236ecc5dcc616ee6cfcc07af29446f9 -SHA512 (cmsis_svd-5910f3d115a53ead55c8158da24a8fa8bda1eb50-clean.tar.xz) = 7187cade0e78bbd6e65a8f38109aa95783e71cc3fad445fc51ac8fca796845b8ad4b9b84335ef3aa725b9abb0c3ed72c768c0f7da5ecc7b14a505a328b625b47 +SHA512 (cmsis_svd-7d9b4167010feed9e59ac45e56519180295b3813-clean.tar.xz) = 013a5991a0fc170bd86e8c3cafe41b722061d9c631a51ecca762e00ea61ab2d14cb794a78a4ff8f449b10e32c8e746b07782da66f64599c7e6c8b17475f00428 SHA512 (compiler-rt-8.0.0.src.tar.xz) = fe9f69fe2269fa3d560ae97fdacd462f855fb0b7a5f647f5b8595206ff7febca6496725adc953de411a827c761e2b3ca11a2149f25707d6c62af0722b68ba913 SHA512 (nrfx-3ab39a9d457bfe627473ed0e03a7f1161d9e4f27.tar.gz) = 95b5293c9b707aeb4d8ad13643619c053ba0fa9423053a12f9a65b0ed8febc2aab87cd832e6ac73e9673987b7cb73f85cce68cb85ce4ca5bd607afee1098f9e9 diff --git a/tinygo.spec b/tinygo.spec index 0222e01..a072851 100644 --- a/tinygo.spec +++ b/tinygo.spec @@ -5,12 +5,12 @@ # https://github.com/tinygo-org/tinygo %global goipath github.com/tinygo-org/tinygo -Version: 0.8.0 +Version: 0.9.0 %global CMSIS_commit 9fe411cef1cef5de58e5957b89760759de44e393 %global avr_commit 6624554c02b237b23dc17d53e992bf54033fc228 %global clang_version 8.0.0 -%global cmsis_svd_commit 5910f3d115a53ead55c8158da24a8fa8bda1eb50 +%global cmsis_svd_commit 7d9b4167010feed9e59ac45e56519180295b3813 %global compiler_rt_version 8.0.0 %global nrfx_commit 3ab39a9d457bfe627473ed0e03a7f1161d9e4f27 @@ -49,8 +49,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/590 -Patch0004: 0004-Allow-overridding-Python-used-for-generators.patch +# Fix import path. +Patch0004: 0004-Use-go-mod-expected-path-for-go.bug.st-serial.patch # Not supported upstream yet. ExcludeArch: armv7hl ppc64le s390x @@ -58,6 +58,7 @@ ExcludeArch: armv7hl ppc64le s390x BuildRequires: clang-devel = %{clang_version} BuildRequires: golang(github.com/blakesmith/ar) BuildRequires: golang(github.com/marcinbor85/gohex) +BuildRequires: golang(go.bug.st/serial) BuildRequires: golang(golang.org/x/tools/go/ast/astutil) BuildRequires: golang(golang.org/x/tools/go/ssa) BuildRequires: golang(tinygo.org/x/go-llvm) @@ -177,6 +178,9 @@ PATH=%{buildroot}%{_bindir}:$PATH make smoketest AVR=0 RISCV=0 %changelog +* Mon Feb 10 2020 Elliott Sales de Andrade - 0.9.0-1 +- Update to latest version + * Tue Sep 24 2019 Elliott Sales de Andrade - 0.8.0-1 - Update to latest version - Enable x86 build From af7210d4df585e79ed43cd147bd1e1d8d734c0f8 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 10 Feb 2020 22:56:19 -0500 Subject: [PATCH 8/8] Fix setting of TINYGOROOT to point to installed version. --- tinygo.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tinygo.spec b/tinygo.spec index a072851..6cb237d 100644 --- a/tinygo.spec +++ b/tinygo.spec @@ -114,7 +114,7 @@ ln -s %{_libdir}/clang/%{clang_version}/include lib/clang/include %build -export LDFLAGS="-X main.TINYGOROOT=%{tinygoroot} " +export LDFLAGS="-X github.com/tinygo-org/tinygo/goenv.TINYGOROOT=%{tinygoroot} " %gobuildroot %gobuild -o _bin/tinygo %{goipath} GO111MODULE=off %make_build gen-device PYTHON=%{__python3}