Add patch to fix gcc version detection in configure.ac.
Thanks: Matthias Klose for the bug report.
Closes: #957073
gregor herrmann
4 years ago
0 | Description: Fix detection of gcc version. | |
1 | Use numeric instead of string comparison, then gcc version 10 is greater then 3. | |
2 | Origin: vendor | |
3 | Bug-Debian: https://bugs.debian.org/957073 | |
4 | Author: gregor herrmann <gregoa@debian.org> | |
5 | Last-Update: 2020-04-17 | |
6 | ||
7 | --- a/configure.ac | |
8 | +++ b/configure.ac | |
9 | @@ -50,7 +50,7 @@ | |
10 | echo $_echo_n "checking version of ${CC} ... $_echo_c" | |
11 | exec 15> ./.gcc.test | |
12 | cat >&15 <<EOF | |
13 | -${CC} -v 2>&1 | perl -e '\$/=undef;\$_=<STDIN>;s/.*ver.+?([[0-9\.]]+).*//s;\$_=\$1;print; s/\.//sg;s/^.*?(\d{0,4}).*\$/\$1/; exit 0 if (\$_ gt 300); exit -1' | |
14 | +${CC} -v 2>&1 | perl -e '\$/=undef;\$_=<STDIN>;s/.*ver.+?([[0-9\.]]+).*//s;\$_=\$1;print; s/\.//sg;s/^.*?(\d{0,4}).*\$/\$1/; exit 0 if (\$_ >= 300); exit -1' | |
15 | EOF | |
16 | sh ./.gcc.test 2>/dev/null | |
17 | if test $? -ne 0 ; then |