mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 21:13:39 +00:00
arm: switch to hardfloat ABI for Linux
This avoids an error on the Raspberry Pi 3.
This commit is contained in:
committed by
Ron Evans
parent
1c68da89af
commit
9b4071237f
@@ -162,6 +162,9 @@ func LoadTarget(target string) (*TargetSpec, error) {
|
||||
llvmarch = goarch
|
||||
}
|
||||
target = llvmarch + "--" + llvmos
|
||||
if goarch == "arm" {
|
||||
target += "-gnueabihf"
|
||||
}
|
||||
return defaultTarget(goos, goarch, target)
|
||||
}
|
||||
|
||||
@@ -226,10 +229,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.Linker = "arm-linux-gnueabi-gcc"
|
||||
spec.Objcopy = "arm-linux-gnueabi-objcopy"
|
||||
spec.GDB = "arm-linux-gnueabi-gdb"
|
||||
spec.Emulator = []string{"qemu-arm", "-L", "/usr/arm-linux-gnueabi"}
|
||||
spec.Linker = "arm-linux-gnueabihf-gcc"
|
||||
spec.Objcopy = "arm-linux-gnueabihf-objcopy"
|
||||
spec.GDB = "arm-linux-gnueabihf-gdb"
|
||||
spec.Emulator = []string{"qemu-arm", "-L", "/usr/arm-linux-gnueabihf"}
|
||||
}
|
||||
if goarch == "arm64" && goos == "linux" {
|
||||
spec.Linker = "aarch64-linux-gnu-gcc"
|
||||
|
||||
Reference in New Issue
Block a user