pkarashchenko commented on code in PR #14159:
URL: https://github.com/apache/nuttx/pull/14159#discussion_r1798614954
##########
libs/libxx/libcxx.cmake:
##########
@@ -95,14 +95,6 @@ list(APPEND SRCS ${SRCSTMP})
set(FLAGS -Wno-attributes -Wno-deprecated-declarations -Wno-shadow
-Wno-sign-compare)
-if(NOT DEFINED GCCVER)
- execute_process(COMMAND ${CMAKE_CXX_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()
-
if(GCCVER EQUAL 12)
Review Comment:
Should this be greater equal?
##########
arch/arm/src/cmake/gcc.cmake:
##########
@@ -66,7 +66,9 @@ 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})
+set(GCCVER
+ ${CMAKE_MATCH_1}
+ PARENT_SCOPE)
if(GCCVER EQUAL 12)
Review Comment:
Should this also be greater equal?
##########
arch/arm/src/common/Toolchain.defs:
##########
@@ -309,10 +309,6 @@ else
# Wrong warning array subscript [0] is outside array bounds:
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523
- ifeq ($(GCCVER),)
- export GCCVER := $(shell $(CC) --version | grep gcc | sed -E "s/.*
([0-9]+\.[0-9]+).*/\1/" | cut -d'.' -f1)
- endif
-
ifeq ($(GCCVER),12)
Review Comment:
Should this be `($(shell expr $(GCCVER) \>= 12), 1)`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]