mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-26 11:50:52 +00:00
libuv: Remove GCCVER redefinition
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
This commit is contained in:
parent
e5a1bb1796
commit
729cc337a1
2 changed files with 2 additions and 13 deletions
|
|
@ -44,13 +44,6 @@ if(CONFIG_LIBUV)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED GCCVER)
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} --version
|
||||
OUTPUT_VARIABLE GCC_VERSION_OUTPUT)
|
||||
string(REGEX MATCH "\\+\\+.* ([0-9]+)\\.[0-9]+" GCC_VERSION_REGEX
|
||||
"${GCC_VERSION_OUTPUT}")
|
||||
set(GCCVER ${CMAKE_MATCH_1})
|
||||
endif()
|
||||
# ############################################################################
|
||||
# Flags
|
||||
# ############################################################################
|
||||
|
|
@ -60,7 +53,7 @@ if(CONFIG_LIBUV)
|
|||
-DDEF_THREADPOOL_STACKSIZE=CONFIG_LIBUV_THREAD_STACKSIZE
|
||||
-DDEF_THREADPOOL_PRIORITY=CONFIG_LIBUV_THREADPOOL_PRIORITY)
|
||||
|
||||
if(GCCVER EQUAL 12)
|
||||
if(GCCVER GREATER_EQUAL 12)
|
||||
list(APPEND CFLAGS -Wno-dangling-pointer)
|
||||
endif()
|
||||
# ############################################################################
|
||||
|
|
|
|||
|
|
@ -54,11 +54,7 @@ CFLAGS += -DDEF_THREADPOOL_PRIORITY=CONFIG_LIBUV_THREADPOOL_PRIORITY
|
|||
CFLAGS += -DMAX_EPOLL_EVENTS=CONFIG_LIBUV_MAX_EPOLL_EVENTS
|
||||
CFLAGS += -DPREP_EVENT_SIZE=CONFIG_LIBUV_PREP_EVENT_SIZE
|
||||
|
||||
ifeq ($(GCCVER),)
|
||||
export GCCVER = $(shell $(CC) --version | grep gcc | sed -r 's/.* ([0-9]+\.[0-9]+).*/\1/' | cut -d'.' -f1)
|
||||
endif
|
||||
|
||||
ifeq ($(GCCVER),12)
|
||||
ifeq ($(shell expr "$(GCCVER)" \>= 12), 1)
|
||||
CFLAGS += -Wno-dangling-pointer
|
||||
endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue