From 6e2f8beedf2291e9b5fec1a0cfebb05980e3aa90 Mon Sep 17 00:00:00 2001 From: Shuanglei Tao Date: Fri, 30 Jun 2023 16:00:18 +0800 Subject: [PATCH] toolchain: upgrade to gcc 12 --- .github/workflows/toolchain.yml | 6 +++--- Makefile | 2 +- README.md | 2 +- .../samples/mipsel-linux-uclibc/crosstool.config | 3 +-- trunk/linux-4.4.x/arch/mips/kernel/Makefile | 2 ++ 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/toolchain.yml b/.github/workflows/toolchain.yml index d69b41e54a1..30b68d64c2a 100644 --- a/.github/workflows/toolchain.yml +++ b/.github/workflows/toolchain.yml @@ -20,14 +20,14 @@ jobs: run: | make toolchain/build cd toolchain-mipsel/toolchain-4.4.x - tar cJf ../mipsel-linux-uclibc-gcc10.tar.xz * + tar cJf ../mipsel-linux-uclibc-gcc12.tar.xz * - uses: actions/upload-artifact@v3 with: name: toolchain - path: toolchain-mipsel/mipsel-linux-uclibc-gcc10.tar.xz + path: toolchain-mipsel/mipsel-linux-uclibc-gcc12.tar.xz - uses: svenstaro/upload-release-action@2.2.0 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: toolchain-mipsel/mipsel-linux-uclibc-gcc10.tar.xz + file: toolchain-mipsel/mipsel-linux-uclibc-gcc12.tar.xz tag: toolchain overwrite: true \ No newline at end of file diff --git a/Makefile b/Makefile index 07854a4a983..689c2d01394 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ TOPDIR:=${CURDIR} SOURCE_DIR:=$(TOPDIR)/trunk TOOLCHAIN_DIR:=$(TOPDIR)/toolchain-mipsel TOOLCHAIN_ROOT:=$(TOOLCHAIN_DIR)/toolchain-4.4.x -TOOLCHAIN_URL:=https://github.com/tsl0922/padavan/releases/download/toolchain/mipsel-linux-uclibc-gcc10.tar.xz +TOOLCHAIN_URL:=https://github.com/tsl0922/padavan/releases/download/toolchain/mipsel-linux-uclibc-gcc12.tar.xz TEMPLATE_DIR:=$(SOURCE_DIR)/configs/templates PRODUCTS:=$(shell ls $(TEMPLATE_DIR) | sed 's/.config//g') CONFIG:=$(SOURCE_DIR)/.config diff --git a/README.md b/README.md index 7c5076e5e9f..97ceead1d28 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This project is based on original rt-n56u with latest mtk 4.4.198 kernel, which - Optimized Makefiles and build scripts, added a toplevel Makefile - Added ccache support, may save up to 50%+ build time - Upgraded the toolchain and libc: - - gcc 10.4.0 + - gcc 12.3.0 - uClibc-ng 1.0.43 - Enabled kernel cgroups support - Fixed K2P led label names diff --git a/toolchain-mipsel/samples/mipsel-linux-uclibc/crosstool.config b/toolchain-mipsel/samples/mipsel-linux-uclibc/crosstool.config index 42dd4247bb4..cddc08a9bf4 100644 --- a/toolchain-mipsel/samples/mipsel-linux-uclibc/crosstool.config +++ b/toolchain-mipsel/samples/mipsel-linux-uclibc/crosstool.config @@ -30,10 +30,9 @@ CT_LIBC_UCLIBC_CONFIG_FILE="${CT_TOP_DIR}/../trunk/configs/boards/uclibc-mipsel. CT_LIBC_UCLIBC_IPV6=y CT_LIBC_UCLIBC_WCHAR=y # CT_LIBC_UCLIBC_HAS_SSP is not set -CT_GCC_V_10=y +CT_GCC_V_12=y CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY="--with-gnu-ld" CT_CC_GCC_EXTRA_CONFIG_ARRAY="--with-gnu-ld" CT_CC_GCC_CONFIG_TLS=y # CT_CC_GCC_USE_GRAPHITE is not set CT_CC_LANG_CXX=y - diff --git a/trunk/linux-4.4.x/arch/mips/kernel/Makefile b/trunk/linux-4.4.x/arch/mips/kernel/Makefile index 68e2b7db934..f6bf699eda9 100644 --- a/trunk/linux-4.4.x/arch/mips/kernel/Makefile +++ b/trunk/linux-4.4.x/arch/mips/kernel/Makefile @@ -9,6 +9,8 @@ obj-y += cpu-probe.o branch.o elf.o entry.o genex.o idle.o irq.o \ syscall.o time.o topology.o traps.o unaligned.o watch.o \ vdso.o +CFLAGS_traps.o += -Wno-array-bounds + ifdef CONFIG_FUNCTION_TRACER CFLAGS_REMOVE_ftrace.o = -pg CFLAGS_REMOVE_early_printk.o = -pg