diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index d9dc9df823a56..2cbae083fc464 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -417,6 +417,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", @@ -436,6 +437,15 @@ 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"); + 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 // https://source.android.com/security/enhancements/enhancements50