summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Leech <andrew.leech@planetinnovation.com.au>2024-07-26 15:22:53 +1000
committerDamien George <damien@micropython.org>2024-07-31 12:44:16 +1000
commit70a7e0ff2f86cc7359785ad356cecc4449f7b850 (patch)
treea7c507200d3e21fed8367120b572844f5acfc82c
parent6007f3e2062cc65fc8416f241c682e37eb956c11 (diff)
nrf/Makefile: Fix GCC_VERSION check.
Previously it was truncating the first digit of the version if the major number had more than one digit. Signed-off-by: Andrew Leech <andrew@alelec.net>
-rw-r--r--ports/nrf/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile
index 621f7d33c..c4150c292 100644
--- a/ports/nrf/Makefile
+++ b/ports/nrf/Makefile
@@ -130,7 +130,7 @@ CFLAGS_MCU_m4 = $(CFLAGS_CORTEX_M) -mtune=cortex-m4 -mcpu=cortex-m4 -mfpu=fpv4-s
CFLAGS_MCU_m0 = $(CFLAGS_CORTEX_M) -fshort-enums -mtune=cortex-m0 -mcpu=cortex-m0 -mfloat-abi=soft
# linker wrap does not work with lto on older gcc/binutils: https://sourceware.org/bugzilla/show_bug.cgi?id=24406
-GCC_VERSION = $(shell arm-none-eabi-gcc --version | sed -n -E 's:^arm.*([0-9]+\.[0-9]+\.[0-9]+).*$$:\1:p')
+GCC_VERSION = $(shell arm-none-eabi-gcc -dumpversion)
GCC_MAJOR_VERS = $(word 1,$(subst ., ,$(GCC_VERSION)))
ifeq ($(shell test $(GCC_MAJOR_VERS) -ge 10; echo $$?),0)
LTO ?= 1