mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-10 17:17:06 +02:00
BUG/MINOR: jit: don't rely on USE flag to detect support
Since ea68d36
we show whether JIT is enabled, based on the USE-flag
(USE_PCRE_JIT). This is too naive; libpcre may be built without JIT
support (which is the default).
Fix this by calling pcre_config(), which has the accurate information
we are looking for.
Example of a libpcre without JIT support after this patch:
> ./haproxy -vv | grep PCRE
> OPTIONS = USE_STATIC_PCRE=1 USE_PCRE_JIT=1
> Built with PCRE version : 8.32 2012-11-30
> PCRE library supports JIT : no (libpcre build without JIT?)
This commit is contained in:
parent
667c2a3d2a
commit
d9bdccda55
@ -292,13 +292,20 @@ void display_build_opts()
|
|||||||
|
|
||||||
#ifdef USE_PCRE
|
#ifdef USE_PCRE
|
||||||
printf("Built with PCRE version : %s", pcre_version());
|
printf("Built with PCRE version : %s", pcre_version());
|
||||||
printf("\nPCRE library supports JIT : "
|
printf("\nPCRE library supports JIT : ");
|
||||||
#ifndef USE_PCRE_JIT
|
#ifdef USE_PCRE_JIT
|
||||||
"no (USE_PCRE_JIT not set)"
|
{
|
||||||
|
int r;
|
||||||
|
pcre_config(PCRE_CONFIG_JIT, &r);
|
||||||
|
if (r)
|
||||||
|
printf("yes");
|
||||||
|
else
|
||||||
|
printf("no (libpcre build without JIT?)");
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
"yes"
|
printf("no (USE_PCRE_JIT not set)");
|
||||||
#endif
|
#endif
|
||||||
"\n");
|
printf("\n");
|
||||||
#else
|
#else
|
||||||
printf("Built without PCRE support (using libc's regex instead)\n");
|
printf("Built without PCRE support (using libc's regex instead)\n");
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user