summaryrefslogtreecommitdiffstats
path: root/recipes-core
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2014-06-26 14:29:42 +0200
committerAdrian Dudau <adrian.dudau@enea.com>2014-06-26 14:29:42 +0200
commit99ac0639fff61cbdcfe58668eb9b0083d624504f (patch)
treef9142a48899bace9dda4f48c80e9a6f4b123c504 /recipes-core
downloadmeta-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.bb152
-rw-r--r--recipes-core/meta/external-xilinx-toolchain/SUPPORTED0
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 @@
1require recipes-core/eglibc/eglibc-package.inc
2
3INHIBIT_DEFAULT_DEPS = "1"
4
5# License applies to this recipe code, not the toolchain itself
6SUMMARY = "External Xilinx toolchain"
7LICENSE = "MIT"
8LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
9
10DEPENDS += "${@base_conditional('PREFERRED_PROVIDER_linux-libc-headers', PN, '', 'linux-libc-headers', d)}"
11PROVIDES += "\
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
30PV = "${CSL_VER_MAIN}"
31PR = "r1"
32
33SRC_URI = "file://SUPPORTED"
34
35do_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
85PACKAGES =+ " \
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
93INSANE_SKIP_${PN}-dbg = "staticdev"
94
95# We don't care about GNU_HASH in prebuilt binaries
96INSANE_SKIP_${PN}-utils += "ldflags"
97INSANE_SKIP_${PN}-dev += "ldflags"
98INSANE_SKIP_libstdc++ += "ldflags"
99INSANE_SKIP_libgcc += "ldflags"
100INSANE_SKIP_gdbserver += "ldflags"
101
102PKG_${PN} = "eglibc"
103PKG_${PN}-dev = "eglibc-dev"
104PKG_${PN}-staticdev = "eglibc-staticdev"
105PKG_${PN}-doc = "eglibc-doc"
106PKG_${PN}-dbg = "eglibc-dbg"
107PKG_${PN}-pic = "eglibc-pic"
108PKG_${PN}-utils = "eglibc-utils"
109PKG_${PN}-gconv = "eglibc-gconv"
110PKG_${PN}-extra-nss = "eglibc-extra-nss"
111PKG_${PN}-thread-db = "eglibc-thread-db"
112PKG_${PN}-pcprofile = "eglibc-pcprofile"
113
114PKGV = "${CSL_VER_LIBC}"
115PKGV_libgcc = "${CSL_VER_GCC}"
116PKGV_libgcc-dev = "${CSL_VER_GCC}"
117PKGV_libstdc++ = "${CSL_VER_GCC}"
118PKGV_libstdc++-dev = "${CSL_VER_GCC}"
119PKGV_libstdc++-staticdev = "${CSL_VER_GCC}"
120PKGV_linux-libc-headers = "${CSL_VER_KERNEL}"
121PKGV_linux-libc-headers-dev = "${CSL_VER_KERNEL}"
122PKGV_gdbserver = "${CSL_VER_GDB}"
123PKGV_gdbserver-dbg = "${CSL_VER_GDB}"
124
125FILES_libgcc = "${base_libdir}/libgcc_s.so.1"
126FILES_libgcc-dev = "${base_libdir}/libgcc_s.so"
127FILES_libstdc++ = "${libdir}/libstdc++.so.*"
128FILES_libstdc++-dev = " \
129 ${includedir}/c++/${PV} \
130 ${libdir}/libstdc++.so \
131 ${libdir}/libstdc++.la \
132 ${libdir}/libsupc++.la \
133 "
134FILES_libstdc++-staticdev = "${libdir}/libstdc++.a ${libdir}/libsupc++.a"
135FILES_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 "
144FILES_gdbserver = "${bindir}/gdbserver"
145FILES_gdbserver-dbg = "${bindir}/.debug/gdbserver"
146
147CSL_VER_MAIN ??= ""
148
149python () {
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