mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 06:18:40 +08:00
Change the judgment of GCCVER version to greater equal.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
This commit is contained in:
parent
ae126a8065
commit
9d9857acd2
3 changed files with 3 additions and 3 deletions
|
@ -68,7 +68,7 @@ string(REGEX MATCH "\\+\\+.* ([0-9]+)\\.[0-9]+" GCC_VERSION_REGEX
|
|||
"${GCC_VERSION_OUTPUT}")
|
||||
set(GCCVER ${CMAKE_MATCH_1})
|
||||
|
||||
if(GCCVER EQUAL 12)
|
||||
if(GCCVER GREATER_EQUAL 12)
|
||||
add_compile_options(--param=min-pagesize=0)
|
||||
if(CONFIG_ARCH_RAMFUNCS)
|
||||
add_link_options(-Wl,--no-warn-rwx-segments)
|
||||
|
|
|
@ -309,7 +309,7 @@ else
|
|||
# Wrong warning array subscript [0] is outside array bounds:
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523
|
||||
|
||||
ifeq ($(GCCVER),12)
|
||||
ifeq ($(shell expr $(GCCVER) \>= 12), 1)
|
||||
ARCHOPTIMIZATION += --param=min-pagesize=0
|
||||
ifeq ($(CONFIG_ARCH_RAMFUNCS),y)
|
||||
LDFLAGS += --no-warn-rwx-segments
|
||||
|
|
|
@ -95,7 +95,7 @@ list(APPEND SRCS ${SRCSTMP})
|
|||
set(FLAGS -Wno-attributes -Wno-deprecated-declarations -Wno-shadow
|
||||
-Wno-sign-compare)
|
||||
|
||||
if(GCCVER EQUAL 12)
|
||||
if(GCCVER GREATER_EQUAL 12)
|
||||
list(APPEND FLAGS -Wno-maybe-uninitialized -Wno-alloc-size-larger-than)
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Reference in a new issue