micro-uclibc.conf: move OVERRIDES to bottom of file
[openembedded.git] / recipes / binutils / binutils_2.16.91.0.6.bb
blob3461c891ba35e3832b916b00f9b85e15e0c2e593
1 DESCRIPTION = "A GNU collection of binary utilities"
2 HOMEPAGE = "http://www.gnu.org/software/binutils/"
3 SECTION = "devel"
4 LICENSE = "GPL"
5 INC_PR = "r3"
6 PR = "${INC_PR}.1"
8 # glibc 2.3 has issues with this version
9 # of binutils.
10 DEFAULT_PREFERENCE = "-1"
13 inherit autotools gettext
15 PACKAGES = "${PN} ${PN}-dev ${PN}-doc ${PN}-symlinks"
17 FILES_${PN} = " \
18 ${bindir}/${TARGET_PREFIX}* \
19 ${libdir}/lib*-*.so \
20 ${prefix}/${TARGET_SYS}/bin/*"
22 FILES_${PN}-dev = " \
23 ${includedir} \
24 ${libdir}/*.a \
25 ${libdir}/*.la \
26 ${libdir}/libbfd.so \
27 ${libdir}/libopcodes.so"
29 FILES_${PN}-symlinks = " \
30 ${bindir}/addr2line \
31 ${bindir}/ar \
32 ${bindir}/as \
33 ${bindir}/c++filt \
34 ${bindir}/gprof \
35 ${bindir}/ld \
36 ${bindir}/nm \
37 ${bindir}/objcopy \
38 ${bindir}/objdump \
39 ${bindir}/ranlib \
40 ${bindir}/readelf \
41 ${bindir}/size \
42 ${bindir}/strings \
43 ${bindir}/strip"
45 SRC_URI = \
46 "${KERNELORG_MIRROR}/pub/linux/devel/binutils/binutils-${PV}.tar.bz2 \
47 file://binutils-2.16.91.0.6-objcopy-rename-errorcode.patch;patch=1 \
48 file://binutils-uclibc-100-uclibc-conf.patch;patch=1 \
49 file://binutils-uclibc-300-001_ld_makefile_patch.patch;patch=1 \
50 file://binutils-uclibc-300-006_better_file_error.patch;patch=1 \
51 file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
52 file://binutils-uclibc-400-mips-ELF_MAXPAGESIZE-4K.patch;patch=1 \
53 file://binutils-uclibc-702-binutils-skip-comments.patch;patch=1"
55 S = "${WORKDIR}/binutils-${PV}"
56 B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
58 EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
59 --enable-shared"
61 # This is necessary due to a bug in the binutils Makefiles
62 EXTRA_OEMAKE = "configure-build-libiberty all"
64 export AR = "${HOST_PREFIX}ar"
65 export AS = "${HOST_PREFIX}as"
66 export LD = "${HOST_PREFIX}ld"
67 export NM = "${HOST_PREFIX}nm"
68 export RANLIB = "${HOST_PREFIX}ranlib"
69 export OBJCOPY = "${HOST_PREFIX}objcopy"
70 export OBJDUMP = "${HOST_PREFIX}objdump"
72 export AR_FOR_TARGET = "${TARGET_PREFIX}ar"
73 export AS_FOR_TARGET = "${TARGET_PREFIX}as"
74 export LD_FOR_TARGET = "${TARGET_PREFIX}ld"
75 export NM_FOR_TARGET = "${TARGET_PREFIX}nm"
76 export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib"
78 export CC_FOR_HOST = "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
79 export CXX_FOR_HOST = "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
81 export CC_FOR_BUILD = "${BUILD_CC}"
82 export CPP_FOR_BUILD = "${BUILD_CPP}"
83 export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}"
85 export CC = "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
87 do_configure () {
88 (cd ${S}; gnu-configize) || die "Failed to run gnu-configize"
89 oe_runconf
92 do_stage () {
93 oe_libinstall -so -a -C opcodes libopcodes ${STAGING_LIBDIR}/
94 oe_libinstall -a -C libiberty libiberty ${STAGING_LIBDIR}/
95 oe_libinstall -so -a -C bfd libbfd ${STAGING_LIBDIR}/
96 install -m 0644 ${S}/include/dis-asm.h ${STAGING_INCDIR}/
97 install -m 0644 ${S}/include/symcat.h ${STAGING_INCDIR}/
98 install -m 0644 ${S}/include/libiberty.h ${STAGING_INCDIR}/
99 install -m 0644 ${S}/include/ansidecl.h ${STAGING_INCDIR}/
100 install -m 0644 ${S}/include/bfdlink.h ${STAGING_INCDIR}/
101 install -m 0644 bfd/bfd.h ${STAGING_INCDIR}/
104 do_install () {
105 autotools_do_install
107 # We don't really need these, so we'll remove them...
108 rm -rf ${D}${libdir}/ldscripts
110 # Fix the /usr/${TARGET_SYS}/bin/* links
111 for l in ${D}${prefix}/${TARGET_SYS}/bin/*; do
112 rm -f $l
113 ln -sf `echo ${prefix}/${TARGET_SYS}/bin \
114 | tr -s / \
115 | sed -e 's,^/,,' -e 's,[^/]*,..,g'`${bindir}/${TARGET_PREFIX}`basename $l` $l
116 done
118 # Install the libiberty header
119 install -d ${D}${includedir}
120 install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
121 install -m 644 ${S}/include/libiberty.h ${D}${includedir}
123 cd ${D}${bindir}
125 # Symlinks for ease of running these on the native target
126 for p in ${TARGET_SYS}-* ; do
127 ln -sf $p `echo $p | sed -e s,${TARGET_SYS}-,,`
128 done