summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorOtto Kekäläinen <otto@mariadb.org>2018-06-01 22:24:20 +0300
committerOtto Kekäläinen <otto@mariadb.org>2018-06-02 21:32:18 +0300
commit898a8c3c0ce2c56773865521c59d5ac172495978 (patch)
treeea5827f1980e468eb2ac15c52c54c740328371ab /debian
parentee5124d714ea01f4e1bd6decf6da38b05c1009ad (diff)
downloadmariadb-git-898a8c3c0ce2c56773865521c59d5ac172495978.tar.gz
Deb: Disable PIE in debian/rules on older Debian/Ubuntu releases
This partially reverts commit dc0a76600b65950c478782203ac811e7e1027123.
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/autobake-deb.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/debian/autobake-deb.sh b/debian/autobake-deb.sh
index 48721043279..132bb2eea7b 100755
--- a/debian/autobake-deb.sh
+++ b/debian/autobake-deb.sh
@@ -81,6 +81,16 @@ then
sed '/libzstd1/d' -i debian/control
fi
+# The binaries should be fully hardened by default. However TokuDB compilation seems to fail on
+# Debian Jessie and older and on Ubuntu Xenial and older with the following error message:
+# /usr/bin/ld.bfd.real: /tmp/ccOIwjFo.ltrans0.ltrans.o: relocation R_X86_64_PC32 against symbol
+# `toku_product_name_strings' can not be used when making a shared object; recompile with -fPIC
+# Therefore we need to disable PIE on those releases using debhelper as proxy for detection.
+if ! apt-cache madison debhelper | grep 'debhelper *| *1[0-9]\.' >/dev/null 2>&1
+then
+ sed 's/hardening=+all$/hardening=+all,-pie/' -i debian/rules
+fi
+
# Convert gcc version to numberical value. Format is Mmmpp where M is Major
# version, mm is minor version and p is patch.