From 77e6c39cbd4758e2b6c7994cf266a9326cbfecb7 Mon Sep 17 00:00:00 2001 From: chao an Date: Wed, 23 Aug 2023 19:05:16 +0800 Subject: [PATCH] system/libuv: strict GCC version check from GCC-12.2 to GCC-12 Toolchain related detection errors are still not resolved on GCC-12.3 Signed-off-by: chao an --- system/libuv/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/system/libuv/Makefile b/system/libuv/Makefile index 928059ca2..d29410de6 100644 --- a/system/libuv/Makefile +++ b/system/libuv/Makefile @@ -52,8 +52,11 @@ CFLAGS += -Wno-shadow CFLAGS += -DDEF_THREADPOOL_SIZE=CONFIG_LIBUV_THREADPOOL_SIZE CFLAGS += -DDEF_THREADPOOL_STACKSIZE=CONFIG_LIBUV_THREAD_STACKSIZE -GCCVER = $(shell $(CC) --version | grep gcc | sed -r 's/.* ([0-9]+\.[0-9]+\.[0-9]+).*/\1/') -ifeq ($(GCCVER),12.2.1) +ifeq ($(GCCVER),) + GCCVER = $(shell $(CC) --version | grep gcc | sed -r 's/.* ([0-9]+\.[0-9]+).*/\1/' | cut -d'.' -f1) +endif + +ifeq ($(GCCVER),12) CFLAGS += -Wno-dangling-pointer endif