From e4903d16ef5205516ca2bd3506198b6cfabd19b1 Mon Sep 17 00:00:00 2001 From: "Aaron M. Ucko" Date: Mon, 3 Jun 2013 02:59:12 +0000 Subject: [PATCH] * debian/patches/use_pie_for_apps: Explicitly build all executables with -fPIE -pie, to avoid giving project_tree_builder a partial PIE treatment that now fails on mips and mipsel. (Closes: #710807.) * debian/rules: Retire redundant APP_LDFLAGS override. --- debian/changelog | 6 +++++- debian/patches/use_pie_for_apps | 15 ++++++++++++--- debian/rules | 3 +-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7b51bcad..9d57c497 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,12 @@ ncbi-blast+ (2.2.28-2) UNRELEASED; urgency=low * NOT RELEASED YET. + * debian/patches/use_pie_for_apps: Explicitly build all executables with + -fPIE -pie, to avoid giving project_tree_builder a partial PIE + treatment that now fails on mips and mipsel. (Closes: #710807.) + * debian/rules: Retire redundant APP_LDFLAGS override. - -- Aaron M. Ucko Sun, 02 Jun 2013 22:55:40 -0400 + -- Aaron M. Ucko Sun, 02 Jun 2013 22:59:08 -0400 ncbi-blast+ (2.2.28-1) unstable; urgency=low diff --git a/debian/patches/use_pie_for_apps b/debian/patches/use_pie_for_apps index c4528e03..30173324 100644 --- a/debian/patches/use_pie_for_apps +++ b/debian/patches/use_pie_for_apps @@ -1,13 +1,13 @@ Subject: build executables with -fPIE, not -fPIC -* -fPIC is only useful for shared libraries; substitute -fPIE (to be - accompanied by appropriate APP_LDFLAGS) when building executables. +* -fPIC is only useful for shared libraries; substitute -fPIE (along + with -pie at link time) when building executables. Author: Aaron M. Ucko Last-Update: 2012-05-10 --- a/c++/src/build-system/Makefile.app.in +++ b/c++/src/build-system/Makefile.app.in -@@ -24,8 +24,8 @@ +@@ -24,8 +24,8 @@ default_rule: all ### C/C++ source file compilation (and maybe auto-dependencies) build rules @@ -18,3 +18,12 @@ Last-Update: 2012-05-10 SOURCES = @UNIX_SRC@ $(SRC) include $(builddir)/Makefile.$(Rules) +@@ -72,7 +72,7 @@ rebuild-libs: + + $(XAPP): $(XOBJ) $(XLIBDEP) + @-$(RM) .$(XAPP).stamp +- $(LINK_WRAPPER) $(LINK) $(LDFLAGS) $(APP_LDFLAGS) $(XOBJ) $(XOBJ2) $(PRE_LIBS) $(XLIB) $(XAPP_LIBS) @f_outexe@$(XAPP) $(LINK_FILTER) ++ $(LINK_WRAPPER) $(LINK) $(LDFLAGS) $(APP_LDFLAGS) -fPIE -pie $(XOBJ) $(XOBJ2) $(PRE_LIBS) $(XLIB) $(XAPP_LIBS) @f_outexe@$(XAPP) $(LINK_FILTER) + $(STRIP) $(XAPP) + $(POST_LINK) $(XAPP) + ifneq "$(BINCOPY)" "@:" diff --git a/debian/rules b/debian/rules index 76998faa..c3052851 100755 --- a/debian/rules +++ b/debian/rules @@ -42,8 +42,7 @@ override_dh_auto_configure: override_dh_auto_build: cd c++/BUILD/build && \ - make -f Makefile.flat all_projects="$(proj)" \ - APP_LDFLAGS='-Wl,-E -fPIE -pie' + make -f Makefile.flat all_projects="$(proj)" override_dh_auto_test: -dh_auto_test -- 2.30.2