From 2047a0d083ad8bf651d00287267e0ef418ef50f5 Mon Sep 17 00:00:00 2001 From: "Jonathan A. Kollasch" Date: Thu, 31 Aug 2017 09:34:03 -0500 Subject: [PATCH 1/2] bootstrap: add openssl config for sparc64-unknown-netbsd --- src/bootstrap/native.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index 8173903c03440..ee00ee57e94d8 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -416,6 +416,7 @@ impl Step for Openssl { "powerpc64-unknown-linux-gnu" => "linux-ppc64", "powerpc64le-unknown-linux-gnu" => "linux-ppc64le", "s390x-unknown-linux-gnu" => "linux64-s390x", + "sparc64-unknown-netbsd" => "BSD-sparc64", "x86_64-apple-darwin" => "darwin64-x86_64-cc", "x86_64-linux-android" => "linux-x86_64", "x86_64-unknown-freebsd" => "BSD-x86_64", @@ -435,6 +436,10 @@ impl Step for Openssl { configure.arg("-mandroid"); configure.arg("-fomit-frame-pointer"); } + if target == "sparc64-unknown-netbsd" { + // Need -m64 to get assembly generated correctly for sparc64. + configure.arg("-m64"); + } // Make PIE binaries // Non-PIE linker support was removed in Lollipop // https://source.android.com/security/enhancements/enhancements50 From 847d1ffbe95729f4e22db022298a7b22c94ad18b Mon Sep 17 00:00:00 2001 From: "Jonathan A. Kollasch" Date: Thu, 31 Aug 2017 09:36:10 -0500 Subject: [PATCH 2/2] bootstrap: avoid m4 -B for NetBSD-built sparc64 OpenSSL --- src/bootstrap/native.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index ee00ee57e94d8..b3929516470a6 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -439,6 +439,11 @@ impl Step for Openssl { if target == "sparc64-unknown-netbsd" { // Need -m64 to get assembly generated correctly for sparc64. configure.arg("-m64"); + if build.build.contains("netbsd") { + // Disable sparc64 asm on NetBSD builders, it uses + // m4(1)'s -B flag, which NetBSD m4 does not support. + configure.arg("no-asm"); + } } // Make PIE binaries // Non-PIE linker support was removed in Lollipop