Re: Regression: git no longer works with musl libc's regex impl
- From
Jeff King <peff@peff.net>
- Date
- Oct 6, 2016, 19:28 UTC
- Message-ID
- <20161006192811.xy5iahvczigfgapa@sigill.intra.peff.net>
- In-Reply-To
- <20161006192500.GS19318@brightrain.aerifal.cx>
On Thu, Oct 06, 2016 at 03:25:00PM -0400, Rich Felker wrote:
Show 13 quoted lines
> > No, I think that is the exact purpose of configure.ac and autoconf. > > > > It would be neat if we could auto-fallback during the build. Rich > > suggested always compiling compat/regex.c, and just having it be a noop > > at the preprocessor level. I'm not sure if that would work, though, > > because we'd have to include the system "regex.h" to know if we have > > REG_STARTEND, at which point it is potentially too late to compile our > > own regex routines (we're potentially going to conflict with the system > > declarations). > > If you have autoconf testing for REG_STARTEND at configure time then > compat/regex.c can #include "config.h" and test for HAVE_REG_STARTEND > rather than for REG_STARTEND, or something like that.
Right, that part is easy; we do not even have to touch compat/regex.c, because we already have such a knob in the Makefile (NO_REGEX), and autoconf just needs to tweak that knob.
My question was whether we could do it without running a separate compile (via autoconf or via the Makefile), and I think the answer is "no".
-Peff