OpenWrt – Diff between revs 2 and 3
?pathlinks?
Rev 2 | Rev 3 | |||
---|---|---|---|---|
1 | # |
1 | # |
|
2 | # Copyright (C) 2006-2013 OpenWrt.org |
2 | # Copyright (C) 2006-2013 OpenWrt.org |
|
3 | # |
3 | # |
|
4 | # This is free software, licensed under the GNU General Public License v2. |
4 | # This is free software, licensed under the GNU General Public License v2. |
|
5 | # See /LICENSE for more information. |
5 | # See /LICENSE for more information. |
|
6 | # |
6 | # |
|
7 | include $(TOPDIR)/rules.mk |
7 | include $(TOPDIR)/rules.mk |
|
8 | |
8 | |
|
9 | PKG_NAME:=binutils |
9 | PKG_NAME:=binutils |
|
10 | PKG_VERSION:=$(call qstrip,$(CONFIG_BINUTILS_VERSION)) |
10 | PKG_VERSION:=$(call qstrip,$(CONFIG_BINUTILS_VERSION)) |
|
11 | BIN_VERSION:=$(PKG_VERSION) |
11 | BIN_VERSION:=$(PKG_VERSION) |
|
12 | |
12 | |
|
13 | PKG_SOURCE_URL:=@GNU/binutils/ |
13 | PKG_SOURCE_URL:=@GNU/binutils/ |
|
14 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz |
14 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz |
|
15 | |
15 | |
|
16 | TAR_OPTIONS += --exclude='*.rej' |
16 | TAR_OPTIONS += --exclude='*.rej' |
|
17 | |
17 | |
|
- | 18 | ifeq ($(PKG_VERSION),2.27) |
||
18 | ifeq ($(PKG_VERSION),2.29.1) |
19 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 |
|
19 | PKG_HASH:=e7010a46969f9d3e53b650a518663f98a5dde3c3ae21b7d71e5e6803bc36b577 |
20 | PKG_HASH:=369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88 |
|
20 | endif |
21 | endif |
|
21 | |
22 | |
|
22 | ifeq ($(PKG_VERSION),2.31.1) |
23 | ifeq ($(PKG_VERSION),2.29.1) |
|
23 | PKG_HASH:=5d20086ecf5752cc7d9134246e9588fa201740d540f7eb84d795b1f7a93bca86 |
24 | PKG_HASH:=e7010a46969f9d3e53b650a518663f98a5dde3c3ae21b7d71e5e6803bc36b577 |
|
24 | endif |
25 | endif |
|
25 | |
26 | |
|
26 | ifeq ($(PKG_VERSION),2.32) |
27 | ifeq ($(PKG_VERSION),2.30) |
|
27 | PKG_HASH:=0ab6c55dd86a92ed561972ba15b9b70a8b9f75557f896446c82e8b36e473ee04 |
28 | PKG_HASH:=6e46b8aeae2f727a36f0bd9505e405768a72218f1796f0d09757d45209871ae6 |
|
28 | endif |
29 | endif |
|
29 | |
30 | |
|
30 | ifneq ($(CONFIG_BINUTILS_VERSION_2_29_ARC),) |
31 | ifneq ($(CONFIG_BINUTILS_VERSION_2_29_ARC),) |
|
31 | PKG_REV:=arc-2017.09-release |
32 | PKG_REV:=arc-2017.09-release |
|
32 | PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/$(PKG_REV)/ |
33 | PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/$(PKG_REV)/ |
|
33 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_REV).tar.gz |
34 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_REV).tar.gz |
|
34 | PKG_HASH:=2ea086fd5521e942926dd6ff6922ce31c29ee7ffc754fca3d06385e0f27600f8 |
35 | PKG_HASH:=2ea086fd5521e942926dd6ff6922ce31c29ee7ffc754fca3d06385e0f27600f8 |
|
35 | BINUTILS_DIR:=$(PKG_NAME)-gdb-$(PKG_REV) |
36 | BINUTILS_DIR:=$(PKG_NAME)-gdb-$(PKG_REV) |
|
36 | HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(BINUTILS_DIR) |
37 | HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(BINUTILS_DIR) |
|
37 | endif |
38 | endif |
|
38 | |
39 | |
|
39 | HOST_BUILD_PARALLEL:=1 |
40 | HOST_BUILD_PARALLEL:=1 |
|
40 | |
41 | |
|
41 | PATCH_DIR:=./patches/$(PKG_VERSION) |
42 | PATCH_DIR:=./patches/$(PKG_VERSION) |
|
42 | |
43 | |
|
43 | include $(INCLUDE_DIR)/toolchain-build.mk |
44 | include $(INCLUDE_DIR)/toolchain-build.mk |
|
44 | |
45 | |
|
45 | BINUTILS_CONFIGURE:= \ |
46 | BINUTILS_CONFIGURE:= \ |
|
46 | ./configure \ |
47 | ./configure \ |
|
47 | --prefix=$(TOOLCHAIN_DIR) \ |
48 | --prefix=$(TOOLCHAIN_DIR) \ |
|
48 | --build=$(GNU_HOST_NAME) \ |
49 | --build=$(GNU_HOST_NAME) \ |
|
49 | --host=$(GNU_HOST_NAME) \ |
50 | --host=$(GNU_HOST_NAME) \ |
|
50 | --target=$(REAL_GNU_TARGET_NAME) \ |
51 | --target=$(REAL_GNU_TARGET_NAME) \ |
|
51 | --with-sysroot=$(TOOLCHAIN_DIR) \ |
52 | --with-sysroot=$(TOOLCHAIN_DIR) \ |
|
52 | --enable-deterministic-archives \ |
53 | --enable-deterministic-archives \ |
|
53 | --enable-plugins \ |
54 | --enable-plugins \ |
|
54 | --disable-multilib \ |
55 | --disable-multilib \ |
|
55 | --disable-werror \ |
56 | --disable-werror \ |
|
56 | --disable-nls \ |
57 | --disable-nls \ |
|
57 | --disable-sim \ |
58 | --disable-sim \ |
|
58 | --disable-gdb \ |
59 | --disable-gdb \ |
|
59 | $(GRAPHITE_CONFIGURE) \ |
60 | $(GRAPHITE_CONFIGURE) \ |
|
60 | $(SOFT_FLOAT_CONFIG_OPTION) \ |
61 | $(SOFT_FLOAT_CONFIG_OPTION) \ |
|
61 | $(call qstrip,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS)) |
62 | $(call qstrip,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS)) |
|
62 | |
63 | |
|
63 | ifneq ($(CONFIG_SSP_SUPPORT),) |
64 | ifneq ($(CONFIG_SSP_SUPPORT),) |
|
64 | BINUTILS_CONFIGURE+= \ |
65 | BINUTILS_CONFIGURE+= \ |
|
65 | --enable-libssp |
66 | --enable-libssp |
|
66 | else |
67 | else |
|
67 | BINUTILS_CONFIGURE+= \ |
68 | BINUTILS_CONFIGURE+= \ |
|
68 | --disable-libssp |
69 | --disable-libssp |
|
69 | endif |
70 | endif |
|
70 | |
71 | |
|
71 | ifneq ($(CONFIG_EXTRA_TARGET_ARCH),) |
72 | ifneq ($(CONFIG_EXTRA_TARGET_ARCH),) |
|
72 | BINUTILS_CONFIGURE+= \ |
73 | BINUTILS_CONFIGURE+= \ |
|
73 | --enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-$(TARGET_SUFFIX) |
74 | --enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-$(TARGET_SUFFIX) |
|
74 | endif |
75 | endif |
|
75 | |
76 | |
|
76 | define Host/Prepare |
77 | define Host/Prepare |
|
77 | $(call Host/Prepare/Default) |
78 | $(call Host/Prepare/Default) |
|
78 | ln -snf $(notdir $(HOST_BUILD_DIR)) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) |
79 | ln -snf $(notdir $(HOST_BUILD_DIR)) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) |
|
79 | $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(HOST_BUILD_DIR)/ |
80 | $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(HOST_BUILD_DIR)/ |
|
80 | $(SED) 's, " Linaro.*,,' $(HOST_BUILD_DIR)/bfd/version.h |
81 | $(SED) 's, " Linaro.*,,' $(HOST_BUILD_DIR)/bfd/version.h |
|
81 | endef |
82 | endef |
|
82 | |
83 | |
|
83 | define Host/Configure |
84 | define Host/Configure |
|
84 | (cd $(HOST_BUILD_DIR); \ |
85 | (cd $(HOST_BUILD_DIR); \ |
|
85 | $(BINUTILS_CONFIGURE) \ |
86 | $(BINUTILS_CONFIGURE) \ |
|
86 | ); |
87 | ); |
|
87 | endef |
88 | endef |
|
88 | |
89 | |
|
89 | define Host/Compile |
90 | define Host/Compile |
|
90 | +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) all |
91 | +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) all |
|
91 | endef |
92 | endef |
|
92 | |
93 | |
|
93 | define Host/Install |
94 | define Host/Install |
|
94 | mkdir -p $(TOOLCHAIN_DIR)/initial |
95 | mkdir -p $(TOOLCHAIN_DIR)/initial |
|
95 | $(MAKE) -C $(HOST_BUILD_DIR) \ |
96 | $(MAKE) -C $(HOST_BUILD_DIR) \ |
|
96 | prefix=$(TOOLCHAIN_DIR)/initial \ |
97 | prefix=$(TOOLCHAIN_DIR)/initial \ |
|
97 | install |
98 | install |
|
98 | $(MAKE) -C $(HOST_BUILD_DIR) \ |
99 | $(MAKE) -C $(HOST_BUILD_DIR) \ |
|
99 | prefix=$(TOOLCHAIN_DIR) \ |
100 | prefix=$(TOOLCHAIN_DIR) \ |
|
100 | install |
101 | install |
|
101 | $(call FixupLibdir,$(TOOLCHAIN_DIR)/initial) |
102 | $(call FixupLibdir,$(TOOLCHAIN_DIR)/initial) |
|
102 | $(RM) $(TOOLCHAIN_DIR)/initial/lib/libiberty.a |
103 | $(RM) $(TOOLCHAIN_DIR)/initial/lib/libiberty.a |
|
103 | $(CP) $(TOOLCHAIN_DIR)/bin/$(REAL_GNU_TARGET_NAME)-readelf $(HOST_BUILD_PREFIX)/bin/readelf |
104 | $(CP) $(TOOLCHAIN_DIR)/bin/$(REAL_GNU_TARGET_NAME)-readelf $(HOST_BUILD_PREFIX)/bin/readelf |
|
104 | # ARC gcc requires extlib. |
105 | # ARC gcc requires extlib. |
|
105 | # If extlib is not available in "initial" folder |
106 | # If extlib is not available in "initial" folder |
|
106 | # initial gcc will fail to build libc. |
107 | # initial gcc will fail to build libc. |
|
107 | if [ -d $(TOOLCHAIN_DIR)/extlib ]; then \ |
108 | if [ -d $(TOOLCHAIN_DIR)/extlib ]; then \ |
|
108 | $(CP) -r $(TOOLCHAIN_DIR)/extlib $(TOOLCHAIN_DIR)/initial/; \ |
109 | $(CP) -r $(TOOLCHAIN_DIR)/extlib $(TOOLCHAIN_DIR)/initial/; \ |
|
109 | fi |
110 | fi |
|
110 | endef |
111 | endef |
|
111 | |
112 | |
|
112 | define Host/Clean |
113 | define Host/Clean |
|
113 | rm -rf \ |
114 | rm -rf \ |
|
114 | $(HOST_BUILD_DIR) \ |
115 | $(HOST_BUILD_DIR) \ |
|
115 | $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) |
116 | $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) |
|
116 | endef |
117 | endef |
|
117 | |
118 | |
|
118 | $(eval $(call HostBuild)) |
119 | $(eval $(call HostBuild)) |
|
119 | |
120 | |