1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
From: Jonathon Love <jon@thon.cc>
Description: Fixed build process to use "dpkg-buildflags" (and prevent lint warning)
Upstream is not interested
Author: Jonathon Love <jon@thon.cc>
Forwarded: http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2015-August/008931.html
Index: r-cran-rinside/src/Makevars
===================================================================
--- r-cran-rinside.orig/src/Makevars
+++ r-cran-rinside/src/Makevars
@@ -21,6 +21,10 @@ USERLIB=libRInside$(DYLIB_EXT)
USERLIBST=libRInside.a
USERDIR=../inst/lib
+ifneq ("$(wildcard /usr/bin/dpkg-buildflags)", "")
+HARDEN_FLAGS=$(shell dpkg-buildflags --get LDFLAGS)
+endif
+
PKG_CPPFLAGS = -I. -I../inst/include/
PKG_LIBS =
@@ -43,7 +47,7 @@ userLibrary: $(USERLIB) $(USERLIBST)
rm $(USERLIB) $(USERLIBST)
$(USERLIB): $(OBJECTS)
- $(SHLIB_CXXLD) -o $(USERLIB) $^ $(SHLIB_CXXLDFLAGS) $(ALL_LIBS)
+ $(SHLIB_CXXLD) $(HARDEN_FLAGS) -o $(USERLIB) $^ $(SHLIB_CXXLDFLAGS) $(ALL_LIBS)
@if test -e "/usr/bin/install_name_tool"; then /usr/bin/install_name_tool -id $(R_PACKAGE_DIR)/lib$(R_ARCH)/$(USERLIB) $(USERLIB); fi
$(USERLIBST): $(OBJECTS)
|