diff --git a/arch/arm64/src/Toolchain.defs b/arch/arm64/src/Toolchain.defs index 47d1b55969..bf6a8eb8f5 100644 --- a/arch/arm64/src/Toolchain.defs +++ b/arch/arm64/src/Toolchain.defs @@ -166,10 +166,10 @@ endif ifeq ($(CONFIG_ARCH_TOOLCHAIN_GNU),y) ifeq ($(GCCVER),) - export GCCVER := $(shell $(CC) --version | grep gcc | sed -r "s/.* ([0-9]+\.[0-9]+).*/\1/") + export GCCVER := $(shell $(CC) --version | grep gcc | sed -r "s/.* ([0-9]+\.[0-9]+).*/\1/" | cut -d'.' -f1) endif - ifeq ($(GCCVER),12.2) + ifeq ($(GCCVER),12) LDFLAGS += --no-warn-rwx-segments endif endif