2 # Copyright (C) 2006-2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
10 PKG_VERSION
:=$(call qstrip
,$(CONFIG_BINUTILS_VERSION
))
12 PKG_SOURCE_URL
:=@GNU
/binutils
/
13 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 ifeq ($(PKG_VERSION
),2.17)
16 PKG_MD5SUM
:=e26e2e06b6e4bf3acf1dc8688a94c0d1
18 ifeq ($(PKG_VERSION
),2.18)
19 PKG_MD5SUM
:=9d22ee4dafa3a194457caf4706f9cf01
22 PATCH_DIR
:=.
/patches
/$(PKG_VERSION
)
24 STAGING_DIR_HOST
:=$(TOOLCHAIN_DIR
)
25 BUILD_DIR_HOST
:=$(BUILD_DIR_TOOLCHAIN
)
26 override CONFIG_AUTOREBUILD
=
28 include $(INCLUDE_DIR
)/host-build.mk
30 EXTRA_TARGET
=$(if
$(CONFIG_EXTRA_TARGET_ARCH
),--enable-targets
=$(call qstrip
,$(CONFIG_EXTRA_TARGET_ARCH_NAME
))-linux-uclibc
)
32 define Build
/Configure
33 $(CP
) $(SCRIPT_DIR
)/config.
{guess
,sub
} $(PKG_BUILD_DIR
)/
34 (cd
$(PKG_BUILD_DIR
); \
36 --prefix=$(STAGING_DIR_HOST
) \
37 --build
=$(GNU_HOST_NAME
) \
38 --host
=$(GNU_HOST_NAME
) \
39 --target
=$(REAL_GNU_TARGET_NAME
) \
43 $(SOFT_FLOAT_CONFIG_OPTION
) \
44 $(call qstrip
,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS
)) \
49 $(MAKE
) -C
$(PKG_BUILD_DIR
) all
53 $(MAKE
) -C
$(PKG_BUILD_DIR
) install
56 $(eval
$(call HostBuild
))