summaryrefslogtreecommitdiffstats
path: root/meta/packages/binutils/binutils_2.17.50.0.5.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/binutils/binutils_2.17.50.0.5.bb')
-rw-r--r--meta/packages/binutils/binutils_2.17.50.0.5.bb130
1 files changed, 130 insertions, 0 deletions
diff --git a/meta/packages/binutils/binutils_2.17.50.0.5.bb b/meta/packages/binutils/binutils_2.17.50.0.5.bb
new file mode 100644
index 0000000000..87a333b035
--- /dev/null
+++ b/meta/packages/binutils/binutils_2.17.50.0.5.bb
@@ -0,0 +1,130 @@
1DESCRIPTION = "A GNU collection of binary utilities"
2HOMEPAGE = "http://www.gnu.org/software/binutils/"
3SECTION = "devel"
4LICENSE = "GPL"
5
6inherit autotools gettext
7
8PACKAGES += "${PN}-symlinks"
9
10FILES_${PN} = " \
11 ${bindir}/${TARGET_PREFIX}* \
12 ${libdir}/lib*-*.so \
13 ${prefix}/${TARGET_SYS}/bin/*"
14
15FILES_${PN}-dev = " \
16 ${includedir} \
17 ${libdir}/*.a \
18 ${libdir}/*.la \
19 ${libdir}/libbfd.so \
20 ${libdir}/libopcodes.so"
21
22FILES_${PN}-symlinks = " \
23 ${bindir}/addr2line \
24 ${bindir}/ar \
25 ${bindir}/as \
26 ${bindir}/c++filt \
27 ${bindir}/gprof \
28 ${bindir}/ld \
29 ${bindir}/nm \
30 ${bindir}/objcopy \
31 ${bindir}/objdump \
32 ${bindir}/ranlib \
33 ${bindir}/readelf \
34 ${bindir}/size \
35 ${bindir}/strings \
36 ${bindir}/strip"
37
38SRC_URI = \
39 "${KERNELORG_MIRROR}/pub/linux/devel/binutils/binutils-${PV}.tar.bz2 \
40 file://binutils-2.16.91.0.6-objcopy-rename-errorcode.patch;patch=1 \
41 file://binutils-uclibc-100-uclibc-conf.patch;patch=1 \
42 file://110-arm-eabi-conf.patch;patch=1 \
43 file://binutils-uclibc-300-001_ld_makefile_patch.patch;patch=1 \
44 file://binutils-uclibc-300-006_better_file_error.patch;patch=1 \
45 file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
46 "
47
48S = "${WORKDIR}/binutils-${PV}"
49B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
50
51EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
52 --enable-shared"
53
54# This is necessary due to a bug in the binutils Makefiles
55EXTRA_OEMAKE = "configure-build-libiberty all"
56
57export AR = "${HOST_PREFIX}ar"
58export AS = "${HOST_PREFIX}as"
59export LD = "${HOST_PREFIX}ld"
60export NM = "${HOST_PREFIX}nm"
61export RANLIB = "${HOST_PREFIX}ranlib"
62export OBJCOPY = "${HOST_PREFIX}objcopy"
63export OBJDUMP = "${HOST_PREFIX}objdump"
64
65export AR_FOR_TARGET = "${TARGET_PREFIX}ar"
66export AS_FOR_TARGET = "${TARGET_PREFIX}as"
67export LD_FOR_TARGET = "${TARGET_PREFIX}ld"
68export NM_FOR_TARGET = "${TARGET_PREFIX}nm"
69export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib"
70
71export CC_FOR_HOST = "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
72export CXX_FOR_HOST = "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
73
74export CC_FOR_BUILD = "${BUILD_CC}"
75export CPP_FOR_BUILD = "${BUILD_CPP}"
76export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}"
77
78export CC = "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
79
80do_configure () {
81 (cd ${S}; gnu-configize) || die "Failed to run gnu-configize"
82 oe_runconf
83#
84# must prime config.cache to ensure the build of libiberty
85#
86 mkdir -p ${B}/build-${BUILD_SYS}
87 for i in ${CONFIG_SITE}; do
88 cat $i >> ${B}/build-${BUILD_SYS}/config.cache
89 done
90
91}
92
93do_stage () {
94 oe_libinstall -so -a -C opcodes libopcodes ${STAGING_LIBDIR}/
95 oe_libinstall -a -C libiberty libiberty ${STAGING_LIBDIR}/
96 oe_libinstall -so -a -C bfd libbfd ${STAGING_LIBDIR}/
97 install -m 0644 ${S}/include/dis-asm.h ${STAGING_INCDIR}/
98 install -m 0644 ${S}/include/symcat.h ${STAGING_INCDIR}/
99 install -m 0644 ${S}/include/libiberty.h ${STAGING_INCDIR}/
100 install -m 0644 ${S}/include/ansidecl.h ${STAGING_INCDIR}/
101 install -m 0644 ${S}/include/bfdlink.h ${STAGING_INCDIR}/
102 install -m 0644 bfd/bfd.h ${STAGING_INCDIR}/
103}
104
105do_install () {
106 autotools_do_install
107
108 # We don't really need these, so we'll remove them...
109 rm -rf ${D}${libdir}/ldscripts
110
111 # Fix the /usr/${TARGET_SYS}/bin/* links
112 for l in ${D}${prefix}/${TARGET_SYS}/bin/*; do
113 rm -f $l
114 ln -sf `echo ${prefix}/${TARGET_SYS}/bin \
115 | tr -s / \
116 | sed -e 's,^/,,' -e 's,[^/]*,..,g'`${bindir}/${TARGET_PREFIX}`basename $l` $l
117 done
118
119 # Install the libiberty header
120 install -d ${D}${includedir}
121 install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
122 install -m 644 ${S}/include/libiberty.h ${D}${includedir}
123
124 cd ${D}${bindir}
125
126 # Symlinks for ease of running these on the native target
127 for p in ${TARGET_SYS}-* ; do
128 ln -sf $p `echo $p | sed -e s,${TARGET_SYS}-,,`
129 done
130}