diff options
author | Christopher Larson <kergoth@gmail.com> | 2012-05-21 16:09:11 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-24 08:51:36 +0100 |
commit | f60b4cb2f48969661d7702905c21f5f6c19718f9 (patch) | |
tree | cd28f9845f529c4a630aa297b771ad8ea0e0d7ac /meta/recipes-core/meta/external-sourcery-toolchain.bb | |
parent | 844df77bcf05bbf4500a23609e55d950aa890815 (diff) | |
download | poky-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.bb | 143 |
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 @@ | |||
1 | require recipes-core/eglibc/eglibc-package.inc | ||
2 | |||
3 | INHIBIT_DEFAULT_DEPS = "1" | ||
4 | |||
5 | # License applies to this recipe code, not the toolchain itself | ||
6 | LICENSE = "MIT" | ||
7 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ | ||
8 | file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
9 | |||
10 | PROVIDES += "\ | ||
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 | " | ||
26 | PV = "${CSL_VER_MAIN}" | ||
27 | PR = "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 | |||
31 | SRC_URI = "file://SUPPORTED" | ||
32 | |||
33 | do_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 | |||
77 | SYSROOT_PREPROCESS_FUNCS += "external_toolchain_sysroot_adjust" | ||
78 | external_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 | |||
90 | PACKAGES =+ "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 | ||
93 | INSANE_SKIP_${PN}-dbg = "staticdev" | ||
94 | |||
95 | PKG_${PN} = "eglibc" | ||
96 | PKG_${PN}-dev = "eglibc-dev" | ||
97 | PKG_${PN}-staticdev = "eglibc-staticdev" | ||
98 | PKG_${PN}-doc = "eglibc-doc" | ||
99 | PKG_${PN}-dbg = "eglibc-dbg" | ||
100 | PKG_${PN}-pic = "eglibc-pic" | ||
101 | PKG_${PN}-utils = "eglibc-utils" | ||
102 | PKG_${PN}-gconv = "eglibc-gconv" | ||
103 | PKG_${PN}-extra-nss = "eglibc-extra-nss" | ||
104 | PKG_${PN}-thread-db = "eglibc-thread-db" | ||
105 | PKG_${PN}-pcprofile = "eglibc-pcprofile" | ||
106 | |||
107 | PKGV = "${CSL_VER_LIBC}" | ||
108 | PKGV_libgcc = "${CSL_VER_GCC}" | ||
109 | PKGV_libgcc-dev = "${CSL_VER_GCC}" | ||
110 | PKGV_libstdc++ = "${CSL_VER_GCC}" | ||
111 | PKGV_libstdc++-dev = "${CSL_VER_GCC}" | ||
112 | PKGV_libstdc++-staticdev = "${CSL_VER_GCC}" | ||
113 | PKGV_linux-libc-headers = "${CSL_VER_KERNEL}" | ||
114 | PKGV_linux-libc-headers-dev = "${CSL_VER_KERNEL}" | ||
115 | PKGV_gdbserver = "${CSL_VER_GDB}" | ||
116 | PKGV_gdbserver-dbg = "${CSL_VER_GDB}" | ||
117 | |||
118 | FILES_libgcc = "${base_libdir}/libgcc_s.so.1" | ||
119 | FILES_libgcc-dev = "${base_libdir}/libgcc_s.so" | ||
120 | FILES_libstdc++ = "${libdir}/libstdc++.so.*" | ||
121 | FILES_libstdc++-dev = "${includedir}/c++/${PV} \ | ||
122 | ${libdir}/libstdc++.so \ | ||
123 | ${libdir}/libstdc++.la \ | ||
124 | ${libdir}/libsupc++.la" | ||
125 | FILES_libstdc++-staticdev = "${libdir}/libstdc++.a ${libdir}/libsupc++.a" | ||
126 | FILES_linux-libc-headers = "${includedir}/asm* \ | ||
127 | ${includedir}/linux \ | ||
128 | ${includedir}/mtd \ | ||
129 | ${includedir}/rdma \ | ||
130 | ${includedir}/scsi \ | ||
131 | ${includedir}/sound \ | ||
132 | ${includedir}/video \ | ||
133 | " | ||
134 | FILES_gdbserver = "${bindir}/gdbserver ${libdir}/bin/sysroot-gdbserver" | ||
135 | FILES_gdbserver-dbg = "${bindir}/.debug/gdbserver" | ||
136 | |||
137 | CSL_VER_MAIN ??= "" | ||
138 | |||
139 | python () { | ||
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 | |||