Blob Blame History Raw
From 53621b8f63cf33bf0434787a2e0a04eb41ddf6c3 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/3] 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 256e707..606d6ac 100644
--- a/compileopts/target.go
+++ b/compileopts/target.go
@@ -214,7 +214,7 @@ func LoadTarget(target string) (*TargetSpec, error) {
 		}
 		target = llvmarch + "--" + llvmos
 		if goarch == "arm" {
-			target += "-gnueabihf"
+			target += "-none"
 		}
 		return defaultTarget(goos, goarch, target)
 	}
@@ -290,10 +290,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 8597de1..254104f 100644
--- a/main_test.go
+++ b/main_test.go
@@ -79,7 +79,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.26.2