compiler: add syscalls for 32-bit arm

This commit is contained in:
Ayke van Laethem
2019-02-05 19:30:52 +01:00
committed by Ron Evans
parent 4b477fad55
commit 93d5269fef
4 changed files with 72 additions and 21 deletions
+2 -1
View File
@@ -218,10 +218,11 @@ 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" {
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"}
}
if goarch == "arm64" {
spec.Linker = "aarch64-linux-gnu-gcc"