diff options
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 11 |
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),) | |||
39 | endif | 39 | endif |
40 | 40 | ||
41 | ifneq (,$(findstring :$(DEB_HOST_ARCH_OS):,:linux:knetbsd:)) | 41 | ifneq (,$(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 | |||
95 | confflags_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 | 100 | confflags_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. |
98 | cflags := $(OPTFLAGS) $(PIE_CFLAGS) | 103 | cflags := $(OPTFLAGS) $(PIC_CFLAGS) $(PIE_CFLAGS) |
99 | cflags += -DLOGIN_PROGRAM=\"/bin/login\" -DLOGIN_NO_ENDOPT | 104 | cflags += -DLOGIN_PROGRAM=\"/bin/login\" -DLOGIN_NO_ENDOPT |
100 | cflags += -DSSH_EXTRAVERSION=\"$(SSH_EXTRAVERSION)\" | 105 | cflags += -DSSH_EXTRAVERSION=\"$(SSH_EXTRAVERSION)\" |
101 | cflags_udeb := -Os | 106 | cflags_udeb := -Os |
@@ -104,8 +109,8 @@ confflags += --with-cflags='$(cflags)' | |||
104 | confflags_udeb += --with-cflags='$(cflags_udeb)' | 109 | confflags_udeb += --with-cflags='$(cflags_udeb)' |
105 | 110 | ||
106 | # Linker flags. | 111 | # Linker flags. |
107 | ifneq ($(PIE_LDFLAGS),) | 112 | ifneq ($(PIC_LDFLAGS)$(PIE_LDFLAGS),) |
108 | confflags += --with-ldflags='$(PIE_LDFLAGS)' | 113 | confflags += --with-ldflags='$(strip $(PIC_LDFLAGS) $(PIE_LDFLAGS))' |
109 | endif | 114 | endif |
110 | 115 | ||
111 | build: build-deb build-udeb | 116 | build: build-deb build-udeb |