1 # These variables are specifically meant to be overridable via the make
4 WASM_NM ?
= $(patsubst %clang
,%llvm-nm
,$(WASM_CC
))
5 WASM_AR ?
= $(patsubst %clang
,%llvm-ar
,$(WASM_CC
))
6 WASM_CFLAGS ?
= -O2
-DNDEBUG
7 # The directory where we build the sysroot.
8 SYSROOT ?
= $(CURDIR
)/sysroot
9 # A directory to install to for "make install".
10 INSTALL_DIR ?
= /usr
/local
12 THREAD_MODEL ?
= single
15 BUILD_LIBC_BOTTOM_HALF ?
= yes
16 BUILD_LIBC_TOP_HALF ?
= yes
17 # The directory where we're store intermediate artifacts.
18 OBJDIR ?
= $(CURDIR
)/build
21 ifeq ($(BUILD_LIBC_TOP_HALF
),yes
)
22 ifneq ($(BUILD_LIBC_BOTTOM_HALF
),yes
)
23 $(error BUILD_LIBC_TOP_HALF
=yes depends on BUILD_LIBC_BOTTOM_HALF
=yes
)
26 ifeq ($(BUILD_LIBC_BOTTOM_HALF
),yes
)
27 ifneq ($(BUILD_DLMALLOC
),yes
)
28 $(error BUILD_LIBC_BOTTOM_HALF
=yes depends on BUILD_DLMALLOC
=yes
)
32 # Variables from this point on are not meant to be overridable via the
35 # Set the target variables. Multiarch triples notably omit the vendor field,
36 # which happens to be what we do for the main target triple too.
37 TARGET_TRIPLE
= wasm32-wasi
38 MULTIARCH_TRIPLE
= wasm32-wasi
40 # These variables describe the locations of various files and directories in
42 BASICS_DIR
= $(CURDIR
)/basics
43 BASICS_INC
= $(BASICS_DIR
)/include
44 BASICS_CRT_SOURCES
= $(wildcard $(BASICS_DIR
)/crt
/*.c
)
46 $(wildcard $(BASICS_DIR
)/sources
/*.c
) \
47 $(wildcard $(BASICS_DIR
)/sources
/math
/*.c
)
48 DLMALLOC_DIR
= $(CURDIR
)/dlmalloc
49 DLMALLOC_SRC_DIR
= $(DLMALLOC_DIR
)/src
50 DLMALLOC_SOURCES
= $(DLMALLOC_SRC_DIR
)/dlmalloc.c
51 DLMALLOC_INC
= $(DLMALLOC_DIR
)/include
52 LIBC_BOTTOM_HALF_DIR
= $(CURDIR
)/libc-bottom-half
53 LIBC_BOTTOM_HALF_CLOUDLIBC_SRC
= $(LIBC_BOTTOM_HALF_DIR
)/cloudlibc
/src
54 LIBC_BOTTOM_HALF_CLOUDLIBC_SRC_INC
= $(LIBC_BOTTOM_HALF_CLOUDLIBC_SRC
)/include
55 LIBC_BOTTOM_HALF_HEADERS_PUBLIC
= $(LIBC_BOTTOM_HALF_DIR
)/headers
/public
56 LIBC_BOTTOM_HALF_HEADERS_PRIVATE
= $(LIBC_BOTTOM_HALF_DIR
)/headers
/private
57 LIBC_BOTTOM_HALF_LIBPREOPEN_DIR
= $(LIBC_BOTTOM_HALF_DIR
)/libpreopen
58 LIBC_BOTTOM_HALF_SOURCES
= $(LIBC_BOTTOM_HALF_DIR
)/sources
59 LIBC_BOTTOM_HALF_ALL_SOURCES
= \
60 $(shell find
$(LIBC_BOTTOM_HALF_CLOUDLIBC_SRC
) -name \
*.c
) \
61 $(LIBC_BOTTOM_HALF_LIBPREOPEN_DIR
)/libpreopen.c \
62 $(shell find
$(LIBC_BOTTOM_HALF_SOURCES
) -name \
*.c
)
63 LIBWASI_EMULATED_MMAN_SOURCES
= \
64 $(shell find
$(LIBC_BOTTOM_HALF_DIR
)/mman
-name \
*.c
)
65 LIBC_BOTTOM_HALF_CRT_SOURCES
= $(wildcard $(LIBC_BOTTOM_HALF_DIR
)/crt
/*.c
)
66 LIBC_TOP_HALF_DIR
= $(CURDIR
)/libc-top-half
67 LIBC_TOP_HALF_MUSL_DIR
= $(LIBC_TOP_HALF_DIR
)/musl
68 LIBC_TOP_HALF_MUSL_SRC_DIR
= $(LIBC_TOP_HALF_MUSL_DIR
)/src
69 LIBC_TOP_HALF_MUSL_INC
= $(LIBC_TOP_HALF_MUSL_DIR
)/include
70 LIBC_TOP_HALF_MUSL_SOURCES
= \
71 $(addprefix $(LIBC_TOP_HALF_MUSL_SRC_DIR
)/, \
79 misc
/getdomainname.c \
94 network
/in6addr_any.c \
95 network
/in6addr_loopback.c \
99 fenv
/fesetexceptflag.c \
100 fenv
/fegetexceptflag.c \
101 fenv
/feholdexcept.c \
106 exit
/at_quick_exit.c \
119 time
/timespec_get.c \
124 time
/__tm_to_secs.c \
125 time
/__month_to_secs.c \
126 time
/__secs_to_tm.c \
127 time
/__year_to_secs.c \
131 dirent
/versionsort.c \
137 unistd
/posix_close.c \
139 $(filter-out %/procfdname.c
%/syscall.c
%/syscall_ret.c
%/vdso.c
%/version.c
, \
140 $(wildcard $(LIBC_TOP_HALF_MUSL_SRC_DIR
)/internal
/*.c
)) \
141 $(filter-out %/flockfile.c
%/funlockfile.c
%/__lockfile.c
%/ftrylockfile.c \
143 %/tmpnam.c
%/tmpfile.c
%/tempnam.c \
144 %/popen.c
%/pclose.c \
147 $(wildcard $(LIBC_TOP_HALF_MUSL_SRC_DIR
)/stdio
/*.c
)) \
148 $(filter-out %/strsignal.c
, \
149 $(wildcard $(LIBC_TOP_HALF_MUSL_SRC_DIR
)/string
/*.c
)) \
150 $(filter-out %/dcngettext.c
%/textdomain.c
%/bind_textdomain_codeset.c
, \
151 $(wildcard $(LIBC_TOP_HALF_MUSL_SRC_DIR
)/locale
/*.c
)) \
152 $(wildcard $(LIBC_TOP_HALF_MUSL_SRC_DIR
)/stdlib
/*.c
) \
153 $(wildcard $(LIBC_TOP_HALF_MUSL_SRC_DIR
)/search
/*.c
) \
154 $(wildcard $(LIBC_TOP_HALF_MUSL_SRC_DIR
)/multibyte
/*.c
) \
155 $(wildcard $(LIBC_TOP_HALF_MUSL_SRC_DIR
)/regex
/*.c
) \
156 $(wildcard $(LIBC_TOP_HALF_MUSL_SRC_DIR
)/prng
/*.c
) \
157 $(wildcard $(LIBC_TOP_HALF_MUSL_SRC_DIR
)/conf
/*.c
) \
158 $(wildcard $(LIBC_TOP_HALF_MUSL_SRC_DIR
)/ctype
/*.c
) \
159 $(filter-out %/__signbit.c
%/__signbitf.c
%/__signbitl.c \
160 %/__fpclassify.c
%/__fpclassifyf.c
%/__fpclassifyl.c \
162 %/floorf.c
%/floor.c \
163 %/truncf.c
%/trunc.c \
165 %/nearbyintf.c
%/nearbyint.c \
168 %/copysignf.c
%/copysign.c \
169 %/fminf.c
%/fmaxf.c \
171 $(wildcard $(LIBC_TOP_HALF_MUSL_SRC_DIR
)/math
/*.c
)) \
172 $(filter-out %/crealf.c
%/creal.c \
173 %/cimagf.c
%/cimag.c
, \
174 $(wildcard $(LIBC_TOP_HALF_MUSL_SRC_DIR
)/complex
/*.c
)) \
175 $(wildcard $(LIBC_TOP_HALF_MUSL_SRC_DIR
)/crypt
/*.c
)
176 MUSL_PRINTSCAN_SOURCES
= \
177 $(LIBC_TOP_HALF_MUSL_SRC_DIR
)/internal
/floatscan.c \
178 $(LIBC_TOP_HALF_MUSL_SRC_DIR
)/stdio
/vfprintf.c \
179 $(LIBC_TOP_HALF_MUSL_SRC_DIR
)/stdio
/vfwprintf.c \
180 $(LIBC_TOP_HALF_MUSL_SRC_DIR
)/stdio
/vfscanf.c \
181 $(LIBC_TOP_HALF_MUSL_SRC_DIR
)/stdlib
/strtod.c \
182 $(LIBC_TOP_HALF_MUSL_SRC_DIR
)/stdlib
/wcstod.c
183 LIBC_TOP_HALF_HEADERS_PRIVATE
= $(LIBC_TOP_HALF_DIR
)/headers
/private
184 LIBC_TOP_HALF_SOURCES
= $(LIBC_TOP_HALF_DIR
)/sources
185 LIBC_TOP_HALF_ALL_SOURCES
= \
186 $(LIBC_TOP_HALF_MUSL_SOURCES
) \
187 $(shell find
$(LIBC_TOP_HALF_SOURCES
) -name \
*.c
)
190 WASM_CFLAGS
+= --target
=$(TARGET_TRIPLE
)
191 # WebAssembly floating-point match doesn't trap.
192 # TODO: Add -fno-signaling-nans when the compiler supports it.
193 WASM_CFLAGS
+= -fno-trapping-math
195 # Configure support for threads.
196 ifeq ($(THREAD_MODEL
), single
)
197 WASM_CFLAGS
+= -mthread-model single
199 ifeq ($(THREAD_MODEL
), posix
)
200 WASM_CFLAGS
+= -mthread-model posix
-pthread
204 WASM_CFLAGS
+= --sysroot
="$(SYSROOT)"
206 # These variables describe the locations of various files and directories in
208 objs
= $(patsubst $(CURDIR
)/%.c
,$(OBJDIR
)/%.o
,$(1))
209 BASICS_OBJS
= $(call objs
,$(BASICS_SOURCES
))
210 DLMALLOC_OBJS
= $(call objs
,$(DLMALLOC_SOURCES
))
211 LIBC_BOTTOM_HALF_ALL_OBJS
= $(call objs
,$(LIBC_BOTTOM_HALF_ALL_SOURCES
))
212 LIBC_TOP_HALF_ALL_OBJS
= $(call objs
,$(LIBC_TOP_HALF_ALL_SOURCES
))
213 LIBC_OBJS
:= $(BASICS_OBJS
)
214 ifeq ($(BUILD_DLMALLOC
),yes
)
215 LIBC_OBJS
+= $(DLMALLOC_OBJS
)
217 ifeq ($(BUILD_LIBC_BOTTOM_HALF
),yes
)
218 # Override basics' string.o with libc-bottom-half's.
219 LIBC_OBJS
:= $(filter-out %/string.o
,$(LIBC_OBJS
))
220 # Add libc-bottom-half's objects.
221 LIBC_OBJS
+= $(LIBC_BOTTOM_HALF_ALL_OBJS
)
223 ifeq ($(BUILD_LIBC_TOP_HALF
),yes
)
224 # Override libc-bottom-half's string.o with libc-top-half's.
225 LIBC_OBJS
:= $(filter-out %/string.o
,$(LIBC_OBJS
))
226 # Override libc-bottom-half's qsort.o with libc-top-half's.
227 LIBC_OBJS
:= $(filter-out %/qsort.o
,$(LIBC_OBJS
))
228 # libc-top-half is musl.
229 LIBC_OBJS
+= $(LIBC_TOP_HALF_ALL_OBJS
)
231 MUSL_PRINTSCAN_OBJS
= $(call objs
,$(MUSL_PRINTSCAN_SOURCES
))
232 MUSL_PRINTSCAN_LONG_DOUBLE_OBJS
= $(patsubst %.o
,%.long-double.o
,$(MUSL_PRINTSCAN_OBJS
))
233 MUSL_PRINTSCAN_NO_FLOATING_POINT_OBJS
= $(patsubst %.o
,%.no-floating-point.o
,$(MUSL_PRINTSCAN_OBJS
))
234 LIBWASI_EMULATED_MMAN_OBJS
= $(call objs
,$(LIBWASI_EMULATED_MMAN_SOURCES
))
236 # These variables describe the locations of various files and
237 # directories in the generated sysroot tree.
238 SYSROOT_LIB
:= $(SYSROOT
)/lib
/$(MULTIARCH_TRIPLE
)
239 SYSROOT_INC
= $(SYSROOT
)/include
240 SYSROOT_SHARE
= $(SYSROOT
)/share
/$(MULTIARCH_TRIPLE
)
242 # Files from musl's include directory that we don't want to install in the
243 # sysroot's include directory.
246 # Remove files which aren't headers (we generate alltypes.h below).
247 MUSL_OMIT_HEADERS
+= \
248 "bits/syscall.h.in" \
249 "bits/alltypes.h.in" \
252 # Use the compiler's version of these headers.
253 MUSL_OMIT_HEADERS
+= \
257 # Use the WASI errno definitions.
258 MUSL_OMIT_HEADERS
+= \
261 # Remove headers that aren't supported yet or that aren't relevant for WASI.
262 MUSL_OMIT_HEADERS
+= \
265 "sys/kd.h" "sys/vt.h" "sys/soundcard.h" "sys/sem.h" \
266 "sys/shm.h" "sys/msg.h" "sys/ipc.h" "sys/ptrace.h" \
268 "bits/kd.h" "bits/vt.h" "bits/soundcard.h" "bits/sem.h" \
269 "bits/shm.h" "bits/msg.h" "bits/ipc.h" "bits/ptrace.h" \
273 "syslog.h" "sys/syslog.h" \
274 "wait.h" "sys/wait.h" \
275 "ucontext.h" "sys/ucontext.h" \
281 "sys/epoll.h" "sys/reboot.h" "sys/swap.h" \
282 "sys/sendfile.h" "sys/inotify.h" \
291 "sys/personality.h" \
292 "elf.h" "link.h" "bits/link.h" \
293 "scsi/scsi.h" "scsi/scsi_ioctl.h" "scsi/sg.h" \
295 "pwd.h" "shadow.h" "grp.h" \
315 "netinet/if_ether.h" \
321 ifeq ($(THREAD_MODEL
), single
)
322 # Remove headers not supported in single-threaded mode.
323 MUSL_OMIT_HEADERS
+= "aio.h" "pthread.h"
328 $(SYSROOT_LIB
)/libc.a
: $(LIBC_OBJS
)
330 $(SYSROOT_LIB
)/libc-printscan-long-double.a
: $(MUSL_PRINTSCAN_LONG_DOUBLE_OBJS
)
332 $(SYSROOT_LIB
)/libc-printscan-no-floating-point.a
: $(MUSL_PRINTSCAN_NO_FLOATING_POINT_OBJS
)
334 $(SYSROOT_LIB
)/libwasi-emulated-mman.a
: $(LIBWASI_EMULATED_MMAN_OBJS
)
338 # On Windows, the commandline for the ar invocation got too long, so it needs to be split up.
339 $(WASM_AR
) crs
$@
$(wordlist
1, 199, $^
)
340 $(WASM_AR
) crs
$@
$(wordlist
200, 399, $^
)
341 $(WASM_AR
) crs
$@
$(wordlist
400, 599, $^
)
342 $(WASM_AR
) crs
$@
$(wordlist
600, 799, $^
)
343 # This might eventually overflow again, but at least it'll do so in a loud way instead of
344 # silently dropping the tail.
345 $(WASM_AR
) crs
$@
$(wordlist
800, 100000, $^
)
347 $(MUSL_PRINTSCAN_OBJS
): WASM_CFLAGS
+= \
348 -D__wasilibc_printscan_no_long_double \
349 -D__wasilibc_printscan_full_support_option
="\"add -lc-printscan-long-double to the link command\""
351 $(MUSL_PRINTSCAN_NO_FLOATING_POINT_OBJS
): WASM_CFLAGS
+= \
352 -D__wasilibc_printscan_no_floating_point \
353 -D__wasilibc_printscan_floating_point_support_option
="\"remove -lc-printscan-no-floating-point from the link command\""
355 $(OBJDIR
)/%.long-double.o
: $(CURDIR
)/%.c include_dirs
357 "$(WASM_CC)" $(WASM_CFLAGS
) -MD
-MP
-o
$@
-c
$<
359 $(OBJDIR
)/%.no-floating-point.o
: $(CURDIR
)/%.c include_dirs
361 "$(WASM_CC)" $(WASM_CFLAGS
) -MD
-MP
-o
$@
-c
$<
363 $(OBJDIR
)/%.o
: $(CURDIR
)/%.c include_dirs
365 "$(WASM_CC)" $(WASM_CFLAGS
) -MD
-MP
-o
$@
-c
$<
367 -include $(shell find
$(OBJDIR
) -name \
*.d
)
369 $(DLMALLOC_OBJS
): WASM_CFLAGS
+= \
372 startup_files
$(LIBC_BOTTOM_HALF_ALL_OBJS
): WASM_CFLAGS
+= \
373 -I
$(LIBC_BOTTOM_HALF_HEADERS_PRIVATE
) \
374 -I
$(LIBC_BOTTOM_HALF_CLOUDLIBC_SRC_INC
) \
375 -I
$(LIBC_BOTTOM_HALF_CLOUDLIBC_SRC
)
377 $(LIBC_TOP_HALF_ALL_OBJS
) $(MUSL_PRINTSCAN_LONG_DOUBLE_OBJS
) $(MUSL_PRINTSCAN_NO_FLOATING_POINT_OBJS
): WASM_CFLAGS
+= \
378 -I
$(LIBC_TOP_HALF_MUSL_SRC_DIR
)/include \
379 -I
$(LIBC_TOP_HALF_MUSL_SRC_DIR
)/internal \
380 -I
$(LIBC_TOP_HALF_MUSL_DIR
)/arch
/wasm32 \
381 -I
$(LIBC_TOP_HALF_MUSL_DIR
)/arch
/generic \
382 -I
$(LIBC_TOP_HALF_HEADERS_PRIVATE
) \
384 -Wno-shift-op-parentheses \
385 -Wno-bitwise-op-parentheses \
386 -Wno-logical-op-parentheses \
387 -Wno-string-plus-int \
392 $(RM
) -r
"$(SYSROOT)"
395 # Install the include files.
397 mkdir
-p
"$(SYSROOT_INC)"
398 cp
-r
"$(BASICS_INC)" "$(SYSROOT)"
399 cp
-r
"$(LIBC_BOTTOM_HALF_HEADERS_PUBLIC)"/* "$(SYSROOT_INC)"
401 # Generate musl's bits/alltypes.h header.
402 mkdir
-p
"$(SYSROOT_INC)/bits"
403 sed
-f
$(LIBC_TOP_HALF_MUSL_DIR
)/tools
/mkalltypes.sed \
404 $(LIBC_TOP_HALF_MUSL_DIR
)/arch
/wasm32
/bits
/alltypes.h.in \
405 $(LIBC_TOP_HALF_MUSL_DIR
)/include/alltypes.h.in \
406 > "$(SYSROOT_INC)/bits/alltypes.h"
408 # Copy in the bulk of musl's public header files.
409 cp
-r
"$(LIBC_TOP_HALF_MUSL_INC)"/* "$(SYSROOT_INC)"
410 # Copy in the musl's "bits" header files.
411 cp
-r
"$(LIBC_TOP_HALF_MUSL_DIR)"/arch
/generic
/bits
/* "$(SYSROOT_INC)/bits"
412 cp
-r
"$(LIBC_TOP_HALF_MUSL_DIR)"/arch
/wasm32
/bits
/* "$(SYSROOT_INC)/bits"
414 # Remove selected header files.
415 $(RM
) $(patsubst %,$(SYSROOT_INC
)/%,$(MUSL_OMIT_HEADERS
))
417 ifeq ($(BUILD_LIBC_BOTTOM_HALF
),no
)
418 CRT_SOURCES
= $(BASICS_CRT_SOURCES
)
420 CRT_SOURCES
= $(LIBC_BOTTOM_HALF_CRT_SOURCES
)
423 startup_files
: include_dirs
425 # Build the startup files.
427 @mkdir
-p
"$(OBJDIR)"
429 "$(WASM_CC)" $(WASM_CFLAGS
) -c
$(CRT_SOURCES
) -MD
-MP
&& \
430 mkdir
-p
"$(SYSROOT_LIB)" && \
431 mv
*.o
"$(SYSROOT_LIB)"
434 $(SYSROOT_LIB
)/libc.a \
435 $(SYSROOT_LIB
)/libc-printscan-long-double.a \
436 $(SYSROOT_LIB
)/libc-printscan-no-floating-point.a \
437 $(SYSROOT_LIB
)/libwasi-emulated-mman.a
439 finish
: startup_files libc
441 # Create empty placeholder libraries.
443 for name in m rt pthread crypt util xnet resolv dl
; do \
444 $(WASM_AR
) crs
"$(SYSROOT_LIB)/lib$${name}.a"; \
448 # Collect metadata on the sysroot and perform sanity checks.
450 mkdir
-p
"$(SYSROOT_SHARE)"
453 # Collect symbol information.
455 @
# TODO: Use llvm-nm --extern-only instead of grep. This is blocked on
456 @
# LLVM PR40497, which is fixed in 9.0, but not in 8.0.
457 @
# Ignore certain llvm builtin symbols such as those starting with __mul
458 @
# since these dependencies can vary between llvm versions.
459 "$(WASM_NM)" --defined-only
"$(SYSROOT_LIB)"/libc.a
"$(SYSROOT_LIB)"/*.o \
460 |grep
' [[:upper:]] ' |sed
's/.* [[:upper:]] //' |LC_ALL
=C
sort > "$(SYSROOT_SHARE)/defined-symbols.txt"
461 for undef_sym in
$$("$(WASM_NM)" --undefined-only
"$(SYSROOT_LIB)"/*.a
"$(SYSROOT_LIB)"/*.o \
462 |grep
' U ' |sed
's/.* U //' |LC_ALL
=C
sort |uniq
); do \
463 grep
-q
'\<'$$undef_sym'\>' "$(SYSROOT_SHARE)/defined-symbols.txt" || echo
$$undef_sym; \
464 done | grep
-v
"^__mul" > "$(SYSROOT_SHARE)/undefined-symbols.txt"
465 grep
'^_*wasi_' "$(SYSROOT_SHARE)/undefined-symbols.txt" \
466 > "$(SYSROOT_LIB)/libc.imports"
469 # Generate a test file that includes all public header files.
472 for header in
$$(find
include -type f
-not
-name mman.h |grep
-v
/bits
/); do \
473 echo
'#include <'$$header'>' | sed
's/include\///' ; \
474 done |LC_ALL
=C
sort >share
/$(MULTIARCH_TRIPLE
)/include-all.c
; \
478 # Test that it compiles.
480 "$(WASM_CC)" $(WASM_CFLAGS
) -fsyntax-only
"$(SYSROOT_SHARE)/include-all.c" -Wno-\
#warnings
483 # Collect all the predefined macros, except for compiler version macros
484 # which we don't need to track here.
487 @
# For the __*_ATOMIC_*_LOCK_FREE macros, squash individual compiler names
488 @
# to attempt, toward keeping these files compiler-independent.
490 @
# We have to add `-isystem $(SYSROOT_INC)` because otherwise clang puts
491 @
# its builtin include path first, which produces compiler-specific
494 @
# TODO: Undefine __FLOAT128__ for now since it's not in clang 8.0.
495 @
# TODO: Filter out __FLT16_* for now, as not all versions of clang have these.
496 "$(WASM_CC)" $(WASM_CFLAGS
) "$(SYSROOT_SHARE)/include-all.c" \
497 -isystem
$(SYSROOT_INC
) \
499 -E
-dM
-Wno-\
#warnings \
505 -U__clang_patchlevel__ \
506 -U__clang_version__ \
509 -U__GNUC_PATCHLEVEL__ \
512 | sed
-e
's/__[[:upper:][:digit:]]*_ATOMIC_\([[:upper:][:digit:]_]*\)_LOCK_FREE/__compiler_ATOMIC_\1_LOCK_FREE/' \
513 | grep
-v
'^#define __FLT16_' \
514 > "$(SYSROOT_SHARE)/predefined-macros.txt"
516 # Check that the computed metadata matches the expected metadata.
517 # This ignores whitespace because on Windows the output has CRLF line endings.
518 diff
-wur
"$(CURDIR)/expected/$(MULTIARCH_TRIPLE)" "$(SYSROOT_SHARE)"
521 # The build succeeded! The generated sysroot is in $(SYSROOT).
525 mkdir
-p
"$(INSTALL_DIR)"
526 cp
-r
"$(SYSROOT)/lib" "$(SYSROOT)/share" "$(SYSROOT)/include" "$(INSTALL_DIR)"
528 .PHONY
: default startup_files libc finish
install include_dirs