File tree 2 files changed +15
-0
lines changed
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -1983,6 +1983,7 @@ impl Build {
1983
1983
if self . pic . unwrap_or (
1984
1984
!target. contains ( "windows" )
1985
1985
&& !target. contains ( "-none-" )
1986
+ && !target. ends_with ( "-none" )
1986
1987
&& !target. contains ( "uefi" ) ,
1987
1988
) {
1988
1989
cmd. push_cc_arg ( "-fPIC" . into ( ) ) ;
Original file line number Diff line number Diff line change @@ -269,6 +269,20 @@ fn gnu_x86_64_no_plt() {
269
269
test. cmd ( 0 ) . must_have ( "-fno-plt" ) ;
270
270
}
271
271
272
+ #[ test]
273
+ fn gnu_aarch64_none_no_pic ( ) {
274
+ for target in & [ "aarch64-unknown-none-gnu" , "aarch64-unknown-none" ] {
275
+ let test = Test :: gnu ( ) ;
276
+ test. gcc ( )
277
+ . target ( & target)
278
+ . host ( & target)
279
+ . file ( "foo.c" )
280
+ . compile ( "foo" ) ;
281
+
282
+ test. cmd ( 0 ) . must_not_have ( "-fPIC" ) ;
283
+ }
284
+ }
285
+
272
286
#[ test]
273
287
fn gnu_set_stdlib ( ) {
274
288
reset_env ( ) ;
You can’t perform that action at this time.
0 commit comments