Skip to content

Commit 9d9857a

Browse files
cuiziweizwGUIDINGLI
authored andcommitted
Change the judgment of GCCVER version to greater equal.
Signed-off-by: cuiziwei <[email protected]>
1 parent ae126a8 commit 9d9857a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

arch/arm/src/cmake/gcc.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ string(REGEX MATCH "\\+\\+.* ([0-9]+)\\.[0-9]+" GCC_VERSION_REGEX
6868
"${GCC_VERSION_OUTPUT}")
6969
set(GCCVER ${CMAKE_MATCH_1})
7070

71-
if(GCCVER EQUAL 12)
71+
if(GCCVER GREATER_EQUAL 12)
7272
add_compile_options(--param=min-pagesize=0)
7373
if(CONFIG_ARCH_RAMFUNCS)
7474
add_link_options(-Wl,--no-warn-rwx-segments)

arch/arm/src/common/Toolchain.defs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ else
309309
# Wrong warning array subscript [0] is outside array bounds:
310310
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523
311311

312-
ifeq ($(GCCVER),12)
312+
ifeq ($(shell expr $(GCCVER) \>= 12), 1)
313313
ARCHOPTIMIZATION += --param=min-pagesize=0
314314
ifeq ($(CONFIG_ARCH_RAMFUNCS),y)
315315
LDFLAGS += --no-warn-rwx-segments

libs/libxx/libcxx.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ list(APPEND SRCS ${SRCSTMP})
9595
set(FLAGS -Wno-attributes -Wno-deprecated-declarations -Wno-shadow
9696
-Wno-sign-compare)
9797

98-
if(GCCVER EQUAL 12)
98+
if(GCCVER GREATER_EQUAL 12)
9999
list(APPEND FLAGS -Wno-maybe-uninitialized -Wno-alloc-size-larger-than)
100100
endif()
101101

0 commit comments

Comments
 (0)