# 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 # What `cc -print-prog-name=ld` answers: the linker wrapper installed below. if [ -z "$BRINTIUM_LD" ]; then export BRINTIUM_LD=/usr/bin/wasm32-hwjs-linux-gnu-ld; 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 # 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 # 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 # brintcc-glibc defaults it on; the C++ driver reads it before delegating, # to pick libc++.so over the archives, as a host recipe exports it. if [ -z "$WASMLD_DYNAMIC_MAIN" ]; then export WASMLD_DYNAMIC_MAIN=1; fi 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 # A program built here names its libraries by soname (record version 2), # so a library a `make install` put in place is found without its digest. if [ -z "$WASMLD_NEEDED_RECORD" ]; then export WASMLD_NEEDED_RECORD=2; fi # The image's libc.so is lane-addressed, and a main must match it. if [ -z "$HWJS_STATUS_CHANNEL" ]; then export HWJS_STATUS_CHANNEL=1; fi if [ -z "$HWJS_CORO_FRAME_DEFER" ]; then export HWJS_CORO_FRAME_DEFER=1; fi if [ -z "$HWJS_LANE_ADDRESSED" ]; then export HWJS_LANE_ADDRESSED=1; fi fi