NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: toolchain/57431: tool m4 can't regen tools/compat/configure

The following reply was made to PR toolchain/57431; it has been noted by GNATS.

From: Luke Mewburn <>
Subject: Re: toolchain/57431: tool m4 can't regen tools/compat/configure
Date: Thu, 25 May 2023 07:05:43 +1000

 On 23-05-24 07:00, Luke Mewburn wrote:
   | >Number:         57431
   | >Category:       toolchain
   | >Synopsis:       tool m4 can't regen tools/compat/configure
   | It's not possible to run "$TOOLDIR/bin/make -C tools/compat regen"
   | with $TOOLDIR/bin/nbm4 as the m4 implementation for tools/autoconf;
   | nbm4 complains about a regular expression used within autoconf.
   | GNU M4 works fine.
   | This makes it tricky to regen tools/compat after modifying
   | tools/compat/ for other issues.
 I analysed this further - see discussion on source-changed-d:
 In short, we don't need Christos' rev 1.2 change to
 and should revert that.
 What we need to do is change unescaped GNU m4 regexp and patsubst
 '{' and '}' to '\{' and '\}', because GNU m4 regexp is imp
 GNU m4 regexp is implemented using gnulib Emacs-mode regexp
 which are documented in
 Specifically, { and } have no special meaning for GNU m4;
 these are not interval characters, and \{ and \} are not
 the equivalent (unlike POSIX BREs).
 I have experimented with converting our m4's -g mode (GNU emulation)
 to escape { and } in regexes (in the twiddle()) function and
 this seems to work. Further testing is required.

Home | Main Index | Thread Index | Old Index