From e0fe667421bfd49d25f0052d873cef7c344ebb74 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Cristian=20Rodr=C3=ADguez?= Date: Sun, 5 Aug 2018 16:07:01 +0200 Subject: [PATCH] Fix bug #76030 RE2C_FLAGS rarely honoured Since PHP 5.3 the default lexer generator is RE2C. On Unix-alike build systems there is also optional configure option --enable-re2c-cgoto which enables optimized conditional jumps using non-standard computed goto extension. It is available since RE2C 0.10.3 so it's well covered by RE2C versions PHP uses. This patch syncs usage of -g option accross the PHP Unix-alike build system. --- ext/json/Makefile.frag | 2 +- ext/pdo/Makefile.frag | 4 ++-- ext/phar/Makefile.frag | 4 ++-- ext/standard/Makefile.frag | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ext/json/Makefile.frag b/ext/json/Makefile.frag index cb26acabc7..d35abfc8c4 100644 --- a/ext/json/Makefile.frag +++ b/ext/json/Makefile.frag @@ -1,5 +1,5 @@ $(srcdir)/json_scanner.c: $(srcdir)/json_scanner.re - $(RE2C) -t $(srcdir)/php_json_scanner_defs.h --no-generation-date -bci -o $@ $(srcdir)/json_scanner.re + $(RE2C) $(RE2C_FLAGS) -t $(srcdir)/php_json_scanner_defs.h --no-generation-date -bci -o $@ $(srcdir)/json_scanner.re $(srcdir)/json_parser.tab.c: $(srcdir)/json_parser.y $(YACC) --defines -l $(srcdir)/json_parser.y -o $@ diff --git a/ext/pdo/Makefile.frag b/ext/pdo/Makefile.frag index d2b59744ef..698699be75 100644 --- a/ext/pdo/Makefile.frag +++ b/ext/pdo/Makefile.frag @@ -9,9 +9,9 @@ PDO_HEADER_FILES= \ $(srcdir)/pdo_sql_parser.c: $(srcdir)/pdo_sql_parser.re @(cd $(top_srcdir); \ if test -f ./pdo_sql_parser.re; then \ - $(RE2C) --no-generation-date -o pdo_sql_parser.c pdo_sql_parser.re; \ + $(RE2C) $(RE2C_FLAGS) --no-generation-date -o pdo_sql_parser.c pdo_sql_parser.re; \ else \ - $(RE2C) --no-generation-date -o ext/pdo/pdo_sql_parser.c ext/pdo/pdo_sql_parser.re; \ + $(RE2C) $(RE2C_FLAGS) --no-generation-date -o ext/pdo/pdo_sql_parser.c ext/pdo/pdo_sql_parser.re; \ fi) install-pdo-headers: diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag index 0e3713fc63..e1dda15723 100644 --- a/ext/phar/Makefile.frag +++ b/ext/phar/Makefile.frag @@ -1,9 +1,9 @@ $(srcdir)/phar_path_check.c: $(srcdir)/phar_path_check.re @(cd $(top_srcdir); \ if test -f ./php_phar.h; then \ - $(RE2C) --no-generation-date -b -o phar_path_check.c phar_path_check.re; \ + $(RE2C) $(RE2C_FLAGS) --no-generation-date -b -o phar_path_check.c phar_path_check.re; \ else \ - $(RE2C) --no-generation-date -b -o ext/phar/phar_path_check.c ext/phar/phar_path_check.re; \ + $(RE2C) $(RE2C_FLAGS) --no-generation-date -b -o ext/phar/phar_path_check.c ext/phar/phar_path_check.re; \ fi) pharcmd: $(builddir)/phar.php $(builddir)/phar.phar diff --git a/ext/standard/Makefile.frag b/ext/standard/Makefile.frag index 8b6e3e233a..2cc75ca93f 100644 --- a/ext/standard/Makefile.frag +++ b/ext/standard/Makefile.frag @@ -1,9 +1,9 @@ $(srcdir)/var_unserializer.c: $(srcdir)/var_unserializer.re - @(cd $(top_srcdir); $(RE2C) --no-generation-date -b -o ext/standard/var_unserializer.c ext/standard/var_unserializer.re) + @(cd $(top_srcdir); $(RE2C) $(RE2C_FLAGS) --no-generation-date -b -o ext/standard/var_unserializer.c ext/standard/var_unserializer.re) $(srcdir)/url_scanner_ex.c: $(srcdir)/url_scanner_ex.re - @(cd $(top_srcdir); $(RE2C) --no-generation-date -b -o ext/standard/url_scanner_ex.c ext/standard/url_scanner_ex.re) + @(cd $(top_srcdir); $(RE2C) $(RE2C_FLAGS) --no-generation-date -b -o ext/standard/url_scanner_ex.c ext/standard/url_scanner_ex.re) $(builddir)/info.lo: $(builddir)/../../main/build-defs.h -- 2.40.0