From 394e4bc7737b397396afb39f41b020bfbcacc360 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sun, 26 Nov 2017 22:20:31 +0100 Subject: [PATCH] librem: Use default Build/Compile routine Change from custom make call to using the default Build/Compile routine. This applies the standard memory corruption mitigation methods, e.g. FORTIFY_SOURCE and RELRO, to the package if they are enabled (default). Signed-off-by: Sebastian Kemper --- libs/rem/Makefile | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/libs/rem/Makefile b/libs/rem/Makefile index fe9280c..132a587 100644 --- a/libs/rem/Makefile +++ b/libs/rem/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=rem PKG_VERSION:=0.5.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.creytiv.com/pub @@ -20,6 +20,8 @@ PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=docs/COPYING PKG_MAINTAINER:=Jiri Slachta +PKG_INSTALL:=1 + include $(INCLUDE_DIR)/package.mk define Package/librem @@ -31,24 +33,15 @@ define Package/librem URL:=http://www.creytiv.com/ endef -TARGET_CFLAGS+=$(FPIC) - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - LIBRE_MK=$(STAGING_DIR)/usr/share/re/re.mk \ - LIBRE_INC=$(STAGING_DIR)/usr/include/re \ - LIBRE_SO=$(STAGING_DIR)/usr/lib \ - CC="$(TARGET_CC)" \ - EXTRA_CFLAGS="$(TARGET_CFLAGS) -DOPENWRT" \ - EXTRA_LFLAGS="-lm" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - SYSROOT="$$$$($(FIND) $(TOOLCHAIN_DIR) -path '*/include/pthread.h' | sed -ne '1s#/include/pthread.h##p')" \ - SYSROOT_ALT="$(STAGING_DIR)/usr" \ - RELEASE=1 \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - OS=linux \ - all install -endef +MAKE_FLAGS+= \ + EXTRA_LFLAGS="$(TARGET_LDFLAGS)" \ + LIBRE_MK="$(STAGING_DIR)/usr/share/re/re.mk" \ + LIBRE_INC="$(STAGING_DIR)/usr/include/re" \ + LIBRE_SO="$(STAGING_DIR)/usr/lib" \ + SYSROOT="$(shell $(FIND) $(TOOLCHAIN_DIR) -path '*/include/pthread.h' | sed -ne '1s|/include/pthread.h||p')" \ + SYSROOT_ALT="$(STAGING_DIR)/usr" \ + RELEASE=1 \ + OS=linux define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include -- 2.30.2