Browse Source

xz: Compile with PIC to fix linking errors

While researching CircleCI build failures, I came across a linking error
relating to liblzma, where ld instructs to recompile with fPIC.

Unfortunately, this increases filesize. Added some configure flags to try
to mitigate is somewhat.

Removed maintainer as he is no longer active.

Added PKG_CPE_ID for proper CVE tracking.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
lilik-openwrt-22.03
Rosen Penev 6 years ago
parent
commit
ea5f175f44
1 changed files with 9 additions and 6 deletions
  1. +9
    -6
      utils/xz/Makefile

+ 9
- 6
utils/xz/Makefile View File

@ -10,15 +10,16 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=xz PKG_NAME:=xz
PKG_VERSION:=5.2.4 PKG_VERSION:=5.2.4
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/lzmautils PKG_SOURCE_URL:=@SF/lzmautils
PKG_HASH:=3313fd2a95f43d88e44264e6b015e7d03053e681860b0d5d3f9baca79c57b7bf PKG_HASH:=3313fd2a95f43d88e44264e6b015e7d03053e681860b0d5d3f9baca79c57b7bf
PKG_MAINTAINER:=
PKG_LICENSE:=Public-Domain LGPL-2.1+ GPL-2.0+ GPL-3.0+ PKG_LICENSE:=Public-Domain LGPL-2.1+ GPL-2.0+ GPL-3.0+
PKG_LICENSE_FILES:=COPYING PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
PKG_CPE_ID:=cpe:/a:tukaani:xz
PKG_BUILD_PARALLEL:=1 PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1 PKG_INSTALL:=1
@ -69,16 +70,18 @@ define BuildSubPackage
$$(eval $$(call BuildPackage,$(1))) $$(eval $$(call BuildPackage,$(1)))
endef endef
TARGET_LDFLAGS += -Wl,--gc-sections -flto
CONFIGURE_ARGS += \ CONFIGURE_ARGS += \
--enable-small \ --enable-small \
--enable-assume-ram=4 \ --enable-assume-ram=4 \
--disable-assembler \ --disable-assembler \
--disable-debug \
--disable-doc \
--disable-rpath \
--disable-symbol-versions \
--disable-werror \ --disable-werror \
# API uses "restrict" keyword introduced in C99 standard
TARGET_CFLAGS += \
-std=c99 \
--with-pic
define Build/InstallDev define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include $(INSTALL_DIR) $(1)/usr/include


Loading…
Cancel
Save