libre: Use default Build/Compile routing
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 <sebastian_ml@gmx.net>
This commit is contained in:
parent
021d3fdd9c
commit
01243348d3
|
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=re
|
PKG_NAME:=re
|
||||||
PKG_VERSION:=0.5.6
|
PKG_VERSION:=0.5.6
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=http://www.creytiv.com/pub
|
PKG_SOURCE_URL:=http://www.creytiv.com/pub
|
||||||
|
@ -20,6 +20,8 @@ PKG_LICENSE:=BSD-3-Clause
|
||||||
PKG_LICENSE_FILES:=docs/COPYING
|
PKG_LICENSE_FILES:=docs/COPYING
|
||||||
PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
|
PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
|
||||||
|
|
||||||
|
PKG_INSTALL:=1
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
define Package/libre
|
define Package/libre
|
||||||
|
@ -31,26 +33,26 @@ define Package/libre
|
||||||
URL:=http://www.creytiv.com/
|
URL:=http://www.creytiv.com/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
TARGET_CFLAGS += $(FPIC)
|
# re.mk is used for this and all related packages (rem, restund and baresip).
|
||||||
|
# It relies on SYSROOT and SYSROOT_ALT being set. SYSROOT is used for finding
|
||||||
|
# toolchain headers (like pthread.h). SYSROOT_ALT is used for finding headers
|
||||||
|
# from other packages, like openssl etc.
|
||||||
|
#
|
||||||
|
# CFLAGS are picked up from the environment, as well as CPPFLAGS (and LD etc.).
|
||||||
|
# But LDFLAGS aren't picked up, so they need to be handed over via
|
||||||
|
# EXTRA_LFLAGS.
|
||||||
|
|
||||||
ifneq ($(CONFIG_USE_GLIBC)$(CONFIG_USE_MUSL),)
|
ifneq ($(CONFIG_USE_GLIBC)$(CONFIG_USE_MUSL),)
|
||||||
TARGET_CFLAGS += -D_GNU_SOURCE
|
TARGET_CFLAGS += -D_GNU_SOURCE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
define Build/Compile
|
MAKE_FLAGS+= \
|
||||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
|
||||||
HAVE_LIBRESOLV= \
|
HAVE_LIBRESOLV= \
|
||||||
CC="$(TARGET_CC)" \
|
EXTRA_LFLAGS="$(TARGET_LDFLAGS)" \
|
||||||
EXTRA_CFLAGS="$(TARGET_CFLAGS) -DOPENWRT" \
|
SYSROOT="$(shell $(FIND) $(TOOLCHAIN_DIR) -path '*/include/pthread.h' | sed -ne '1s|/include/pthread.h||p')" \
|
||||||
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" \
|
SYSROOT_ALT="$(STAGING_DIR)/usr" \
|
||||||
RELEASE=1 \
|
RELEASE=1 \
|
||||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
OS=linux
|
||||||
OS=linux \
|
|
||||||
all install
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/InstallDev
|
define Build/InstallDev
|
||||||
$(INSTALL_DIR) $(1)/usr/share/re
|
$(INSTALL_DIR) $(1)/usr/share/re
|
||||||
|
|
Loading…
Reference in New Issue