Skip to content

Commit eba961b

Browse files
authored
shlib: specify the sysroot to find the correct crt1 (#441)
1 parent 4db5398 commit eba961b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,8 @@ PIC_OBJS = \
506506
# to CC. This is a workaround for a Windows command line size limitation. See
507507
# the `%.a` rule below for details.
508508
$(SYSROOT_LIB)/%.so: $(OBJDIR)/%.so.a $(BUILTINS_LIB)
509-
$(CC) -nodefaultlibs -shared -o $@ -Wl,--whole-archive $< -Wl,--no-whole-archive $(BUILTINS_LIB)
509+
$(CC) -nodefaultlibs -shared --sysroot=$(SYSROOT) \
510+
-o $@ -Wl,--whole-archive $< -Wl,--no-whole-archive $(BUILTINS_LIB)
510511

511512
$(OBJDIR)/libc.so.a: $(LIBC_SO_OBJS) $(MUSL_PRINTSCAN_LONG_DOUBLE_SO_OBJS)
512513

0 commit comments

Comments
 (0)