Compare commits
83 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da069d072e | ||
|
|
faf08a188d | ||
|
|
20e209e6d0 | ||
|
|
1ba82360fb | ||
|
|
8526125e83 | ||
|
|
dc10663dd3 | ||
|
|
98fdc4179f | ||
|
|
4bdd7c5cf3 | ||
|
|
5f84d1ac7a | ||
|
|
36b6b72c3d | ||
|
|
b460c7c931 | ||
|
|
716d8be332 | ||
|
|
cc972cf7e5 | ||
|
|
16bb42b116 | ||
|
|
70df58fba1 | ||
|
|
62cfc868a2 | ||
|
|
2fb69c2ae8 |
||
|
|
6bea1c34db | ||
|
|
1539b445c8 | ||
|
|
9a6e0539c2 | ||
|
|
000c23720d | ||
|
|
fa5e9eb979 | ||
|
|
81c66e60d6 | ||
|
|
1eb5a805d6 | ||
|
|
96c5d0d6c6 | ||
|
|
4d6d12da79 | ||
|
|
5c81169782 | ||
|
|
8180175230 | ||
|
|
b2c23a4f26 | ||
|
|
0539d75995 | ||
|
|
694d1924a1 | ||
|
|
b3b8eb54cc | ||
|
|
35a3896d93 | ||
|
|
9b16b76e2f | ||
|
|
a9b7fbae8f | ||
|
|
b0024804f5 | ||
|
|
6da6ac5b43 | ||
|
|
9b32d8b0dd | ||
|
|
544baed7e0 | ||
|
|
d515a92b8f | ||
|
|
5756d01921 | ||
|
|
3a69331208 | ||
|
|
820cb03fbe |
||
|
|
7f243952fe | ||
|
|
36cc90c360 | ||
|
|
55713f9bab | ||
|
|
e72fffe5c3 | ||
|
|
95b7509b69 | ||
|
|
b22e3707e9 | ||
|
|
174a446d2f | ||
|
|
e3dd63fec3 | ||
|
|
7c2e2a55ac | ||
|
|
0f7ffa073d | ||
|
|
6ba7946a1e | ||
|
|
ab77f345e8 | ||
|
|
41a0389334 | ||
|
|
f0ad6d6577 | ||
|
|
47756c617f | ||
|
|
03e3a66ed7 | ||
|
|
b12ac02c48 | ||
|
|
8bc0621c07 | ||
|
|
6cc53805c6 | ||
|
|
33d138a833 | ||
|
|
4ce2174a9a | ||
|
|
52b73ed7f4 | ||
|
|
dfb60b5bad | ||
|
|
18f324114b | ||
|
|
0818c307ca | ||
|
|
f19a9cedea | ||
|
|
164a6e7074 | ||
|
|
bf7dd9ce9c | ||
|
|
7494a536a8 | ||
|
|
31fad1082a | ||
|
|
5106f36458 | ||
|
|
4c79ef6776 | ||
|
|
349460a153 | ||
|
|
934e871bb6 | ||
|
|
f1635eba95 | ||
|
|
b854f98fa6 | ||
|
|
6084b0a021 | ||
|
|
4ee622c82b | ||
|
|
22683d9b42 | ||
|
|
118877d6c8 |
19 changed files with 997 additions and 672 deletions
28
.gitignore
vendored
28
.gitignore
vendored
|
|
@ -1,23 +1,19 @@
|
|||
/tinygo-*.tar.gz
|
||||
/avr-*.tar.gz
|
||||
/cmsis-*.tar.gz
|
||||
/cmsis-*-clean.tar.xz
|
||||
/cmsis_svd-*.tar.gz
|
||||
/cmsis_svd-*-clean.tar.xz
|
||||
/cmsis_svd_data-*.tar.gz
|
||||
/cmsis_svd_data-*-clean.tar.xz
|
||||
/compiler-rt-*.src.tar.xz
|
||||
/compiler-rt-*.src.tar.xz.sig
|
||||
/macos-minimal-sdk-*.tar.gz
|
||||
/mingw64-*.tar.gz
|
||||
/musl-*.tar.gz
|
||||
/musl-*.tar.gz.asc
|
||||
/net-*.tar.gz
|
||||
/nrfx-*.tar.gz
|
||||
/tinygo-0.6.0.tar.gz
|
||||
/tinygo-0.7.0.tar.gz
|
||||
/tinygo-0.7.1.tar.gz
|
||||
/tinygo-0.8.0.tar.gz
|
||||
/tinygo-0.9.0.tar.gz
|
||||
/tinygo-0.10.0.tar.gz
|
||||
/tinygo-0.11.0.tar.gz
|
||||
/tinygo-0.12.0.tar.gz
|
||||
/wasi-libc-a280fead2ae71b9a230d3b48c1f95867431888e4.tar.gz
|
||||
/tinygo-0.13.0.tar.gz
|
||||
/picolibc-80528c684b10aaee977397e7eb40c4784e6dc433.tar.gz
|
||||
/tinygo-0.13.1.tar.gz
|
||||
/tinygo-0.14.0.tar.gz
|
||||
/tinygo-0.14.1.tar.gz
|
||||
/tinygo-0.15.0.tar.gz
|
||||
/wasi-libc-215adc8ac9f91eb055311acc72683fd2eb1ae15a.tar.gz
|
||||
/picolibc-*.tar.gz
|
||||
/wasi-libc-*.tar.gz
|
||||
/bdwgc-1166f11f7dee08d7ad369296b24cf8c9582f8789.tar.gz
|
||||
|
|
|
|||
50
0001-Skip-WASI-tests.patch
Normal file
50
0001-Skip-WASI-tests.patch
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
From fdd5322026e4b7b2e7fe6a80628b7239b4c4eb99 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Tue, 15 Dec 2020 05:06:04 -0500
|
||||
Subject: [PATCH 1/5] Skip WASI tests.
|
||||
|
||||
We do not have wasmtime available.
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
main_test.go | 17 -----------------
|
||||
1 file changed, 17 deletions(-)
|
||||
|
||||
diff --git a/main_test.go b/main_test.go
|
||||
index b07d6aaa..ae0a4482 100644
|
||||
--- a/main_test.go
|
||||
+++ b/main_test.go
|
||||
@@ -188,22 +188,6 @@ func TestBuild(t *testing.T) {
|
||||
runTest("gc.go", optionsBoehm, t, nil, nil)
|
||||
})
|
||||
})
|
||||
- t.Run("WASIp1", func(t *testing.T) {
|
||||
- t.Parallel()
|
||||
- runPlatTests(optionsFromTarget("wasip1", sema), tests, t)
|
||||
-
|
||||
- // Test with -gc=boehm.
|
||||
- t.Run("gc.go-boehm", func(t *testing.T) {
|
||||
- t.Parallel()
|
||||
- optionsBoehm := optionsFromTarget("wasip1", sema)
|
||||
- optionsBoehm.GC = "boehm"
|
||||
- runTest("gc.go", optionsBoehm, t, nil, nil)
|
||||
- })
|
||||
- })
|
||||
- t.Run("WASIp2", func(t *testing.T) {
|
||||
- t.Parallel()
|
||||
- runPlatTests(optionsFromTarget("wasip2", sema), tests, t)
|
||||
- })
|
||||
}
|
||||
|
||||
if runtime.GOOS == "linux" {
|
||||
@@ -925,7 +909,6 @@ func TestTest(t *testing.T) {
|
||||
|
||||
// Node/Wasmtime
|
||||
targ{"WASM", optionsFromTarget("wasm", sema)},
|
||||
- targ{"WASI", optionsFromTarget("wasip1", sema)},
|
||||
)
|
||||
}
|
||||
for _, targ := range targs {
|
||||
--
|
||||
2.50.0
|
||||
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
From 845a1e4c9d7456d2a914e540ad6c8a7f9d684aa6 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@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@gmail.com>
|
||||
---
|
||||
compileopts/target.go | 10 +++++-----
|
||||
main_test.go | 2 +-
|
||||
2 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/compileopts/target.go b/compileopts/target.go
|
||||
index 6547320..d7f8390 100644
|
||||
--- a/compileopts/target.go
|
||||
+++ b/compileopts/target.go
|
||||
@@ -226,7 +226,7 @@ func LoadTarget(target string) (*TargetSpec, error) {
|
||||
}
|
||||
target = llvmarch + "--" + llvmos
|
||||
if goarch == "arm" {
|
||||
- target += "-gnueabihf"
|
||||
+ target += "-none"
|
||||
}
|
||||
return defaultTarget(goos, goarch, target)
|
||||
}
|
||||
@@ -302,10 +302,10 @@ 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" {
|
||||
- spec.CFlags = append(spec.CFlags, "--sysroot=/usr/arm-linux-gnueabihf")
|
||||
- spec.Linker = "arm-linux-gnueabihf-gcc"
|
||||
- spec.GDB = "arm-linux-gnueabihf-gdb"
|
||||
- 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.GDB = "arm-linux-gnu-gdb"
|
||||
+ 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 f66117b..3c31e21 100644
|
||||
--- a/main_test.go
|
||||
+++ b/main_test.go
|
||||
@@ -79,7 +79,7 @@ func TestCompiler(t *testing.T) {
|
||||
|
||||
if runtime.GOOS == "linux" {
|
||||
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.26.2
|
||||
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
From 483c57eee834fb9cf19426d35f31cdb21a94044f Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@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@gmail.com>
|
||||
---
|
||||
main_test.go | 6 ------
|
||||
1 file changed, 6 deletions(-)
|
||||
|
||||
diff --git a/main_test.go b/main_test.go
|
||||
index 3c31e21..47a0e6b 100644
|
||||
--- a/main_test.go
|
||||
+++ b/main_test.go
|
||||
@@ -78,12 +78,6 @@ func TestCompiler(t *testing.T) {
|
||||
}
|
||||
|
||||
if runtime.GOOS == "linux" {
|
||||
- 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.26.2
|
||||
|
||||
58
0002-Skip-tests-that-require-Go-module-mode.patch
Normal file
58
0002-Skip-tests-that-require-Go-module-mode.patch
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
From f650ab16b5a3badf48922f77683ceaf791c82d64 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Wed, 28 Feb 2024 04:26:40 -0500
|
||||
Subject: [PATCH 2/5] Skip tests that require Go module mode
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
errors_test.go | 2 +-
|
||||
main_test.go | 2 +-
|
||||
testdata/errors/loader-invaliddep.go | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/errors_test.go b/errors_test.go
|
||||
index 871dc4c0..3d0bb162 100644
|
||||
--- a/errors_test.go
|
||||
+++ b/errors_test.go
|
||||
@@ -37,7 +37,7 @@ func TestErrors(t *testing.T) {
|
||||
{name: "loader-importcycle"},
|
||||
{name: "loader-invaliddep"},
|
||||
{name: "loader-invalidpackage"},
|
||||
- {name: "loader-nopackage"},
|
||||
+ // {name: "loader-nopackage"},
|
||||
{name: "optimizer"},
|
||||
{name: "syntax"},
|
||||
{name: "types"},
|
||||
diff --git a/main_test.go b/main_test.go
|
||||
index ae0a4482..ca052821 100644
|
||||
--- a/main_test.go
|
||||
+++ b/main_test.go
|
||||
@@ -78,7 +78,6 @@ func TestBuild(t *testing.T) {
|
||||
"json.go",
|
||||
"map.go",
|
||||
"math.go",
|
||||
- "oldgo/",
|
||||
"print.go",
|
||||
"reflect.go",
|
||||
"signal.go",
|
||||
@@ -1031,6 +1030,7 @@ func ioLogger(t *testing.T, wg *sync.WaitGroup) io.WriteCloser {
|
||||
}
|
||||
|
||||
func TestGetListOfPackages(t *testing.T) {
|
||||
+ t.Skip("Not available in non-module mode")
|
||||
opts := optionsFromTarget("", sema)
|
||||
tests := []struct {
|
||||
pkgs []string
|
||||
diff --git a/testdata/errors/loader-invaliddep.go b/testdata/errors/loader-invaliddep.go
|
||||
index 05c2f2d5..719a617b 100644
|
||||
--- a/testdata/errors/loader-invaliddep.go
|
||||
+++ b/testdata/errors/loader-invaliddep.go
|
||||
@@ -5,4 +5,4 @@ import _ "github.com/tinygo-org/tinygo/testdata/errors/invaliddep"
|
||||
func main() {
|
||||
}
|
||||
|
||||
-// ERROR: invaliddep{{[\\/]}}invaliddep.go:1:1: expected 'package', found ppackage
|
||||
+// ERROR: {{.*}}invaliddep{{[\\/]}}invaliddep.go:1:1: expected 'package', found ppackage
|
||||
--
|
||||
2.50.0
|
||||
|
||||
126
0003-Set-LLVM-search-paths-for-Fedora.patch
Normal file
126
0003-Set-LLVM-search-paths-for-Fedora.patch
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
From d516beb86673a9b80ca75c41e8fb7cba7e3f126f Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Sun, 27 Oct 2024 23:33:18 -0400
|
||||
Subject: [PATCH 3/5] Set LLVM search paths for Fedora
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
cgo/libclang_config_llvm15.go | 4 ++--
|
||||
cgo/libclang_config_llvm16.go | 4 ++--
|
||||
cgo/libclang_config_llvm17.go | 4 ++--
|
||||
cgo/libclang_config_llvm18.go | 4 ++--
|
||||
cgo/libclang_config_llvm19.go | 4 ++--
|
||||
cgo/libclang_config_llvm20.go | 4 ++--
|
||||
6 files changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/cgo/libclang_config_llvm15.go b/cgo/libclang_config_llvm15.go
|
||||
index edb1128d..0dc87193 100644
|
||||
--- a/cgo/libclang_config_llvm15.go
|
||||
+++ b/cgo/libclang_config_llvm15.go
|
||||
@@ -3,11 +3,11 @@
|
||||
package cgo
|
||||
|
||||
/*
|
||||
-#cgo linux CFLAGS: -I/usr/lib/llvm-15/include
|
||||
+#cgo linux CFLAGS: -I/usr/lib64/llvm15/include
|
||||
#cgo darwin,amd64 CFLAGS: -I/usr/local/opt/llvm@15/include
|
||||
#cgo darwin,arm64 CFLAGS: -I/opt/homebrew/opt/llvm@15/include
|
||||
#cgo freebsd CFLAGS: -I/usr/local/llvm15/include
|
||||
-#cgo linux LDFLAGS: -L/usr/lib/llvm-15/lib -lclang
|
||||
+#cgo linux LDFLAGS: -L/usr/lib64/llvm15/lib -lclang
|
||||
#cgo darwin,amd64 LDFLAGS: -L/usr/local/opt/llvm@15/lib -lclang
|
||||
#cgo darwin,arm64 LDFLAGS: -L/opt/homebrew/opt/llvm@15/lib -lclang
|
||||
#cgo freebsd LDFLAGS: -L/usr/local/llvm15/lib -lclang
|
||||
diff --git a/cgo/libclang_config_llvm16.go b/cgo/libclang_config_llvm16.go
|
||||
index ee354e21..4c338678 100644
|
||||
--- a/cgo/libclang_config_llvm16.go
|
||||
+++ b/cgo/libclang_config_llvm16.go
|
||||
@@ -9,11 +9,11 @@ package cgo
|
||||
// ln -sf ../../x86_64-linux-gnu/libclang-16.so.1 /usr/lib/llvm-16/lib/libclang.so
|
||||
|
||||
/*
|
||||
-#cgo linux CFLAGS: -I/usr/lib/llvm-16/include
|
||||
+#cgo linux CFLAGS: -I/usr/lib64/llvm16/include
|
||||
#cgo darwin,amd64 CFLAGS: -I/usr/local/opt/llvm@16/include
|
||||
#cgo darwin,arm64 CFLAGS: -I/opt/homebrew/opt/llvm@16/include
|
||||
#cgo freebsd CFLAGS: -I/usr/local/llvm16/include
|
||||
-#cgo linux LDFLAGS: -L/usr/lib/llvm-16/lib -lclang
|
||||
+#cgo linux LDFLAGS: -L/usr/lib64/llvm16/lib -lclang
|
||||
#cgo darwin,amd64 LDFLAGS: -L/usr/local/opt/llvm@16/lib -lclang
|
||||
#cgo darwin,arm64 LDFLAGS: -L/opt/homebrew/opt/llvm@16/lib -lclang
|
||||
#cgo freebsd LDFLAGS: -L/usr/local/llvm16/lib -lclang
|
||||
diff --git a/cgo/libclang_config_llvm17.go b/cgo/libclang_config_llvm17.go
|
||||
index 6395d8a3..609b0758 100644
|
||||
--- a/cgo/libclang_config_llvm17.go
|
||||
+++ b/cgo/libclang_config_llvm17.go
|
||||
@@ -3,11 +3,11 @@
|
||||
package cgo
|
||||
|
||||
/*
|
||||
-#cgo linux CFLAGS: -I/usr/include/llvm-17 -I/usr/include/llvm-c-17 -I/usr/lib/llvm-17/include
|
||||
+#cgo linux CFLAGS: -I/usr/lib64/llvm17/include
|
||||
#cgo darwin,amd64 CFLAGS: -I/usr/local/opt/llvm@17/include
|
||||
#cgo darwin,arm64 CFLAGS: -I/opt/homebrew/opt/llvm@17/include
|
||||
#cgo freebsd CFLAGS: -I/usr/local/llvm17/include
|
||||
-#cgo linux LDFLAGS: -L/usr/lib/llvm-17/lib -lclang
|
||||
+#cgo linux LDFLAGS: -L/usr/lib64/llvm17/lib -lclang
|
||||
#cgo darwin,amd64 LDFLAGS: -L/usr/local/opt/llvm@17/lib -lclang
|
||||
#cgo darwin,arm64 LDFLAGS: -L/opt/homebrew/opt/llvm@17/lib -lclang
|
||||
#cgo freebsd LDFLAGS: -L/usr/local/llvm17/lib -lclang
|
||||
diff --git a/cgo/libclang_config_llvm18.go b/cgo/libclang_config_llvm18.go
|
||||
index da181291..76f23129 100644
|
||||
--- a/cgo/libclang_config_llvm18.go
|
||||
+++ b/cgo/libclang_config_llvm18.go
|
||||
@@ -3,11 +3,11 @@
|
||||
package cgo
|
||||
|
||||
/*
|
||||
-#cgo linux CFLAGS: -I/usr/include/llvm-18 -I/usr/include/llvm-c-18 -I/usr/lib/llvm-18/include
|
||||
+#cgo linux CFLAGS: -I/usr/lib64/llvm18/include
|
||||
#cgo darwin,amd64 CFLAGS: -I/usr/local/opt/llvm@18/include
|
||||
#cgo darwin,arm64 CFLAGS: -I/opt/homebrew/opt/llvm@18/include
|
||||
#cgo freebsd CFLAGS: -I/usr/local/llvm18/include
|
||||
-#cgo linux LDFLAGS: -L/usr/lib/llvm-18/lib -lclang
|
||||
+#cgo linux LDFLAGS: -L/usr/lib64/llvm18/lib -lclang
|
||||
#cgo darwin,amd64 LDFLAGS: -L/usr/local/opt/llvm@18/lib -lclang
|
||||
#cgo darwin,arm64 LDFLAGS: -L/opt/homebrew/opt/llvm@18/lib -lclang
|
||||
#cgo freebsd LDFLAGS: -L/usr/local/llvm18/lib -lclang
|
||||
diff --git a/cgo/libclang_config_llvm19.go b/cgo/libclang_config_llvm19.go
|
||||
index 11a64e72..94c95bcb 100644
|
||||
--- a/cgo/libclang_config_llvm19.go
|
||||
+++ b/cgo/libclang_config_llvm19.go
|
||||
@@ -3,11 +3,11 @@
|
||||
package cgo
|
||||
|
||||
/*
|
||||
-#cgo linux CFLAGS: -I/usr/include/llvm-19 -I/usr/include/llvm-c-19 -I/usr/lib/llvm-19/include
|
||||
+#cgo linux CFLAGS: -I/usr/lib64/llvm19/include
|
||||
#cgo darwin,amd64 CFLAGS: -I/usr/local/opt/llvm@19/include
|
||||
#cgo darwin,arm64 CFLAGS: -I/opt/homebrew/opt/llvm@19/include
|
||||
#cgo freebsd CFLAGS: -I/usr/local/llvm19/include
|
||||
-#cgo linux LDFLAGS: -L/usr/lib/llvm-19/lib -lclang
|
||||
+#cgo linux LDFLAGS: -L/usr/lib64/llvm19/lib -lclang
|
||||
#cgo darwin,amd64 LDFLAGS: -L/usr/local/opt/llvm@19/lib -lclang
|
||||
#cgo darwin,arm64 LDFLAGS: -L/opt/homebrew/opt/llvm@19/lib -lclang
|
||||
#cgo freebsd LDFLAGS: -L/usr/local/llvm19/lib -lclang
|
||||
diff --git a/cgo/libclang_config_llvm20.go b/cgo/libclang_config_llvm20.go
|
||||
index faa2e54d..947558d6 100644
|
||||
--- a/cgo/libclang_config_llvm20.go
|
||||
+++ b/cgo/libclang_config_llvm20.go
|
||||
@@ -3,11 +3,11 @@
|
||||
package cgo
|
||||
|
||||
/*
|
||||
-#cgo linux CFLAGS: -I/usr/include/llvm-20 -I/usr/include/llvm-c-20 -I/usr/lib/llvm-20/include
|
||||
+#cgo linux CFLAGS: -I/usr/lib64/llvm20/include
|
||||
#cgo darwin,amd64 CFLAGS: -I/usr/local/opt/llvm@20/include
|
||||
#cgo darwin,arm64 CFLAGS: -I/opt/homebrew/opt/llvm@20/include
|
||||
#cgo freebsd CFLAGS: -I/usr/local/llvm20/include
|
||||
-#cgo linux LDFLAGS: -L/usr/lib/llvm-20/lib -lclang
|
||||
+#cgo linux LDFLAGS: -L/usr/lib64/llvm20/lib -lclang
|
||||
#cgo darwin,amd64 LDFLAGS: -L/usr/local/opt/llvm@20/lib -lclang
|
||||
#cgo darwin,arm64 LDFLAGS: -L/opt/homebrew/opt/llvm@20/lib -lclang
|
||||
#cgo freebsd LDFLAGS: -L/usr/local/llvm20/lib -lclang
|
||||
--
|
||||
2.50.0
|
||||
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
From b93a578d1ca1538ada696ccb6d75f4c8c7858b14 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Thu, 13 Jun 2019 02:50:40 -0400
|
||||
Subject: [PATCH 3/5] Skip STM32 tests.
|
||||
|
||||
We can't ship the STM32 .svd files due to their odd license.
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
Makefile | 14 +-------------
|
||||
1 file changed, 1 insertion(+), 13 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index e59799c..9e6b571 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -118,7 +118,7 @@ fmt-check:
|
||||
@unformatted=$$(gofmt -l $(FMT_PATHS)); [ -z "$$unformatted" ] && exit 0; echo "Unformatted:"; for fn in $$unformatted; do echo " $$fn"; done; exit 1
|
||||
|
||||
|
||||
-gen-device: gen-device-avr gen-device-esp gen-device-nrf gen-device-sam gen-device-sifive gen-device-stm32 gen-device-kendryte gen-device-nxp
|
||||
+gen-device: gen-device-avr gen-device-esp gen-device-nrf gen-device-sam gen-device-sifive gen-device-kendryte gen-device-nxp
|
||||
|
||||
gen-device-avr:
|
||||
@if [ ! -e lib/avr/README.md ]; then echo "Submodules have not been downloaded. Please download them using:\n git submodule update --init"; exit 1; fi
|
||||
@@ -257,8 +257,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
|
||||
@@ -275,14 +273,6 @@ 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=stm32f4disco-1 examples/blinky1
|
||||
- @$(MD5SUM) test.hex
|
||||
- $(TINYGO) build -size short -o test.hex -target=feather-stm32f405 examples/blinky1
|
||||
- @$(MD5SUM) test.hex
|
||||
$(TINYGO) build -size short -o test.hex -target=circuitplay-bluefruit examples/blinky1
|
||||
@$(MD5SUM) test.hex
|
||||
$(TINYGO) build -size short -o test.hex -target=circuitplay-express examples/i2s
|
||||
@@ -307,8 +297,6 @@ smoketest:
|
||||
@$(MD5SUM) test.hex
|
||||
$(TINYGO) build -size short -o test.hex -target=particle-xenon examples/blinky1
|
||||
@$(MD5SUM) test.hex
|
||||
- $(TINYGO) build -size short -o test.hex -target=nucleo-f103rb examples/blinky1
|
||||
- @$(MD5SUM) test.hex
|
||||
$(TINYGO) build -size short -o test.hex -target=pinetime-devkit0 examples/blinky1
|
||||
@$(MD5SUM) test.hex
|
||||
$(TINYGO) build -size short -o test.hex -target=x9pro examples/blinky1
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
From 22bbf4dc4f002d1a9178d45f92e5f81bac8593a4 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Sat, 19 Sep 2020 23:11:08 -0400
|
||||
Subject: [PATCH 4/5] Also check lib64 for clang include path.
|
||||
|
||||
On 64-bit Fedora, `lib64` is where the clang headers are, not `lib`. For
|
||||
multiarch systems, both will exist, but it's likely you want 64-bit, so
|
||||
check that first.
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
builder/env.go | 14 ++++++++++----
|
||||
1 file changed, 10 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/builder/env.go b/builder/env.go
|
||||
index c59f5df..91bc263 100644
|
||||
--- a/builder/env.go
|
||||
+++ b/builder/env.go
|
||||
@@ -40,13 +40,19 @@ func getClangHeaderPath(TINYGOROOT string) string {
|
||||
// Example executable:
|
||||
// /usr/lib/llvm-9/bin/clang
|
||||
// Example include path:
|
||||
- // /usr/lib/llvm-9/lib/clang/9.0.1/include/
|
||||
+ // /usr/lib/llvm-9/lib64/clang/9.0.1/include/
|
||||
llvmRoot := filepath.Dir(filepath.Dir(binpath))
|
||||
- clangVersionRoot := filepath.Join(llvmRoot, "lib", "clang")
|
||||
+ clangVersionRoot := filepath.Join(llvmRoot, "lib64", "clang")
|
||||
dirs, err := ioutil.ReadDir(clangVersionRoot)
|
||||
if err != nil {
|
||||
- // Unexpected.
|
||||
- continue
|
||||
+ // Example include path:
|
||||
+ // /usr/lib/llvm-9/lib/clang/9.0.1/include/
|
||||
+ clangVersionRoot = filepath.Join(llvmRoot, "lib", "clang")
|
||||
+ dirs, err = ioutil.ReadDir(clangVersionRoot)
|
||||
+ if err != nil {
|
||||
+ // Unexpected.
|
||||
+ continue
|
||||
+ }
|
||||
}
|
||||
dirnames := make([]string, len(dirs))
|
||||
for i, d := range dirs {
|
||||
--
|
||||
2.26.2
|
||||
|
||||
33
0004-Normalize-expected-path-for-chdir-tests.patch
Normal file
33
0004-Normalize-expected-path-for-chdir-tests.patch
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
From d83874e6ab92ee4142cc7672da226a9091f7211a Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Tue, 31 Dec 2024 02:00:17 -0500
|
||||
Subject: [PATCH 4/5] Normalize expected path for chdir tests
|
||||
|
||||
The expected path comes from a simple string concatenation in shell, but
|
||||
`os.Getwd` appears to have the normalized working directory, so this can
|
||||
fail if any parent directory is a symlink.
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
tests/testing/chdir/chdir.go | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/tests/testing/chdir/chdir.go b/tests/testing/chdir/chdir.go
|
||||
index 75281c21..660b25ac 100644
|
||||
--- a/tests/testing/chdir/chdir.go
|
||||
+++ b/tests/testing/chdir/chdir.go
|
||||
@@ -20,6 +20,11 @@ func main() {
|
||||
}
|
||||
if runtime.GOOS == "windows" {
|
||||
cwd = filepath.ToSlash(cwd)
|
||||
+ } else {
|
||||
+ expectDir, err = filepath.EvalSymlinks(expectDir)
|
||||
+ if err != nil {
|
||||
+ log.Fatal(err)
|
||||
+ }
|
||||
}
|
||||
if cwd != expectDir {
|
||||
log.Fatalf("expected:\"%v\" != os.Getwd():\"%v\"", expectDir, cwd)
|
||||
--
|
||||
2.50.0
|
||||
|
||||
44
0005-Skip-x86-tests-on-ARM.patch
Normal file
44
0005-Skip-x86-tests-on-ARM.patch
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
From 9c8cef8d589dfbd2d913010a1211d8a49279c986 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Sat, 2 Aug 2025 18:30:43 -0400
|
||||
Subject: [PATCH 5/5] Skip x86 tests on ARM
|
||||
|
||||
They are currently broken:
|
||||
https://github.com/tinygo-org/tinygo/issues/4969
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
main_test.go | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/main_test.go b/main_test.go
|
||||
index ca052821..13a40997 100644
|
||||
--- a/main_test.go
|
||||
+++ b/main_test.go
|
||||
@@ -192,7 +192,10 @@ func TestBuild(t *testing.T) {
|
||||
if runtime.GOOS == "linux" {
|
||||
for name, osArch := range supportedLinuxArches {
|
||||
options := optionsFromOSARCH(osArch, sema)
|
||||
- if options.GOARCH != runtime.GOARCH { // Native architecture already run above.
|
||||
+ if options.GOARCH == "386" && runtime.GOARCH == "arm64" {
|
||||
+ // This is currently broken running in qemu.
|
||||
+ // https://github.com/tinygo-org/tinygo/issues/4969
|
||||
+ } else if options.GOARCH != runtime.GOARCH { // Native architecture already run above.
|
||||
t.Run(name, func(t *testing.T) {
|
||||
runPlatTests(options, tests, t)
|
||||
})
|
||||
@@ -895,7 +898,10 @@ func TestTest(t *testing.T) {
|
||||
if runtime.GOOS == "linux" {
|
||||
for name, osArch := range supportedLinuxArches {
|
||||
options := optionsFromOSARCH(osArch, sema)
|
||||
- if options.GOARCH != runtime.GOARCH { // Native architecture already run above.
|
||||
+ if options.GOARCH == "386" && runtime.GOARCH == "arm64" {
|
||||
+ // This is currently broken running in qemu.
|
||||
+ // https://github.com/tinygo-org/tinygo/issues/4969
|
||||
+ } else if options.GOARCH != runtime.GOARCH { // Native architecture already run above.
|
||||
targs = append(targs, targ{name, options})
|
||||
}
|
||||
}
|
||||
--
|
||||
2.50.0
|
||||
|
||||
|
|
@ -1,270 +0,0 @@
|
|||
From 91f8baf2d104ab29ff11e62bde456899083db319 Mon Sep 17 00:00:00 2001
|
||||
From: Ayke van Laethem <aykevanlaethem@gmail.com>
|
||||
Date: Tue, 14 Apr 2020 22:43:32 +0200
|
||||
Subject: [PATCH 5/5] main: add initial support for (in-development) LLVM 11
|
||||
|
||||
This can be useful to test improvements in LLVM master and to make it
|
||||
possible to support LLVM 11 for the most part already before the next
|
||||
release. That also allows catching LLVM bugs early to fix them upstream.
|
||||
|
||||
Note that tests do not yet pass for this LLVM version, but the TinyGo
|
||||
compiler can be built with the binaries from apt.llvm.org (at the time
|
||||
of making this commit).
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
builder/build.go | 11 +++++++++++
|
||||
builder/objcopy.go | 8 +++++++-
|
||||
cgo/libclang_config.go | 2 +-
|
||||
cgo/libclang_config_llvm11.go | 14 ++++++++++++++
|
||||
go.mod | 2 +-
|
||||
go.sum | 4 ++--
|
||||
interp/interp_test.go | 17 +++++++++++++++--
|
||||
targets/gameboy-advance.ld | 7 ++++---
|
||||
transform/globals.go | 14 ++++++++++++++
|
||||
transform/transform_test.go | 16 ++++++++++++++--
|
||||
10 files changed, 83 insertions(+), 12 deletions(-)
|
||||
create mode 100644 cgo/libclang_config_llvm11.go
|
||||
|
||||
diff --git a/builder/build.go b/builder/build.go
|
||||
index 67c09df..e59fec4 100644
|
||||
--- a/builder/build.go
|
||||
+++ b/builder/build.go
|
||||
@@ -129,6 +129,17 @@ func Build(pkgName, outpath string, config *compileopts.Config, action func(Buil
|
||||
}
|
||||
}
|
||||
|
||||
+ // LLVM 11 by default tries to emit tail calls (even with the target feature
|
||||
+ // disabled) unless it is explicitly disabled with a function attribute.
|
||||
+ // This is a problem, as it tries to emit them and prints an error when it
|
||||
+ // can't with this feature disabled.
|
||||
+ // Because as of september 2020 tail calls are not yet widely supported,
|
||||
+ // they need to be disabled until they are widely supported (at which point
|
||||
+ // the +tail-call target feautre can be set).
|
||||
+ if strings.HasPrefix(config.Triple(), "wasm") {
|
||||
+ transform.DisableTailCalls(mod)
|
||||
+ }
|
||||
+
|
||||
// Make sure stack sizes are loaded from a separate section so they can be
|
||||
// modified after linking.
|
||||
var stackSizeLoads []string
|
||||
diff --git a/builder/objcopy.go b/builder/objcopy.go
|
||||
index a8a76af..991bceb 100644
|
||||
--- a/builder/objcopy.go
|
||||
+++ b/builder/objcopy.go
|
||||
@@ -61,7 +61,7 @@ func extractROM(path string) (uint64, []byte, error) {
|
||||
|
||||
progs := make(progSlice, 0, 2)
|
||||
for _, prog := range f.Progs {
|
||||
- if prog.Type != elf.PT_LOAD || prog.Filesz == 0 {
|
||||
+ if prog.Type != elf.PT_LOAD || prog.Filesz == 0 || prog.Off == 0 {
|
||||
continue
|
||||
}
|
||||
progs = append(progs, prog)
|
||||
@@ -73,6 +73,12 @@ func extractROM(path string) (uint64, []byte, error) {
|
||||
|
||||
var rom []byte
|
||||
for _, prog := range progs {
|
||||
+ romEnd := progs[0].Paddr + uint64(len(rom))
|
||||
+ if prog.Paddr > romEnd && prog.Paddr < romEnd+16 {
|
||||
+ // Sometimes, the linker seems to insert a bit of padding between
|
||||
+ // segments. Simply zero-fill these parts.
|
||||
+ rom = append(rom, make([]byte, prog.Paddr-romEnd)...)
|
||||
+ }
|
||||
if prog.Paddr != progs[0].Paddr+uint64(len(rom)) {
|
||||
diff := prog.Paddr - (progs[0].Paddr + uint64(len(rom)))
|
||||
if diff > maxPadBytes {
|
||||
diff --git a/cgo/libclang_config.go b/cgo/libclang_config.go
|
||||
index ec65d8a..24b9501 100644
|
||||
--- a/cgo/libclang_config.go
|
||||
+++ b/cgo/libclang_config.go
|
||||
@@ -1,5 +1,5 @@
|
||||
// +build !byollvm
|
||||
-// +build !llvm9
|
||||
+// +build !llvm9,!llvm11
|
||||
|
||||
package cgo
|
||||
|
||||
diff --git a/cgo/libclang_config_llvm11.go b/cgo/libclang_config_llvm11.go
|
||||
new file mode 100644
|
||||
index 0000000..6fab82b
|
||||
--- /dev/null
|
||||
+++ b/cgo/libclang_config_llvm11.go
|
||||
@@ -0,0 +1,14 @@
|
||||
+// +build !byollvm
|
||||
+// +build llvm11
|
||||
+
|
||||
+package cgo
|
||||
+
|
||||
+/*
|
||||
+#cgo linux CFLAGS: -I/usr/lib/llvm-11/include
|
||||
+#cgo darwin CFLAGS: -I/usr/local/opt/llvm@11/include
|
||||
+#cgo freebsd CFLAGS: -I/usr/local/llvm11/include
|
||||
+#cgo linux LDFLAGS: -L/usr/lib/llvm-11/lib -lclang
|
||||
+#cgo darwin LDFLAGS: -L/usr/local/opt/llvm@11/lib -lclang -lffi
|
||||
+#cgo freebsd LDFLAGS: -L/usr/local/llvm11/lib -lclang
|
||||
+*/
|
||||
+import "C"
|
||||
diff --git a/go.mod b/go.mod
|
||||
index 6887936..98a2ab9 100644
|
||||
--- a/go.mod
|
||||
+++ b/go.mod
|
||||
@@ -10,5 +10,5 @@ require (
|
||||
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
|
||||
- tinygo.org/x/go-llvm v0.0.0-20200503225853-345b2947b59d
|
||||
+ tinygo.org/x/go-llvm v0.0.0-20200503224449-70c558526021
|
||||
)
|
||||
diff --git a/go.sum b/go.sum
|
||||
index c24491e..9ceebac 100644
|
||||
--- a/go.sum
|
||||
+++ b/go.sum
|
||||
@@ -46,5 +46,5 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbO
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
-tinygo.org/x/go-llvm v0.0.0-20200503225853-345b2947b59d h1:hcX7vpB067GWM/EH4sGGOti0PMgIx+0bbZwUXctOIvE=
|
||||
-tinygo.org/x/go-llvm v0.0.0-20200503225853-345b2947b59d/go.mod h1:fv1F0BSNpxMfCL0zF3M4OPFbgYHnhtB6ST0HvUtu/LE=
|
||||
+tinygo.org/x/go-llvm v0.0.0-20200503224449-70c558526021 h1:d8T98WXGjrTgDmMXgxa6nb9EAYXGXwnzXygnJl6d+ac=
|
||||
+tinygo.org/x/go-llvm v0.0.0-20200503224449-70c558526021/go.mod h1:fv1F0BSNpxMfCL0zF3M4OPFbgYHnhtB6ST0HvUtu/LE=
|
||||
diff --git a/interp/interp_test.go b/interp/interp_test.go
|
||||
index 6b0cc38..dba7387 100644
|
||||
--- a/interp/interp_test.go
|
||||
+++ b/interp/interp_test.go
|
||||
@@ -3,6 +3,7 @@ package interp
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
+ "regexp"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
@@ -66,6 +67,8 @@ func runTest(t *testing.T, pathPrefix string) {
|
||||
}
|
||||
}
|
||||
|
||||
+var alignRegexp = regexp.MustCompile(", align [0-9]+$")
|
||||
+
|
||||
// fuzzyEqualIR returns true if the two LLVM IR strings passed in are roughly
|
||||
// equal. That means, only relevant lines are compared (excluding comments
|
||||
// etc.).
|
||||
@@ -75,8 +78,18 @@ func fuzzyEqualIR(s1, s2 string) bool {
|
||||
if len(lines1) != len(lines2) {
|
||||
return false
|
||||
}
|
||||
- for i, line := range lines1 {
|
||||
- if line != lines2[i] {
|
||||
+ for i, line1 := range lines1 {
|
||||
+ line2 := lines2[i]
|
||||
+ match1 := alignRegexp.MatchString(line1)
|
||||
+ match2 := alignRegexp.MatchString(line2)
|
||||
+ if match1 != match2 {
|
||||
+ // Only one of the lines has the align keyword. Remove it.
|
||||
+ // This is a change to make the test work in both LLVM 10 and LLVM
|
||||
+ // 11 (LLVM 11 appears to automatically add alignment everywhere).
|
||||
+ line1 = alignRegexp.ReplaceAllString(line1, "")
|
||||
+ line2 = alignRegexp.ReplaceAllString(line2, "")
|
||||
+ }
|
||||
+ if line1 != line2 {
|
||||
return false
|
||||
}
|
||||
}
|
||||
diff --git a/targets/gameboy-advance.ld b/targets/gameboy-advance.ld
|
||||
index 8b35042..566f78e 100644
|
||||
--- a/targets/gameboy-advance.ld
|
||||
+++ b/targets/gameboy-advance.ld
|
||||
@@ -19,6 +19,7 @@ SECTIONS
|
||||
{
|
||||
KEEP (*(.init))
|
||||
*(.text)
|
||||
+ *(.text.*)
|
||||
. = ALIGN(4);
|
||||
} >rom
|
||||
|
||||
@@ -26,7 +27,7 @@ SECTIONS
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.rodata)
|
||||
- *(.rodata*)
|
||||
+ *(.rodata.*)
|
||||
. = ALIGN(4);
|
||||
} >rom
|
||||
|
||||
@@ -51,7 +52,7 @@ SECTIONS
|
||||
. = ALIGN(4);
|
||||
_sdata = .; /* used by startup code */
|
||||
*(.data)
|
||||
- *(.data*)
|
||||
+ *(.data.*)
|
||||
*(.iwram .iwram.*)
|
||||
. = ALIGN(4);
|
||||
_edata = .; /* used by startup code */
|
||||
@@ -63,7 +64,7 @@ SECTIONS
|
||||
. = ALIGN(4);
|
||||
_sbss = .; /* used by startup code */
|
||||
*(.bss)
|
||||
- *(.bss*)
|
||||
+ *(.bss.*)
|
||||
*(COMMON)
|
||||
. = ALIGN(4);
|
||||
_ebss = .; /* used by startup code */
|
||||
diff --git a/transform/globals.go b/transform/globals.go
|
||||
index 89386fd..7a29683 100644
|
||||
--- a/transform/globals.go
|
||||
+++ b/transform/globals.go
|
||||
@@ -31,3 +31,17 @@ func NonConstGlobals(mod llvm.Module) {
|
||||
global = llvm.NextGlobal(global)
|
||||
}
|
||||
}
|
||||
+
|
||||
+// DisableTailCalls adds the "disable-tail-calls"="true" function attribute to
|
||||
+// all functions. This may be necessary, in particular to avoid an error with
|
||||
+// WebAssembly in LLVM 11.
|
||||
+func DisableTailCalls(mod llvm.Module) {
|
||||
+ attribute := mod.Context().CreateStringAttribute("disable-tail-calls", "true")
|
||||
+ llvmFn := mod.FirstFunction()
|
||||
+ for !llvmFn.IsNil() {
|
||||
+ if !llvmFn.IsDeclaration() {
|
||||
+ llvmFn.AddFunctionAttr(attribute)
|
||||
+ }
|
||||
+ llvmFn = llvm.NextFunction(llvmFn)
|
||||
+ }
|
||||
+}
|
||||
diff --git a/transform/transform_test.go b/transform/transform_test.go
|
||||
index 7a607f1..28faf86 100644
|
||||
--- a/transform/transform_test.go
|
||||
+++ b/transform/transform_test.go
|
||||
@@ -61,6 +61,8 @@ func testTransform(t *testing.T, pathPrefix string, transform func(mod llvm.Modu
|
||||
}
|
||||
}
|
||||
|
||||
+var alignRegexp = regexp.MustCompile(", align [0-9]+$")
|
||||
+
|
||||
// fuzzyEqualIR returns true if the two LLVM IR strings passed in are roughly
|
||||
// equal. That means, only relevant lines are compared (excluding comments
|
||||
// etc.).
|
||||
@@ -70,8 +72,18 @@ func fuzzyEqualIR(s1, s2 string) bool {
|
||||
if len(lines1) != len(lines2) {
|
||||
return false
|
||||
}
|
||||
- for i, line := range lines1 {
|
||||
- if line != lines2[i] {
|
||||
+ for i, line1 := range lines1 {
|
||||
+ line2 := lines2[i]
|
||||
+ match1 := alignRegexp.MatchString(line1)
|
||||
+ match2 := alignRegexp.MatchString(line2)
|
||||
+ if match1 != match2 {
|
||||
+ // Only one of the lines has the align keyword. Remove it.
|
||||
+ // This is a change to make the test work in both LLVM 10 and LLVM
|
||||
+ // 11 (LLVM 11 appears to automatically add alignment everywhere).
|
||||
+ line1 = alignRegexp.ReplaceAllString(line1, "")
|
||||
+ line2 = alignRegexp.ReplaceAllString(line2, "")
|
||||
+ }
|
||||
+ if line1 != line2 {
|
||||
return false
|
||||
}
|
||||
}
|
||||
--
|
||||
2.26.2
|
||||
|
||||
79
changelog
Normal file
79
changelog
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Thu May 13 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.18.0-1
|
||||
- Update to latest version (#1960058)
|
||||
|
||||
* Sun Mar 14 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.17.0-1
|
||||
- Update to latest version (#1936121)
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Fri Jan 22 2021 Tom Stellard <tstellar@redhat.com> - 0.16.0-2
|
||||
- Rebuild for clang-11.1.0
|
||||
|
||||
* Sun Sep 20 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.15.0-1
|
||||
- Update to latest version (#1866183)
|
||||
- Loosen up runtime clang requirement
|
||||
|
||||
* Sat Aug 22 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.14.1-1
|
||||
- Update to latest version (#1866183)
|
||||
|
||||
* Sun Aug 02 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.13.1-3
|
||||
- Patch to allow Go 1.15
|
||||
|
||||
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.1-3
|
||||
- Second attempt - Rebuilt for
|
||||
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Thu Apr 30 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.13.1-1
|
||||
- Update to latest version
|
||||
|
||||
* Mon Apr 20 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.13.0-1
|
||||
- Update to latest version
|
||||
|
||||
* Sun Apr 19 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.12.0-1
|
||||
- Update to latest version
|
||||
|
||||
* Wed Mar 04 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.11.0-3
|
||||
- Update required clang version
|
||||
|
||||
* Tue Feb 11 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.11.0-3
|
||||
- Enable RISCV tests
|
||||
- Enable AVR tests
|
||||
- Add Recommends for AVR dependencies
|
||||
|
||||
* Mon Feb 10 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.11.0-2
|
||||
- Fix setting of TINYGOROOT to point to packaged version
|
||||
|
||||
* Mon Feb 10 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.11.0-1
|
||||
- Update to 0.11.0
|
||||
|
||||
* Mon Feb 10 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.10.0-1
|
||||
- Update to 0.10.0
|
||||
|
||||
* Mon Feb 10 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.9.0-1
|
||||
- Update to 0.9.0
|
||||
|
||||
* Tue Sep 24 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.8.0-1
|
||||
- Update to latest version
|
||||
- Enable x86 build
|
||||
|
||||
* Sun Aug 04 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.7.1-1
|
||||
- Update to latest version
|
||||
|
||||
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Tue Jul 23 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.7.0-1
|
||||
- Update to latest version
|
||||
|
||||
* Tue Jun 11 01:26:10 EDT 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.6.0-1
|
||||
- Initial package
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
CMSIS_VERSION=9fe411cef1cef5de58e5957b89760759de44e393
|
||||
CMSIS_SVD_VERSION=d9b58694cef35b39ddf61c07ef7e6347d6ec3cbd
|
||||
CMSIS_SVD_DATA_VERSION=05a9562ec59b87945a8d7177a4b08b7aa2f2fd58
|
||||
|
||||
if [ -e "cmsis-${CMSIS_VERSION}-clean.tar.xz" ]; then
|
||||
echo "Not downloading cmsis-${CMSIS_VERSION}-clean.tar.xz again!"
|
||||
else
|
||||
# The license for this tarball is complicated, but the headers are under a
|
||||
# simple BSD license, so we only package them.
|
||||
# The license for this tarball is complicated, but the headers are under the
|
||||
# BSD-3-Clause license, so we only package them.
|
||||
wget -nc https://github.com/ARM-software/CMSIS/archive/${CMSIS_VERSION}/cmsis-${CMSIS_VERSION}.tar.gz
|
||||
tar xf cmsis-${CMSIS_VERSION}.tar.gz
|
||||
tar cJf cmsis-${CMSIS_VERSION}-clean.tar.xz \
|
||||
|
|
@ -16,22 +16,52 @@ tar cJf cmsis-${CMSIS_VERSION}-clean.tar.xz \
|
|||
rm -r CMSIS-${CMSIS_VERSION}/
|
||||
fi
|
||||
|
||||
if [ -e "cmsis_svd-${CMSIS_SVD_VERSION}-clean.tar.xz" ]; then
|
||||
echo "Not downloading cmsis_svd-${CMSIS_SVD_VERSION}-clean.tar.xz again!"
|
||||
if [ -e "cmsis_svd_data-${CMSIS_SVD_DATA_VERSION}-clean.tar.xz" ]; then
|
||||
echo "Not downloading cmsis_svd_data-${CMSIS_SVD_DATA_VERSION}-clean.tar.xz again!"
|
||||
else
|
||||
# This is basically a "collection of random stuff" from various vendors, under
|
||||
# various licenses. Some licenses are non-free and some are actively hostile,
|
||||
# but we only need a rather small portion under a good license.
|
||||
#wget https://github.com/posborne/cmsis-svd/archive/${CMSIS_SVD_VERSION}/cmsis_svd-${CMSIS_SVD_VERSION}.tar.gz
|
||||
wget -nc https://github.com/tinygo-org/cmsis-svd/archive/${CMSIS_SVD_VERSION}/cmsis_svd-${CMSIS_SVD_VERSION}.tar.gz
|
||||
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-Community/ \
|
||||
cmsis-svd-${CMSIS_SVD_VERSION}/data/Kendryte-Community/ \
|
||||
cmsis-svd-${CMSIS_SVD_VERSION}/data/SiFive-Community/ \
|
||||
cmsis-svd-${CMSIS_SVD_VERSION}/data/NXP/M* \
|
||||
# This has a weird license, so we cannot include it.
|
||||
# cmsis-svd-${CMSIS_SVD_VERSION}/data/STMicro/
|
||||
rm -r cmsis-svd-${CMSIS_SVD_VERSION}/
|
||||
# but we only need a rather small portion under a good license:
|
||||
# - Atmel: Apache-2.0 AND BSD-Source-Code
|
||||
# - Espressif: Apache-2.0
|
||||
# - Espressif-Community: Apache-2.0 OR MIT
|
||||
# - Kendryte-Community: ISC
|
||||
# - Nordic: BSD-3-Clause
|
||||
# - NXP/L*: Proprietary, so not included.
|
||||
# - NXP/Q*: Unknown, so not included.
|
||||
# - NXP/M*: BSD-3-Clause
|
||||
# - RaspberryPi: BSD-3-Clause
|
||||
# - Renesas: Proprietary
|
||||
# - SiFive-Community: ISC AND (Apache-2.0 OR MIT)
|
||||
# - STMicro: Apache-2.0 AND Proprietary, so only a subset included.
|
||||
# These directories are not used by TinyGo, so are not kept:
|
||||
# - ARM_SAMPLE: BSD-3-Clause
|
||||
# - Allwinner-Community: Apache-2.0 OR MIT
|
||||
# - ArteryTek: BSD-3-Clause
|
||||
# - Cypress: Apache-2.0
|
||||
# - Freescale: Proprietary
|
||||
# - Fujitsu: Proprietary
|
||||
# - GigaDevice: Apache-2.0
|
||||
# - Holtek: Proprietary
|
||||
# - Infineon: Proprietary
|
||||
# - Nuvoton: Unknown
|
||||
# - SiliconLabs: Zlib
|
||||
# - Spansion: Proprietary
|
||||
# - TexasInstruments: Proprietary
|
||||
# - Toshiba: Unknown
|
||||
wget -nc https://github.com/cmsis-svd/cmsis-svd-data/archive/${CMSIS_SVD_DATA_VERSION}/cmsis_svd_data-${CMSIS_SVD_DATA_VERSION}.tar.gz
|
||||
tar xf cmsis_svd_data-${CMSIS_SVD_DATA_VERSION}.tar.gz
|
||||
mapfile -t clean_stmicro < <(grep -Rl '^ *SPDX-License-Identifier: Apache-2.0$' \
|
||||
cmsis-svd-data-${CMSIS_SVD_DATA_VERSION}/data/STMicro/*.svd)
|
||||
tar cJf cmsis_svd_data-${CMSIS_SVD_DATA_VERSION}-clean.tar.xz \
|
||||
cmsis-svd-data-${CMSIS_SVD_DATA_VERSION}/data/Atmel/ \
|
||||
cmsis-svd-data-${CMSIS_SVD_DATA_VERSION}/data/Espressif/ \
|
||||
cmsis-svd-data-${CMSIS_SVD_DATA_VERSION}/data/Espressif-Community/ \
|
||||
cmsis-svd-data-${CMSIS_SVD_DATA_VERSION}/data/Kendryte-Community/ \
|
||||
cmsis-svd-data-${CMSIS_SVD_DATA_VERSION}/data/Nordic/ \
|
||||
cmsis-svd-data-${CMSIS_SVD_DATA_VERSION}/data/NXP/M* \
|
||||
cmsis-svd-data-${CMSIS_SVD_DATA_VERSION}/data/RaspberryPi/ \
|
||||
cmsis-svd-data-${CMSIS_SVD_DATA_VERSION}/data/SiFive-Community/ \
|
||||
"${clean_stmicro[@]}"
|
||||
rm -r cmsis-svd-data-${CMSIS_SVD_DATA_VERSION}/
|
||||
fi
|
||||
|
|
|
|||
104
compiler-rt-release-keys.asc
Normal file
104
compiler-rt-release-keys.asc
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
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
|
||||
9RmlwZlOTFGcWBYl/cfRONn9qi9a6w==
|
||||
=Lvw+
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
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
|
||||
=tMzl
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
38
musl-cve-2025-26519-1.patch
Normal file
38
musl-cve-2025-26519-1.patch
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
>From e5adcd97b5196e29991b524237381a0202a60659 Mon Sep 17 00:00:00 2001
|
||||
From: Rich Felker <dalias@aerifal.cx>
|
||||
Date: Sun, 9 Feb 2025 10:07:19 -0500
|
||||
Subject: [PATCH] iconv: fix erroneous input validation in EUC-KR decoder
|
||||
|
||||
as a result of incorrect bounds checking on the lead byte being
|
||||
decoded, certain invalid inputs which should produce an encoding
|
||||
error, such as "\xc8\x41", instead produced out-of-bounds loads from
|
||||
the ksc table.
|
||||
|
||||
in a worst case, the loaded value may not be a valid unicode scalar
|
||||
value, in which case, if the output encoding was UTF-8, wctomb would
|
||||
return (size_t)-1, causing an overflow in the output pointer and
|
||||
remaining buffer size which could clobber memory outside of the output
|
||||
buffer.
|
||||
|
||||
bug report was submitted in private by Nick Wellnhofer on account of
|
||||
potential security implications.
|
||||
---
|
||||
src/locale/iconv.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/locale/iconv.c b/src/locale/iconv.c
|
||||
index 9605c8e9..008c93f0 100644
|
||||
--- a/src/locale/iconv.c
|
||||
+++ b/src/locale/iconv.c
|
||||
@@ -502,7 +502,7 @@ size_t iconv(iconv_t cd, char **restrict in, size_t *restrict inb, char **restri
|
||||
if (c >= 93 || d >= 94) {
|
||||
c += (0xa1-0x81);
|
||||
d += 0xa1;
|
||||
- if (c >= 93 || c>=0xc6-0x81 && d>0x52)
|
||||
+ if (c > 0xc6-0x81 || c==0xc6-0x81 && d>0x52)
|
||||
goto ilseq;
|
||||
if (d-'A'<26) d = d-'A';
|
||||
else if (d-'a'<26) d = d-'a'+26;
|
||||
--
|
||||
2.21.0
|
||||
|
||||
38
musl-cve-2025-26519-2.patch
Normal file
38
musl-cve-2025-26519-2.patch
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
>From c47ad25ea3b484e10326f933e927c0bc8cded3da Mon Sep 17 00:00:00 2001
|
||||
From: Rich Felker <dalias@aerifal.cx>
|
||||
Date: Wed, 12 Feb 2025 17:06:30 -0500
|
||||
Subject: [PATCH] iconv: harden UTF-8 output code path against input decoder
|
||||
bugs
|
||||
|
||||
the UTF-8 output code was written assuming an invariant that iconv's
|
||||
decoders only emit valid Unicode Scalar Values which wctomb can encode
|
||||
successfully, thereby always returning a value between 1 and 4.
|
||||
|
||||
if this invariant is not satisfied, wctomb returns (size_t)-1, and the
|
||||
subsequent adjustments to the output buffer pointer and remaining
|
||||
output byte count overflow, moving the output position backwards,
|
||||
potentially past the beginning of the buffer, without storing any
|
||||
bytes.
|
||||
---
|
||||
src/locale/iconv.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/locale/iconv.c b/src/locale/iconv.c
|
||||
index 008c93f0..52178950 100644
|
||||
--- a/src/locale/iconv.c
|
||||
+++ b/src/locale/iconv.c
|
||||
@@ -545,6 +545,10 @@ size_t iconv(iconv_t cd, char **restrict in, size_t *restrict inb, char **restri
|
||||
if (*outb < k) goto toobig;
|
||||
memcpy(*out, tmp, k);
|
||||
} else k = wctomb_utf8(*out, c);
|
||||
+ /* This failure condition should be unreachable, but
|
||||
+ * is included to prevent decoder bugs from translating
|
||||
+ * into advancement outside the output buffer range. */
|
||||
+ if (k>4) goto ilseq;
|
||||
*out += k;
|
||||
*outb -= k;
|
||||
break;
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
||||
30
musl.pub
Normal file
30
musl.pub
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v1.4.12 (GNU/Linux)
|
||||
|
||||
mQENBFNcU8EBCAC3g30bXEEh+YzD06JQ+iG+gr5Nb+tjianh8aJ/ql35lqICVj6F
|
||||
nitol0KgSB1L3T80+EON3IEmic9rb2dw6EQ0rMl/6mSW91jQC1rGkGBZnlPZXOSW
|
||||
JznNTBeHaK1NlG6m0shZ+wePWXHoFDtxaEoaMqAzR+E3EkSduLQb9tJJ2vtmIC2X
|
||||
5SFT625DKpRYOpcUxX/d63U+gSQThTitHS9Me0mljcP+qKhP/HIajesx6s5QTBBe
|
||||
vOlzih5MpI0FHcwSIbPwhPUWRS2RdFKfJRQZQAQ1ZiOJL0W82eFI1uztDgfudPcf
|
||||
BbgZcSjqvrKiXaeZxHsj3aguaOqaKdRlkyD1ABEBAAG0GW11c2wgbGliYyA8bXVz
|
||||
bEBsaWJjLm9yZz6JATcEEwECACEFAlNcU8ECGwMGCwkIBwMCBhUIAgkKCwMWAgEC
|
||||
HgECF4AACgkQVrzbWTAgRQ91FwgAnxSTh6Yjz8Oj3p5hTA/5t/ueGpf3dgbVrOXB
|
||||
W0dgIkv+JbpJnpNFzLLz+Yi7J0eDGhW2OXMvZ1AEJmwoNsbsXBvd2rQAMQGUdcDT
|
||||
EhmM+9bRGvWW3hpRT9xFtVJb9bsj0vs6Tpcb9LmmUxwmrguAVo2eOQLQ3UvVWaFh
|
||||
oqEbvhfEb7kvhDds4iFuHxpAH11GmK5Q6POtfFBhYXZBhXqbcHzs1hs51vdDWPUg
|
||||
pcHdpeR9NiP1Ch7lVMHaTuiTmvQcOtCvk9K8OMsG+9z8e7BIis7bXbIjHOTLNVBI
|
||||
IE+kq4I0/Co9shhdqump1pJ0b7R+CfgkFP3n9GpGKkGTgc3djrkBDQRTXFPBAQgA
|
||||
y1PIPj4GJD8AAgSsNMkGxgT1Q0lV8cUh+qN4+uHjO6XzxyiX2rULnO25AWVSq4X2
|
||||
i4LzZxgfFG9wUPEWdeYsJzEzNQYL5JWJREBc1UO73pbVWykvP0zUlxtGKNIKHETx
|
||||
7D02vBpkTUErlNXbKWw1jpApyBmhWZhRsCa320t2yL6v6lO/1YxxCZ/VkSYYbCZ3
|
||||
Rl/uH+l7CfAsOJLczMSHpLNFg+fl9gYy6S/LUZ1kwHWLFbTYbzTdEaPSm9i+iNJ2
|
||||
tMHnvkvDv9GhOhIrixENCzfe3muxd8+8/UxAjZdj24AYphIRhvMSxnLSOUsoGjeP
|
||||
BWhTvKsr6r2MZGQcCiDNjwARAQABiQEeBBgBAgAJBQJTXFPBAhsMAAoJEFa821kw
|
||||
IEUPz50H93mm0dQVPDJV075V5eySx8kYgQUwc7aP6zSQdoMZ3GDa8+fpta3PQv09
|
||||
CqVFeJf8KUTkJwMKbNu5GUUmuA1WbxdmRkOHp81PalLbZS0vAJh62TNntmHU0sFJ
|
||||
kp+IviwOmAJaAO64BQAy/arH0D8q+LFAnMLdIFEVWiMuULXUCB1P4D8agbltd0rH
|
||||
KniPwcWR8Sh0PUcVjUPFzdZz1Qpc+9VYp626p2OZ+tlLO41OZAsbJ24+cWB/fkWu
|
||||
H6g/nw7y9+2xtX8TIi6YBtLCPx/5IcY8LzrSFC+NFYll5V1SoTiGtdhudSfs0Eb2
|
||||
RXdP42mK+kMrgynbOn1RP7p/rfpSlA==
|
||||
=FgKg
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
19
sources
19
sources
|
|
@ -1,8 +1,15 @@
|
|||
SHA512 (tinygo-0.15.0.tar.gz) = f23b705bdbe8ba9e426aeee1fb6095c74d9e4ed8f55db83475627f9932a64411a167a4cb9b4fb3f4be4ee769ad4b4c61dfc7c4db2adf6adbe0b1162789f4caa6
|
||||
SHA512 (tinygo-0.39.0.tar.gz) = ab9dbe6bfac56470d3703617bd0da152b044e84ced1bfcfb7e7bf6ba8880d07dfac267dca7356ace18bd3ed392ed7031b6cb4a2535ad5f956ab5912ecefe3807
|
||||
SHA512 (avr-6624554c02b237b23dc17d53e992bf54033fc228.tar.gz) = 1aa157bd761db38f8680614fa1cf47d7009508f65291b7eaaa5aba1ae76d35103f68a42947b7269a170d2f1cf8fb09941a5d74070fe6d204b68dd15a9ad2ed29
|
||||
SHA512 (bdwgc-1166f11f7dee08d7ad369296b24cf8c9582f8789.tar.gz) = 030d5a9a0931915a76b1ec270e7208199cf40973ac6c8141c02e34f118f965bedcadff3bb36481b0e45703df8eb2750d20809f3fde367fd5efed5f8a44ccab32
|
||||
SHA512 (cmsis-9fe411cef1cef5de58e5957b89760759de44e393-clean.tar.xz) = f131fc241f61982c49f334eb502c2f13da61eb7bdaa641ee84a8de30c4d576b735b8aadeafd7d75351473a2df6a42de6a236ecc5dcc616ee6cfcc07af29446f9
|
||||
SHA512 (cmsis_svd-d9b58694cef35b39ddf61c07ef7e6347d6ec3cbd-clean.tar.xz) = f3040f089e0714aa7d8b234a0becf8ca77934e9aa6510ff56f68add2881ade1f52176b461fbdf6218df077f3bf66505ca4d1ef94d03d28dfad1b53801dbfc88f
|
||||
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-215adc8ac9f91eb055311acc72683fd2eb1ae15a.tar.gz) = f7e5dd8689d86bd781d2985bcab996018e9fefec7744fbbfcc19215d082f20b1ee84b252c3f905926327da6d6e0465c0f22b94e52f5fdb523317275a6b4bf3e1
|
||||
SHA512 (cmsis_svd_data-05a9562ec59b87945a8d7177a4b08b7aa2f2fd58-clean.tar.xz) = e8ba9d74fb148dfa8b3ba140d307b243fb38378f69544529455eea5df57d4276b7177d3549228f8acadc4e72c94506456e78025d9b16d606b322fda8ab38327d
|
||||
SHA512 (compiler-rt-19.1.7.src.tar.xz) = e2e8e6a094525b84184e9e4a4c1a727de518d4ef1a91370515f0c955719dc946fd60e7fabd10f52ab1905ef6d4a86084b8ddfb9b45de838aa1c5ddf3c042748b
|
||||
SHA512 (compiler-rt-19.1.7.src.tar.xz.sig) = 48550377345331bfa0015d2c5bb6e063507a76e950f8f349a8e6877d35428a11d86bd617ea7a048f1584a42c58da924ef523d622b54ce4ca94eaa12ce290b49c
|
||||
SHA512 (macos-minimal-sdk-e7c72156eac3ebf29c34cc2faa71efcb1296663f.tar.gz) = 44638fa9786e88327eb5a2f5cf06c8f09149f21b2592802bdd2db04cbdf4dfbee1bc9296af1b7745c4e30ac97f26a714e19168b742526a8a1b4f8ce23d8fa789
|
||||
SHA512 (mingw64-8526cb618269440a94810b94b77f8bd48c5c3396.tar.gz) = 723d1ac22d8026f31b59d39328f711f36976798445a82daddcdc9fa6ab4346a5030e9c2efc84ef009439b8f021c5c7c120cfa083a7912a5b0212ac6852c005a7
|
||||
SHA512 (musl-1.2.3.tar.gz) = 9332f713d3eb7de4369bc0327d99252275ee52abf523ee34b894b24a387f67579787f7c72a46cf652e090cffdb0bc3719a4e7b84dca66890b6a37f12e8ad089c
|
||||
SHA512 (musl-1.2.3.tar.gz.asc) = 01a857dbc3981c90244d4d1d883efe51986652ca5734a741c9d1a4d06c5a22831e85520ac67212268b70c22049317a8f39b3219be182e7e67741add428ac5bc6
|
||||
SHA512 (net-c134160ae47d38b468b1c5ade43e78ad5a1e616d.tar.gz) = 449149af6bca15fa0fe1a9a8b37b3cab3bf83b177dd78d760fcca561bbacb415d6c7f0a355edf8d0de1b934d13fbce9d307c2a4410f1ff1c3bfe71b28e76b228
|
||||
SHA512 (nrfx-d779b49fc59c7a165e7da1d7cd7d57b28a059f16.tar.gz) = 31c7fc6fd88d4a74e5739b29659cb717a4629480d17d84e491d61c36c435aba16d38ef63d1036e508666a17eeaac5f11a5ff83211f88410f30cc2e152146ee83
|
||||
SHA512 (picolibc-b92edfda8ac6853772d87cadaeeeaa21b78609b6.tar.gz) = 9fb60d81bd98c96264c81e95cab6622ccacb34da285f7f3c137bd3cd8bc6e87cbc065a2e9d9fdfc7b93eec52f33bbfa70b6d0abc1a30551ebec1af351344cc39
|
||||
SHA512 (wasi-libc-wasi-sdk-20.tar.gz) = e264240dc7dbcf6398c8ca09bc108298f4a8aa955af22de5a3015fbcde81cb09dd83cd48349090082d5de0e8a3dbcf746c7b14657c67657b3f2f1ab28bb9cf05
|
||||
|
|
|
|||
493
tinygo.spec
493
tinygo.spec
|
|
@ -1,29 +1,30 @@
|
|||
# Generated by go2rpm 1
|
||||
%bcond_without check
|
||||
%bcond check 1
|
||||
# I'm not sure what this is for, as no tests seem to use it, and it introduces
|
||||
# some weird license that needs review.
|
||||
%bcond wasi_cli 0
|
||||
|
||||
%global __brp_strip_lto %{nil}
|
||||
%global __brp_strip_static_archive %{nil}
|
||||
|
||||
# https://github.com/tinygo-org/tinygo
|
||||
%global goipath github.com/tinygo-org/tinygo
|
||||
Version: 0.15.0
|
||||
Version: 0.39.0
|
||||
|
||||
%global CMSIS_commit 9fe411cef1cef5de58e5957b89760759de44e393
|
||||
%global avr_commit 6624554c02b237b23dc17d53e992bf54033fc228
|
||||
%if %{fedora} > 32
|
||||
%global clang_version 11
|
||||
%else
|
||||
%if %{fedora} > 31
|
||||
%global clang_version 10
|
||||
%else
|
||||
%global clang_version 9
|
||||
%endif
|
||||
%endif
|
||||
%global cmsis_svd_commit d9b58694cef35b39ddf61c07ef7e6347d6ec3cbd
|
||||
%global compiler_rt_version 9.0.0
|
||||
%global nrfx_commit 3ab39a9d457bfe627473ed0e03a7f1161d9e4f27
|
||||
%global picolibc_commit 80528c684b10aaee977397e7eb40c4784e6dc433
|
||||
%global wasi_libc_commit 215adc8ac9f91eb055311acc72683fd2eb1ae15a
|
||||
%global CMSIS_commit 9fe411cef1cef5de58e5957b89760759de44e393
|
||||
%global avr_commit 6624554c02b237b23dc17d53e992bf54033fc228
|
||||
%global bdwgc_commit 1166f11f7dee08d7ad369296b24cf8c9582f8789
|
||||
%global clang_llvm_version 19
|
||||
%global cmsis_svd_data_commit 05a9562ec59b87945a8d7177a4b08b7aa2f2fd58
|
||||
%global compiler_rt_version %{clang_llvm_version}.1.7
|
||||
%global macos_minsdk_commit e7c72156eac3ebf29c34cc2faa71efcb1296663f
|
||||
%global mingw64_commit 8526cb618269440a94810b94b77f8bd48c5c3396
|
||||
%global musl_version 1.2.3
|
||||
%global net_commit c134160ae47d38b468b1c5ade43e78ad5a1e616d
|
||||
%global nrfx_commit d779b49fc59c7a165e7da1d7cd7d57b28a059f16
|
||||
%global picolibc_commit b92edfda8ac6853772d87cadaeeeaa21b78609b6
|
||||
%global wasi_libc_version 20
|
||||
%global wasi_libc_tag wasi-sdk-%{wasi_libc_version}
|
||||
%global wasi_cli_version 0.2.0
|
||||
|
||||
# No longer matching regular Go's /usr/share/gocode because it also provides
|
||||
# pre-compiled binaries, and symlinks to arch-specific clang headers.
|
||||
|
|
@ -35,184 +36,397 @@ Version: 0.15.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}
|
||||
Release: %autorelease
|
||||
Summary: Go compiler for small places
|
||||
|
||||
# Main files: BSD
|
||||
# CMSIS: BSD (subsetted)
|
||||
# avr-mcu: ASL 2.0 (packs) and MIT (Rust code, unused by this package)
|
||||
# cmsis-svd: ASL 2.0 and BSD and ISC and MIT (subsetted)
|
||||
# compiler-rt: NCSA or MIT
|
||||
# nrfx: BSD and ASL 2.0
|
||||
# picolibc: BSD and ISC and MIT and GPLv2 (testing code only, unused by this package)
|
||||
# wasi-libc: BSD and CC0 and ISC and MIT and Public Domain
|
||||
License: BSD and ASL 2.0 and CC0 and ISC and MIT and (NCSA or MIT) and Public Domain
|
||||
# Main files: BSD-3-Clause
|
||||
# builder/cc1as.*: Apache-2.0 WITH LLVM-exception
|
||||
# corpus_test.go: MIT
|
||||
# CMSIS: BSD-3-Clause (subsetted)
|
||||
# avr-mcu: Apache-2.0 (packs) AND MIT (Rust code, unused by this package)
|
||||
# cmsis-svd: Apache-2.0 AND (Apache-2.0 OR MIT) AND BSD-3-Clause AND BSD-Source-Code AND ISC AND MIT (subsetted)
|
||||
# compiler-rt: Apache-2.0 WITH LLVM-exception OR NCSA OR MIT
|
||||
# macos-minimal-sdk: APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSD-4-Clause-UC AND ISC AND LicenseRef-Fedora-Public-Domain
|
||||
# musl: MIT
|
||||
# net: BSD-2-Clause
|
||||
# nrfx: BSD-3-Clause AND Apache-2.0
|
||||
# picolibc: BSD-2-Clause AND BSD-2-Clause-FreeBSD AND BSD-3-Clause AND ISC AND SMLNJ AND Spencer-94 AND GPLv2 (testing code only, unused by this package)
|
||||
# wasi-libc: Apache-2.0 WITH LLVM-exception AND Apache-2.0 AND MIT AND BSD-2-Clause AND CC0-1.0 (dlmalloc implementation, unused by this package)
|
||||
License: %{shrink: BSD-3-Clause AND Apache-2.0 WITH LLVM-exception AND BSD-2-Clause AND MIT AND
|
||||
Apache-2.0 AND
|
||||
(Apache-2.0 OR MIT) AND BSD-Source-Code AND ISC AND
|
||||
(Apache-2.0 WITH LLVM-exception OR NCSA OR MIT) AND
|
||||
APSL-2.0 AND BSD-2-Clause AND BSD-4-Clause AND BSD-4-Clause-UC AND LicenseRef-Fedora-Public-Domain AND
|
||||
BSD-2-Clause-FreeBSD AND SMLNJ AND Spencer-94}
|
||||
URL: %{gourl}
|
||||
Source0: %{gosource}
|
||||
Source1: clean_tarballs.sh
|
||||
Source2: cmsis-%{CMSIS_commit}-clean.tar.xz
|
||||
Source3: https://github.com/avr-rust/avr-mcu/archive/%{avr_commit}/avr-%{avr_commit}.tar.gz
|
||||
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
|
||||
Source7: https://github.com/keith-packard/picolibc/archive/%{picolibc_commit}/picolibc-%{picolibc_commit}.tar.gz
|
||||
Source8: https://github.com/WebAssembly/wasi-libc/archive/%{wasi_libc_commit}/wasi-libc-%{wasi_libc_commit}.tar.gz
|
||||
# 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
|
||||
# https://github.com/tinygo-org/tinygo/pull/1399
|
||||
Patch0004: 0004-Also-check-lib64-for-clang-include-path.patch
|
||||
# https://github.com/tinygo-org/tinygo/pull/1056
|
||||
Patch0005: 0005-main-add-initial-support-for-in-development-LLVM-11.patch
|
||||
Source4: cmsis_svd_data-%{cmsis_svd_data_commit}-clean.tar.xz
|
||||
Source50: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compiler_rt_version}/compiler-rt-%{compiler_rt_version}.src.tar.xz
|
||||
Source51: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compiler_rt_version}/compiler-rt-%{compiler_rt_version}.src.tar.xz.sig
|
||||
Source52: https://src.fedoraproject.org/rpms/compiler-rt/raw/f8e98d51f0c3fdbaa9ce5d99816930e4fcbe504b/f/release-keys.asc#/compiler-rt-release-keys.asc
|
||||
Source60: https://musl.libc.org/releases/musl-%{musl_version}.tar.gz
|
||||
Source61: https://musl.libc.org/releases/musl-%{musl_version}.tar.gz.asc
|
||||
Source62: https://musl.libc.org/musl.pub
|
||||
Source7: https://github.com/aykevl/macos-minimal-sdk/archive/%{macos_minsdk_commit}/macos-minimal-sdk-%{macos_minsdk_commit}.tar.gz
|
||||
Source8: https://github.com/NordicSemiconductor/nrfx/archive/%{nrfx_commit}/nrfx-%{nrfx_commit}.tar.gz
|
||||
Source9: https://github.com/keith-packard/picolibc/archive/%{picolibc_commit}/picolibc-%{picolibc_commit}.tar.gz
|
||||
Source10: https://github.com/WebAssembly/wasi-libc/archive/%{wasi_libc_tag}/wasi-libc-%{wasi_libc_tag}.tar.gz
|
||||
Source11: https://github.com/mingw-w64/mingw-w64/archive/%{mingw64_commit}/mingw64-%{mingw64_commit}.tar.gz
|
||||
Source12: https://github.com/tinygo-org/net/archive/%{net_commit}/net-%{net_commit}.tar.gz
|
||||
%if %{with wasi_cli}
|
||||
Source13: https://github.com/WebAssembly/wasi-cli/archive/v%{wasi_cli_version}/wasi-cli-%{wasi_cli_version}.tar.gz
|
||||
%endif
|
||||
Source14: https://github.com/ivmai/bdwgc/archive/%{bdwgc_commit}/bdwgc-%{bdwgc_commit}.tar.gz
|
||||
|
||||
#
|
||||
# Unnumbered patches are applied to the main source tree.
|
||||
# Patches that are 1X00-1X99 are applied to the subdirectory for source X.
|
||||
#
|
||||
|
||||
# We don't have wasmtime to run these.
|
||||
Patch: 0001-Skip-WASI-tests.patch
|
||||
# We set GO111MODULE=off during tests, so can't run a few of them.
|
||||
Patch: 0002-Skip-tests-that-require-Go-module-mode.patch
|
||||
# Better search paths for non-default LLVM.
|
||||
Patch: 0003-Set-LLVM-search-paths-for-Fedora.patch
|
||||
#https://github.com/tinygo-org/tinygo/pull/4677
|
||||
Patch: 0004-Normalize-expected-path-for-chdir-tests.patch
|
||||
# https://github.com/tinygo-org/tinygo/issues/4969
|
||||
Patch: 0005-Skip-x86-tests-on-ARM.patch
|
||||
|
||||
# Fix CVE-2025-26519 in musl.
|
||||
Patch1600: https://www.openwall.com/lists/musl/2025/02/13/1/1#/musl-cve-2025-26519-1.patch
|
||||
Patch1601: https://www.openwall.com/lists/musl/2025/02/13/1/2#/musl-cve-2025-26519-2.patch
|
||||
|
||||
# Not supported upstream yet.
|
||||
ExcludeArch: armv7hl ppc64le s390x
|
||||
ExcludeArch: ppc64le s390x
|
||||
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
|
||||
ExcludeArch: %{ix86}
|
||||
|
||||
BuildRequires: chromium
|
||||
BuildRequires: (clang-devel >= %{clang_version} with clang-devel < %{lua: print(tonumber(rpm.expand('%{clang_version}')) + 1)})
|
||||
BuildRequires: clang-devel(major) = %{clang_llvm_version}
|
||||
BuildRequires: golang(github.com/aykevl/go-wasm)
|
||||
BuildRequires: golang(github.com/blakesmith/ar)
|
||||
BuildRequires: golang(github.com/chromedp/chromedp)
|
||||
BuildRequires: chromium
|
||||
BuildRequires: golang(github.com/chromedp/chromedp) >= 0.7.6
|
||||
BuildRequires: golang(github.com/chromedp/cdproto/cdp)
|
||||
BuildRequires: golang(github.com/gofrs/flock) >= 0.8.1
|
||||
BuildRequires: golang(github.com/google/shlex)
|
||||
BuildRequires: golang(github.com/inhies/go-bytesize)
|
||||
BuildRequires: golang(github.com/marcinbor85/gohex)
|
||||
BuildRequires: golang(go.bug.st/serial)
|
||||
BuildRequires: golang(github.com/mattn/go-colorable) >= 0.1.13
|
||||
BuildRequires: golang(github.com/mattn/go-tty) >= 0.0.4
|
||||
BuildRequires: golang(github.com/tetratelabs/wazero) >= 1.6
|
||||
BuildRequires: golang(golang.org/x/net/http/httpguts) >= 0.35
|
||||
BuildRequires: golang(github.com/sigurn/crc16)
|
||||
BuildRequires: golang(go.bug.st/serial) >= 1.6.0
|
||||
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.30
|
||||
BuildRequires: golang(gopkg.in/yaml.v2) >= 2.4.0
|
||||
BuildRequires: golang(tinygo.org/x/go-llvm)
|
||||
BuildRequires: golang-tests
|
||||
BuildRequires: llvm-devel(major) = %{clang_llvm_version}
|
||||
BuildRequires: make
|
||||
|
||||
BuildRequires: avr-gcc
|
||||
BuildRequires: avr-libc
|
||||
BuildRequires: binaryen >= 116
|
||||
# We don't have glibc for arm, so skip these.
|
||||
#BuildRequires: gcc-arm-linux-gnu
|
||||
#BuildRequires: gcc-aarch64-linux-gnu
|
||||
BuildRequires: lld
|
||||
BuildRequires: nodejs
|
||||
BuildRequires: lld(major) = %{clang_llvm_version}
|
||||
# BuildRequires: mingw64-crt
|
||||
# BuildRequires: mingw64-headers
|
||||
BuildRequires: nodejs >= 18
|
||||
BuildRequires: qemu-system-arm-core
|
||||
BuildRequires: qemu-system-riscv-core
|
||||
BuildRequires: qemu-user
|
||||
|
||||
# For GPG signature verification
|
||||
BuildRequires: gnupg2
|
||||
|
||||
Requires: clang(major) = %{clang_llvm_version}
|
||||
Requires: golang
|
||||
Requires: lld
|
||||
Recommends: avr-gcc
|
||||
Recommends: avr-libc
|
||||
Recommends: clang
|
||||
Requires: lld(major) = %{clang_llvm_version}
|
||||
# Add this when LLVM supports ESP natively.
|
||||
# Recommends: esptool
|
||||
# Recommends: mingw64-crt
|
||||
# Recommends: mingw64-headers
|
||||
Recommends: qemu-system-arm-core
|
||||
Recommends: qemu-system-riscv-core
|
||||
Recommends: qemu-user
|
||||
|
||||
# Make note of bundled libc's
|
||||
Provides: bundled(bdwgc) = %{bdwgc_commit}
|
||||
Provides: bundled(gc) = %{bdwgc_commit}
|
||||
Provides: bundled(compiler-rt) = %{compiler_rt_version}
|
||||
Provides: bundled(musl) = %{musl_version}
|
||||
Provides: bundled(picolibc) = %{picolibc_commit}
|
||||
Provides: bundled(wasi-libc) = %{wasi_libc_version}
|
||||
|
||||
%description
|
||||
%{common_description}
|
||||
|
||||
#gopkg
|
||||
|
||||
|
||||
%prep
|
||||
%goprep
|
||||
%patch0001 -p1
|
||||
%patch0002 -p1
|
||||
%patch0003 -p1
|
||||
%patch0004 -p1
|
||||
%patch0005 -p1
|
||||
%autopatch -q -p1 -M 999
|
||||
|
||||
tar -C lib -xf %{SOURCE2}
|
||||
rmdir lib/CMSIS
|
||||
mv lib/CMSIS-%{CMSIS_commit} lib/CMSIS
|
||||
pushd lib/CMSIS
|
||||
%autopatch -q -p1 -m 1200 -M 1299
|
||||
popd
|
||||
|
||||
tar -C lib -xf %{SOURCE3}
|
||||
rmdir lib/avr
|
||||
mv lib/avr-mcu-%{avr_commit} lib/avr
|
||||
pushd lib/avr
|
||||
%autopatch -q -p1 -m 1300 -M 1399
|
||||
popd
|
||||
|
||||
tar -C lib -xf %{SOURCE4}
|
||||
rmdir lib/cmsis-svd
|
||||
mv lib/cmsis-svd-%{cmsis_svd_commit} lib/cmsis-svd
|
||||
mv lib/cmsis-svd-data-%{cmsis_svd_data_commit} lib/cmsis-svd
|
||||
pushd lib/cmsis-svd
|
||||
%autopatch -q -p1 -m 1400 -M 1499
|
||||
popd
|
||||
|
||||
tar -C lib -xf %{SOURCE5}
|
||||
rmdir lib/compiler-rt
|
||||
mv lib/compiler-rt-%{compiler_rt_version}.src lib/compiler-rt
|
||||
# Verify *before* actually unpacking!
|
||||
%{gpgverify} --keyring='%{SOURCE52}' --signature='%{SOURCE51}' --data='%{SOURCE50}'
|
||||
tar -C lib -xf %{SOURCE50}
|
||||
mv lib/compiler-rt-%{compiler_rt_version}.src/lib/builtins lib/compiler-rt-builtins
|
||||
mv lib/compiler-rt-%{compiler_rt_version}.src/README.txt lib/compiler-rt-builtins/
|
||||
mv lib/compiler-rt-%{compiler_rt_version}.src/LICENSE.TXT lib/compiler-rt-builtins/
|
||||
pushd lib/compiler-rt-builtins
|
||||
%autopatch -q -p1 -m 1500 -M 1599
|
||||
popd
|
||||
|
||||
tar -C lib -xf %{SOURCE6}
|
||||
# Verify *before* actually unpacking!
|
||||
%{gpgverify} --keyring='%{SOURCE62}' --signature='%{SOURCE61}' --data='%{SOURCE60}'
|
||||
tar -C lib -xf %{SOURCE60}
|
||||
rmdir lib/musl
|
||||
mv lib/musl-%{musl_version} lib/musl
|
||||
pushd lib/musl
|
||||
%autopatch -q -p1 -m 1600 -M 1699
|
||||
popd
|
||||
|
||||
tar -C lib -xf %{SOURCE7}
|
||||
rmdir lib/macos-minimal-sdk
|
||||
mv lib/macos-minimal-sdk-%{macos_minsdk_commit} lib/macos-minimal-sdk
|
||||
pushd lib/macos-minimal-sdk
|
||||
%autopatch -q -p1 -m 1700 -M 1799
|
||||
popd
|
||||
|
||||
tar -C lib -xf %{SOURCE8}
|
||||
rmdir lib/nrfx
|
||||
mv lib/nrfx-%{nrfx_commit} lib/nrfx
|
||||
rm lib/nrfx/.gitignore
|
||||
chmod -x lib/nrfx/doc/generate_html_doc.sh
|
||||
pushd lib/nrfx
|
||||
%autopatch -q -p1 -m 1800 -M 1899
|
||||
popd
|
||||
|
||||
tar -C lib -xf %{SOURCE7}
|
||||
tar -C lib -xf %{SOURCE9}
|
||||
rmdir lib/picolibc
|
||||
mv lib/picolibc-%{picolibc_commit} lib/picolibc
|
||||
pushd lib/picolibc
|
||||
%autopatch -q -p1 -m 1900 -M 1999
|
||||
popd
|
||||
|
||||
tar -C lib -xf %{SOURCE8}
|
||||
tar -C lib -xf %{SOURCE10}
|
||||
rmdir lib/wasi-libc
|
||||
mv lib/wasi-libc-%{wasi_libc_commit} lib/wasi-libc
|
||||
mv lib/wasi-libc-%{wasi_libc_tag} lib/wasi-libc
|
||||
pushd lib/wasi-libc
|
||||
%autopatch -q -p1 -m 11000 -M 11099
|
||||
popd
|
||||
|
||||
tar -C lib -xf %{SOURCE11}
|
||||
rmdir lib/mingw-w64
|
||||
mv lib/mingw-w64-%{mingw64_commit} lib/mingw-w64
|
||||
pushd lib/mingw-w64
|
||||
%autopatch -q -p1 -m 11100 -M 11199
|
||||
popd
|
||||
|
||||
tar -C src -xf %{SOURCE12}
|
||||
rmdir src/net
|
||||
mv src/net-%{net_commit} src/net
|
||||
pushd src/net
|
||||
%autopatch -q -p1 -m 11200 -M 11299
|
||||
popd
|
||||
|
||||
%if %{with wasi_cli}
|
||||
tar -C lib -xf %{SOURCE13}
|
||||
rmdir lib/wasi-cli
|
||||
mv lib/wasi-cli-%{wasi_cli_version} lib/wasi-cli
|
||||
pushd lib/wasi-cli
|
||||
%autopatch -q -p1 -m 11300 -M 11399
|
||||
popd
|
||||
%endif
|
||||
|
||||
tar -C lib -xf %{SOURCE14}
|
||||
rmdir lib/bdwgc
|
||||
mv lib/bdwgc-%{bdwgc_commit} lib/bdwgc
|
||||
pushd lib/bdwgc
|
||||
%autopatch -q -p1 -m 11400 -M 11499
|
||||
popd
|
||||
|
||||
%build
|
||||
export LDFLAGS="-X github.com/tinygo-org/tinygo/goenv.TINYGOROOT=%{tinygoroot} "
|
||||
export GO_BUILDTAGS="llvm%{clang_llvm_version}" GO_LDFLAGS="-X github.com/tinygo-org/tinygo/goenv.TINYGOROOT=%{tinygoroot} "
|
||||
%gobuild -o %{gobuilddir}/bin/tinygo %{goipath}
|
||||
GO111MODULE=off %make_build gen-device
|
||||
for target in armv6m-none-eabi armv7m-none-eabi armv7em-none-eabi; do
|
||||
for libc in compiler-rt picolibc; do
|
||||
TINYGOROOT=$PWD \
|
||||
%{gobuilddir}/bin/tinygo \
|
||||
build-library -target=$target -o ${target}-${libc}.a ${libc}
|
||||
done
|
||||
done
|
||||
%make_build wasi-libc CLANG=clang-%{clang_version} LLVM_AR=llvm-ar LLVM_NM=llvm-nm
|
||||
GO111MODULE=off %make_build gen-device RENESAS=0 STM32=0
|
||||
|
||||
|
||||
%install
|
||||
#gopkginstall
|
||||
install -vdm 0755 %{buildroot}%{_bindir}
|
||||
install -vpm 0755 %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
|
||||
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib/bdwgc
|
||||
cp -rp lib/bdwgc/* %{buildroot}%{tinygoroot}/lib/bdwgc
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib/CMSIS
|
||||
install -vpm 0644 lib/CMSIS/README.md %{buildroot}%{tinygoroot}/lib/CMSIS/
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib/CMSIS/CMSIS/Include
|
||||
install -vpm 0644 lib/CMSIS/CMSIS/Include/* %{buildroot}%{tinygoroot}/lib/CMSIS/CMSIS/Include/
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib/compiler-rt
|
||||
install -vpm 0644 lib/compiler-rt/README.txt %{buildroot}%{tinygoroot}/lib/compiler-rt/
|
||||
install -vpm 0644 lib/compiler-rt/LICENSE.TXT %{buildroot}%{tinygoroot}/lib/compiler-rt/
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib/compiler-rt/lib
|
||||
cp -rp lib/compiler-rt/lib/builtins %{buildroot}%{tinygoroot}/lib/compiler-rt/lib/
|
||||
cp -rp lib/compiler-rt-builtins %{buildroot}%{tinygoroot}/lib
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib/macos-minimal-sdk
|
||||
cp -rp lib/macos-minimal-sdk/* %{buildroot}%{tinygoroot}/lib/macos-minimal-sdk
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib/mingw-w64/mingw-w64-crt
|
||||
cp -rp lib/mingw-w64/mingw-w64-crt/def-include %{buildroot}%{tinygoroot}/lib/mingw-w64/mingw-w64-crt
|
||||
cp -rp lib/mingw-w64/mingw-w64-crt/gdtoa %{buildroot}%{tinygoroot}/lib/mingw-w64/mingw-w64-crt
|
||||
cp -rp lib/mingw-w64/mingw-w64-crt/include %{buildroot}%{tinygoroot}/lib/mingw-w64/mingw-w64-crt
|
||||
cp -rp lib/mingw-w64/mingw-w64-crt/misc %{buildroot}%{tinygoroot}/lib/mingw-w64/mingw-w64-crt
|
||||
cp -rp lib/mingw-w64/mingw-w64-crt/stdio %{buildroot}%{tinygoroot}/lib/mingw-w64/mingw-w64-crt
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib/mingw-w64/mingw-w64-crt/crt
|
||||
cp -rp lib/mingw-w64/mingw-w64-crt/crt/pseudo-reloc.c %{buildroot}%{tinygoroot}/lib/mingw-w64/mingw-w64-crt/crt
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib/mingw-w64/mingw-w64-crt/math
|
||||
cp -rp lib/mingw-w64/mingw-w64-crt/math/x86 %{buildroot}%{tinygoroot}/lib/mingw-w64/mingw-w64-crt/math
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib/mingw-w64/mingw-w64-crt/lib-common
|
||||
cp -rp lib/mingw-w64/mingw-w64-crt/lib-common/api-ms-win-crt-* %{buildroot}%{tinygoroot}/lib/mingw-w64/mingw-w64-crt/lib-common
|
||||
cp -rp lib/mingw-w64/mingw-w64-crt/lib-common/advapi32.def.in %{buildroot}%{tinygoroot}/lib/mingw-w64/mingw-w64-crt/lib-common
|
||||
cp -rp lib/mingw-w64/mingw-w64-crt/lib-common/kernel32.def.in %{buildroot}%{tinygoroot}/lib/mingw-w64/mingw-w64-crt/lib-common
|
||||
cp -rp lib/mingw-w64/mingw-w64-crt/lib-common/msvcrt.def.in %{buildroot}%{tinygoroot}/lib/mingw-w64/mingw-w64-crt/lib-common
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib/mingw-w64/mingw-w64-headers/defaults
|
||||
cp -rp lib/mingw-w64/mingw-w64-headers/crt/ %{buildroot}%{tinygoroot}/lib/mingw-w64/mingw-w64-headers
|
||||
cp -rp lib/mingw-w64/mingw-w64-headers/include %{buildroot}%{tinygoroot}/lib/mingw-w64/mingw-w64-headers
|
||||
cp -rp lib/mingw-w64/mingw-w64-headers/defaults/include %{buildroot}%{tinygoroot}/lib/mingw-w64/mingw-w64-headers/defaults
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib/musl
|
||||
cp -rp lib/musl/COPYRIGHT %{buildroot}%{tinygoroot}/lib/musl
|
||||
cp -rp lib/musl/include %{buildroot}%{tinygoroot}/lib/musl
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib/musl/arch
|
||||
cp -rp lib/musl/arch/aarch64 %{buildroot}%{tinygoroot}/lib/musl/arch
|
||||
cp -rp lib/musl/arch/arm %{buildroot}%{tinygoroot}/lib/musl/arch
|
||||
cp -rp lib/musl/arch/generic %{buildroot}%{tinygoroot}/lib/musl/arch
|
||||
cp -rp lib/musl/arch/i386 %{buildroot}%{tinygoroot}/lib/musl/arch
|
||||
cp -rp lib/musl/arch/mips %{buildroot}%{tinygoroot}/lib/musl/arch
|
||||
cp -rp lib/musl/arch/x86_64 %{buildroot}%{tinygoroot}/lib/musl/arch
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib/musl/crt
|
||||
cp -rp lib/musl/crt/crt1.c %{buildroot}%{tinygoroot}/lib/musl/crt
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/musl/src/conf %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/musl/src/ctype %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/musl/src/env %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/musl/src/errno %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/musl/src/exit %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/musl/src/fcntl %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/musl/src/include %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/musl/src/internal %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/musl/src/legacy %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/musl/src/linux %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/musl/src/locale %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/musl/src/malloc %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/musl/src/mman %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/musl/src/math %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/musl/src/misc %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/musl/src/multibyte %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/musl/src/sched %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/musl/src/signal %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/musl/src/stdio %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/musl/src/stdlib %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/musl/src/string %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/musl/src/thread %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/musl/src/time %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/musl/src/unistd %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/musl/src/process %{buildroot}%{tinygoroot}/lib/musl/src
|
||||
cp -rp lib/nrfx %{buildroot}%{tinygoroot}/lib/
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib/wasi-libc
|
||||
cp -rp lib/wasi-libc/sysroot %{buildroot}%{tinygoroot}/lib/wasi-libc/
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib/wasi-libc/dlmalloc
|
||||
cp -rp lib/wasi-libc/dlmalloc/src %{buildroot}%{tinygoroot}/lib/wasi-libc/dlmalloc
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-bottom-half
|
||||
cp -rp lib/wasi-libc/libc-bottom-half/cloudlibc %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-bottom-half
|
||||
cp -rp lib/wasi-libc/libc-bottom-half/headers %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-bottom-half
|
||||
cp -rp lib/wasi-libc/libc-bottom-half/sources %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-bottom-half
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half
|
||||
cp -rp lib/wasi-libc/libc-top-half/headers %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half
|
||||
cp -rp lib/wasi-libc/libc-top-half/sources %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl
|
||||
cp -rp lib/wasi-libc/libc-top-half/musl/include %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/arch
|
||||
cp -rp lib/wasi-libc/libc-top-half/musl/arch/generic %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/arch
|
||||
cp -rp lib/wasi-libc/libc-top-half/musl/arch/wasm32 %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/arch
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/src
|
||||
cp -rp lib/wasi-libc/libc-top-half/musl/src/conf %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/src
|
||||
cp -rp lib/wasi-libc/libc-top-half/musl/src/dirent %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/src
|
||||
cp -rp lib/wasi-libc/libc-top-half/musl/src/env %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/src
|
||||
cp -rp lib/wasi-libc/libc-top-half/musl/src/errno %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/src
|
||||
cp -rp lib/wasi-libc/libc-top-half/musl/src/exit %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/src
|
||||
cp -rp lib/wasi-libc/libc-top-half/musl/src/fcntl %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/src
|
||||
cp -rp lib/wasi-libc/libc-top-half/musl/src/fenv %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/src
|
||||
cp -rp lib/wasi-libc/libc-top-half/musl/src/include %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/src
|
||||
cp -rp lib/wasi-libc/libc-top-half/musl/src/internal %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/src
|
||||
cp -rp lib/wasi-libc/libc-top-half/musl/src/legacy %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/src
|
||||
cp -rp lib/wasi-libc/libc-top-half/musl/src/locale %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/src
|
||||
cp -rp lib/wasi-libc/libc-top-half/musl/src/math %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/src
|
||||
cp -rp lib/wasi-libc/libc-top-half/musl/src/misc %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/src
|
||||
cp -rp lib/wasi-libc/libc-top-half/musl/src/multibyte %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/src
|
||||
cp -rp lib/wasi-libc/libc-top-half/musl/src/network %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/src
|
||||
cp -rp lib/wasi-libc/libc-top-half/musl/src/stat %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/src
|
||||
cp -rp lib/wasi-libc/libc-top-half/musl/src/stdio %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/src
|
||||
cp -rp lib/wasi-libc/libc-top-half/musl/src/stdlib %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/src
|
||||
cp -rp lib/wasi-libc/libc-top-half/musl/src/string %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/src
|
||||
cp -rp lib/wasi-libc/libc-top-half/musl/src/thread %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/src
|
||||
cp -rp lib/wasi-libc/libc-top-half/musl/src/time %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/src
|
||||
cp -rp lib/wasi-libc/libc-top-half/musl/src/unistd %{buildroot}%{tinygoroot}/lib/wasi-libc/libc-top-half/musl/src
|
||||
%if %{with wasi_cli}
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib/wasi-cli
|
||||
cp -rp lib/wasi-cli/wit %{buildroot}%{tinygoroot}/lib/wasi-cli/wit
|
||||
%endif
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib/picolibc/newlib/libc
|
||||
cp -rp lib/picolibc/newlib/libc/ctype %{buildroot}%{tinygoroot}/lib/picolibc/newlib/libc
|
||||
chmod -x %{buildroot}%{tinygoroot}/lib/picolibc/newlib/libc/ctype/{mkcaseconv,mkcategories,mkunidata}
|
||||
cp -rp lib/picolibc/newlib/libc/include %{buildroot}%{tinygoroot}/lib/picolibc/newlib/libc
|
||||
cp -rp lib/picolibc/newlib/libc/locale %{buildroot}%{tinygoroot}/lib/picolibc/newlib/libc
|
||||
cp -rp lib/picolibc/newlib/libc/string %{buildroot}%{tinygoroot}/lib/picolibc/newlib/libc
|
||||
chmod -x %{buildroot}%{tinygoroot}/lib/picolibc/newlib/libc/string/{mkunidata,mkwide,mkwidthA,uniset}
|
||||
cp -rp lib/picolibc/newlib/libc/tinystdio %{buildroot}%{tinygoroot}/lib/picolibc/newlib/libc
|
||||
cp -rp lib/picolibc-include %{buildroot}%{tinygoroot}/lib
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/pkg
|
||||
for target in armv6m-none-eabi armv7m-none-eabi armv7em-none-eabi; do
|
||||
for libc in compiler-rt picolibc; do
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/pkg/${target}
|
||||
install -vpm 0644 ${target}-${libc}.a %{buildroot}%{tinygoroot}/pkg/${target}/${libc}.a
|
||||
done
|
||||
done
|
||||
chmod -x %{buildroot}%{tinygoroot}/lib/picolibc/newlib/libc/tinystdio/make-dtoa-data
|
||||
install -vdm 0755 %{buildroot}%{tinygoroot}/lib/picolibc/newlib/libm
|
||||
cp -rp lib/picolibc/newlib/libm/common %{buildroot}%{tinygoroot}/lib/picolibc/newlib/libm
|
||||
cp -rp lib/picolibc/newlib/libm/math %{buildroot}%{tinygoroot}/lib/picolibc/newlib/libm
|
||||
cp -rp lib/picolibc-stdio.c %{buildroot}%{tinygoroot}/lib
|
||||
cp -rp src %{buildroot}%{tinygoroot}/
|
||||
rm %{buildroot}%{tinygoroot}/src/examples/wasm/.gitignore
|
||||
cp -rp targets %{buildroot}%{tinygoroot}/
|
||||
|
||||
|
||||
%if %{with check}
|
||||
%global gotestflags %gocompilerflags -v -tags="llvm%{clang_llvm_version}" -timeout 30m
|
||||
%check
|
||||
export TINYGOROOT=%{buildroot}%{tinygoroot}
|
||||
export GOPATH=%{buildroot}%{tinygoroot}:%{gopath}
|
||||
export PATH=%{buildroot}%{_bindir}:$PATH
|
||||
export GO111MODULE=off
|
||||
%gocheck -v -d tests/tinygotest
|
||||
make smoketest XTENSA=0
|
||||
export XDG_CACHE_HOME="${PWD}/$(mktemp -d tinygo.XXXXXX)"
|
||||
%gocheck -v -t src -t tests
|
||||
( cd _build/src/%{goipath} && GOPATH=%{currentgosourcedir}/_build:$GOPATH make smoketest STM32=0 XTENSA=0 )
|
||||
%ifnarch aarch64
|
||||
make wasmtest
|
||||
%endif
|
||||
make tinygo-test
|
||||
%endif
|
||||
|
||||
|
||||
%files
|
||||
|
|
@ -220,74 +434,15 @@ make wasmtest
|
|||
%license LICENSE
|
||||
%{_bindir}/tinygo
|
||||
%{tinygoroot}
|
||||
%doc %{tinygoroot}/lib/bdwgc/README.md
|
||||
%license %{tinygoroot}/lib/bdwgc/LICENSE
|
||||
%doc %{tinygoroot}/lib/CMSIS/README.md
|
||||
%license %{tinygoroot}/lib/compiler-rt/LICENSE.TXT
|
||||
%doc %{tinygoroot}/lib/compiler-rt/README.txt
|
||||
%license %{tinygoroot}/lib/compiler-rt-builtins/LICENSE.TXT
|
||||
%doc %{tinygoroot}/lib/compiler-rt-builtins/README.txt
|
||||
%license %{tinygoroot}/lib/nrfx/LICENSE
|
||||
%doc %{tinygoroot}/lib/nrfx/README.md
|
||||
|
||||
#gopkgfiles
|
||||
%license %{tinygoroot}/lib/musl/COPYRIGHT
|
||||
|
||||
|
||||
%changelog
|
||||
* Sun Sep 20 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.15.0-1
|
||||
- Update to latest version (#1866183)
|
||||
- Loosen up runtime clang requirement
|
||||
|
||||
* Sat Aug 22 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.14.1-1
|
||||
- Update to latest version (#1866183)
|
||||
|
||||
* Sun Aug 02 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.13.1-3
|
||||
- Patch to allow Go 1.15
|
||||
|
||||
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.1-3
|
||||
- Second attempt - Rebuilt for
|
||||
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Thu Apr 30 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.13.1-1
|
||||
- Update to latest version
|
||||
|
||||
* Mon Apr 20 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.13.0-1
|
||||
- Update to latest version
|
||||
|
||||
* Sun Apr 19 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.12.0-1
|
||||
- Update to latest version
|
||||
|
||||
* Wed Mar 04 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.11.0-3
|
||||
- Update required clang version
|
||||
|
||||
* Tue Feb 11 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.11.0-3
|
||||
- Enable RISCV tests
|
||||
- Enable AVR tests
|
||||
- Add Recommends for AVR dependencies
|
||||
|
||||
* Mon Feb 10 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.11.0-2
|
||||
- Fix setting of TINYGOROOT to point to packaged version
|
||||
|
||||
* Mon Feb 10 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.11.0-1
|
||||
- Update to 0.11.0
|
||||
|
||||
* Mon Feb 10 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.10.0-1
|
||||
- Update to 0.10.0
|
||||
|
||||
* Mon Feb 10 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.9.0-1
|
||||
- Update to 0.9.0
|
||||
|
||||
* Tue Sep 24 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.8.0-1
|
||||
- Update to latest version
|
||||
- Enable x86 build
|
||||
|
||||
* Sun Aug 04 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.7.1-1
|
||||
- Update to latest version
|
||||
|
||||
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Tue Jul 23 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.7.0-1
|
||||
- Update to latest version
|
||||
|
||||
* Tue Jun 11 01:26:10 EDT 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.6.0-1
|
||||
- Initial package
|
||||
%autochangelog
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue