Re: [PATCH v2] configure: Fix GCC version checking
Anton Blanchard <[email protected]> Thu, 19 Jul 2018 23:25:53 +1000
| Newsgroups | gmane.comp.audio.mp3.lame |
|---|---|
| Message-ID | <20180719232553.60dfd146@kryten> |
On Wed, 18 Jul 2018 20:31:46 +0930 Joel Stanley <[email protected]> wrote: > The case statement fails to match as the braces are stripped when the > configure.in is converted to the configure script. > > This is bad, as the configure script then decides to set GCC to false, > and no optimisation flags are applied. Thanks Joel, with this patch applied I see a huge improvement in performance on my POWER9. Some tests are over 5x faster. Not a surprise when we were previously building without any optimisation whatsoever. Tested-by: Anton Blanchard <[email protected]> Anton > Signed-off-by: Joel Stanley <[email protected]> > --- > v2: The first fix was incorrect, as I was testing the changes > by hacking configure not configure.in. When generating configure, > single quotes are removed. > > This has been tested on x86_64 and ppc64le. > > configure.in | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/configure.in b/configure.in > index cea313d..aee44a6 100644 > --- a/configure.in > +++ b/configure.in > @@ -96,7 +96,7 @@ if test "x${GCC}" = "xyes"; then > AC_MSG_CHECKING(version of GCC) > GCC_version="`${CC} --version | sed -n '1s/^[[^ ]]* > (.*) //;s/ .*$//;1p'`" case "${GCC_version}" in > - [0-9]*[0-9]*) > + [[0-9]]*[[0-9]]*) > AC_MSG_RESULT(${GCC_version}) > ;; > *) ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot