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