makefile: Avoid using PCRE REGEX support on OS X

- OS X libpcreposix segfaults when a compiled regular expression is freed.
- Revise regular expression syntax used in VAX diagnostic scripts to avoid
  Perl oriented extensions.
This commit is contained in:
Mark Pizzolato 2018-09-30 12:37:49 -07:00
parent 4807fbbf67
commit 31c512c6e7
2 changed files with 5 additions and 4 deletions

View file

@ -106,10 +106,11 @@ set env DIAG_TEST=%1
set env DIAG_DESC=%2 set env DIAG_DESC=%2
set env -a DIAG_ERRORS=1 set env -a DIAG_ERRORS=1
noexpect noexpect
if (SIM_REGEX_TYPE == "") echof "Missing Regular Expression support - skipping %DIAG_TEST% test\n"; exit 0
expect -r "Hard error" go -q expect -r "Hard error" go -q
expect -r "Pass \d+, test (\d+), subtest (\d+), error (\d+)," set env -a DIAG_ERRORS=_EXPECT_MATCH_GROUP_3; return expect -r "Pass 1, test ([0-9][0-9]*), subtest ([0-9][0-9]*), error ([0-9][0-9]*)," set env -a DIAG_ERRORS=_EXPECT_MATCH_GROUP_3; return
expect -r "System fatal error while testing" go -q expect -r "System fatal error while testing" go -q
expect -r "\.\. End of run, (\d+) (error|errors) detected, pass count is \d+," set env -a DIAG_ERRORS=_EXPECT_MATCH_GROUP_1; go -q expect -r "\.\. End of run, ([0-9][0-9]*) (error|errors) detected, pass count is [0-9][0-9]*," set env -a DIAG_ERRORS=_EXPECT_MATCH_GROUP_1; go -q
expect "DS> " expect "DS> "
if (DIAG_QUIET_MODE) echof "\nRunning - %DIAG_DESC% %DIAG_TEST%\n" if (DIAG_QUIET_MODE) echof "\nRunning - %DIAG_DESC% %DIAG_TEST%\n"
send "RUN %DIAG_TEST%\r" send "RUN %DIAG_TEST%\r"

View file

@ -479,8 +479,8 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
endif endif
endif endif
endif endif
# Find available RegEx library. Prefer libpcreposix. # Find available RegEx library. Prefer libpcreposix - except on OS X.
ifneq (,$(and $(call find_include,pcreposix),$(call find_include,pcre))) ifneq (,$(and $(call find_include,pcreposix),$(call find_include,pcre),$(subst Darwin,,$(OSTYPE))))
ifneq (,$(and $(call find_lib,pcreposix),$(call find_lib,pcre))) ifneq (,$(and $(call find_lib,pcreposix),$(call find_lib,pcre)))
OS_CCDEFS += -DHAVE_PCREPOSIX_H OS_CCDEFS += -DHAVE_PCREPOSIX_H
OS_LDFLAGS += -lpcreposix -lpcre OS_LDFLAGS += -lpcreposix -lpcre