diff --git a/ninja-re2c-g.patch b/ninja-re2c-g.patch new file mode 100644 index 0000000..7e47e82 --- /dev/null +++ b/ninja-re2c-g.patch @@ -0,0 +1,11 @@ +--- configure.py.orig ++++ configure.py +@@ -479,7 +479,7 @@ + return False + if has_re2c(): + n.rule('re2c', +- command='re2c -b -i --no-generation-date -o $out $in', ++ command='re2c -g -b -i --no-generation-date -o $out $in', + description='RE2C $out') + # Generate the .cc files in the source directory so we can check them in. + n.build(src('depfile_parser.cc'), 're2c', src('depfile_parser.in.cc')) diff --git a/ninja.changes b/ninja.changes index ffc419a..5bfe0fc 100644 --- a/ninja.changes +++ b/ninja.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Apr 5 21:51:58 UTC 2021 - Cristian Rodríguez + +- ninja-re2c-g.patch tell re2c to generate gcc specific code using + the -g flag, this usually results in lexers that are 20-25% faster. + ------------------------------------------------------------------- Tue Dec 29 18:55:10 UTC 2020 - Dirk Müller diff --git a/ninja.spec b/ninja.spec index 5f1d13d..1b5f61a 100644 --- a/ninja.spec +++ b/ninja.spec @@ -1,7 +1,7 @@ # # spec file for package ninja # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,7 @@ URL: https://ninja-build.org/ Source0: https://github.com/ninja-build/ninja/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: macros.ninja Patch1: ninja-disable-maxprocs-test.patch +Patch2: ninja-re2c-g.patch BuildRequires: gcc-c++ BuildRequires: python3-base BuildRequires: re2c