File tree 4 files changed +33
-3
lines changed
4 files changed +33
-3
lines changed Original file line number Diff line number Diff line change @@ -250,8 +250,11 @@ fn main() {
250
250
let llvm_use_libcxx = env:: var_os ( "LLVM_USE_LIBCXX" ) ;
251
251
252
252
let stdcppname = if target. contains ( "openbsd" ) {
253
- // llvm-config on OpenBSD doesn't mention stdlib=libc++
254
- "c++"
253
+ if target. contains ( "sparc64" ) {
254
+ "estdc++"
255
+ } else {
256
+ "c++"
257
+ }
255
258
} else if target. contains ( "freebsd" ) {
256
259
"c++"
257
260
} else if target. contains ( "darwin" ) {
Original file line number Diff line number Diff line change @@ -395,6 +395,7 @@ supported_targets! {
395
395
396
396
( "aarch64-unknown-openbsd" , aarch64_unknown_openbsd) ,
397
397
( "i686-unknown-openbsd" , i686_unknown_openbsd) ,
398
+ ( "sparc64-unknown-openbsd" , sparc64_unknown_openbsd) ,
398
399
( "x86_64-unknown-openbsd" , x86_64_unknown_openbsd) ,
399
400
400
401
( "aarch64-unknown-netbsd" , aarch64_unknown_netbsd) ,
Original file line number Diff line number Diff line change
1
+ use crate :: spec:: { LinkerFlavor , Target , TargetResult } ;
2
+
3
+ pub fn target ( ) -> TargetResult {
4
+ let mut base = super :: openbsd_base:: opts ( ) ;
5
+ base. cpu = "v9" . to_string ( ) ;
6
+ base. pre_link_args . get_mut ( & LinkerFlavor :: Gcc ) . unwrap ( ) . push ( "-m64" . to_string ( ) ) ;
7
+ base. max_atomic_width = Some ( 64 ) ;
8
+
9
+ Ok ( Target {
10
+ llvm_target : "sparc64-unknown-openbsd" . to_string ( ) ,
11
+ target_endian : "big" . to_string ( ) ,
12
+ target_pointer_width : "64" . to_string ( ) ,
13
+ target_c_int_width : "32" . to_string ( ) ,
14
+ data_layout : "E-m:e-i64:64-n32:64-S128" . to_string ( ) ,
15
+ arch : "sparc64" . to_string ( ) ,
16
+ target_os : "openbsd" . to_string ( ) ,
17
+ target_env : String :: new ( ) ,
18
+ target_vendor : "unknown" . to_string ( ) ,
19
+ linker_flavor : LinkerFlavor :: Gcc ,
20
+ options : base,
21
+ } )
22
+ }
Original file line number Diff line number Diff line change @@ -23,7 +23,11 @@ fn main() {
23
23
} else if target. contains ( "netbsd" ) {
24
24
println ! ( "cargo:rustc-link-lib=gcc_s" ) ;
25
25
} else if target. contains ( "openbsd" ) {
26
- println ! ( "cargo:rustc-link-lib=c++abi" ) ;
26
+ if target. contains ( "sparc64" ) {
27
+ println ! ( "cargo:rustc-link-lib=gcc" ) ;
28
+ } else {
29
+ println ! ( "cargo:rustc-link-lib=c++abi" ) ;
30
+ }
27
31
} else if target. contains ( "solaris" ) {
28
32
println ! ( "cargo:rustc-link-lib=gcc_s" ) ;
29
33
} else if target. contains ( "dragonfly" ) {
You can’t perform that action at this time.
0 commit comments