Skip to content

Commit

Permalink
nrf/Makefile: Fix GCC_VERSION check.
Browse files Browse the repository at this point in the history
Previously it was truncating the first digit of the version if the major
number had more than one digit.

Signed-off-by: Andrew Leech <[email protected]>
  • Loading branch information
pi-anl authored and dpgeorge committed Jul 31, 2024
1 parent 6007f3e commit 70a7e0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ports/nrf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 70a7e0f

Please sign in to comment.