@@ -883,23 +883,25 @@ endif
883
883
884
884
libc : include_dirs $(STATIC_LIBS )
885
885
886
- dummy_libs :
886
+ DUMMY := m rt pthread crypt util xnet resolv
887
+ DUMMY_LIBS := $(patsubst % ,$(SYSROOT_LIB ) /lib% .a,$(DUMMY ) )
888
+ $(DUMMY_LIBS ) :
887
889
#
888
890
# Create empty placeholder libraries.
889
891
#
890
- mkdir -p " $( SYSROOT_LIB) " && \
891
- for name in m rt pthread crypt util xnet resolv ; do \
892
- $(AR ) crs " $( SYSROOT_LIB ) /lib $$ {name}.a " ; \
892
+ mkdir -p " $( SYSROOT_LIB) "
893
+ for lib in $@ ; do \
894
+ $(AR ) crs " $$ lib " ; \
893
895
done
894
896
895
- finish : startup_files libc dummy_libs
897
+ finish : startup_files libc $( DUMMY_LIBS )
896
898
#
897
899
# The build succeeded! The generated sysroot is in $(SYSROOT).
898
900
#
899
901
900
902
ifeq ($(LTO ) ,no)
901
903
# The check for defined and undefined symbols expects there to be a heap
902
- # alloctor (providing malloc, calloc, free, etc). Skip this step if the build
904
+ # allocator (providing malloc, calloc, free, etc). Skip this step if the build
903
905
# is done without a malloc implementation.
904
906
ifneq ($(MALLOC_IMPL ) ,none)
905
907
finish : check-symbols
@@ -1099,4 +1101,4 @@ clean:
1099
1101
$(RM ) -r " $( OBJDIR) "
1100
1102
$(RM ) -r " $( SYSROOT) "
1101
1103
1102
- .PHONY : default startup_files libc libc_so dummy_libs finish install include_dirs clean check-symbols bindings
1104
+ .PHONY : default startup_files libc libc_so finish install include_dirs clean check-symbols bindings
0 commit comments