更新 toolchain/build.sh
Signed-off-by: zhao <zhao@noreply.localhost>
This commit is contained in:
parent
28d1c8e83e
commit
3f0604880b
@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
export Github=https://raw.githubusercontent.com/oppen321/ZeroWrt-Action/refs/heads/master/patch
|
||||||
# Clone source code
|
# Clone source code
|
||||||
git clone -b openwrt-24.10 --single-branch --filter=blob:none https://github.com/immortalwrt/immortalwrt openwrt
|
git clone -b openwrt-24.10 --single-branch --filter=blob:none https://github.com/immortalwrt/immortalwrt openwrt
|
||||||
|
|
||||||
@ -11,31 +12,31 @@ cd openwrt
|
|||||||
./scripts/feeds install -a
|
./scripts/feeds install -a
|
||||||
|
|
||||||
# gcc15 patches
|
# gcc15 patches
|
||||||
curl -s https://raw.githubusercontent.com/oppen321/ZeroWrt-Action/refs/heads/master/patch/gcc-15/202-toolchain-gcc-add-support-for-GCC-15.patch | patch -p1
|
curl -s $Github/gcc-15/202-toolchain-gcc-add-support-for-GCC-15.patch | patch -p1
|
||||||
|
|
||||||
# fix gcc-15
|
# fix gcc-15
|
||||||
if [ "$USE_GCC15" = y ]; then
|
if [ "$USE_GCC15" = y ]; then
|
||||||
# Mbedtls
|
# Mbedtls
|
||||||
curl -s $mirror/openwrt/patch/openwrt-6.x/gcc-15/mbedtls/901-tests-fix-string-initialization-error-on-gcc15.patch > package/libs/mbedtls/patches/901-tests-fix-string-initialization-error-on-gcc15.patch
|
curl -s $Github/gcc-15/mbedtls/901-tests-fix-string-initialization-error-on-gcc15.patch > package/libs/mbedtls/patches/901-tests-fix-string-initialization-error-on-gcc15.patch
|
||||||
sed -i '/TARGET_CFLAGS/ s/$/ -Wno-error=unterminated-string-initialization/' package/libs/mbedtls/Makefile
|
sed -i '/TARGET_CFLAGS/ s/$/ -Wno-error=unterminated-string-initialization/' package/libs/mbedtls/Makefile
|
||||||
# elfutils
|
# elfutils
|
||||||
curl -s $mirror/openwrt/patch/openwrt-6.x/gcc-15/elfutils/901-backends-fix-string-initialization-error-on-gcc15.patch > package/libs/elfutils/patches/901-backends-fix-string-initialization-error-on-gcc15.patch
|
curl -s $Github/gcc-15/elfutils/901-backends-fix-string-initialization-error-on-gcc15.patch > package/libs/elfutils/patches/901-backends-fix-string-initialization-error-on-gcc15.patch
|
||||||
# libwebsockets
|
# libwebsockets
|
||||||
mkdir -p feeds/packages/libs/libwebsockets/patches
|
mkdir -p feeds/packages/libs/libwebsockets/patches
|
||||||
curl -s $mirror/openwrt/patch/openwrt-6.x/gcc-15/libwebsockets/901-fix-string-initialization-error-on-gcc15.patch > feeds/packages/libs/libwebsockets/patches/901-fix-string-initialization-error-on-gcc15.patch
|
curl -s $Github/gcc-15/libwebsockets/901-fix-string-initialization-error-on-gcc15.patch > feeds/packages/libs/libwebsockets/patches/901-fix-string-initialization-error-on-gcc15.patch
|
||||||
# libxcrypt
|
# libxcrypt
|
||||||
mkdir -p feeds/packages/libs/libxcrypt/patches
|
mkdir -p feeds/packages/libs/libxcrypt/patches
|
||||||
curl -s $mirror/openwrt/patch/openwrt-6.x/gcc-15/libxcrypt/901-fix-string-initialization-error-on-gcc15.patch > feeds/packages/libs/libxcrypt/patches/901-fix-string-initialization-error-on-gcc15.patch
|
curl -s $Github/gcc-15/libxcrypt/901-fix-string-initialization-error-on-gcc15.patch > feeds/packages/libs/libxcrypt/patches/901-fix-string-initialization-error-on-gcc15.patch
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# fix gcc-15.0.1 C23
|
# fix gcc-15.0.1 C23
|
||||||
if [ "$USE_GCC15" = y ]; then
|
if [ "$USE_GCC15" = y ]; then
|
||||||
# gmp
|
# gmp
|
||||||
mkdir -p package/libs/gmp/patches
|
mkdir -p package/libs/gmp/patches
|
||||||
curl -s $mirror/openwrt/patch/openwrt-6.x/gcc-15-c23/gmp/001-fix-build-with-gcc-15.patch > package/libs/gmp/patches/001-fix-build-with-gcc-15.patch
|
curl -s $Github/gcc-15-c23/gmp/001-fix-build-with-gcc-15.patch > package/libs/gmp/patches/001-fix-build-with-gcc-15.patch
|
||||||
# htop
|
# htop
|
||||||
mkdir -p feeds/packages/admin/htop/patches
|
mkdir -p feeds/packages/admin/htop/patches
|
||||||
curl -s $mirror/openwrt/patch/openwrt-6.x/gcc-15-c23/htop/001-Avoid-compilation-issues-with-ncurses-on-GCC-15.patch > feeds/packages/admin/htop/patches/001-Avoid-compilation-issues-with-ncurses-on-GCC-15.patch
|
curl -s $Github/gcc-15-c23/htop/001-Avoid-compilation-issues-with-ncurses-on-GCC-15.patch > feeds/packages/admin/htop/patches/001-Avoid-compilation-issues-with-ncurses-on-GCC-15.patch
|
||||||
# libtirpc
|
# libtirpc
|
||||||
sed -i '/TARGET_CFLAGS/i TARGET_CFLAGS += -std=gnu17\n' feeds/packages/libs/libtirpc/Makefile
|
sed -i '/TARGET_CFLAGS/i TARGET_CFLAGS += -std=gnu17\n' feeds/packages/libs/libtirpc/Makefile
|
||||||
# libsepol
|
# libsepol
|
||||||
|
Loading…
Reference in New Issue
Block a user