RustForge

foundry

Foundry OS: the operating system built on the Rustbelt kernel

foundry / toolchain / foundry-cc
477 bytes ยท raw
1
2
3
4
5
6
7
8
#!/bin/sh
# foundry-cc: the C compiler for Foundry OS programs and ports.
# Plain gcc + our musl sysroot (make musl), always static-PIE: Rustbelt
# 0.19.0 loads static-PIE, so there are no link tricks (the old rb-cc).
# Based on Clarke's 0.19.0 re-test wrapper (clarke-scratch/tc/rb-cc-pie).
# SYSROOT defaults to out/sysroot of this repo.
SYSROOT=${FOUNDRY_SYSROOT:-$(cd "$(dirname "$0")/.." && pwd)/out/sysroot}
exec gcc -specs "$SYSROOT/lib/musl-pie.specs" -static-pie "$@"