1DOLLY 72TOOLCHAIN system-build3REQUIRES HOST runtime@04REQUIRES HOST http@056# This is the first step. It has no requirements: its exact compiler commands7# and C headers are the externally supplied bootstrap seed. How those headers8# eventually map to the lower-level machine contract is deliberately open.9SOURCE /v0.1.6/include/dolly/toolchain.h 6f9da3258e970e356c31034e1f109a04ac8bd5ab57dc82c19aebf293289fb415 /usr/include/dolly/toolchain.h10SOURCE /v0.1.6/include/dolly/runtime.h   d57f5242814e516035781cc4fb23c6c5d6c8c6b1b89eafc7447f566fe0b7ad21 /usr/include/dolly/runtime.h11SOURCE /v0.1.6/include/dolly/process.h   2946bdef52557f5fae8b5741ccd7904745b42a960c27d829f81026a637529ce0 /usr/include/dolly/process.h12SOURCE /v0.1.6/include/dolly/host.h 9737f9b15bd65f5732e16bd942fe593132c7c886c3076dfda89a529a23fee08a /usr/include/dolly/host.h13SOURCE /v0.1.6/include/dolly/host-abi.h 3f2d26426bb088d61a0cc18b6c464697e98c83d8d34ffaf1d063768e619eb766 /usr/include/dolly/host-abi.h1415# /usr/include also holds the headers of the modules whose clients the seed16# holds (host/README.md); every other module's are in its package.17EXPORTS HEADER libc      /usr/include18EXPORTS HEADER toolchain /usr/include/dolly/toolchain.h19EXPORTS HEADER runtime   /usr/include/dolly/runtime.h20EXPORTS HEADER process   /usr/include/dolly/process.h21EXPORTS HEADER host /usr/include/dolly/host.h22EXPORTS HEADER host-abi /usr/include/dolly/host-abi.h23EXPORTS LIB compiler-rt /usr/lib/libclang_rt.builtins.a2425# These are the complete externally seeded compiler dependencies, not ambient26# additions to every boot. Images retain them by re-exporting these objects.27EXPORTS FOLDER process-sdk       /usr/lib/dolly/process28EXPORTS FOLDER clang-headers     /usr/lib/clang/24/include29EXPORTS FILE   compiler          /usr/libexec/dolly/process-bin/compiler30EXPORTS FILE   kernel-plugin-abi /usr/lib/dolly/dolly-kernel-plugin-0.wasm3132# Every program links the process libc: Emscripten's musl.33SOURCE /v0.1.6/dist/static/default/licenses/musl b870108ec5e7790e9f9919064f1b9421d62d5f9b0e6c230c6adf7ea2da62e97b /usr/share/licenses/musl/COPYRIGHT34SOURCE /v0.1.6/dist/static/default/licenses/emscripten 620a78084fc7ca97c0b5dea9abf891f3ffcadfdbf305276f099c9c4e12fc1d86 /usr/share/licenses/emscripten/LICENSE35FILE /usr/share/licenses/musl/COPYRIGHT36FILE /usr/share/licenses/emscripten/LICENSE3738# cc, c++, ld and ar forward to the seed compiler. Only that compiler exists at39# this point, so RUN starts it for them; every later recipe step uses SLOP.40SOURCE /v0.1.6/dist/static/default/commands/cc.c a282fe564c0387114321839e30a5f66e5ae964d014f206baa7d742f9698d1026 /tmp/process-tools/cc.c41SOURCE /v0.1.6/dist/static/default/commands/cxx.c 0fd83199b0d1063bf5e81b8e762f7105b013e83eb1c2953967e51db34dd94524 /tmp/process-tools/cxx.c42SOURCE /v0.1.6/dist/static/default/commands/ld.c d12309353aeb2a80e3766e87c3e9936ac9fb434114e36287a1acbf3339bf104b /tmp/process-tools/ld.c43SOURCE /v0.1.6/dist/static/default/commands/ar.c f3007ddb171959a587b62d840253144198749acd8dbe0212b2cbd73a55dd83bd /tmp/process-tools/ar.c44RUN /usr/libexec/dolly/process-bin/compiler --dolly-toolchain-mode=c -O1 /tmp/process-tools/cc.c -o /bin/cc45RUN /usr/libexec/dolly/process-bin/compiler --dolly-toolchain-mode=c -O1 /tmp/process-tools/cxx.c -o /bin/c++46RUN /usr/libexec/dolly/process-bin/compiler --dolly-toolchain-mode=c -O1 /tmp/process-tools/ld.c -o /bin/ld47RUN /usr/libexec/dolly/process-bin/compiler --dolly-toolchain-mode=c -O1 /tmp/process-tools/ar.c -o /bin/ar4849EXPORTS ENV CC    cc50EXPORTS ENV AR    ar51EXPORTS ENV PATH  /bin:/usr/bin5253# These programs are linked against the seeded process adapter, so their54# complete input identity is the image build ID rather than this recipe55# alone. They are still validated as dolly-process-0 executables when loaded.56# /bin/dollyfile is the engine running this recipe; the bootstrap compiles it.57EXPORTS TOOL cc58EXPORTS TOOL c++59EXPORTS TOOL ld60EXPORTS TOOL ar61EXPORTS TOOL dollyfile62# Slop runs every SLOP step, so it is built before any shell exists: RUN63# starts the seed compiler alone.64REQUIRES HEADER libc65REQUIRES HEADER runtime6667SOURCE /v0.1.6/dist/static/default/slop.c eef57190c2bc7fb36829dced03b93d9db2c4e08fb667f97daf80676bb5570658 /tmp/slop/slop.c68# Slop runs the code of the system's test, [, echo and printf itself.69SOURCE /v0.1.6/dist/static/default/commands/test.c f8c6d9618f2f78a85eb8c177df0bb565e9f611f849cbc05401a4a888ce98c5f9 /tmp/slop/commands/test.c70SOURCE /v0.1.6/dist/static/default/commands/echo.c 41f0735133bdae9226bf41909009e6db7fc298a0c9a9e1ee16934c09ad244335 /tmp/slop/commands/echo.c71SOURCE /v0.1.6/dist/static/default/commands/printf.c 67ec89acb4cd3a1f5657e8ec8d54d58f1d796f6e2eb461545e34a884cce962dc /tmp/slop/commands/printf.c72RUN /usr/libexec/dolly/process-bin/compiler --dolly-toolchain-mode=c -O1 -DDOLLY_SHELL_UTILITY /tmp/slop/slop.c \73  /tmp/slop/commands/test.c /tmp/slop/commands/echo.c /tmp/slop/commands/printf.c -o /bin/slop7475EXPORTS TOOL slop76EXPORTS ENV SHELL /bin/slop77REQUIRES TOOL   cc7879# Dolly's own small commands, from programs/commands. Each TOOL export names the80# compiled result.81SOURCE /v0.1.6/dist/static/default/commands/path.h 48c3a1e853aa273106234c8cdbbcae7d54c2f68f477373e0712d5e4748a9b788 /tmp/core-tools/path.h82SOURCE /v0.1.6/dist/static/default/commands/mkdir.c 0713179c0b44c92e30d2fd22c87a930ca23f5417b1b3392b3997547648617ad6 /tmp/core-tools/mkdir.c83SOURCE /v0.1.6/dist/static/default/commands/rm.c 2adb95ed560a55f22b91eda217fdbfc4108bd14ebe71b143ef706869d88a1997 /tmp/core-tools/rm.c84SOURCE /v0.1.6/dist/static/default/commands/foreground.c e926c3c87764e44064744fc1d3cba008c46666ed7a06d351824ce67792bcdd76 /tmp/core-tools/foreground.c85SOURCE /v0.1.6/dist/static/default/commands/help.c 5051d2894cf4733b35ee0a128bbccbc428ffd232314465123360b0fba866c70d /tmp/core-tools/help.c86SOURCE /v0.1.6/dist/static/default/commands/man.c cd13cdece7706188e083a1754187cb19b7627e9cb8d2b294ba21cd2f88ff39d8 /tmp/core-tools/man.c87SOURCE /v0.1.6/dist/static/default/commands/pwd.c 61b2840bfba274f511c3777f5b800bcdfff1947bef13b771c5d9a98eb5d03d3d /tmp/core-tools/pwd.c88SOURCE /v0.1.6/dist/static/default/commands/cat.c 43eabd1e83f6c56cd5b5a7d8e5f9621e214c35e9407dea6bbce34120cb9da723 /tmp/core-tools/cat.c89SOURCE /v0.1.6/dist/static/default/commands/echo.c 41f0735133bdae9226bf41909009e6db7fc298a0c9a9e1ee16934c09ad244335 /tmp/core-tools/echo.c90SOURCE /v0.1.6/dist/static/default/commands/printf.c 67ec89acb4cd3a1f5657e8ec8d54d58f1d796f6e2eb461545e34a884cce962dc /tmp/core-tools/printf.c91SOURCE /v0.1.6/dist/static/default/commands/touch.c 1eb3737abe39d9efe0c66d9e84a7bf6445fa2c07c12b46ad107cd799f2f0747c /tmp/core-tools/touch.c92SOURCE /v0.1.6/dist/static/default/commands/clear.c f2e6915b3fe34393087ec7d04e61d090c0d62e551b86b36e8c3ff6bfff72598d /tmp/core-tools/clear.c93SOURCE /v0.1.6/dist/static/default/commands/ls.c 7b1f4a0cdfb7e568b9a8e4ab9b9d784d52d034103915e11b1a25472bbe86d225 /tmp/core-tools/ls.c94SOURCE /v0.1.6/dist/static/default/commands/stat.c 716e40d4db491a766b738e21c780d4f386641be93daccc4481b4d71b603110c2 /tmp/core-tools/stat.c95SOURCE /v0.1.6/dist/static/default/commands/file.c 3fd871ab9da0233ab738683f3ae45ab8cac3b37df3be92359575448137b4ec37 /tmp/core-tools/file.c96SOURCE /v0.1.6/dist/static/default/commands/test.c f8c6d9618f2f78a85eb8c177df0bb565e9f611f849cbc05401a4a888ce98c5f9 /tmp/core-tools/test.c97SOURCE /v0.1.6/dist/static/default/commands/mv.c 9c14fbc337cd41f6d7733fb3a36346d845e14223e6207d427a74123a00ea6504 /tmp/core-tools/mv.c98SOURCE /v0.1.6/dist/static/default/commands/cp.c 97eaeb0da4d284fa222de163bb99b86086398c4c76cdb6a77d0a06c699e7d2e9 /tmp/core-tools/cp.c99SOURCE /v0.1.6/dist/static/default/commands/sleep.c 7723af4c2a4feb4a3393482fe3e58beaba36b2b0d83fcc67787b339a87e031e6 /tmp/core-tools/sleep.c100SLOP cc \101  -O2 \102  /tmp/core-tools/foreground.c \103  -o /bin/foreground104SLOP cc \105  -O2 \106  /tmp/core-tools/help.c \107  -o /bin/help108SLOP cc \109  -O2 \110  /tmp/core-tools/man.c \111  -o /bin/man112SLOP cc \113  -O2 \114  /tmp/core-tools/pwd.c \115  -o /bin/pwd116SLOP cc \117  -O2 \118  /tmp/core-tools/cat.c \119  -o /bin/cat120SLOP cc \121  -O2 \122  /tmp/core-tools/echo.c \123  -o /bin/echo124SLOP cc \125  -O2 \126  /tmp/core-tools/printf.c \127  -o /bin/printf128SLOP cc \129  -O2 \130  /tmp/core-tools/touch.c \131  -o /bin/touch132SLOP cc \133  -O2 \134  /tmp/core-tools/clear.c \135  -o /bin/clear136SLOP cc \137  -O2 \138  /tmp/core-tools/ls.c \139  -o /bin/ls140SLOP cc \141  -O2 \142  /tmp/core-tools/stat.c \143  -o /bin/stat144SLOP cc \145  -O2 \146  /tmp/core-tools/file.c \147  -o /bin/file148SLOP cc \149  -O2 \150  /tmp/core-tools/test.c \151  -o /bin/test152SLOP cc \153  -O2 \154  /tmp/core-tools/test.c \155  -o /bin/[156SLOP cc \157  -O2 \158  /tmp/core-tools/mv.c \159  -o /bin/mv160SLOP cc \161  -O2 \162  /tmp/core-tools/cp.c \163  -o /bin/cp164SLOP cc \165  -O2 \166  /tmp/core-tools/mkdir.c \167  -o /bin/mkdir168SLOP cc \169  -O2 \170  /tmp/core-tools/rm.c \171  -o /bin/rm172SLOP cc \173  -O2 \174  /tmp/core-tools/sleep.c \175  -o /bin/sleep176EXPORTS TOOL mkdir177EXPORTS TOOL rm178EXPORTS TOOL foreground179EXPORTS TOOL help180EXPORTS TOOL man181EXPORTS TOOL pwd182EXPORTS TOOL cat183EXPORTS TOOL echo184EXPORTS TOOL printf185EXPORTS TOOL touch186EXPORTS TOOL clear187EXPORTS TOOL ls188EXPORTS TOOL stat189EXPORTS TOOL file190EXPORTS TOOL test191EXPORTS TOOL [192EXPORTS TOOL mv193EXPORTS TOOL cp194EXPORTS TOOL sleep195196# A page is a file under /usr/share/man. One of Dolly's own commands has a197# single text: the page is what NAME --help prints, captured when it is built.198SLOP mkdir \199  -p \200  /usr/share/man/cat1 \201  /usr/share/man/man1202SLOP for name in ar c++ cat cc clear cp dollyfile file foreground help ld ls man mkdir mv pwd rm sleep slop stat touch; do \203  "/bin/$name" --help > "/usr/share/man/cat1/$name.1"; \204  done205SLOP help >> /usr/share/man/cat1/slop.1206# echo prints its operands, --help among them, as POSIX says.207FILE /usr/share/man/cat1/echo.1208    usage: echo [-n] [ARG ...]209    Print the ARGs separated by spaces and a newline; -n as the first ARG omits the newline.210    Backslashes are printed as they are: printf interprets escapes.211# printf takes a FORMAT, so --help is one too.212FILE /usr/share/man/cat1/printf.1213    usage: printf FORMAT [ARG ...]214    Write FORMAT, reused while ARGs remain. FORMAT's escapes are \\ \a \b \f \n \r \t \v,215    \e, \xHH and \NNN in octal; \c ends the output. Each conversion takes the next ARG,216    or an empty one: %s, %c, %b (the ARG's escapes, octal as \0NNN), %d %i %o %u %x %X,217    whose ARG is a C integer constant or a quote and a character, and %e %f %g %a and218    their capitals; flags - + space # 0, a width and a .precision, each may be *. %% is %.219FILE /usr/share/man/cat1/test.1220    usage: test EXPRESSION221           [ EXPRESSION ]222    Exit 0 when EXPRESSION is true, 1 when it is false or missing, 2 when it is malformed.223      -e FILE          FILE exists (-r and -w are the same: there are no permission bits)224      -f FILE          FILE is a regular file225      -d FILE          FILE is a directory226      -x FILE          FILE is a regular file or a directory227      -h FILE, -L FILE FILE is a symbolic link228      -s FILE          FILE is not empty229      -b, -c, -p, -S FILE  FILE is a block or character device, a FIFO, a socket230      -g, -u, -k FILE  the set-group-ID, set-user-ID, sticky bit of the fixed modes stat reports231      -t FD            descriptor FD is a terminal232      -n STRING        STRING is not empty (so is a lone STRING)233      -z STRING        STRING is empty234      A = B, A != B    the strings are equal (== is the same), differ235      A < B, A > B     A sorts before, after B236      M -eq N          the integers are equal; also -ne -lt -le -gt -ge237      F -nt G, F -ot G F was modified after, before G (a missing file is older)238      F -ef G          F and G are the same file239      ! E, E -a E, E -o E, ( E )   not, and, or, grouping; up to four arguments240      count, as POSIX says, so test "$x" = -a compares strings241    example: test -d /tmp && [ "$HOME" != / ]242SLOP cp /usr/share/man/cat1/test.1 '/usr/share/man/cat1/[.1'243244SLOP rm \245  -rf \246  /tmp/core-tools247REQUIRES TOOL   rm248249# Dolly's deliberately small ustar extractor.250SOURCE /v0.1.6/dist/static/default/commands/tar.c 9e01d3df0905b893afe02232c713d5feafbead706392f7fc62967bdffad1779f /tmp/bootstrap/tar.c251SLOP cc \252  /tmp/bootstrap/tar.c \253  -o /bin/tar254255EXPORTS TOOL tar256257SLOP tar --help > /usr/share/man/cat1/tar.1258259SLOP rm \260  -rf \261  /tmp/bootstrap262REQUIRES TOOL   mkdir263REQUIRES TOOL   tar264265SOURCE /v0.1.6/dist/static/default/make-4.4.1.tar                     5dce03b47a90e26891e789b3361481c65765e12bd8dc79ec0cf949336ef94616 /tmp/make-4.4.1.tar266SLOP tar \267  -xf /tmp/make-4.4.1.tar \268  -C /269SLOP mkdir \270  -p \271  /usr/bin272# The sources of upstream's build (dolly-sources.txt) in one cc.273SLOP CWD /usr/src/make cc \274  -O1 \275  -std=gnu11 \276  -DHAVE_CONFIG_H \277  -I /usr/src/make \278  -I /usr/src/make/src \279  -I /usr/src/make/lib \280  '-DLIBDIR="/usr/lib"' \281  '-DLOCALEDIR="/usr/share/locale"' \282  $(cat dolly-sources.txt) \283  -o /usr/bin/make284285EXPORTS TOOL make286287SLOP make \288  --version289SLOP make --help > /usr/share/man/cat1/make.1290# FOLDER keeps the members a directory has at this row: the last page is written.291FOLDER /usr/share/man292293FILE /usr/share/licenses/make/COPYING294295SLOP rm \296  -rf \297  /tmp/make-4.4.1.tar \298  /usr/src/make299# libc++, libc++abi and libunwind are Emscripten's copy, compiled here from its300# pinned source with the flags of its own build (tools/system_libs.py,301# -ww-wasmexcept; its -mt-wasmexcept build is the same bytes) for the headers302# installed beside them. Every C++ link takes them, including explicit303# -lc++/-lc++abi; the links above this point are C and need none.304REQUIRES TOOL   c++305REQUIRES TOOL   cc306REQUIRES TOOL   ar307REQUIRES TOOL   make308309SOURCE /v0.1.6/dist/static/default/libcxx-headers.tar 5e558f6f862d4a3fb22cc3c5b62c5e2652bf699f176fa349eeecb85d1a946735 /tmp/cpp/libcxx-headers.tar310SOURCE /v0.1.6/dist/static/default/libcxx.tar         2dff834a9e5e907476841437518cfdd568563e922e7a22f3261da114e1b1a1e8 /tmp/cpp/libcxx.tar311SOURCE /v0.1.6/dist/static/default/licenses/libcxx    539dd7aed86e8a4f12cbdd0e6c50c189c7d74847e4fecc64ce2c6ee3a01da38b /usr/share/licenses/libcxx/LICENSE312SOURCE /v0.1.6/dist/static/default/licenses/libcxxabi e2b35be49f7284a45b7baca8fc7b3ab7440e7902392b2528a457816b5bb2a15c /usr/share/licenses/libcxxabi/LICENSE313314SLOP tar \315  -xf /tmp/cpp/libcxx-headers.tar \316  -C /317SLOP tar \318  -xf /tmp/cpp/libcxx.tar \319  -C /320321FILE /tmp/cpp/Makefile322    .RECIPEPREFIX := >323    S := /tmp/cpp/system/lib324    L := /usr/lib/dolly/process325    # Static code with hidden symbols, as for a program. The directory is the one326    # Emscripten's build names, so the code and data are its archives' bytes.327    FLAGS := -Oz -g -fno-pic -fvisibility=hidden -ffile-prefix-map=/tmp/cpp=/emsdk/emscripten -DNDEBUG328    COMPILE := c++ $(FLAGS) -std=c++23 -D_LIBCPP_BUILDING_LIBRARY -I$S/libcxx/src -I/tmp/cpp/system/include329    LIBCXX := $(filter-out %/int128_builtins.cpp,$(wildcard $S/libcxx/src/*.cpp $S/libcxx/src/filesystem/*.cpp \330      $S/libcxx/src/ryu/*.cpp)) $(addprefix $S/libcxx/src/experimental/,chrono_exception.cpp keep.cpp log_hardening_failure.cpp)331    LIBCXXABI := $(addprefix $S/libcxxabi/src/,abort_message.cpp cxa_aux_runtime.cpp cxa_default_handlers.cpp \332      cxa_demangle.cpp cxa_guard.cpp cxa_handlers.cpp cxa_virtual.cpp cxa_thread_atexit.cpp fallback_malloc.cpp \333      stdlib_new_delete.cpp stdlib_exception.cpp stdlib_stdexcept.cpp stdlib_typeinfo.cpp private_typeinfo.cpp \334      cxa_exception_js_utils.cpp cxa_exception_storage.cpp cxa_exception.cpp cxa_personality.cpp)335    objects = $(sort $(addprefix /tmp/cpp/$1/,$(addsuffix .o,$(basename $(notdir $2)))))336    all: $L/libc++-ww-wasmexcept.a $L/libc++abi-ww-wasmexcept.a $L/libunwind-ww-wasmexcept.a337    $L/libc++-ww-wasmexcept.a: $(call objects,libc++,$(LIBCXX))338    $L/libc++abi-ww-wasmexcept.a: $(call objects,libc++abi,$(LIBCXXABI))339    $L/libunwind-ww-wasmexcept.a: /tmp/cpp/libunwind/Unwind-wasm.o340    $L/%.a:341    >ar rc $@ $^342    define compile343    /tmp/cpp/$1/$(basename $(notdir $2)).o: $2344    >$3 -c $$< -o $$@345    endef346    $(foreach source,$(LIBCXX),$(eval $(call compile,libc++,$(source),$(COMPILE) -DLIBCXX_BUILDING_LIBCXXABI=1 \347      -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -DLIBC_NAMESPACE=__llvm_libc -I$S/llvm-libc)))348    $(foreach source,$(LIBCXXABI),$(eval $(call compile,libc++abi,$(source),$(COMPILE) -D_LIBCXXABI_USE_FUTEX \349      -D_LIBCXXABI_BUILDING_LIBRARY -DLIBCXXABI_NON_DEMANGLING_TERMINATE -I$S/libunwind/include)))350    $(eval $(call compile,libunwind,$S/libunwind/src/Unwind-wasm.c,cc $(FLAGS) -D_LIBUNWIND_HIDE_SYMBOLS \351      -I$S/libunwind/include))352SLOP mkdir /tmp/cpp/libc++ /tmp/cpp/libc++abi /tmp/cpp/libunwind353SLOP make -C /tmp/cpp -j2354355EXPORTS HEADER cpp    /usr/include/c++/v1356EXPORTS LIB    c++    /usr/lib/dolly/process/libc++-ww-wasmexcept.a357EXPORTS LIB    c++abi /usr/lib/dolly/process/libc++abi-ww-wasmexcept.a358EXPORTS ENV    CXX    c++359360FILE /usr/share/licenses/libcxx/LICENSE361FILE /usr/share/licenses/libcxxabi/LICENSE362363SLOP rm \364  -rf \365  /tmp/cpp366