help2man: fix drag in of target perl for the native package
[openembedded.git] / recipes / binutils / binutils_2.14.90.0.6.bb
blobce095933d815e21873a2aacc7404483ce7d75607
1 SECTION = "devel"
2 LICENSE = "GPL"
3 inherit autotools gettext
5 INC_PR = "r5"
6 PR = "${INC_PR}.1"
8 DESCRIPTION = "A GNU collection of binary utilities"
9 HOMEPAGE = "http://www.gnu.org/software/binutils/"
10 LICENSE = "GPL"
12 PACKAGES = "${PN} ${PN}-dev ${PN}-doc ${PN}-symlinks"
14 FILES_${PN} = " \
15 ${bindir}/${TARGET_PREFIX}* \
16 ${libdir}/lib*-*.so \
17 ${prefix}/${TARGET_SYS}/bin/*"
19 FILES_${PN}-dev = " \
20 ${includedir} \
21 ${libdir}/*.a \
22 ${libdir}/*.la \
23 ${libdir}/libbfd.so \
24 ${libdir}/libopcodes.so"
26 FILES_${PN}-symlinks = " \
27 ${bindir}/addr2line \
28 ${bindir}/ar \
29 ${bindir}/as \
30 ${bindir}/c++filt \
31 ${bindir}/gprof \
32 ${bindir}/ld \
33 ${bindir}/nm \
34 ${bindir}/objcopy \
35 ${bindir}/objdump \
36 ${bindir}/ranlib \
37 ${bindir}/readelf \
38 ${bindir}/size \
39 ${bindir}/strings \
40 ${bindir}/strip"
42 SRC_URI = \
43 "${KERNELORG_MIRROR}/pub/linux/devel/binutils/binutils-${PV}.tar.bz2 \
44 file://ld_makefile.patch \
45 file://better_file_error.patch \
46 file://signed_char_fix.patch \
47 file://binutils-uclibc-001-debian.patch \
48 file://binutils-uclibc-100-conf.patch \
49 file://binutils-uclibc-200-build_modules.patch \
50 file://binutils-uclibc-210-cflags.patch \
51 file://binutils-100_cflags_for_build.patch \
52 file://plt32trunc.patch"
54 S = "${WORKDIR}/binutils-${PV}"
55 B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
57 EXTRA_OECONF = "--with-sysroot=/ \
58 --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"
79 export CXX_FOR_HOST = "${CCACHE} ${HOST_PREFIX}gcc"
81 export CC_FOR_BUILD = "${BUILD_CC}"
83 export CC = "${CCACHE} ${HOST_PREFIX}gcc"
85 do_configure () {
86 (cd ${S}; gnu-configize) || die "Failed to run gnu-configize"
87 oe_runconf
90 do_install () {
91 autotools_do_install
93 # We don't really need these, so we'll remove them...
94 rm -rf ${D}${libdir}/ldscripts
96 # Fix the /usr/${TARGET_SYS}/bin/* links
97 for l in ${D}${prefix}/${TARGET_SYS}/bin/*; do
98 rm -f $l
99 ln -sf `echo ${prefix}/${TARGET_SYS}/bin \
100 | tr -s / \
101 | sed -e 's,^/,,' -e 's,[^/]*,..,g'`${bindir}/${TARGET_PREFIX}`basename $l` $l
102 done
104 # Install the libiberty header
105 install -d ${D}${includedir}
106 install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
107 install -m 644 ${S}/include/libiberty.h ${D}${includedir}
109 cd ${D}${bindir}
111 # Symlinks for ease of running these on the native target
112 for p in ${TARGET_SYS}-* ; do
113 ln -sf $p `echo $p | sed -e s,${TARGET_SYS}-,,`
114 done
117 SRC_URI[md5sum] = "71b99dba3045a359dc314dbebedcf502"
118 SRC_URI[sha256sum] = "6f75f36f35d16fd1fdc6600926af3ceaaa3bdca4e91ae3bf22891594afa0116e"