Skip to content

src/configure.ac: fix gcc-10 pattern detection#5580

Closed
trofi wants to merge 1 commit intovim:masterfrom
trofi:master
Closed

src/configure.ac: fix gcc-10 pattern detection#5580
trofi wants to merge 1 commit intovim:masterfrom
trofi:master

Conversation

@trofi
Copy link
Copy Markdown
Contributor

@trofi trofi commented Feb 5, 2020

On gcc-10 ./configure can't detect correct value of -D_FORTIFY_SOURCE=:

$ ./configure
...
checking for GCC 3 or later... auto/configure: line 14735:
  test: 10.0.1: integer expression expected
no
checking whether we need -D_FORTIFY_SOURCE=1... auto/configure: line 14745:
  test: 10.0.1: integer expression expected
no
$ gcc -dumpversion
10.0.1

It was noticed as vim buffer overflow detection as gentoo default to
-D_FORTIFY_SOURCE=2: https://bugs.gentoo.org/706324#c2

The fix extends sed regex to catch multiple digits in major version.

Reported-by: lekto@o2.pl
Bug: https://bugs.gentoo.org/706324

On gcc-10 `./configure` can't detect correct value of `-D_FORTIFY_SOURCE=`:

```
$ ./configure
...
checking for GCC 3 or later... auto/configure: line 14735:
  test: 10.0.1: integer expression expected
no
checking whether we need -D_FORTIFY_SOURCE=1... auto/configure: line 14745:
  test: 10.0.1: integer expression expected
no
```

```
$ gcc -dumpversion
10.0.1
```

It was noticed as vim buffer overflow detection as gentoo default to
`-D_FORTIFY_SOURCE=2`: https://bugs.gentoo.org/706324#c2

The fix extends sed regex to catch multiple digits in major version.

Reported-by: lekto@o2.pl
Bug: https://bugs.gentoo.org/706324
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant