mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 09:12:39 +00:00
d27623b542
Removed sys/cdefs usage. The header is deprecated. Removed canonicalize_file_name define. It's already fixed upstream. Added --disable-debuginfod. Seems to be needed. Modified patch 005 to build more stuff. It was failing before. It still only builds libraries. Modified patch 100 to use strerror under non-glibc. It is used under glibc as strerror is not thread safe. It is under musl and uClibc-ng. strerror_l is not available under uClibc-ng. Signed-off-by: Rosen Penev <rosenp@gmail.com>
102 lines
2.6 KiB
Makefile
102 lines
2.6 KiB
Makefile
#
|
|
# Copyright (C) 2010-2019 OpenWrt.org
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=elfutils
|
|
PKG_VERSION:=0.179
|
|
PKG_RELEASE:=1
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
|
|
PKG_HASH:=25a545566cbacaa37ae6222e58f1c48ea4570f53ba991886e2f5ce96e22a23a2
|
|
|
|
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
|
|
PKG_LICENSE:=GPL-3.0-or-later
|
|
PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3
|
|
PKG_CPE_ID:=cpe:/a:elfutils_project:elfutils
|
|
|
|
PKG_FIXUP:=autoreconf
|
|
PKG_INSTALL:=1
|
|
PKG_USE_MIPS16:=0
|
|
PKG_BUILD_DEPENDS:=!USE_GLIBC:argp-standalone
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
include $(INCLUDE_DIR)/host-build.mk
|
|
include $(INCLUDE_DIR)/nls.mk
|
|
|
|
define Package/elfutils/Default
|
|
SECTION:=libs
|
|
CATEGORY:=Libraries
|
|
TITLE:=ELF manipulation libraries
|
|
URL:=https://fedorahosted.org/elfutils/
|
|
ABI_VERSION:=1
|
|
endef
|
|
|
|
define Package/libasm
|
|
$(call Package/elfutils/Default)
|
|
TITLE+= (libasm)
|
|
DEPENDS:=+libelf +libdw
|
|
endef
|
|
|
|
define Package/libdw
|
|
$(call Package/elfutils/Default)
|
|
DEPENDS:=+libelf +libbz2
|
|
TITLE+= (libdw)
|
|
endef
|
|
|
|
define Package/libelf
|
|
$(call Package/elfutils/Default)
|
|
DEPENDS:=$(INTL_DEPENDS) +zlib
|
|
TITLE+= (libelf)
|
|
PROVIDES:=libelf1
|
|
endef
|
|
|
|
ifeq ($(CONFIG_BUILD_NLS),y)
|
|
TARGET_LDFLAGS += -lintl
|
|
else
|
|
CONFIGURE_ARGS += --disable-nls
|
|
endif
|
|
|
|
CONFIGURE_ARGS += \
|
|
--program-prefix=eu- \
|
|
--disable-debuginfod \
|
|
--without-lzma
|
|
|
|
TARGET_CFLAGS += -D_GNU_SOURCE -Wno-unused-result -Wno-format-nonliteral
|
|
|
|
define Build/InstallDev
|
|
$(INSTALL_DIR) $(1)/usr/include
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libasm*.{a,so*} $(1)/usr/lib/
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdw*.{a,so*} $(1)/usr/lib/
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf*.{a,so*} $(1)/usr/lib/
|
|
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libelf.pc $(1)/usr/lib/pkgconfig/
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libdw.pc $(1)/usr/lib/pkgconfig/
|
|
endef
|
|
|
|
define Package/libasm/install
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libasm{-*.so,*.so.*} $(1)/usr/lib/
|
|
endef
|
|
|
|
define Package/libdw/install
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdw{-*.so,*.so.*} $(1)/usr/lib/
|
|
endef
|
|
|
|
define Package/libelf/install
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf{-*.so,*.so.*} $(1)/usr/lib/
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,libasm))
|
|
$(eval $(call BuildPackage,libdw))
|
|
$(eval $(call BuildPackage,libelf))
|
|
$(eval $(call HostBuild))
|