diff options
| author | Nathan Rossi <nathan.rossi@xilinx.com> | 2013-09-20 17:57:51 +1000 |
|---|---|---|
| committer | Nathan Rossi <nathan.rossi@xilinx.com> | 2013-09-23 10:42:34 +1000 |
| commit | cf9571203be0af5fc654952d3f00e0a7e0fb1174 (patch) | |
| tree | 8e8fadd90b3f32f5b198be757fbad5f467cb5962 /recipes-core | |
| parent | 4204ea87969a5f7e000abd0d91a56d8e6db2ac61 (diff) | |
| download | meta-xilinx-dylan.tar.gz | |
external-xilinx-toochain: Created recipedylan
* Allows use of external Xilinx MicroBlaze and Zynq pre-built toolchains
* Does not require additional layer dependencies
* Backported from master
Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
Diffstat (limited to 'recipes-core')
| -rw-r--r-- | recipes-core/meta/external-xilinx-toolchain.bb | 155 | ||||
| -rw-r--r-- | recipes-core/meta/external-xilinx-toolchain/SUPPORTED | 0 |
2 files changed, 155 insertions, 0 deletions
diff --git a/recipes-core/meta/external-xilinx-toolchain.bb b/recipes-core/meta/external-xilinx-toolchain.bb new file mode 100644 index 00000000..392d94cf --- /dev/null +++ b/recipes-core/meta/external-xilinx-toolchain.bb | |||
| @@ -0,0 +1,155 @@ | |||
| 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 | SUMMARY = "External Xilinx toolchain" | ||
| 7 | LICENSE = "MIT" | ||
| 8 | LIC_FILES_CHKSUM = " \ | ||
| 9 | file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ | ||
| 10 | file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420 \ | ||
| 11 | " | ||
| 12 | |||
| 13 | DEPENDS += "${@base_conditional('PREFERRED_PROVIDER_linux-libc-headers', PN, '', 'linux-libc-headers', d)}" | ||
| 14 | PROVIDES += "\ | ||
| 15 | linux-libc-headers \ | ||
| 16 | virtual/${TARGET_PREFIX}gcc \ | ||
| 17 | virtual/${TARGET_PREFIX}g++ \ | ||
| 18 | virtual/${TARGET_PREFIX}gcc-initial \ | ||
| 19 | virtual/${TARGET_PREFIX}gcc-intermediate \ | ||
| 20 | virtual/${TARGET_PREFIX}binutils \ | ||
| 21 | virtual/${TARGET_PREFIX}libc-for-gcc \ | ||
| 22 | virtual/${TARGET_PREFIX}libc-initial \ | ||
| 23 | virtual/${TARGET_PREFIX}compilerlibs \ | ||
| 24 | virtual/libc \ | ||
| 25 | virtual/libintl \ | ||
| 26 | virtual/libiconv \ | ||
| 27 | virtual/linux-libc-headers \ | ||
| 28 | glibc-thread-db \ | ||
| 29 | libgcc \ | ||
| 30 | eglibc \ | ||
| 31 | " | ||
| 32 | |||
| 33 | PV = "${CSL_VER_MAIN}" | ||
| 34 | PR = "r1" | ||
| 35 | |||
| 36 | SRC_URI = "file://SUPPORTED" | ||
| 37 | |||
| 38 | do_install() { | ||
| 39 | # Use optimized files if available | ||
| 40 | sysroot="${EXTERNAL_TOOLCHAIN_SYSROOT}" | ||
| 41 | dbgroot="${EXTERNAL_TOOLCHAIN_DBGROOT}" | ||
| 42 | |||
| 43 | cp -a $sysroot${base_libdir}/. ${D}${base_libdir} | ||
| 44 | cp -a $sysroot/sbin/. ${D}${base_sbindir} | ||
| 45 | |||
| 46 | install -d ${D}/usr | ||
| 47 | for usr_element in bin libexec sbin share ${base_libdir}; do | ||
| 48 | # Copy files from both the sysroot and the debugroot if they exist | ||
| 49 | if [ ! -z "$sysroot" -a -e $sysroot/usr/$usr_element ]; then | ||
| 50 | cp -a $sysroot/usr/$usr_element ${D}/usr/ | ||
| 51 | fi | ||
| 52 | if [ ! -z "$dbgroot" -a -e $dbgroot/usr/$usr_element ]; then | ||
| 53 | cp -a $dbgroot/usr/$usr_element ${D}/usr/ | ||
| 54 | fi | ||
| 55 | done | ||
| 56 | |||
| 57 | # Copy Include files | ||
| 58 | cp -a $sysroot/usr/include/. ${D}${includedir} | ||
| 59 | |||
| 60 | # strip out any multi-lib files (they are not supported) | ||
| 61 | for element in bs m ldscripts; do | ||
| 62 | if [ -e ${D}${libdir}/$element ]; then | ||
| 63 | rm -rf ${D}${libdir}/$element | ||
| 64 | fi | ||
| 65 | if [ -e ${D}${base_libdir}/$element ]; then | ||
| 66 | rm -rf ${D}${base_libdir}/$element | ||
| 67 | fi | ||
| 68 | done | ||
| 69 | |||
| 70 | # Clean up the image (remove files and directories that are not packaged) | ||
| 71 | ## ${D}${sysconfdir} | ||
| 72 | for i in ${D}/usr/share/zoneinfo ${D}/usr/lib/bin ${D}/usr/libexec ; do | ||
| 73 | if [ -e $i ]; then | ||
| 74 | rm -rf $i | ||
| 75 | fi | ||
| 76 | done | ||
| 77 | |||
| 78 | # Move libstdc++ to /usr/lib | ||
| 79 | if [ -e ${D}${base_libdir}/libstdc++.so ]; then | ||
| 80 | mv ${D}${base_libdir}/libstdc++.* ${D}${libdir}/ | ||
| 81 | fi | ||
| 82 | |||
| 83 | sed -i -e 's/__packed/__attribute__ ((packed))/' ${D}${includedir}/mtd/ubi-user.h | ||
| 84 | sed -i -e "s# ${base_libdir}# ../..${base_libdir}#g" -e "s# ${libdir}# .#g" ${D}${libdir}/libc.so | ||
| 85 | sed -i -e "s# ${base_libdir}# ../..${base_libdir}#g" -e "s# ${libdir}# .#g" ${D}${libdir}/libpthread.so | ||
| 86 | } | ||
| 87 | |||
| 88 | PACKAGES =+ " \ | ||
| 89 | libgcc libgcc-dev \ | ||
| 90 | libstdc++ libstdc++-dev libstdc++-staticdev \ | ||
| 91 | linux-libc-headers linux-libc-headers-dev \ | ||
| 92 | gdbserver gdbserver-dbg \ | ||
| 93 | " | ||
| 94 | |||
| 95 | # This test should be fixed to ignore .a files in .debug dirs | ||
| 96 | INSANE_SKIP_${PN}-dbg = "staticdev" | ||
| 97 | |||
| 98 | # We don't care about GNU_HASH in prebuilt binaries | ||
| 99 | INSANE_SKIP_${PN}-utils += "ldflags" | ||
| 100 | INSANE_SKIP_${PN}-dev += "ldflags" | ||
| 101 | INSANE_SKIP_libstdc++ += "ldflags" | ||
| 102 | INSANE_SKIP_libgcc += "ldflags" | ||
| 103 | INSANE_SKIP_gdbserver += "ldflags" | ||
| 104 | |||
| 105 | PKG_${PN} = "eglibc" | ||
| 106 | PKG_${PN}-dev = "eglibc-dev" | ||
| 107 | PKG_${PN}-staticdev = "eglibc-staticdev" | ||
| 108 | PKG_${PN}-doc = "eglibc-doc" | ||
| 109 | PKG_${PN}-dbg = "eglibc-dbg" | ||
| 110 | PKG_${PN}-pic = "eglibc-pic" | ||
| 111 | PKG_${PN}-utils = "eglibc-utils" | ||
| 112 | PKG_${PN}-gconv = "eglibc-gconv" | ||
| 113 | PKG_${PN}-extra-nss = "eglibc-extra-nss" | ||
| 114 | PKG_${PN}-thread-db = "eglibc-thread-db" | ||
| 115 | PKG_${PN}-pcprofile = "eglibc-pcprofile" | ||
| 116 | |||
| 117 | PKGV = "${CSL_VER_LIBC}" | ||
| 118 | PKGV_libgcc = "${CSL_VER_GCC}" | ||
| 119 | PKGV_libgcc-dev = "${CSL_VER_GCC}" | ||
| 120 | PKGV_libstdc++ = "${CSL_VER_GCC}" | ||
| 121 | PKGV_libstdc++-dev = "${CSL_VER_GCC}" | ||
| 122 | PKGV_libstdc++-staticdev = "${CSL_VER_GCC}" | ||
| 123 | PKGV_linux-libc-headers = "${CSL_VER_KERNEL}" | ||
| 124 | PKGV_linux-libc-headers-dev = "${CSL_VER_KERNEL}" | ||
| 125 | PKGV_gdbserver = "${CSL_VER_GDB}" | ||
| 126 | PKGV_gdbserver-dbg = "${CSL_VER_GDB}" | ||
| 127 | |||
| 128 | FILES_libgcc = "${base_libdir}/libgcc_s.so.1" | ||
| 129 | FILES_libgcc-dev = "${base_libdir}/libgcc_s.so" | ||
| 130 | FILES_libstdc++ = "${libdir}/libstdc++.so.*" | ||
| 131 | FILES_libstdc++-dev = " \ | ||
| 132 | ${includedir}/c++/${PV} \ | ||
| 133 | ${libdir}/libstdc++.so \ | ||
| 134 | ${libdir}/libstdc++.la \ | ||
| 135 | ${libdir}/libsupc++.la \ | ||
| 136 | " | ||
| 137 | FILES_libstdc++-staticdev = "${libdir}/libstdc++.a ${libdir}/libsupc++.a" | ||
| 138 | FILES_linux-libc-headers = " \ | ||
| 139 | ${includedir}/asm* \ | ||
| 140 | ${includedir}/linux \ | ||
| 141 | ${includedir}/mtd \ | ||
| 142 | ${includedir}/rdma \ | ||
| 143 | ${includedir}/scsi \ | ||
| 144 | ${includedir}/sound \ | ||
| 145 | ${includedir}/video \ | ||
| 146 | " | ||
| 147 | FILES_gdbserver = "${bindir}/gdbserver" | ||
| 148 | FILES_gdbserver-dbg = "${bindir}/.debug/gdbserver" | ||
| 149 | |||
| 150 | CSL_VER_MAIN ??= "" | ||
| 151 | |||
| 152 | python () { | ||
| 153 | if not d.getVar("CSL_VER_MAIN"): | ||
| 154 | raise bb.parse.SkipPackage("External toolchain not configured (CSL_VER_MAIN not set).") | ||
| 155 | } | ||
diff --git a/recipes-core/meta/external-xilinx-toolchain/SUPPORTED b/recipes-core/meta/external-xilinx-toolchain/SUPPORTED new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/recipes-core/meta/external-xilinx-toolchain/SUPPORTED | |||
