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