File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -346,15 +346,16 @@ impl Build {
346
346
configure. env_remove ( "CROSS_COMPILE" ) ;
347
347
348
348
// Infer ar/ranlib tools from cross compilers if the it looks like
349
- // we're doing something like `foo-gcc` route that to `foo-ranlib`
349
+ // we're doing something like `foo-gcc` route that to `foo-gcc- ranlib`
350
350
// as well.
351
351
if path. ends_with ( "-gcc" ) && !target. contains ( "unknown-linux-musl" ) {
352
- let path = & path[ ..path. len ( ) - 4 ] ;
352
+ let suffix = & path[ path. len ( ) - 4 ..] ;
353
+ let path = & path[ ..path. len ( ) - suffix. len ( ) ] ;
353
354
if env:: var_os ( "RANLIB" ) . is_none ( ) {
354
- configure. env ( "RANLIB" , format ! ( "{}-ranlib" , path) ) ;
355
+ configure. env ( "RANLIB" , format ! ( "{}{} -ranlib" , path, suffix ) ) ;
355
356
}
356
357
if env:: var_os ( "AR" ) . is_none ( ) {
357
- configure. env ( "AR" , format ! ( "{}-ar" , path) ) ;
358
+ configure. env ( "AR" , format ! ( "{}{} -ar" , path, suffix ) ) ;
358
359
}
359
360
}
360
361
You can’t perform that action at this time.
0 commit comments