openbsd-ports/lang/rust/patches/patch-src_librustc_llvm_build_rs
landry 97894fe4c9 Update to rust 1.22.1.
full changelog at https://blog.rust-lang.org/2017/11/22/Rust-1.22.html

port changes:
- switch to clang and libc++ (instead of egcc and estdc++)
- use devel/llvm instead of the embedded llvm version
- make i386 produce code for 'pentiumpro' instead of 'pentium4' so that
ppl can use ripgrep on pentium II's (yay!)
- use a hack (codegen-units=16) to fix memory pressure issues on i386.
  Might not work forever.....

tested on i386 & amd64, went into an i386 bulk.
all the hard work from semarie@
2017-12-04 17:31:49 +00:00

17 lines
703 B
Plaintext

$OpenBSD: patch-src_librustc_llvm_build_rs,v 1.1 2017/12/04 17:31:49 landry Exp $
Use c++ for OpenBSD instead of stdc++
Index: src/librustc_llvm/build.rs
--- src/librustc_llvm/build.rs.orig
+++ src/librustc_llvm/build.rs
@@ -252,8 +252,8 @@ fn main() {
let llvm_static_stdcpp = env::var_os("LLVM_STATIC_STDCPP");
let stdcppname = if target.contains("openbsd") {
- // OpenBSD has a particular C++ runtime library name
- "estdc++"
+ // llvm-config on OpenBSD doesn't mention stdlib=libc++
+ "c++"
} else if target.contains("netbsd") && llvm_static_stdcpp.is_some() {
// NetBSD uses a separate library when relocation is required
"stdc++_pic"