summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules9
1 files changed, 8 insertions, 1 deletions
diff --git a/debian/rules b/debian/rules
index 6356594..c93b505 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,11 +14,18 @@ include /usr/share/cdbs/1/rules/debhelper.mk
#DEB_TAR_SRCDIR := .
#include /usr/share/cdbs/1/rules/tarball.mk
+# Determine architecture
+DEB_HOST_GNU_CPU ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
+
# Make it even harder to exploit sendmail.
# Well, almost impossible now 8-)
# * Compile all with -fPIC (works for pic or pie objects)
# * Link with either -pie or -shared
-MY_CFLAGS := -fPIC -fstack-protector-all
+ifeq ($(DEB_HOST_GNU_CPU),arm)
+ MY_CFLAGS := -fPIC
+else
+ MY_CFLAGS := -fPIC -fstack-protector-all
+ endif
CFLAGS += ${MY_CFLAGS}
export CFLAGS
MY_LDFLAGS := -Wl,-z,noexecstack,-z,relro,-z,now -Wl,--warn-shared-textrel