source: branches/backfire/toolchain/binutils/Makefile @ 32037

Last change on this file since 32037 was 32037, checked in by mirko, 4 years ago

[toolchain/binutils] set PKG_SOURCE_URL to http://mirror2.openwrt.org/sources

The source tarballs of binutils version 2.20.1 / 2.21.1 got repackaged and replaced
by new versions back in 2011. This was due to missing license files* - the change
didn't affect the actual source code.
Since we can't just change the md5sum and replace the tarball (as it might break
previous releases/builds), the "old" tarballs got put on our mirror servers.
As they're the only ones providing "valid" archives, directly point to them
instead of trying the GNU ones before.

*http://sourceware.org/ml/binutils/2011-08/msg00198.html

  • Property svn:eol-style set to native
File size: 2.1 KB
Line 
1#
2# Copyright (C) 2006-2009 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7include $(TOPDIR)/rules.mk
8
9PKG_NAME:=binutils
10PKG_VERSION:=$(call qstrip,$(CONFIG_BINUTILS_VERSION))
11BIN_VERSION:=$(PKG_VERSION)
12
13PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15
16ifeq ($(PKG_VERSION),2.18)
17  PKG_MD5SUM:=9d22ee4dafa3a194457caf4706f9cf01
18endif
19ifeq ($(PKG_VERSION),2.19.1)
20  PKG_MD5SUM:=09a8c5821a2dfdbb20665bc0bd680791
21endif
22ifeq ($(PKG_VERSION),2.20.1)
23  PKG_MD5SUM:=9cdfb9d6ec0578c166d3beae5e15c4e5
24endif
25
26PATCH_DIR:=./patches/$(PKG_VERSION)
27
28REAL_STAGING_DIR_HOST:=$(STAGING_DIR_HOST)
29
30include $(INCLUDE_DIR)/toolchain-build.mk
31
32BINUTILS_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                $(if $(CONFIG_GCC_VERSION_4_4), \
43                  --with-ppl=$(REAL_STAGING_DIR_HOST) \
44                  --with-cloog=$(REAL_STAGING_DIR_HOST) \
45                ) \
46                $(SOFT_FLOAT_CONFIG_OPTION) \
47                $(call qstrip,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS)) \
48
49ifneq ($(CONFIG_SSP_SUPPORT),)
50  BINUTILS_CONFIGURE+= \
51                --enable-libssp
52else
53  BINUTILS_CONFIGURE+= \
54                --disable-libssp
55endif
56
57ifneq ($(CONFIG_EXTRA_TARGET_ARCH),)
58  BINUTILS_CONFIGURE+= \
59                --enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-$(TARGET_SUFFIX)
60endif
61
62define Host/Prepare
63        $(call Host/Prepare/Default)
64        ln -snf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
65        $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(HOST_BUILD_DIR)/
66endef
67
68define Host/Configure
69        (cd $(HOST_BUILD_DIR); \
70                $(BINUTILS_CONFIGURE) \
71        );
72endef
73
74define Host/Compile
75        $(MAKE) -C $(HOST_BUILD_DIR) all
76endef
77
78define Host/Install
79        $(MAKE) -C $(HOST_BUILD_DIR) install
80        $(CP) $(TOOLCHAIN_DIR)/bin/$(REAL_GNU_TARGET_NAME)-readelf $(REAL_STAGING_DIR_HOST)/bin/readelf
81endef
82
83define Host/Clean
84        rm -rf \
85                $(HOST_BUILD_DIR) \
86                $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
87endef
88
89$(eval $(call HostBuild))
Note: See TracBrowser for help on using the repository browser.