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
)
32 include $(INCLUDE_DIR
)/toolchain-build.mk
34 BINUTILS_CONFIGURE
:= \
36 --prefix=$(TOOLCHAIN_DIR
)/usr \
37 --build
=$(GNU_HOST_NAME
) \
38 --host
=$(GNU_HOST_NAME
) \
39 --target
=$(REAL_GNU_TARGET_NAME
) \
40 --with-sysroot
=$(TOOLCHAIN_DIR
) \
44 $(SOFT_FLOAT_CONFIG_OPTION
) \
45 $(call qstrip
,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS
)) \
47 ifneq ($(CONFIG_SSP_SUPPORT
),)
48 BINUTILS_CONFIGURE
+= \
51 BINUTILS_CONFIGURE
+= \
55 ifneq ($(CONFIG_EXTRA_TARGET_ARCH
),)
56 BINUTILS_CONFIGURE
+= \
57 --enable-targets
=$(call qstrip
,$(CONFIG_EXTRA_TARGET_ARCH_NAME
))-linux-
$(TARGET_SUFFIX
)
61 $(call Host
/Prepare
/Default
)
62 ln
-snf
$(PKG_NAME
)-$(PKG_VERSION
) $(BUILD_DIR_TOOLCHAIN
)/$(PKG_NAME
)
63 $(CP
) $(SCRIPT_DIR
)/config.
{guess
,sub
} $(HOST_BUILD_DIR
)/
67 (cd
$(HOST_BUILD_DIR
); \
68 $(BINUTILS_CONFIGURE
) \
73 $(MAKE
) -C
$(HOST_BUILD_DIR
) all
77 $(MAKE
) -C
$(HOST_BUILD_DIR
) install
78 $(CP
) $(TOOLCHAIN_DIR
)/usr
/bin
/$(REAL_GNU_TARGET_NAME
)-readelf
$(REAL_STAGING_DIR_HOST
)/bin
/readelf
84 $(BUILD_DIR_TOOLCHAIN
)/$(PKG_NAME
)
87 $(eval
$(call HostBuild
))