From d1ee3f77dfc92f9168f8826ecb8fc0a4d414d031 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/4] 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 2071c73..3f183f1 100644
--- a/compileopts/target.go
+++ b/compileopts/target.go
@@ -205,7 +205,7 @@ func LoadTarget(target string) (*TargetSpec, error) {
}
target = llvmarch + "--" + llvmos
if goarch == "arm" {
- target += "-gnueabihf"
+ target += "-none"
}
return defaultTarget(goos, goarch, target)
}
@@ -281,10 +281,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 ec7f708..092b765 100644
--- a/main_test.go
+++ b/main_test.go
@@ -68,7 +68,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.25.4