From 0c9f732165a3afa65b164d2ae38569bc35aa5ec0 Mon Sep 17 00:00:00 2001 From: Lee Lup Yuen Date: Tue, 10 Oct 2023 11:58:47 +0800 Subject: [PATCH] Change `sed -r` to `sed -E` to support macOS --- arch/arm/src/common/Toolchain.defs | 4 ++-- arch/arm64/src/Toolchain.defs | 2 +- arch/xtensa/src/esp32/Make.defs | 2 +- libs/libxx/libcxx.defs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/src/common/Toolchain.defs b/arch/arm/src/common/Toolchain.defs index 5a40e0d11e367..7c0e712d7bd34 100644 --- a/arch/arm/src/common/Toolchain.defs +++ b/arch/arm/src/common/Toolchain.defs @@ -178,7 +178,7 @@ ifeq ($(CONFIG_ARM_TOOLCHAIN_CLANG),y) ifneq ($(TOOLCHAIN_CLANG_CONFIG),) ifeq ($(CLANGVER),) - export CLANGVER := $(shell $(CC) --version | grep "clang version" | sed -r "s/.* ([0-9]+\.[0-9]+).*/\1/") + export CLANGVER := $(shell $(CC) --version | grep "clang version" | sed -E "s/.* ([0-9]+\.[0-9]+).*/\1/") endif ifeq ($(CLANGVER),14.0) @@ -257,7 +257,7 @@ else # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523 ifeq ($(GCCVER),) - export GCCVER := $(shell $(CC) --version | grep gcc | sed -r "s/.* ([0-9]+\.[0-9]+).*/\1/" | cut -d'.' -f1) + export GCCVER := $(shell $(CC) --version | grep gcc | sed -E "s/.* ([0-9]+\.[0-9]+).*/\1/" | cut -d'.' -f1) endif ifeq ($(GCCVER),12) diff --git a/arch/arm64/src/Toolchain.defs b/arch/arm64/src/Toolchain.defs index bf6a8eb8f526f..4b5439910394b 100644 --- a/arch/arm64/src/Toolchain.defs +++ b/arch/arm64/src/Toolchain.defs @@ -166,7 +166,7 @@ endif ifeq ($(CONFIG_ARCH_TOOLCHAIN_GNU),y) ifeq ($(GCCVER),) - export GCCVER := $(shell $(CC) --version | grep gcc | sed -r "s/.* ([0-9]+\.[0-9]+).*/\1/" | cut -d'.' -f1) + export GCCVER := $(shell $(CC) --version | grep gcc | sed -E "s/.* ([0-9]+\.[0-9]+).*/\1/" | cut -d'.' -f1) endif ifeq ($(GCCVER),12) diff --git a/arch/xtensa/src/esp32/Make.defs b/arch/xtensa/src/esp32/Make.defs index f368f6bccd603..43642d581d526 100644 --- a/arch/xtensa/src/esp32/Make.defs +++ b/arch/xtensa/src/esp32/Make.defs @@ -236,7 +236,7 @@ CHIP_CSRCS += esp32_wlan.c esp32_wifi_utils.c esp32_wifi_adapter.c EXTRA_LIBS += -lcore -lnet80211 -lpp -lsmartconfig -lespnow -lwpa_supplicant ifeq ($(GCCVER),) - export GCCVER := $(shell $(CC) --version | grep gcc | sed -r 's/.* ([0-9]+\.[0-9]+).*/\1/' | cut -d'.' -f1) + export GCCVER := $(shell $(CC) --version | grep gcc | sed -E 's/.* ([0-9]+\.[0-9]+).*/\1/' | cut -d'.' -f1) endif ifeq ($(GCCVER),12) chip/esp32_wifi_adapter.c_CFLAGS += -Wno-maybe-uninitialized diff --git a/libs/libxx/libcxx.defs b/libs/libxx/libcxx.defs index 6a1fe640cde83..c0c5b51527bfb 100644 --- a/libs/libxx/libcxx.defs +++ b/libs/libxx/libcxx.defs @@ -79,7 +79,7 @@ libcxx/src/filesystem/operations.cpp_CXXFLAGS += -Wno-shadow # | ^~~~~~ ifeq ($(GCCVER),) - export GCCVER = $(shell $(CXX) --version | grep g++ | sed -r 's/.* ([0-9]+\.[0-9]+).*/\1/' | cut -d'.' -f1) + export GCCVER = $(shell $(CXX) --version | grep g++ | sed -E 's/.* ([0-9]+\.[0-9]+).*/\1/' | cut -d'.' -f1) endif ifeq ($(GCCVER),12)