git: DragonFly_RELEASE_6_4 bsd.{sys, kern}.mk: Fix syntax error in pattern 'gcc[5-]*'

Aaron LI aly at crater.dragonflybsd.org
Sat Aug 30 03:02:18 PDT 2025


commit 63eab4cd43f88ce3bd8619a2b4378ed22ea0266a
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/63eab4cd43f88ce3bd8619a2b4378ed22ea0266a


-- 
DragonFly BSD source repository


More information about the Commits mailing list