base-files: link libpthread against libc
[openwrt.git] / toolchain / binutils / Makefile
1 #
2 # Copyright (C) 2006-2011 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=binutils
10 PKG_VERSION:=$(call qstrip,$(CONFIG_BINUTILS_VERSION))
11 BIN_VERSION:=$(PKG_VERSION)
12
13 PKG_SOURCE_URL:=@GNU/binutils/
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15
16 ifeq ($(PKG_VERSION),2.19.1)
17 PKG_MD5SUM:=09a8c5821a2dfdbb20665bc0bd680791
18 endif
19 ifeq ($(PKG_VERSION),2.20.1)
20 PKG_MD5SUM:=9cdfb9d6ec0578c166d3beae5e15c4e5
21 endif
22 ifeq ($(PKG_VERSION),2.21)
23 PKG_MD5SUM:=c84c5acc9d266f1a7044b51c85a823f5
24 endif
25
26 PATCH_DIR:=./patches/$(PKG_VERSION)
27
28 REAL_STAGING_DIR_HOST:=$(STAGING_DIR_HOST)
29
30 include $(INCLUDE_DIR)/toolchain-build.mk
31
32 BINUTILS_CONFIGURE:= \
33 ./configure \
34 --prefix=$(TOOLCHAIN_DIR) \
35 --build=$(GNU_HOST_NAME) \
36 --host=$(GNU_HOST_NAME) \
37 --target=$(REAL_GNU_TARGET_NAME) \
38 --with-sysroot=$(TOOLCHAIN_DIR) \
39 --disable-multilib \
40 --disable-werror \
41 --disable-nls \
42 $(GRAPHITE_CONFIGURE) \
43 $(SOFT_FLOAT_CONFIG_OPTION) \
44 $(call qstrip,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS))
45
46 ifneq ($(CONFIG_SSP_SUPPORT),)
47 BINUTILS_CONFIGURE+= \
48 --enable-libssp
49 else
50 BINUTILS_CONFIGURE+= \
51 --disable-libssp
52 endif
53
54 ifneq ($(CONFIG_EXTRA_TARGET_ARCH),)
55 BINUTILS_CONFIGURE+= \
56 --enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-$(TARGET_SUFFIX)
57 endif
58
59 define Host/Prepare
60 $(call Host/Prepare/Default)
61 ln -snf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
62 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(HOST_BUILD_DIR)/
63 endef
64
65 define Host/Configure
66 (cd $(HOST_BUILD_DIR); \
67 $(BINUTILS_CONFIGURE) \
68 );
69 endef
70
71 define Host/Compile
72 $(MAKE) $(TOOLCHAIN_JOBS) -C $(HOST_BUILD_DIR) all
73 endef
74
75 define Host/Install
76 $(MAKE) -C $(HOST_BUILD_DIR) install
77 $(CP) $(TOOLCHAIN_DIR)/bin/$(REAL_GNU_TARGET_NAME)-readelf $(REAL_STAGING_DIR_HOST)/bin/readelf
78 endef
79
80 define Host/Clean
81 rm -rf \
82 $(HOST_BUILD_DIR) \
83 $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
84 endef
85
86 $(eval $(call HostBuild))
This page took 0.078652 seconds and 5 git commands to generate.