From 2823d1ebdd3a972e5130a10688eb6774bf608744 Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Sat, 31 Dec 2016 18:32:55 -0600 Subject: Build position-independent Now that Debian #837567 has been resolved, build urweb(1) and its associated libraries as PIC. --- debian/rules | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'debian/rules') diff --git a/debian/rules b/debian/rules index 575fb3ed..cd3f8296 100755 --- a/debian/rules +++ b/debian/rules @@ -7,16 +7,12 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) # Avoid overlinking and reduce library dependencies. export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -# Harden SML executables. Do not build position-independent executables, -# though; urweb depends on the MLton runtime, which is not built position- -# independent in Debian (#837567). -export DEB_BUILD_MAINT_OPTIONS := hardening=+all,-pie +# Harden SML executables. +export DEB_BUILD_MAINT_OPTIONS := hardening=+all export MLTONARGS := \ -cc-opt "$(shell dpkg-buildflags --get CPPFLAGS) \ - $(shell dpkg-buildflags --get CFLAGS) \ - -no-pie" \ - -link-opt "$(shell dpkg-buildflags --get LDFLAGS) \ - -no-pie" + $(shell dpkg-buildflags --get CFLAGS)" \ + -link-opt "$(shell dpkg-buildflags --get LDFLAGS)" %: dh $@ --parallel --with autoreconf -- cgit v1.2.3