foundry
Foundry OS: the operating system built on the Rustbelt kernel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #!/usr/bin/env bash
# Unpack the cached musl tarball, apply patches/*.patch in order, and
# install a static-only musl into a sysroot (headers in include/, libc.a and
# the crt*.o start files in lib/, plus a musl-gcc wrapper in bin/).
#
# Not used by the contract-v1 image yet (milestone M2). Since Rustbelt
# 0.19.0 loads static-PIE programs, C programs are built with
# toolchain/foundry-cc hello.c -o hello (gcc + musl-pie.specs, -static-pie)
# with none of the old rb-cc link tricks (see docs/porting.md). Do NOT use
# the musl-gcc that musl installs into SYSROOT/bin for -static-pie: its
# specs add a PT_INTERP.
#
# Usage: toolchain/musl/build.sh CACHE_DIR BUILD_DIR SYSROOT
HERE=
CACHE= BUILD= SYSROOT=
&&
src=/
for; do
[ || continue
;
done
# Our static-PIE specs (musl's own musl-gcc.specs makes a dynamic PIE with
# PT_INTERP, which Rustbelt refuses); toolchain/foundry-cc uses it.
|