2 # Copyright (C) 2006-2012 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
))
11 BIN_VERSION
:=$(PKG_VERSION
)
13 PKG_SOURCE_URL
:=@GNU
/binutils
/
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
16 ifeq ($(PKG_VERSION
),2.19.1)
17 PKG_MD5SUM
:=09a8c5821a2dfdbb20665bc0bd680791
19 ifeq ($(PKG_VERSION
),2.20.1)
20 PKG_MD5SUM
:=9cdfb9d6ec0578c166d3beae5e15c4e5
22 ifeq ($(PKG_VERSION
),2.21)
23 PKG_MD5SUM
:=c84c5acc9d266f1a7044b51c85a823f5
25 ifeq ($(PKG_VERSION
),2.21.1)
26 PKG_MD5SUM
:=bde820eac53fa3a8d8696667418557ad
28 ifeq ($(PKG_VERSION
),2.22)
29 PKG_MD5SUM
:=ee0f10756c84979622b992a4a61ea3f5
32 PATCH_DIR
:=.
/patches
/$(PKG_VERSION
)
34 REAL_STAGING_DIR_HOST
:=$(STAGING_DIR_HOST
)
36 include $(INCLUDE_DIR
)/toolchain-build.mk
38 BINUTILS_CONFIGURE
:= \
40 --prefix=$(TOOLCHAIN_DIR
) \
41 --build
=$(GNU_HOST_NAME
) \
42 --host
=$(GNU_HOST_NAME
) \
43 --target
=$(REAL_GNU_TARGET_NAME
) \
44 --with-sysroot
=$(TOOLCHAIN_DIR
) \
48 $(GRAPHITE_CONFIGURE
) \
49 $(SOFT_FLOAT_CONFIG_OPTION
) \
50 $(call qstrip
,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS
))
52 ifneq ($(CONFIG_SSP_SUPPORT
),)
53 BINUTILS_CONFIGURE
+= \
56 BINUTILS_CONFIGURE
+= \
60 ifneq ($(CONFIG_EXTRA_TARGET_ARCH
),)
61 BINUTILS_CONFIGURE
+= \
62 --enable-targets
=$(call qstrip
,$(CONFIG_EXTRA_TARGET_ARCH_NAME
))-linux-
$(TARGET_SUFFIX
)
66 $(call Host
/Prepare
/Default
)
67 ln
-snf
$(PKG_NAME
)-$(PKG_VERSION
) $(BUILD_DIR_TOOLCHAIN
)/$(PKG_NAME
)
68 $(CP
) $(SCRIPT_DIR
)/config.
{guess
,sub
} $(HOST_BUILD_DIR
)/
72 (cd
$(HOST_BUILD_DIR
); \
73 $(BINUTILS_CONFIGURE
) \
78 $(MAKE
) $(TOOLCHAIN_JOBS
) -C
$(HOST_BUILD_DIR
) all
82 $(MAKE
) -C
$(HOST_BUILD_DIR
) install
83 $(CP
) $(TOOLCHAIN_DIR
)/bin
/$(REAL_GNU_TARGET_NAME
)-readelf
$(REAL_STAGING_DIR_HOST
)/bin
/readelf
89 $(BUILD_DIR_TOOLCHAIN
)/$(PKG_NAME
)
92 $(eval
$(call HostBuild
))