2 # Copyright (C) 2006-2009 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
21 ifeq ($(PKG_VERSION
),2.19)
22 PKG_MD5SUM
:=17a52219dee5a76c1a9d9b0bfd337d66
24 ifeq ($(PKG_VERSION
),2.19.1)
25 PKG_MD5SUM
:=09a8c5821a2dfdbb20665bc0bd680791
28 PATCH_DIR
:=.
/patches
/$(PKG_VERSION
)
30 REAL_STAGING_DIR_HOST
:=$(STAGING_DIR_HOST
)
31 STAGING_DIR_HOST
:=$(TOOLCHAIN_DIR
)
32 BUILD_DIR_HOST
:=$(BUILD_DIR_TOOLCHAIN
)
34 override CONFIG_AUTOREBUILD
=
36 include $(INCLUDE_DIR
)/host-build.mk
38 BINUTILS_CONFIGURE
:= \
40 --prefix=$(TOOLCHAIN_DIR
)/usr \
41 --build
=$(GNU_HOST_NAME
) \
42 --host
=$(GNU_HOST_NAME
) \
43 --target
=$(REAL_GNU_TARGET_NAME
) \
44 --with-sysroot
=$(TOOLCHAIN_DIR
) \
48 $(SOFT_FLOAT_CONFIG_OPTION
) \
49 $(call qstrip
,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS
)) \
51 ifneq ($(CONFIG_SSP_SUPPORT
),)
52 BINUTILS_CONFIGURE
+= \
55 BINUTILS_CONFIGURE
+= \
59 ifneq ($(CONFIG_EXTRA_TARGET_ARCH
),)
60 BINUTILS_CONFIGURE
+= \
61 --enable-targets
=$(call qstrip
,$(CONFIG_EXTRA_TARGET_ARCH_NAME
))-linux-
$(TARGET_SUFFIX
)
65 $(call Build
/Prepare
/Default
)
66 ln
-snf
$(PKG_NAME
)-$(PKG_VERSION
) $(BUILD_DIR_TOOLCHAIN
)/$(PKG_NAME
)
67 $(CP
) $(SCRIPT_DIR
)/config.
{guess
,sub
} $(PKG_BUILD_DIR
)/
70 define Build
/Configure
71 (cd
$(PKG_BUILD_DIR
); \
72 $(BINUTILS_CONFIGURE
) \
77 $(MAKE
) -C
$(PKG_BUILD_DIR
) all
81 $(MAKE
) -C
$(PKG_BUILD_DIR
) install
82 $(CP
) $(TOOLCHAIN_DIR
)/usr
/bin
/$(REAL_GNU_TARGET_NAME
)-readelf
$(REAL_STAGING_DIR_HOST
)/bin
/readelf
88 $(BUILD_DIR_TOOLCHAIN
)/$(PKG_NAME
)
91 $(eval
$(call HostBuild
))