summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/meta/external-sourcery-toolchain.bb
diff options
context:
space:
mode:
authorChristopher Larson <kergoth@gmail.com>2012-05-21 16:09:11 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-24 08:51:36 +0100
commitf60b4cb2f48969661d7702905c21f5f6c19718f9 (patch)
treecd28f9845f529c4a630aa297b771ad8ea0e0d7ac /meta/recipes-core/meta/external-sourcery-toolchain.bb
parent844df77bcf05bbf4500a23609e55d950aa890815 (diff)
downloadpoky-f60b4cb2f48969661d7702905c21f5f6c19718f9.tar.gz
Rename 'external-csl' to 'external-sourcery'
This is a rename per the purchase of CodeSourcery by Mentor Graphics Corporation, and associated naming change. (From OE-Core rev: dead1540d769fc91a5bd171070a5c96a9f00a2c7) Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/meta/external-sourcery-toolchain.bb')
-rw-r--r--meta/recipes-core/meta/external-sourcery-toolchain.bb143
1 files changed, 143 insertions, 0 deletions
diff --git a/meta/recipes-core/meta/external-sourcery-toolchain.bb b/meta/recipes-core/meta/external-sourcery-toolchain.bb
new file mode 100644
index 0000000000..a14e95867d
--- /dev/null
+++ b/meta/recipes-core/meta/external-sourcery-toolchain.bb
@@ -0,0 +1,143 @@
1require recipes-core/eglibc/eglibc-package.inc
2
3INHIBIT_DEFAULT_DEPS = "1"
4
5# License applies to this recipe code, not the toolchain itself
6LICENSE = "MIT"
7LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
8 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
9
10PROVIDES += "\
11 linux-libc-headers \
12 virtual/${TARGET_PREFIX}gcc \
13 virtual/${TARGET_PREFIX}g++ \
14 virtual/${TARGET_PREFIX}gcc-initial \
15 virtual/${TARGET_PREFIX}gcc-intermediate \
16 virtual/${TARGET_PREFIX}binutils \
17 virtual/${TARGET_PREFIX}libc-for-gcc \
18 virtual/${TARGET_PREFIX}compilerlibs \
19 virtual/libc \
20 virtual/libintl \
21 virtual/libiconv \
22 glibc-thread-db \
23 libgcc \
24 virtual/linux-libc-headers \
25"
26PV = "${CSL_VER_MAIN}"
27PR = "r5"
28
29#SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/${CSL_TARGET_SYS}/arm-${PV}-${TARGET_PREFIX}i686-pc-linux-gnu.tar.bz2"
30
31SRC_URI = "file://SUPPORTED"
32
33do_install() {
34 # Use optimized files if available
35 sysroot="${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc"
36 if [ -d $sysroot/${CSL_TARGET_CORE} ]; then
37 sysroot="$sysroot/${CSL_TARGET_CORE}"
38 fi
39
40 cp -a $sysroot${base_libdir}/. ${D}${base_libdir}
41 cp -a $sysroot/etc/. ${D}${sysconfdir}
42 cp -a $sysroot/sbin/. ${D}${base_sbindir}
43
44 install -d ${D}/usr
45 for usr_element in bin libexec sbin share ${base_libdir}; do
46 usr_path=$sysroot/usr/$usr_element
47 cp -a $usr_path ${D}/usr/
48 done
49 for datadir_element in man info; do
50 datadir_path=$sysroot/usr/$datadir_element
51 if [ -e $datadir_path ]; then
52 cp -a $datadir_path ${D}${datadir}/
53 fi
54 done
55
56 # Some toolchains have headers under the core specific area
57 if [ -e $sysroot/usr/include ]; then
58 cp -a $sysroot/usr/include/. ${D}${includedir}
59 else
60 cp -a $sysroot/../usr/include/. ${D}${includedir}
61 fi
62
63 rm ${D}${sysconfdir}/rpc
64 rm -r ${D}${datadir}/zoneinfo
65
66 mv ${D}${libdir}/bin/* ${D}${bindir}/
67 if [ -e ${D}${libdir}/bin/.debug ]; then
68 mv ${D}${libdir}/bin/.debug/* ${D}${bindir}/.debug/
69 fi
70 ln -s ../../bin/gdbserver ${D}${libdir}/bin/sysroot-gdbserver
71
72 sed -i -e 's/__packed/__attribute__ ((packed))/' ${D}${includedir}/mtd/ubi-user.h
73 sed -i -e "s# ${base_libdir}# ../..${base_libdir}#g" -e "s# ${libdir}# .#g" ${D}${libdir}/libc.so
74 sed -i -e "s# ${base_libdir}# ../..${base_libdir}#g" -e "s# ${libdir}# .#g" ${D}${libdir}/libpthread.so
75}
76
77SYSROOT_PREPROCESS_FUNCS += "external_toolchain_sysroot_adjust"
78external_toolchain_sysroot_adjust() {
79 if [ -n "${CSL_TARGET_CORE}" ]; then
80 rm -f ${SYSROOT_DESTDIR}/${CSL_TARGET_CORE}
81 ln -s . ${SYSROOT_DESTDIR}/${CSL_TARGET_CORE}
82 fi
83
84 if [ "${TUNE_PKGARCH}" = "i586" ]; then
85 rm -f ${SYSROOT_DESTDIR}/system32
86 ln -s . ${SYSROOT_DESTDIR}/system32
87 fi
88}
89
90PACKAGES =+ "libgcc libgcc-dev libstdc++ libstdc++-dev libstdc++-staticdev linux-libc-headers linux-libc-headers-dev gdbserver gdbserver-dbg"
91
92# This test should be fixed to ignore .a files in .debug dirs
93INSANE_SKIP_${PN}-dbg = "staticdev"
94
95PKG_${PN} = "eglibc"
96PKG_${PN}-dev = "eglibc-dev"
97PKG_${PN}-staticdev = "eglibc-staticdev"
98PKG_${PN}-doc = "eglibc-doc"
99PKG_${PN}-dbg = "eglibc-dbg"
100PKG_${PN}-pic = "eglibc-pic"
101PKG_${PN}-utils = "eglibc-utils"
102PKG_${PN}-gconv = "eglibc-gconv"
103PKG_${PN}-extra-nss = "eglibc-extra-nss"
104PKG_${PN}-thread-db = "eglibc-thread-db"
105PKG_${PN}-pcprofile = "eglibc-pcprofile"
106
107PKGV = "${CSL_VER_LIBC}"
108PKGV_libgcc = "${CSL_VER_GCC}"
109PKGV_libgcc-dev = "${CSL_VER_GCC}"
110PKGV_libstdc++ = "${CSL_VER_GCC}"
111PKGV_libstdc++-dev = "${CSL_VER_GCC}"
112PKGV_libstdc++-staticdev = "${CSL_VER_GCC}"
113PKGV_linux-libc-headers = "${CSL_VER_KERNEL}"
114PKGV_linux-libc-headers-dev = "${CSL_VER_KERNEL}"
115PKGV_gdbserver = "${CSL_VER_GDB}"
116PKGV_gdbserver-dbg = "${CSL_VER_GDB}"
117
118FILES_libgcc = "${base_libdir}/libgcc_s.so.1"
119FILES_libgcc-dev = "${base_libdir}/libgcc_s.so"
120FILES_libstdc++ = "${libdir}/libstdc++.so.*"
121FILES_libstdc++-dev = "${includedir}/c++/${PV} \
122 ${libdir}/libstdc++.so \
123 ${libdir}/libstdc++.la \
124 ${libdir}/libsupc++.la"
125FILES_libstdc++-staticdev = "${libdir}/libstdc++.a ${libdir}/libsupc++.a"
126FILES_linux-libc-headers = "${includedir}/asm* \
127 ${includedir}/linux \
128 ${includedir}/mtd \
129 ${includedir}/rdma \
130 ${includedir}/scsi \
131 ${includedir}/sound \
132 ${includedir}/video \
133"
134FILES_gdbserver = "${bindir}/gdbserver ${libdir}/bin/sysroot-gdbserver"
135FILES_gdbserver-dbg = "${bindir}/.debug/gdbserver"
136
137CSL_VER_MAIN ??= ""
138
139python () {
140 if not d.getVar("CSL_VER_MAIN"):
141 raise bb.parse.SkipPackage("External CSL toolchain not configured (CSL_VER_MAIN not set).")
142}
143