2006-06-27 02:44:04 +02:00
|
|
|
#
|
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
2005-03-06 04:34:52 +01:00
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
2006-06-21 08:19:43 +02:00
|
|
|
PKG_NAME:=binutils
|
2008-07-15 01:24:58 +02:00
|
|
|
PKG_VERSION:=$(call qstrip,$(CONFIG_BINUTILS_VERSION))
|
2005-03-06 04:34:52 +01:00
|
|
|
|
2006-06-28 19:52:04 +02:00
|
|
|
PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/binutils/ \
|
2005-07-20 16:58:27 +02:00
|
|
|
ftp://gatekeeper.dec.com/pub/GNU/ \
|
|
|
|
ftp://ftp.uu.net/archive/systems/gnu/ \
|
|
|
|
ftp://ftp.eu.uu.net/pub/gnu/ \
|
|
|
|
ftp://ftp.funet.fi/pub/gnu/prep/ \
|
|
|
|
ftp://ftp.leo.org/pub/comp/os/unix/gnu/
|
2005-08-15 20:26:17 +02:00
|
|
|
|
2006-06-21 08:19:43 +02:00
|
|
|
PKG_SOURCE:=binutils-$(PKG_VERSION).tar.bz2
|
2007-06-28 09:20:42 +02:00
|
|
|
PATCH_DIR:=./patches/$(PKG_VERSION)
|
2007-08-07 02:04:25 +02:00
|
|
|
STAGING_DIR_HOST:=$(TOOLCHAIN_DIR)
|
|
|
|
BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
|
2008-09-02 12:57:35 +02:00
|
|
|
override CONFIG_AUTOREBUILD=
|
2005-07-20 16:58:27 +02:00
|
|
|
|
2006-06-21 08:19:43 +02:00
|
|
|
include $(INCLUDE_DIR)/host-build.mk
|
2005-07-20 16:58:27 +02:00
|
|
|
|
2008-04-13 01:14:42 +02:00
|
|
|
EXTRA_TARGET=$(if $(CONFIG_EXTRA_TARGET_ARCH),--enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-uclibc)
|
|
|
|
|
2006-06-21 08:19:43 +02:00
|
|
|
define Build/Configure
|
2007-12-28 19:13:08 +01:00
|
|
|
$(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/
|
2006-06-21 08:19:43 +02:00
|
|
|
(cd $(PKG_BUILD_DIR); \
|
|
|
|
./configure \
|
2007-08-07 02:04:25 +02:00
|
|
|
--prefix=$(STAGING_DIR_HOST) \
|
2005-07-20 16:58:27 +02:00
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--host=$(GNU_HOST_NAME) \
|
|
|
|
--target=$(REAL_GNU_TARGET_NAME) \
|
|
|
|
--disable-werror \
|
2006-06-21 08:19:43 +02:00
|
|
|
--disable-nls \
|
2008-04-13 01:14:42 +02:00
|
|
|
$(EXTRA_TARGET) \
|
2007-12-28 19:06:47 +01:00
|
|
|
$(SOFT_FLOAT_CONFIG_OPTION) \
|
2007-10-23 08:23:20 +02:00
|
|
|
$(call qstrip,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS)) \
|
2006-06-21 08:19:43 +02:00
|
|
|
);
|
|
|
|
endef
|
2005-07-20 16:58:27 +02:00
|
|
|
|
2006-06-21 08:19:43 +02:00
|
|
|
define Build/Compile
|
2007-08-07 02:04:25 +02:00
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) all
|
2006-06-21 08:19:43 +02:00
|
|
|
endef
|
2005-07-20 16:58:27 +02:00
|
|
|
|
2006-06-21 08:19:43 +02:00
|
|
|
define Build/Install
|
2007-08-07 02:04:25 +02:00
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) install
|
2006-06-21 08:19:43 +02:00
|
|
|
endef
|
2005-07-20 16:58:27 +02:00
|
|
|
|
2006-06-21 08:19:43 +02:00
|
|
|
$(eval $(call HostBuild))
|