summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2009-06-05 09:19:11 +0000
committerColin Watson <cjwatson@debian.org>2009-06-05 09:19:11 +0000
commit891f788bec3762d6f0fccb103f6e4e2c44905445 (patch)
treeef91fcee9f8dfabd8ee57bc5e77316f4dbe143bb /debian/rules
parentbe2797cef3d10e606852a1d5e721ae0ec5acb0ae (diff)
Build with -fPIC on mips/mipsel (thanks, Luk Claes; closes: #531942).
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules11
1 files changed, 8 insertions, 3 deletions
diff --git a/debian/rules b/debian/rules
index e85ff654b..371084e3a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -39,6 +39,11 @@ ifeq ($(DEB_HOST_ARCH_CPU),)
39endif 39endif
40 40
41ifneq (,$(findstring :$(DEB_HOST_ARCH_OS):,:linux:knetbsd:)) 41ifneq (,$(findstring :$(DEB_HOST_ARCH_OS):,:linux:knetbsd:))
42 ifneq (,$(findstring :$(DEB_HOST_ARCH_CPU):,:mips:mipsel:))
43 # Apparently this is not implied by -fPIE, at least on the mipsen.
44 PIC_CFLAGS := -fPIC
45 PIC_LDFLAGS := -fPIC
46 endif
42 ifeq (,$(findstring :$(DEB_HOST_ARCH_CPU):,:hppa:m68k:)) 47 ifeq (,$(findstring :$(DEB_HOST_ARCH_CPU):,:hppa:m68k:))
43 # Use position-independent executables to take advantage of address space 48 # Use position-independent executables to take advantage of address space
44 # layout randomisation. TODO: This should be done in configure. 49 # layout randomisation. TODO: This should be done in configure.
@@ -95,7 +100,7 @@ confflags += --with-default-path=$(DEFAULT_PATH) --with-superuser-path=$(SUPERUS
95confflags_udeb += --with-default-path=/usr/local/bin:/usr/bin:/bin --with-superuser-path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 100confflags_udeb += --with-default-path=/usr/local/bin:/usr/bin:/bin --with-superuser-path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
96 101
97# Compiler flags. 102# Compiler flags.
98cflags := $(OPTFLAGS) $(PIE_CFLAGS) 103cflags := $(OPTFLAGS) $(PIC_CFLAGS) $(PIE_CFLAGS)
99cflags += -DLOGIN_PROGRAM=\"/bin/login\" -DLOGIN_NO_ENDOPT 104cflags += -DLOGIN_PROGRAM=\"/bin/login\" -DLOGIN_NO_ENDOPT
100cflags += -DSSH_EXTRAVERSION=\"$(SSH_EXTRAVERSION)\" 105cflags += -DSSH_EXTRAVERSION=\"$(SSH_EXTRAVERSION)\"
101cflags_udeb := -Os 106cflags_udeb := -Os
@@ -104,8 +109,8 @@ confflags += --with-cflags='$(cflags)'
104confflags_udeb += --with-cflags='$(cflags_udeb)' 109confflags_udeb += --with-cflags='$(cflags_udeb)'
105 110
106# Linker flags. 111# Linker flags.
107ifneq ($(PIE_LDFLAGS),) 112ifneq ($(PIC_LDFLAGS)$(PIE_LDFLAGS),)
108confflags += --with-ldflags='$(PIE_LDFLAGS)' 113confflags += --with-ldflags='$(strip $(PIC_LDFLAGS) $(PIE_LDFLAGS))'
109endif 114endif
110 115
111build: build-deb build-udeb 116build: build-deb build-udeb