From f4fd50842acd45c85c90f1c2a31c5d0f3059744e Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Tue, 26 Jun 2007 08:57:23 +0000 Subject: * Only build PIE executables on Linux and NetBSD (closes: #430455). --- debian/rules | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'debian/rules') diff --git a/debian/rules b/debian/rules index 71e291b7a..8edbc884b 100755 --- a/debian/rules +++ b/debian/rules @@ -12,11 +12,6 @@ else OPTFLAGS := -O0 endif -# Use position-independent executables to take advantage of address space -# layout randomisation. TODO: This should be done in configure. -PIE_CFLAGS := -fPIE -PIE_LDFLAGS := -fPIE -pie - DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null) # Take account of old dpkg-architecture output. @@ -27,6 +22,13 @@ ifeq ($(DEB_HOST_ARCH_OS),) endif endif +ifneq (,$(findstring :$(DEB_HOST_ARCH_OS):,:linux:knetbsd:) +# Use position-independent executables to take advantage of address space +# layout randomisation. TODO: This should be done in configure. +PIE_CFLAGS := -fPIE +PIE_LDFLAGS := -fPIE -pie +endif + ifeq (,$(wildcard /usr/bin/po2debconf)) PO2DEBCONF := no MINDEBCONFVER := 0.5 -- cgit v1.2.3