File tree 3 files changed +19
-0
lines changed
3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -345,6 +345,21 @@ def build_triple(self):
345
345
ostype = 'unknown-openbsd'
346
346
elif ostype == 'NetBSD' :
347
347
ostype = 'unknown-netbsd'
348
+ elif ostype == 'SunOS' :
349
+ ostype = 'sun-solaris'
350
+ # On Solaris, uname -m will return a machine classification instead
351
+ # of a cpu type, so uname -p is recommended instead. However, the
352
+ # output from that option is too generic for our purposes (it will
353
+ # always emit 'i386' on x86/amd64 systems). As such, isainfo -k
354
+ # must be used instead.
355
+ try :
356
+ cputype = subprocess .check_output (['isainfo' ,
357
+ '-k' ]).strip ().decode (default_encoding )
358
+ except (subprocess .CalledProcessError , WindowsError ):
359
+ err = "isainfo not found"
360
+ if self .verbose :
361
+ raise Exception (err )
362
+ sys .exit (err )
348
363
elif ostype == 'Darwin' :
349
364
ostype = 'apple-darwin'
350
365
elif ostype .startswith ('MINGW' ):
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ fn main() {
46
46
} else if target. contains ( "dragonfly" ) || target. contains ( "bitrig" ) ||
47
47
target. contains ( "netbsd" ) || target. contains ( "openbsd" ) {
48
48
println ! ( "cargo:rustc-link-lib=pthread" ) ;
49
+ } else if target. contains ( "solaris" ) {
50
+ println ! ( "cargo:rustc-link-lib=gcc_s" ) ;
49
51
} else if target. contains ( "apple-darwin" ) {
50
52
println ! ( "cargo:rustc-link-lib=System" ) ;
51
53
} else if target. contains ( "apple-ios" ) {
Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ fn main() {
27
27
println ! ( "cargo:rustc-link-lib=gcc_s" ) ;
28
28
} else if target. contains ( "openbsd" ) {
29
29
println ! ( "cargo:rustc-link-lib=gcc" ) ;
30
+ } else if target. contains ( "solaris" ) {
31
+ println ! ( "cargo:rustc-link-lib=gcc_s" ) ;
30
32
} else if target. contains ( "bitrig" ) {
31
33
println ! ( "cargo:rustc-link-lib=c++abi" ) ;
32
34
} else if target. contains ( "dragonfly" ) {
You can’t perform that action at this time.
0 commit comments