mirror of
https://github.com/rclone/rclone.git
synced 2025-01-08 23:40:29 +01:00
build: add ARMv7 to the supported builds - fixes #748
This commit is contained in:
parent
0f72aa8a5f
commit
e2201689cf
@ -40,6 +40,8 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// GOOS/GOARCH pairs we build for
|
// GOOS/GOARCH pairs we build for
|
||||||
|
//
|
||||||
|
// If the GOARCH contains a - it is a synthetic arch with more parameters
|
||||||
var osarches = []string{
|
var osarches = []string{
|
||||||
"windows/386",
|
"windows/386",
|
||||||
"windows/amd64",
|
"windows/amd64",
|
||||||
@ -48,15 +50,18 @@ var osarches = []string{
|
|||||||
"linux/386",
|
"linux/386",
|
||||||
"linux/amd64",
|
"linux/amd64",
|
||||||
"linux/arm",
|
"linux/arm",
|
||||||
|
"linux/arm-v7",
|
||||||
"linux/arm64",
|
"linux/arm64",
|
||||||
"linux/mips",
|
"linux/mips",
|
||||||
"linux/mipsle",
|
"linux/mipsle",
|
||||||
"freebsd/386",
|
"freebsd/386",
|
||||||
"freebsd/amd64",
|
"freebsd/amd64",
|
||||||
"freebsd/arm",
|
"freebsd/arm",
|
||||||
|
"freebsd/arm-v7",
|
||||||
"netbsd/386",
|
"netbsd/386",
|
||||||
"netbsd/amd64",
|
"netbsd/amd64",
|
||||||
"netbsd/arm",
|
"netbsd/arm",
|
||||||
|
"netbsd/arm-v7",
|
||||||
"openbsd/386",
|
"openbsd/386",
|
||||||
"openbsd/amd64",
|
"openbsd/amd64",
|
||||||
"plan9/386",
|
"plan9/386",
|
||||||
@ -69,6 +74,7 @@ var archFlags = map[string][]string{
|
|||||||
"386": {"GO386=387"},
|
"386": {"GO386=387"},
|
||||||
"mips": {"GOMIPS=softfloat"},
|
"mips": {"GOMIPS=softfloat"},
|
||||||
"mipsle": {"GOMIPS=softfloat"},
|
"mipsle": {"GOMIPS=softfloat"},
|
||||||
|
"arm-v7": {"GOARM=7"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// runEnv - run a shell command with env
|
// runEnv - run a shell command with env
|
||||||
@ -263,6 +269,15 @@ func cleanupResourceSyso(sysoFilePath string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Trip a version suffix off the arch if present
|
||||||
|
func stripVersion(goarch string) string {
|
||||||
|
i := strings.Index(goarch, "-")
|
||||||
|
if i < 0 {
|
||||||
|
return goarch
|
||||||
|
}
|
||||||
|
return goarch[:i]
|
||||||
|
}
|
||||||
|
|
||||||
// build the binary in dir returning success or failure
|
// build the binary in dir returning success or failure
|
||||||
func compileArch(version, goos, goarch, dir string) bool {
|
func compileArch(version, goos, goarch, dir string) bool {
|
||||||
log.Printf("Compiling %s/%s", goos, goarch)
|
log.Printf("Compiling %s/%s", goos, goarch)
|
||||||
@ -290,7 +305,7 @@ func compileArch(version, goos, goarch, dir string) bool {
|
|||||||
}
|
}
|
||||||
env := []string{
|
env := []string{
|
||||||
"GOOS=" + goos,
|
"GOOS=" + goos,
|
||||||
"GOARCH=" + goarch,
|
"GOARCH=" + stripVersion(goarch),
|
||||||
}
|
}
|
||||||
if !*cgo {
|
if !*cgo {
|
||||||
env = append(env, "CGO_ENABLED=0")
|
env = append(env, "CGO_ENABLED=0")
|
||||||
|
@ -11,7 +11,8 @@ Rclone Download {{< version >}}
|
|||||||
|:-------:|:-------:|:-----:|:-----:|:----:|:----:|:-------:|:------:|:-------:|:-----:|:-------:|
|
|:-------:|:-------:|:-----:|:-----:|:----:|:----:|:-------:|:------:|:-------:|:-----:|:-------:|
|
||||||
| Intel/AMD - 64 Bit | {{< download windows amd64 >}} | {{< download osx amd64 >}} | {{< download linux amd64 >}} | {{< download linux amd64 deb >}} | {{< download linux amd64 rpm >}} | {{< download freebsd amd64 >}} | {{< download netbsd amd64 >}} | {{< download openbsd amd64 >}} | {{< download plan9 amd64 >}} | {{< download solaris amd64 >}} |
|
| Intel/AMD - 64 Bit | {{< download windows amd64 >}} | {{< download osx amd64 >}} | {{< download linux amd64 >}} | {{< download linux amd64 deb >}} | {{< download linux amd64 rpm >}} | {{< download freebsd amd64 >}} | {{< download netbsd amd64 >}} | {{< download openbsd amd64 >}} | {{< download plan9 amd64 >}} | {{< download solaris amd64 >}} |
|
||||||
| Intel/AMD - 32 Bit | {{< download windows 386 >}} | {{< download osx 386 >}} | {{< download linux 386 >}} | {{< download linux 386 deb >}} | {{< download linux 386 rpm >}} | {{< download freebsd 386 >}} | {{< download netbsd 386 >}} | {{< download openbsd 386 >}} | {{< download plan9 386 >}} | - |
|
| Intel/AMD - 32 Bit | {{< download windows 386 >}} | {{< download osx 386 >}} | {{< download linux 386 >}} | {{< download linux 386 deb >}} | {{< download linux 386 rpm >}} | {{< download freebsd 386 >}} | {{< download netbsd 386 >}} | {{< download openbsd 386 >}} | {{< download plan9 386 >}} | - |
|
||||||
| ARM - 32 Bit | - | - | {{< download linux arm >}} | {{< download linux arm deb >}} | {{< download linux arm rpm >}} | {{< download freebsd arm >}} | {{< download netbsd arm >}} | - | - | - |
|
| ARMv6 - 32 Bit | - | - | {{< download linux arm >}} | {{< download linux arm deb >}} | {{< download linux arm rpm >}} | {{< download freebsd arm >}} | {{< download netbsd arm >}} | - | - | - |
|
||||||
|
| ARMv7 - 32 Bit | - | - | {{< download linux arm-v7 >}} | {{< download linux arm-v7 deb >}} | {{< download linux arm-v7 rpm >}} | {{< download freebsd arm-v7 >}} | {{< download netbsd arm-v7 >}} | - | - | - |
|
||||||
| ARM - 64 Bit | - | - | {{< download linux arm64 >}} | {{< download linux arm64 deb >}} | {{< download linux arm64 rpm >}} | - | - | - | - | - |
|
| ARM - 64 Bit | - | - | {{< download linux arm64 >}} | {{< download linux arm64 deb >}} | {{< download linux arm64 rpm >}} | - | - | - | - | - |
|
||||||
| MIPS - Big Endian | - | - | {{< download linux mips >}} | {{< download linux mips deb >}} | {{< download linux mips rpm >}} | - | - | - | - | - |
|
| MIPS - Big Endian | - | - | {{< download linux mips >}} | {{< download linux mips deb >}} | {{< download linux mips rpm >}} | - | - | - | - | - |
|
||||||
| MIPS - Little Endian | - | - | {{< download linux mipsle >}} | {{< download linux mipsle deb >}} | {{< download linux mipsle rpm >}} | - | - | - | - | - |
|
| MIPS - Little Endian | - | - | {{< download linux mipsle >}} | {{< download linux mipsle deb >}} | {{< download linux mipsle rpm >}} | - | - | - | - | - |
|
||||||
@ -70,7 +71,8 @@ script) from a URL which doesn't change then you can use these links.
|
|||||||
|:-------:|:-------:|:-----:|:-----:|:----:|:----:|:-------:|:------:|:-------:|:-----:|:-------:|
|
|:-------:|:-------:|:-----:|:-----:|:----:|:----:|:-------:|:------:|:-------:|:-----:|:-------:|
|
||||||
| Intel/AMD - 64 Bit | {{< cdownload windows amd64 >}} | {{< cdownload osx amd64 >}} | {{< cdownload linux amd64 >}} | {{< cdownload linux amd64 deb >}} | {{< cdownload linux amd64 rpm >}} | {{< cdownload freebsd amd64 >}} | {{< cdownload netbsd amd64 >}} | {{< cdownload openbsd amd64 >}} | {{< cdownload plan9 amd64 >}} | {{< cdownload solaris amd64 >}} |
|
| Intel/AMD - 64 Bit | {{< cdownload windows amd64 >}} | {{< cdownload osx amd64 >}} | {{< cdownload linux amd64 >}} | {{< cdownload linux amd64 deb >}} | {{< cdownload linux amd64 rpm >}} | {{< cdownload freebsd amd64 >}} | {{< cdownload netbsd amd64 >}} | {{< cdownload openbsd amd64 >}} | {{< cdownload plan9 amd64 >}} | {{< cdownload solaris amd64 >}} |
|
||||||
| Intel/AMD - 32 Bit | {{< cdownload windows 386 >}} | {{< cdownload osx 386 >}} | {{< cdownload linux 386 >}} | {{< cdownload linux 386 deb >}} | {{< cdownload linux 386 rpm >}} | {{< cdownload freebsd 386 >}} | {{< cdownload netbsd 386 >}} | {{< cdownload openbsd 386 >}} | {{< cdownload plan9 386 >}} | - |
|
| Intel/AMD - 32 Bit | {{< cdownload windows 386 >}} | {{< cdownload osx 386 >}} | {{< cdownload linux 386 >}} | {{< cdownload linux 386 deb >}} | {{< cdownload linux 386 rpm >}} | {{< cdownload freebsd 386 >}} | {{< cdownload netbsd 386 >}} | {{< cdownload openbsd 386 >}} | {{< cdownload plan9 386 >}} | - |
|
||||||
| ARM - 32 Bit | - | - | {{< cdownload linux arm >}} | {{< cdownload linux arm deb >}} | {{< cdownload linux arm rpm >}} | {{< cdownload freebsd arm >}} | {{< cdownload netbsd arm >}} | - | - | - |
|
| ARMv6 - 32 Bit | - | - | {{< cdownload linux arm >}} | {{< cdownload linux arm deb >}} | {{< cdownload linux arm rpm >}} | {{< cdownload freebsd arm >}} | {{< cdownload netbsd arm >}} | - | - | - |
|
||||||
|
| ARMv7 - 32 Bit | - | - | {{< cdownload linux arm-v7 >}} | {{< cdownload linux arm-v7 deb >}} | {{< cdownload linux arm-v7 rpm >}} | {{< cdownload freebsd arm-v7 >}} | {{< cdownload netbsd arm-v7 >}} | - | - | - |
|
||||||
| ARM - 64 Bit | - | - | {{< cdownload linux arm64 >}} | {{< cdownload linux arm64 deb >}} | {{< cdownload linux arm64 rpm >}} | - | - | - | - | - |
|
| ARM - 64 Bit | - | - | {{< cdownload linux arm64 >}} | {{< cdownload linux arm64 deb >}} | {{< cdownload linux arm64 rpm >}} | - | - | - | - | - |
|
||||||
| MIPS - Big Endian | - | - | {{< cdownload linux mips >}} | {{< cdownload linux mips deb >}} | {{< cdownload linux mips rpm >}} | - | - | - | - | - |
|
| MIPS - Big Endian | - | - | {{< cdownload linux mips >}} | {{< cdownload linux mips deb >}} | {{< cdownload linux mips rpm >}} | - | - | - | - | - |
|
||||||
| MIPS - Little Endian | - | - | {{< cdownload linux mipsle >}} | {{< cdownload linux mipsle deb >}} | {{< cdownload linux mipsle rpm >}} | - | - | - | - | - |
|
| MIPS - Little Endian | - | - | {{< cdownload linux mipsle >}} | {{< cdownload linux mipsle deb >}} | {{< cdownload linux mipsle rpm >}} | - | - | - | - | - |
|
||||||
|
Loading…
Reference in New Issue
Block a user