# brintOS on-target toolchain environment, sourced by the /usr/bin driver names. BRINTOS_TC=/usr/share/brintos-toolchain if [ -z "$HWJS_TOOLS_DIR" ]; then export HWJS_TOOLS_DIR=$BRINTOS_TC/distros/common; fi if [ -z "$BRINTIUM" ]; then export BRINTIUM=$BRINTOS_TC/toolchains/hwjs-cc; fi if [ -z "$WASMLD_HWJS_LLVM_BIN" ]; then export WASMLD_HWJS_LLVM_BIN=/usr/lib/brintos-llvm/bin; fi if [ -z "$BRINTIUM_KERNEL_HEADERS" ]; then export BRINTIUM_KERNEL_HEADERS=$BRINTOS_TC/distros/linux-6.12-musl-busybox/build/uapi-headers/include fi export WASMLD_HWJS=1 if [ -z "${WASMLD_HWJS_SRC_DIR+set}" ]; then export WASMLD_HWJS_SRC_DIR=; fi # BRINTOS-UPSTREAM-FIX: the e8-registry work cap the host toolchain's environment arms too; the pass ships it off export HWJS_E8_TARGET_WORK_CAP=2000000 # The runtime's provenance check keys on a kernel git checkout, which the guest # does not have. On a link only: on any other line the driver's NOTE about the # override lands on stderr, and autoconf reads a non-empty conftest.err as failure. # BRINTOS-WORKAROUND: brintium#15 remove -- an installed toolchain cannot verify its runtime without a kernel checkout brintos_rt_link=1 for brintos_rt_arg in "$@"; do case "$brintos_rt_arg" in -c|-E|-S|-M|-MM|-fsyntax-only|--version|-v|-dumpversion|-dumpmachine|-print-*) brintos_rt_link=0 ;; esac done if [ "$brintos_rt_link" = 1 ] && [ -z "$WACKY_HWJS_RT" ]; then export WACKY_HWJS_RT=$HWJS_TOOLS_DIR/build/hwjs_user_rt.bc fi unset brintos_rt_link brintos_rt_arg # A program links against the image's libc.so, as the distro's own programs do. # WASMLD_LIBC_IMPORT=0 in the caller's environment gives a static main, with # libc merged into the program. if [ -z "$WASMLD_LIBC_IMPORT" ]; then export WASMLD_LIBC_IMPORT=1; fi if [ "$WASMLD_LIBC_IMPORT" = 1 ]; then if [ -z "$WASMLD_RT_IMPORT" ]; then export WASMLD_RT_IMPORT=1; fi if [ -z "$WASMLD_LIBC_SO_PATH" ]; then export WASMLD_LIBC_SO_PATH=$HWJS_TOOLS_DIR/build/libc-glibc.so; fi if [ -z "$WASMLD_HWJS_XMOD_SUSPENDERS" ]; then export WASMLD_HWJS_XMOD_SUSPENDERS=$HWJS_TOOLS_DIR/build/libc-glibc.so.partition fi fi