更新 toolchain/build.sh

Signed-off-by: zhao <zhao@noreply.localhost>
This commit is contained in:
zhao 2025-03-23 10:04:08 +08:00
parent a0cc9813a0
commit 653cb1f9b2

View File

@ -144,6 +144,32 @@ elif [ "$model" = "OpenWrt_X86_64_v24.10" ]; then
curl -s https://git.kejizero.online/zhao/files/raw/branch/main/toolchain/Configs/immortalwrt_x86_64.config > .config curl -s https://git.kejizero.online/zhao/files/raw/branch/main/toolchain/Configs/immortalwrt_x86_64.config > .config
fi fi
# bpf
[ "$ENABLE_BPF" = "y" ] && curl -s $mirror/openwrt/generic/config-bpf >> .config
# LTO
export ENABLE_LTO=$ENABLE_LTO
[ "$ENABLE_LTO" = "y" ] && curl -s $mirror/openwrt/generic/config-lto >> .config
# mold
[ "$ENABLE_MOLD" = "y" ] && echo 'CONFIG_USE_MOLD=y' >> .config
# glibc
[ "$ENABLE_GLIBC" = "y" ] && {
curl -s $mirror/openwrt/generic/config-glibc >> .config
sed -i '/NaiveProxy/d' .config
}
# mold
[ "$ENABLE_MOLD" = "y" ] && echo 'CONFIG_USE_MOLD=y' >> .config
# ccache
if [ "$USE_GCC15" = "y" ] && [ "$ENABLE_CCACHE" = "y" ]; then
echo "CONFIG_CCACHE=y" >> .config
echo "CONFIG_CCACHE_DIR=\"/builder/.ccache\"" >> .config
tools_suffix="_ccache"
fi
# gcc14 & 15 # gcc14 & 15
if [ "$USE_GCC13" = y ]; then if [ "$USE_GCC13" = y ]; then
export USE_GCC13=y gcc_version=13 export USE_GCC13=y gcc_version=13