summaryrefslogtreecommitdiffstats
path: root/meta/packages/binutils/binutils.inc
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
committerRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
commitb2f192faabe412adce79534e22efe9fb69ee40e2 (patch)
tree7076c49d4286f8a1733650bd8fbc7161af200d57 /meta/packages/binutils/binutils.inc
parent2cf0eadf9f730027833af802d7e6c90b44248f80 (diff)
downloadpoky-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.gz
Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/binutils/binutils.inc')
-rw-r--r--meta/packages/binutils/binutils.inc117
1 files changed, 117 insertions, 0 deletions
diff --git a/meta/packages/binutils/binutils.inc b/meta/packages/binutils/binutils.inc
new file mode 100644
index 0000000000..680e579a06
--- /dev/null
+++ b/meta/packages/binutils/binutils.inc
@@ -0,0 +1,117 @@
1inherit autotools gettext
2
3PACKAGES = "${PN} ${PN}-dev ${PN}-doc ${PN}-symlinks"
4
5FILES_${PN} = " \
6 ${bindir}/${TARGET_PREFIX}* \
7 ${libdir}/lib*-*.so \
8 ${prefix}/${TARGET_SYS}/bin/*"
9
10FILES_${PN}-dev = " \
11 ${includedir} \
12 ${libdir}/*.a \
13 ${libdir}/*.la \
14 ${libdir}/libbfd.so \
15 ${libdir}/libopcodes.so"
16
17FILES_${PN}-symlinks = " \
18 ${bindir}/addr2line \
19 ${bindir}/as \
20 ${bindir}/c++filt \
21 ${bindir}/gprof \
22 ${bindir}/ld \
23 ${bindir}/nm \
24 ${bindir}/objcopy \
25 ${bindir}/objdump \
26 ${bindir}/ranlib \
27 ${bindir}/readelf \
28 ${bindir}/size \
29 ${bindir}/strip"
30
31EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
32 --enable-shared"
33
34# This is necessary due to a bug in the binutils Makefiles
35EXTRA_OEMAKE = "configure-build-libiberty all"
36
37export AR = "${HOST_PREFIX}ar"
38export AS = "${HOST_PREFIX}as"
39export LD = "${HOST_PREFIX}ld"
40export NM = "${HOST_PREFIX}nm"
41export RANLIB = "${HOST_PREFIX}ranlib"
42export OBJCOPY = "${HOST_PREFIX}objcopy"
43export OBJDUMP = "${HOST_PREFIX}objdump"
44
45export AR_FOR_TARGET = "${TARGET_PREFIX}ar"
46export AS_FOR_TARGET = "${TARGET_PREFIX}as"
47export LD_FOR_TARGET = "${TARGET_PREFIX}ld"
48export NM_FOR_TARGET = "${TARGET_PREFIX}nm"
49export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib"
50
51export CC_FOR_HOST = "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
52export CXX_FOR_HOST = "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
53
54export CC_FOR_BUILD = "${BUILD_CC}"
55export CPP_FOR_BUILD = "${BUILD_CPP}"
56export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}"
57
58export CC = "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
59
60do_configure () {
61 (cd ${S}; gnu-configize) || die "Failed to run gnu-configize"
62 oe_runconf
63}
64
65do_stage () {
66 oe_libinstall -so -a -C opcodes libopcodes ${STAGING_LIBDIR}/
67 oe_libinstall -a -C libiberty libiberty ${STAGING_LIBDIR}/
68 oe_libinstall -so -a -C bfd libbfd ${STAGING_LIBDIR}/
69 install -m 0644 ${S}/include/dis-asm.h ${STAGING_INCDIR}/
70 install -m 0644 ${S}/include/symcat.h ${STAGING_INCDIR}/
71 install -m 0644 ${S}/include/libiberty.h ${STAGING_INCDIR}/
72 install -m 0644 ${S}/include/ansidecl.h ${STAGING_INCDIR}/
73 install -m 0644 ${S}/include/bfdlink.h ${STAGING_INCDIR}/
74 install -m 0644 bfd/bfd.h ${STAGING_INCDIR}/
75}
76
77do_install () {
78 autotools_do_install
79
80 # We don't really need these, so we'll remove them...
81 rm -rf ${D}${libdir}/ldscripts
82
83 # Fix the /usr/${TARGET_SYS}/bin/* links
84 for l in ${D}${prefix}/${TARGET_SYS}/bin/*; do
85 rm -f $l
86 ln -sf `echo ${prefix}/${TARGET_SYS}/bin \
87 | tr -s / \
88 | sed -e 's,^/,,' -e 's,[^/]*,..,g'`${bindir}/${TARGET_PREFIX}`basename $l` $l
89 done
90
91 # Install the libiberty header
92 install -d ${D}${includedir}
93 install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
94 install -m 644 ${S}/include/libiberty.h ${D}${includedir}
95
96 cd ${D}${bindir}
97
98 # Symlinks for ease of running these on the native target
99 for p in ${TARGET_SYS}-* ; do
100 ln -sf $p `echo $p | sed -e s,${TARGET_SYS}-,,`
101 done
102
103 rm ${D}${bindir}/ar ${D}${bindir}/strings
104}
105
106
107pkg_postinst_${PN}-symlinks () {
108 update-alternatives --install ${bindir}/ar ar ${TARGET_SYS}-ar 100
109 update-alternatives --install ${bindir}/strings strings ${TARGET_SYS}-strings 100
110}
111
112
113pkg_prerm_${PN}-symlinks () {
114 update-alternatives --remove ar ${TARGET_SYS}-ar
115 update-alternatives --remove strings ${TARGET_SYS}-strings
116}
117