Initial commit
This commit is contained in:
127
package/devel/binutils/Makefile
Normal file
127
package/devel/binutils/Makefile
Normal file
@@ -0,0 +1,127 @@
|
||||
#
|
||||
# Copyright (C) 2006-2013 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:=binutils
|
||||
PKG_VERSION:=2.27
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=@GNU/binutils
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_VERSION:=$(PKG_VERSION)
|
||||
PKG_HASH:=369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_LIBTOOL_PATHS:=. gas bfd opcodes gprof binutils ld libiberty gold intl
|
||||
PKG_REMOVE_FILES:=libtool.m4
|
||||
PKG_INSTALL:=1
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_LICENSE:=GPL-3.0+
|
||||
PKG_CPE_ID:=cpe:/a:gnu:binutils
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
include $(INCLUDE_DIR)/nls.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libbfd
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=libbfd
|
||||
DEPENDS:=+zlib $(ICONV_DEPENDS) $(INTL_DEPENDS)
|
||||
endef
|
||||
|
||||
define Package/libopcodes
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=libbfd
|
||||
DEPENDS:=+libbfd
|
||||
endef
|
||||
|
||||
define Package/binutils
|
||||
SECTION:=devel
|
||||
CATEGORY:=Development
|
||||
TITLE:=binutils
|
||||
DEPENDS:=+objdump +ar
|
||||
ALTERNATIVES:=200:/usr/bin/strings:/usr/bin/binutils-strings
|
||||
endef
|
||||
|
||||
define Package/objdump
|
||||
SECTION:=devel
|
||||
CATEGORY:=Development
|
||||
TITLE:=objdump
|
||||
DEPENDS:=+libopcodes
|
||||
endef
|
||||
|
||||
define Package/ar
|
||||
SECTION:=devel
|
||||
CATEGORY:=Development
|
||||
TITLE:=ar
|
||||
DEPENDS:=+zlib +libbfd
|
||||
endef
|
||||
|
||||
define Package/binutils/description
|
||||
The Binutils package contains a linker, an assembler, and other tools for handling object files
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += $(FPIC) -Wno-unused-value
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--host=$(REAL_GNU_TARGET_NAME) \
|
||||
--target=$(REAL_GNU_TARGET_NAME) \
|
||||
--enable-shared \
|
||||
--enable-install-libiberty \
|
||||
--enable-install-libbfd
|
||||
|
||||
define Build/Install
|
||||
$(call Build/Install/Default)
|
||||
$(MAKE) -C $(PKG_BUILD_DIR)/libiberty \
|
||||
target_header_dir=libiberty \
|
||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
||||
MULTIOSDIR="" \
|
||||
install
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(CP) $(PKG_INSTALL_DIR)/* $(1)/
|
||||
endef
|
||||
|
||||
define Package/libbfd/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libbfd*.so $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libopcodes/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libopcodes*.so $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/objdump/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/objdump $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
define Package/ar/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/ar $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
define Package/binutils/install
|
||||
$(INSTALL_DIR) $(1)/usr $(1)/bin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/ $(1)/usr/
|
||||
mv $(1)/usr/bin/strings $(1)/usr/bin/binutils-strings
|
||||
rm -f $(1)/usr/bin/objdump
|
||||
rm -f $(1)/usr/bin/ar
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libbfd))
|
||||
$(eval $(call BuildPackage,libopcodes))
|
||||
$(eval $(call BuildPackage,binutils))
|
||||
$(eval $(call BuildPackage,objdump))
|
||||
$(eval $(call BuildPackage,ar))
|
||||
@@ -0,0 +1,65 @@
|
||||
From 183eb37e25d903ccd68cc2d8f8a37e75872c03d2 Mon Sep 17 00:00:00 2001
|
||||
From: Nick Clifton <nickc@redhat.com>
|
||||
Date: Tue, 6 Sep 2016 17:35:35 +0100
|
||||
Subject: [PATCH 1/2] Do not pass host compiler sanitization flags on to linker
|
||||
testsuite.
|
||||
|
||||
* Makefile.am (CFLAGS_FOR_TARGET): Define as a copy of CFLAGS but
|
||||
without any sanitization options.
|
||||
(CXXFLAGS_FOR_TARGET): Define as a copy of CXXFLAGS but without
|
||||
any sanitization options.
|
||||
(check-DEJAGNU): Pass CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET
|
||||
as CFLAGS and CXXFLAGS respectively.
|
||||
---
|
||||
ld/Makefile.am | 8 ++++++--
|
||||
ld/Makefile.in | 8 ++++++--
|
||||
2 files changed, 12 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/ld/Makefile.am
|
||||
+++ b/ld/Makefile.am
|
||||
@@ -136,6 +136,10 @@ CXX_FOR_TARGET = ` \
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
+# Strip out sanitization options as we want to test building binaries without any extra paraphernalia
|
||||
+CFLAGS_FOR_TARGET = `echo $(CFLAGS) | sed -e 's/-fsanitize=address//g' -e 's/-fsanitize=undefined//g'`
|
||||
+CXXFLAGS_FOR_TARGET = `echo $(CXXFLAGS) | sed -e 's/-fsanitize=address//g' -e 's/-fsanitize=undefined//g'`
|
||||
+
|
||||
transform = s/^ld-new$$/$(installed_linker)/;@program_transform_name@
|
||||
bin_PROGRAMS = ld-new
|
||||
info_TEXINFOS = ld.texinfo
|
||||
@@ -2075,8 +2079,8 @@ check-DEJAGNU: site.exp
|
||||
runtest=$(RUNTEST); \
|
||||
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
|
||||
$$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
|
||||
- CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS)" \
|
||||
- CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \
|
||||
+ CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS_FOR_TARGET)" \
|
||||
+ CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
|
||||
CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \
|
||||
OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \
|
||||
LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \
|
||||
--- a/ld/Makefile.in
|
||||
+++ b/ld/Makefile.in
|
||||
@@ -507,6 +507,10 @@ CXX_FOR_TARGET = ` \
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
+
|
||||
+# Strip out sanitization options as they require special host libraries.
|
||||
+CFLAGS_FOR_TARGET = `echo $(CFLAGS) | sed -e 's/-fsanitize=address//g' -e 's/-fsanitize=undefined//g'`
|
||||
+CXXFLAGS_FOR_TARGET = `echo $(CXXFLAGS) | sed -e 's/-fsanitize=address//g' -e 's/-fsanitize=undefined//g'`
|
||||
info_TEXINFOS = ld.texinfo
|
||||
ld_TEXINFOS = configdoc.texi
|
||||
noinst_TEXINFOS = ldint.texinfo
|
||||
@@ -3644,8 +3648,8 @@ check-DEJAGNU: site.exp
|
||||
runtest=$(RUNTEST); \
|
||||
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
|
||||
$$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
|
||||
- CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS)" \
|
||||
- CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \
|
||||
+ CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS_FOR_TARGET)" \
|
||||
+ CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
|
||||
CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \
|
||||
OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \
|
||||
LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user