From d12f535f6e41d821d7ddb3f24677ce2b071ba590 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 | 8 ++++----
main_test.go | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/compileopts/target.go b/compileopts/target.go
index 8b3c68f..53b3b61 100644
--- a/compileopts/target.go
+++ b/compileopts/target.go
@@ -174,7 +174,7 @@ func LoadTarget(target string) (*TargetSpec, error) {
}
target = llvmarch + "--" + llvmos
if goarch == "arm" {
- target += "-gnueabihf"
+ target += "-none"
}
return defaultTarget(goos, goarch, target)
}
@@ -254,9 +254,9 @@ func defaultTarget(goos, goarch, triple string) (*TargetSpec, error) {
// Some educated guesses as to how to invoke helper programs.
spec.GDB = "gdb-multiarch"
if goarch == "arm" && goos == "linux" {
- spec.CFlags = append(spec.CFlags, "--sysroot=/usr/arm-linux-gnueabihf")
- spec.Linker = "arm-linux-gnueabihf-gcc"
- 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.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 a7eca14..f8285a2 100644
--- a/main_test.go
+++ b/main_test.go
@@ -82,7 +82,7 @@ func TestCompiler(t *testing.T) {
runPlatTests("i386--linux-gnu", matches, t)
})
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.29.2