File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1653,7 +1653,7 @@ static void construct_linker_job_elf(LinkJob *lj) {
1653
1653
soname = buf_sprintf (" lib%s.so.%" ZIG_PRI_usize, buf_ptr (g->root_out_name ), g->version_major );
1654
1654
}
1655
1655
1656
- if (target_requires_pie (g->zig_target ) && !is_dyn_lib) {
1656
+ if (target_requires_pie (g->zig_target ) && !is_dyn_lib && g-> libc != nullptr ) {
1657
1657
lj->args .append (" -pie" );
1658
1658
}
1659
1659
@@ -1821,7 +1821,7 @@ static void construct_linker_job_elf(LinkJob *lj) {
1821
1821
}
1822
1822
1823
1823
// crt end
1824
- if (target_is_android (g->zig_target ) && g->have_dynamic_link ) {
1824
+ if (target_is_android (g->zig_target ) && g->libc != nullptr ) {
1825
1825
lj->args .append (get_libc_crt_file (g, " crtend_android.o" ));
1826
1826
} else if (lj->link_in_crt && target_libc_needs_crti_crtn (g->zig_target )) {
1827
1827
lj->args .append (get_libc_crt_file (g, " crtn.o" ));
You can’t perform that action at this time.
0 commit comments