File tree 8 files changed +38
-7
lines changed
8 files changed +38
-7
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ CFG_RELEASE_NUM=1.15.0
18
18
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
19
19
# NB Make sure it starts with a dot to conform to semver pre-release
20
20
# versions (section 9)
21
- CFG_PRERELEASE_VERSION =.4
21
+ CFG_PRERELEASE_VERSION =.5
22
22
23
23
ifeq ($(CFG_RELEASE_CHANNEL ) ,stable)
24
24
# This is the normal semver version string, e.g. "0.12.0", "0.12.0-nightly"
Original file line number Diff line number Diff line change 13
13
//! This file implements the various regression test suites that we execute on
14
14
//! our CI.
15
15
16
+ extern crate build_helper;
17
+
16
18
use std:: collections:: HashSet ;
17
19
use std:: env;
18
20
use std:: fmt;
@@ -543,7 +545,7 @@ pub fn distcheck(build: &Build) {
543
545
build. run ( & mut cmd) ;
544
546
build. run ( Command :: new ( "./configure" )
545
547
. current_dir ( & dir) ) ;
546
- build. run ( Command :: new ( " make" )
548
+ build. run ( Command :: new ( build_helper :: make ( & build . config . build ) )
547
549
. arg ( "check" )
548
550
. current_dir ( & dir) ) ;
549
551
}
Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ pub fn cc2ar(cc: &Path, target: &str) -> Option<PathBuf> {
47
47
None
48
48
} else if target. contains ( "musl" ) {
49
49
Some ( PathBuf :: from ( "ar" ) )
50
+ } else if target. contains ( "openbsd" ) {
51
+ Some ( PathBuf :: from ( "ar" ) )
50
52
} else {
51
53
let parent = cc. parent ( ) . unwrap ( ) ;
52
54
let file = cc. file_name ( ) . unwrap ( ) . to_str ( ) . unwrap ( ) ;
@@ -61,6 +63,16 @@ pub fn cc2ar(cc: &Path, target: &str) -> Option<PathBuf> {
61
63
}
62
64
}
63
65
66
+ pub fn make ( host : & str ) -> PathBuf {
67
+ if host. contains ( "bitrig" ) || host. contains ( "dragonfly" ) ||
68
+ host. contains ( "freebsd" ) || host. contains ( "netbsd" ) ||
69
+ host. contains ( "openbsd" ) {
70
+ PathBuf :: from ( "gmake" )
71
+ } else {
72
+ PathBuf :: from ( "make" )
73
+ }
74
+ }
75
+
64
76
pub fn output ( cmd : & mut Command ) -> String {
65
77
let output = match cmd. stderr ( Stdio :: inherit ( ) ) . output ( ) {
66
78
Ok ( status) => status,
Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ fn main() {
151
151
cmd. arg ( format ! ( "--build={}" , build_helper:: gnu_target( & host) ) ) ;
152
152
153
153
run ( & mut cmd) ;
154
- let mut make = Command :: new ( " make" ) ;
154
+ let mut make = Command :: new ( build_helper :: make ( & host ) ) ;
155
155
make. current_dir ( & build_dir)
156
156
. arg ( "build_lib_static" ) ;
157
157
Original file line number Diff line number Diff line change @@ -230,18 +230,25 @@ fn main() {
230
230
}
231
231
}
232
232
233
+ // OpenBSD has a particular C++ runtime library name
234
+ let stdcppname = if target. contains ( "openbsd" ) {
235
+ "estdc++"
236
+ } else {
237
+ "stdc++"
238
+ } ;
239
+
233
240
// C++ runtime library
234
241
if !target. contains ( "msvc" ) {
235
242
if let Some ( s) = env:: var_os ( "LLVM_STATIC_STDCPP" ) {
236
243
assert ! ( !cxxflags. contains( "stdlib=libc++" ) ) ;
237
244
let path = PathBuf :: from ( s) ;
238
245
println ! ( "cargo:rustc-link-search=native={}" ,
239
246
path. parent( ) . unwrap( ) . display( ) ) ;
240
- println ! ( "cargo:rustc-link-lib=static=stdc++" ) ;
247
+ println ! ( "cargo:rustc-link-lib=static={}" , stdcppname ) ;
241
248
} else if cxxflags. contains ( "stdlib=libc++" ) {
242
249
println ! ( "cargo:rustc-link-lib=c++" ) ;
243
250
} else {
244
- println ! ( "cargo:rustc-link-lib=stdc++" ) ;
251
+ println ! ( "cargo:rustc-link-lib={}" , stdcppname ) ;
245
252
}
246
253
}
247
254
}
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ fn build_libbacktrace(host: &str, target: &str) {
104
104
. env ( "AR" , & ar)
105
105
. env ( "RANLIB" , format ! ( "{} s" , ar. display( ) ) )
106
106
. env ( "CFLAGS" , cflags) ) ;
107
- run ( Command :: new ( " make" )
107
+ run ( Command :: new ( build_helper :: make ( host ) )
108
108
. current_dir ( & build_dir)
109
109
. arg ( format ! ( "INCDIR={}" , src_dir. display( ) ) )
110
110
. arg ( "-j" ) . arg ( env:: var ( "NUM_JOBS" ) . expect ( "NUM_JOBS was not set" ) ) ) ;
Original file line number Diff line number Diff line change 10
10
11
11
// ignore-android FIXME #17520
12
12
// ignore-emscripten spawning processes is not supported
13
+ // ignore-openbsd no support for libbacktrace without filename
13
14
// compile-flags:-g
14
15
15
16
use std:: env;
Original file line number Diff line number Diff line change @@ -2108,7 +2108,16 @@ actual:\n\
2108
2108
}
2109
2109
self . create_dir_racy ( & tmpdir) ;
2110
2110
2111
- let mut cmd = Command :: new ( "make" ) ;
2111
+ let host = & self . config . host ;
2112
+ let make = if host. contains ( "bitrig" ) || host. contains ( "dragonfly" ) ||
2113
+ host. contains ( "freebsd" ) || host. contains ( "netbsd" ) ||
2114
+ host. contains ( "openbsd" ) {
2115
+ "gmake"
2116
+ } else {
2117
+ "make"
2118
+ } ;
2119
+
2120
+ let mut cmd = Command :: new ( make) ;
2112
2121
cmd. current_dir ( & self . testpaths . file )
2113
2122
. env ( "TARGET" , & self . config . target )
2114
2123
. env ( "PYTHON" , & self . config . docck_python )
You can’t perform that action at this time.
0 commit comments