#!/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 "$@"