diff options
author | Colin Watson <cjwatson@debian.org> | 2007-06-26 08:57:23 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2007-06-26 08:57:23 +0000 |
commit | f4fd50842acd45c85c90f1c2a31c5d0f3059744e (patch) | |
tree | 6baf9d4303c9f250a431b6a4108763e2996e5bf0 /debian/rules | |
parent | 1a61c1f237414633f32885c552ed54d32fe15138 (diff) |
* Only build PIE executables on Linux and NetBSD (closes: #430455).
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/debian/rules b/debian/rules index 71e291b7a..8edbc884b 100755 --- a/debian/rules +++ b/debian/rules | |||
@@ -12,11 +12,6 @@ else | |||
12 | OPTFLAGS := -O0 | 12 | OPTFLAGS := -O0 |
13 | endif | 13 | endif |
14 | 14 | ||
15 | # Use position-independent executables to take advantage of address space | ||
16 | # layout randomisation. TODO: This should be done in configure. | ||
17 | PIE_CFLAGS := -fPIE | ||
18 | PIE_LDFLAGS := -fPIE -pie | ||
19 | |||
20 | DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null) | 15 | DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null) |
21 | 16 | ||
22 | # Take account of old dpkg-architecture output. | 17 | # Take account of old dpkg-architecture output. |
@@ -27,6 +22,13 @@ ifeq ($(DEB_HOST_ARCH_OS),) | |||
27 | endif | 22 | endif |
28 | endif | 23 | endif |
29 | 24 | ||
25 | ifneq (,$(findstring :$(DEB_HOST_ARCH_OS):,:linux:knetbsd:) | ||
26 | # Use position-independent executables to take advantage of address space | ||
27 | # layout randomisation. TODO: This should be done in configure. | ||
28 | PIE_CFLAGS := -fPIE | ||
29 | PIE_LDFLAGS := -fPIE -pie | ||
30 | endif | ||
31 | |||
30 | ifeq (,$(wildcard /usr/bin/po2debconf)) | 32 | ifeq (,$(wildcard /usr/bin/po2debconf)) |
31 | PO2DEBCONF := no | 33 | PO2DEBCONF := no |
32 | MINDEBCONFVER := 0.5 | 34 | MINDEBCONFVER := 0.5 |