summaryrefslogtreecommitdiffstats
path: root/meta/packages/binutils
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-07-24 01:07:54 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-24 01:07:54 +0100
commit33ee4079a242275ef53be12de6b1e9115096b878 (patch)
tree4eb4e067298dd25b6f0fb860e0ae2c56c3937463 /meta/packages/binutils
parent8b3f94e27d5747f99e13c4fbe9e30375c185092f (diff)
downloadpoky-33ee4079a242275ef53be12de6b1e9115096b878.tar.gz
binutils: Add native version and tweak
Enable use of BBCLASSEXTEND to generate a native verison of binutils for the libiberty, libbfd and libopcodes libs. Also stop installing useless libs in the cross-canadian recipe. Partially based on a patch by Mark Hatle <mhatle@windriver.com>. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/packages/binutils')
-rw-r--r--meta/packages/binutils/binutils-cross-canadian.inc10
-rw-r--r--meta/packages/binutils/binutils.inc24
-rw-r--r--meta/packages/binutils/binutils_2.20.1.bb2
3 files changed, 32 insertions, 4 deletions
diff --git a/meta/packages/binutils/binutils-cross-canadian.inc b/meta/packages/binutils/binutils-cross-canadian.inc
index 23dfa161eb..04fa6e2de0 100644
--- a/meta/packages/binutils/binutils-cross-canadian.inc
+++ b/meta/packages/binutils/binutils-cross-canadian.inc
@@ -13,8 +13,10 @@ do_install () {
13 ln -sf "${bindir}/`basename $l`" "${D}${prefix}/${TARGET_SYS}/bin/`basename $l | sed -e 's,${TARGET_PREFIX},,'`" 13 ln -sf "${bindir}/`basename $l`" "${D}${prefix}/${TARGET_SYS}/bin/`basename $l | sed -e 's,${TARGET_PREFIX},,'`"
14 done 14 done
15 15
16 # Install the libiberty header 16 # We're not interested in the libs or headers, these would come from the
17 install -d ${D}${includedir} 17 # nativesdk or target version of the binutils recipe
18 install -m 644 ${S}/include/ansidecl.h ${D}${includedir} 18 rm -f ${D}${libdir}/libbfd*
19 install -m 644 ${S}/include/libiberty.h ${D}${includedir} 19 rm -f ${D}${libdir}/libiberty*
20 rm -f ${D}${libdir}/libopcodes*
21 rm -f ${D}${includedir}/*.h
20} 22}
diff --git a/meta/packages/binutils/binutils.inc b/meta/packages/binutils/binutils.inc
index 98ddbcfdd2..89c952b1c1 100644
--- a/meta/packages/binutils/binutils.inc
+++ b/meta/packages/binutils/binutils.inc
@@ -39,8 +39,11 @@ FILES_${PN}-symlinks = " \
39B = "${S}/build.${HOST_SYS}.${TARGET_SYS}" 39B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
40 40
41EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \ 41EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
42 --enable-install-libbfd \
42 --enable-shared" 43 --enable-shared"
43 44
45EXTRA_OECONF_virtclass-native = "--enable-target=all --enable-64-bit-bfd --enable-install-libbfd"
46
44# This is necessary due to a bug in the binutils Makefiles 47# This is necessary due to a bug in the binutils Makefiles
45# EXTRA_OEMAKE = "configure-build-libiberty all" 48# EXTRA_OEMAKE = "configure-build-libiberty all"
46 49
@@ -108,6 +111,27 @@ do_install () {
108 rm ${D}${bindir}/ar ${D}${bindir}/strings 111 rm ${D}${bindir}/ar ${D}${bindir}/strings
109} 112}
110 113
114do_install_virtclass-native () {
115 autotools_do_install
116
117 # Install the libiberty header
118 install -d ${D}${includedir}
119 install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
120 install -m 644 ${S}/include/libiberty.h ${D}${includedir}
121
122 # We only want libiberty, libbfd and libopcodes
123 rm -rf ${D}${bindir}
124 rm -rf ${D}${prefix}/${TARGET_SYS}
125 rm -rf ${D}${prefix}/lib/ldscripts
126 rm -rf ${D}${prefix}/share/info
127 rm -rf ${D}${prefix}/share/locale
128 rm -rf ${D}${prefix}/share/man
129 rmdir ${D}${prefix}/share || :
130 rmdir ${D}/${libdir}/gcc-lib || :
131 rmdir ${D}/${libdir}64/gcc-lib || :
132 rmdir ${D}/${libdir} || :
133 rmdir ${D}/${libdir}64 || :
134}
111 135
112pkg_postinst_${PN}-symlinks () { 136pkg_postinst_${PN}-symlinks () {
113 update-alternatives --install ${bindir}/ar ar ${TARGET_SYS}-ar 100 137 update-alternatives --install ${bindir}/ar ar ${TARGET_SYS}-ar 100
diff --git a/meta/packages/binutils/binutils_2.20.1.bb b/meta/packages/binutils/binutils_2.20.1.bb
index 3197b5efb3..a533bd8bb0 100644
--- a/meta/packages/binutils/binutils_2.20.1.bb
+++ b/meta/packages/binutils/binutils_2.20.1.bb
@@ -31,3 +31,5 @@ SRC_URI = "\
31SRC_URI += "\ 31SRC_URI += "\
32 file://binutils-2.16.1-e300c2c3.patch \ 32 file://binutils-2.16.1-e300c2c3.patch \
33 " 33 "
34
35BBCLASSEXTEND = "native"