Skip to contentSkip to conversation

macos: move NO_REGEX in macOS to config.mak.uname

PATCH New Carlo Marcelo Arenas Belón 1 participant 1 message Apr 25, 2020 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 macos: move NO_REGEX in macOS to config.mak.uname

29de20504e (Makefile: fix default regex settings on Darwin, 2013-05-11) added this flag to the Makefile since Mac OS X 10.8 at the time didn't have a working REG_EXTENDED|REG_NEWLINE

move it to config.mak.uname where all the other system specific settings are kept since e1b6dbb554 (Makefile: hoist uname autodetection to config.mak.uname, 2013-01-03) and update the rule so it only applies to those known broken versions as the problem was most likely fixed in the next version when Apple imported TRE on their libc.

---
 Makefile         | 1 -
 config.mak.uname | 3 +++
 2 files changed, 3 insertions(+), 1 deletion(-)
Makefile +0 -1
index dc356ce4dd..7e3fc7ca79 100644
@@ -1308,7 +1308,6 @@ ifeq ($(uname_S),Darwin)
 		APPLE_COMMON_CRYPTO = YesPlease
 		COMPAT_CFLAGS += -DAPPLE_COMMON_CRYPTO
 	endif
-	NO_REGEX = YesPlease
 	PTHREAD_LIBS =
 endif
 
config.mak.uname +3 -0
index 0ab8e00938..f89acdd15f 100644
@@ -125,6 +125,9 @@ ifeq ($(uname_S),Darwin)
 		HAVE_GETDELIM = YesPlease
 	endif
 	NO_MEMMEM = YesPlease
+	ifeq ($(shell test `expr "$(uname_R)" : '\([0-9]*\)\.'` -le 12 && echo 1),1)
+		NO_REGEX = YesPlease
+	endif
 	USE_ST_TIMESPEC = YesPlease
 	HAVE_DEV_TTY = YesPlease
 	COMPAT_OBJS += compat/precompose_utf8.o
Signature · 1 line
2.26.2.569.g1d74ac4d14