summaryrefslogtreecommitdiff
path: root/debian/autobake-deb.sh
diff options
context:
space:
mode:
authorVicentiu Ciorbaru <vicentiu@mariadb.org>2018-02-07 11:13:29 +0000
committerVicentiu Ciorbaru <vicentiu@mariadb.org>2018-02-07 13:07:34 +0000
commit699123fdc3b770451771d9e976bb2728c1db1b5b (patch)
tree3657eaae8260abe46a274fa7c936b2c0779e0a84 /debian/autobake-deb.sh
parent9a23b223469fba85ddf259a5ff3fac2596f854cf (diff)
downloadmariadb-git-699123fdc3b770451771d9e976bb2728c1db1b5b.tar.gz
Fix rocksdb compiler version identification with GCC
GCC 7 with only dumpversion flag returns the major version only. dumpfullversion flag makes it work with both new and old gcc.
Diffstat (limited to 'debian/autobake-deb.sh')
-rwxr-xr-xdebian/autobake-deb.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/debian/autobake-deb.sh b/debian/autobake-deb.sh
index 688698dad8a..b2d30a6deb3 100755
--- a/debian/autobake-deb.sh
+++ b/debian/autobake-deb.sh
@@ -74,7 +74,10 @@ fi
# Convert gcc version to numberical value. Format is Mmmpp where M is Major
# version, mm is minor version and p is patch.
-GCCVERSION=$(gcc -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$/&00/')
+# -dumpfullversion & -dumpversion to make it uniform across old and new (>=7)
+GCCVERSION=$(gcc -dumpfullversion -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' \
+ -e 's/\.\([0-9]\)/0\1/g' \
+ -e 's/^[0-9]\{3,4\}$/&00/')
# Don't build rocksdb package if gcc version is less than 4.8 or we are running on
# x86 32 bit.
if [[ $GCCVERSION -lt 40800 ]] || [[ $(arch) =~ i[346]86 ]]