cosmopolitan/tool/scripts/setup-cosmos
Justine Tunney d53c335a45
Introduce new fatcosmocc command
This new script is an alternative to the `cosmocc` command. It's still a
work in progress. It abstracts all the gory details of building separate
copies of your executable and then running the apelink.com program.
2023-08-11 22:52:11 -07:00

15 lines
369 B
Bash
Executable file

#!/bin/sh
COSMOS=${COSMOS:-/opt/cosmos}
for arch in "" .aarch64/; do
if [ ! -d "$COSMOS/lib/${arch}" ]; then
mkdir -p "$COSMOS/lib/${arch}"
fi
for lib in c dl gcc_s m pthread resolv rt dl z stdc++; do
if [ ! -f "$COSMOS/lib/${arch}lib${lib}.a" ]; then
printf '\041\074\141\162\143\150\076\012' >"$COSMOS/lib/${arch}lib${lib}.a"
fi
done
done