Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the judgment of GCCVER version to greater equal. #14241

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arch/arm/src/cmake/gcc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/src/common/Toolchain.defs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion libs/libxx/libcxx.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
Loading