summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules17
1 files changed, 13 insertions, 4 deletions
diff --git a/debian/rules b/debian/rules
index c9cde8ce1..926e8674e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,6 +13,7 @@ OPTFLAGS := -O0
13endif 13endif
14 14
15DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null) 15DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)
16DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null)
16 17
17# Take account of old dpkg-architecture output. 18# Take account of old dpkg-architecture output.
18ifeq ($(DEB_HOST_ARCH_OS),) 19ifeq ($(DEB_HOST_ARCH_OS),)
@@ -21,12 +22,20 @@ ifeq ($(DEB_HOST_ARCH_OS),)
21 DEB_HOST_ARCH_OS := hurd 22 DEB_HOST_ARCH_OS := hurd
22 endif 23 endif
23endif 24endif
25ifeq ($(DEB_HOST_ARCH_CPU),)
26 DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
27 ifeq ($(DEB_HOST_ARCH_CPU),x86_64)
28 DEB_HOST_ARCH_CPU := amd64
29 endif
30endif
24 31
25ifneq (,$(findstring :$(DEB_HOST_ARCH_OS):,:linux:knetbsd:)) 32ifneq (,$(findstring :$(DEB_HOST_ARCH_OS):,:linux:knetbsd:))
26# Use position-independent executables to take advantage of address space 33 ifneq ($(DEB_HOST_ARCH_CPU),hppa)
27# layout randomisation. TODO: This should be done in configure. 34 # Use position-independent executables to take advantage of address space
28PIE_CFLAGS := -fPIE 35 # layout randomisation. TODO: This should be done in configure.
29PIE_LDFLAGS := -fPIE -pie 36 PIE_CFLAGS := -fPIE
37 PIE_LDFLAGS := -fPIE -pie
38 endif
30endif 39endif
31 40
32ifeq (,$(wildcard /usr/bin/po2debconf)) 41ifeq (,$(wildcard /usr/bin/po2debconf))