summaryrefslogtreecommitdiff
path: root/examples/build_system
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-11-23 12:07:59 +0700
committerhathach <[email protected]>2023-11-23 12:07:59 +0700
commit1a98f5389c70d159f359c5bfe369d1cbf3af7475 (patch)
treeee665a2bfbd6c985a7970cbfb9a39f6ebf4cc51c /examples/build_system
parente54a2c4f3c65551e091cdc79acff5f3aa607cff3 (diff)
correct gcc version major comparison
Diffstat (limited to 'examples/build_system')
-rw-r--r--examples/build_system/make/toolchain/arm_gcc.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/build_system/make/toolchain/arm_gcc.mk b/examples/build_system/make/toolchain/arm_gcc.mk
index 071b13f68..b87657f53 100644
--- a/examples/build_system/make/toolchain/arm_gcc.mk
+++ b/examples/build_system/make/toolchain/arm_gcc.mk
@@ -10,6 +10,7 @@ OBJCOPY = $(CROSS_COMPILE)objcopy
SIZE = $(CROSS_COMPILE)size
CC_VERSION := $(shell $(CC) -dumpversion)
+CC_VERSION_MAJOR = $(firstword $(subst ., ,$(CC_VERSION)))
# ---------------------------------------
# Compiler Flags
@@ -73,6 +74,6 @@ LDFLAGS += -Wl,--print-memory-usage
endif
# from version 12
-ifeq (12,$(firstword $(sort 12 $(CC_VERSION))))
+ifeq ($(shell expr $(CC_VERSION_MAJOR) \>= 12),1)
LDFLAGS += -Wl,--no-warn-rwx-segment
endif