Add patch to fix gcc version detection in configure.ac.
authorgregor herrmann <gregoa@debian.org>
Fri, 17 Apr 2020 14:04:20 +0000 (16:04 +0200)
committergregor herrmann <gregoa@debian.org>
Fri, 17 Apr 2020 14:04:20 +0000 (16:04 +0200)
Thanks: Matthias Klose for the bug report.
Closes: #957073
debian/patches/gcc-10.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/gcc-10.patch b/debian/patches/gcc-10.patch
new file mode 100644 (file)
index 0000000..1455030
--- /dev/null
@@ -0,0 +1,18 @@
+Description: Fix detection of gcc version.
+ Use numeric instead of string comparison, then gcc version 10 is greater then 3.
+Origin: vendor
+Bug-Debian: https://bugs.debian.org/957073
+Author: gregor herrmann <gregoa@debian.org>
+Last-Update: 2020-04-17
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -50,7 +50,7 @@
+ echo $_echo_n "checking version of ${CC} ... $_echo_c"
+ exec 15> ./.gcc.test
+ cat >&15 <<EOF
+-${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'
++${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'
+ EOF
+ sh ./.gcc.test 2>/dev/null
+ if test $? -ne 0 ; then
index d0e0536a3a28a90ff9db4a477c7fa0afe625b227..418ff07c088c2a922dcb026b77bdbaa1abe29e44 100644 (file)
@@ -3,3 +3,4 @@ wording.patch
 hurd.patch
 makefile.am.patch
 cross.patch
 hurd.patch
 makefile.am.patch
 cross.patch
+gcc-10.patch