diff options
author | Vicentiu Ciorbaru <vicentiu@mariadb.org> | 2018-02-07 11:13:29 +0000 |
---|---|---|
committer | Vicentiu Ciorbaru <vicentiu@mariadb.org> | 2018-02-07 13:07:34 +0000 |
commit | 699123fdc3b770451771d9e976bb2728c1db1b5b (patch) | |
tree | 3657eaae8260abe46a274fa7c936b2c0779e0a84 /debian/autobake-deb.sh | |
parent | 9a23b223469fba85ddf259a5ff3fac2596f854cf (diff) | |
download | mariadb-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-x | debian/autobake-deb.sh | 5 |
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 ]] |