git: bsd.{sys,kern}.mk: Fix syntax error in pattern 'gcc[5-]*'
Aaron LI
aly at crater.dragonflybsd.org
Sat Aug 30 02:58:47 PDT 2025
commit 17bd5e541141b95f1055410381ba88956a7dc520
Author: Aaron LI <aly at aaronly.me>
Date: Sat Aug 30 17:35:03 2025 +0800
bsd.{sys,kern}.mk: Fix syntax error in pattern 'gcc[5-]*'
If ${_WCCVER} doesn't match the 'gcc[5-]*' pattern, bmake would generate
this fatal error:
```
Unfinished character list in pattern 'gcc[5-]*' of modifier ':M'
while evaluating variable "_WCCVER" with value "gcc100"
make: Fatal errors encountered -- cannot continue
```
Interestingly, this pattern works as expected if there is match. This
is because bmake matches the pattern along the parsing; it doesn't
validate the pattern syntax before matching it. The bmake code requires
that both the range begin and end be specified. So this is actually a
bug in the bmake code. See also contrib/bmake/str.c:Str_Match().
Reported-by: sparlane (IRC)
Discussed-with: swildner
Summary of changes:
share/mk/bsd.sys.mk | 2 +-
sys/conf/bsd.kern.mk | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/17bd5e541141b95f1055410381ba88956a7dc520
--
DragonFly BSD source repository
More information about the Commits
mailing list