1 include $(TOPDIR
)/rules.mk
3 #############################################################
5 # build binutils for use on the host system
7 #############################################################
8 BINUTILS_VERSION
:=$(strip $(subst ",, $(BR2_BINUTILS_VERSION)))
11 BINUTILS_SITE
:=http
://www.fr.kernel.org
/pub
/linux
/devel
/binutils \
12 http
://www.fi.kernel.org
/pub
/linux
/devel
/binutils \
13 http
://ftp.kernel.org
/pub
/linux
/devel
/binutils \
14 http
://www.de.kernel.org
/pub
/linux
/devel
/binutils
16 BINUTILS_STABLE_SITE
:=http
://ftp.gnu.org
/gnu
/binutils
/ \
17 ftp
://gatekeeper.dec.com
/pub
/GNU
/ \
18 ftp
://ftp.uu.net
/archive
/systems
/gnu
/ \
19 ftp
://ftp.eu.uu.net
/pub
/gnu
/ \
20 ftp
://ftp.funet.fi
/pub
/gnu
/prep
/ \
21 ftp
://ftp.leo.org
/pub
/comp
/os
/unix
/gnu
/
23 ifeq ($(BINUTILS_VERSION
),2.16.1)
24 BINUTILS_SITE
:=$(BINUTILS_STABLE_SITE
)
26 ifeq ($(BINUTILS_VERSION
),2.16)
27 BINUTILS_SITE
:=$(BINUTILS_STABLE_SITE
)
29 ifeq ($(BINUTILS_VERSION
),2.15)
30 BINUTILS_SITE
:=$(BINUTILS_STABLE_SITE
)
32 ifeq ($(BINUTILS_VERSION
),2.14)
33 BINUTILS_SITE
:=$(BINUTILS_STABLE_SITE
)
35 ifeq ($(BINUTILS_VERSION
),2.13)
36 BINUTILS_SITE
:=$(BINUTILS_STABLE_SITE
)
39 BINUTILS_SOURCE
:=binutils-
$(BINUTILS_VERSION
).
tar.bz2
40 BINUTILS_DIR
:=$(TOOL_BUILD_DIR
)/binutils-
$(BINUTILS_VERSION
)
43 BINUTILS_DIR1
:=$(TOOL_BUILD_DIR
)/binutils-
$(BINUTILS_VERSION
)-build
45 $(DL_DIR
)/$(BINUTILS_SOURCE
):
47 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(BINUTILS_SOURCE
) x
$(BINUTILS_SITE
)
49 $(BINUTILS_DIR
)/.unpacked
: $(DL_DIR
)/$(BINUTILS_SOURCE
)
50 mkdir
-p
$(TOOL_BUILD_DIR
)
51 $(BINUTILS_CAT
) $(DL_DIR
)/$(BINUTILS_SOURCE
) |
tar -C
$(TOOL_BUILD_DIR
) $(TAR_OPTIONS
) -
52 touch
$(BINUTILS_DIR
)/.unpacked
54 $(BINUTILS_DIR
)/.patched
: $(BINUTILS_DIR
)/.unpacked
55 # Apply appropriate binutils patches.
56 $(SCRIPT_DIR
)/patch-kernel.sh
$(BINUTILS_DIR
) .
/all \
*.patch
57 $(SCRIPT_DIR
)/patch-kernel.sh
$(BINUTILS_DIR
) .
/$(BINUTILS_VERSION
) \
*.patch
58 touch
$(BINUTILS_DIR
)/.patched
60 $(BINUTILS_DIR1
)/.configured
: $(BINUTILS_DIR
)/.patched
61 mkdir
-p
$(BINUTILS_DIR1
)
62 (cd
$(BINUTILS_DIR1
); \
63 $(BINUTILS_DIR
)/configure \
64 --prefix=$(STAGING_DIR
) \
65 --build
=$(GNU_HOST_NAME
) \
66 --host
=$(GNU_HOST_NAME
) \
67 --target
=$(REAL_GNU_TARGET_NAME
) \
71 $(SOFT_FLOAT_CONFIG_OPTION
) );
72 touch
$(BINUTILS_DIR1
)/.configured
74 $(BINUTILS_DIR1
)/binutils
/objdump
: $(BINUTILS_DIR1
)/.configured
75 $(MAKE
) -C
$(BINUTILS_DIR1
) all
77 # Make install will put gettext data in staging_dir/share/locale.
78 # Unfortunatey, it isn't configureable.
79 $(STAGING_DIR
)/bin
/$(REAL_GNU_TARGET_NAME
)-ld: $(BINUTILS_DIR1
)/binutils
/objdump
80 $(MAKE
) -C
$(BINUTILS_DIR1
) install
83 #############################################################
85 # build binutils for use on the target system
87 #############################################################
88 BINUTILS_DIR2
:=$(BUILD_DIR
)/binutils-
$(BINUTILS_VERSION
)-target
89 $(BINUTILS_DIR2
)/.configured
: $(BINUTILS_DIR
)/.patched
90 mkdir
-p
$(BINUTILS_DIR2
)
91 (cd
$(BINUTILS_DIR2
); \
93 CFLAGS
="$(TARGET_CFLAGS)" \
94 CFLAGS_FOR_BUILD
="-O2 -g" \
95 $(BINUTILS_DIR
)/configure \
98 --build
=$(GNU_HOST_NAME
) \
99 --host
=$(REAL_GNU_TARGET_NAME
) \
100 --target
=$(REAL_GNU_TARGET_NAME
) \
103 $(SOFT_FLOAT_CONFIG_OPTION
) );
104 touch
$(BINUTILS_DIR2
)/.configured
106 $(BINUTILS_DIR2
)/binutils
/objdump
: $(BINUTILS_DIR2
)/.configured
107 PATH
=$(TARGET_PATH
) \
108 $(MAKE
) -C
$(BINUTILS_DIR2
) all
110 source
: $(DL_DIR
)/$(BINUTILS_SOURCE
)
111 prepare
: $(BINUTILS_DIR
)/.patched
112 compile
: $(BINUTILS_DIR1
)/binutils
/objdump
113 install: $(STAGING_DIR
)/bin
/$(REAL_GNU_TARGET_NAME
)-ld
115 rm -f
$(STAGING_DIR
)/bin
/$(REAL_GNU_TARGET_NAME
)*
116 rm -rf
$(BINUTILS_DIR
) $(BINUTILS_DIR1
)
This page took 0.063009 seconds and 5 git commands to generate.