summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/libgcc_4.8.bb
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2013-03-26 19:14:43 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-22 14:45:04 +0100
commitc3cc4bfc83e53acdb2e7ef6ac139598a5ebd8a7f (patch)
tree2a3505dad8eb2a27605ee31906ed4c483d8528c3 /meta/recipes-devtools/gcc/libgcc_4.8.bb
parent7195096f5754245f2b495a1629c6eb5ae6427afe (diff)
downloadpoky-c3cc4bfc83e53acdb2e7ef6ac139598a5ebd8a7f.tar.gz
gcc-4.8: Add recipes
(From OE-Core rev: c850415a1bdbb9268114d90fd0fc4cb3479de9c5) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/libgcc_4.8.bb')
-rw-r--r--meta/recipes-devtools/gcc/libgcc_4.8.bb145
1 files changed, 145 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/libgcc_4.8.bb b/meta/recipes-devtools/gcc/libgcc_4.8.bb
new file mode 100644
index 0000000000..47669a210c
--- /dev/null
+++ b/meta/recipes-devtools/gcc/libgcc_4.8.bb
@@ -0,0 +1,145 @@
1require recipes-devtools/gcc/gcc-${PV}.inc
2
3INHIBIT_DEFAULT_DEPS = "1"
4
5DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
6
7PACKAGES = "\
8 ${PN} \
9 ${PN}-dev \
10 ${PN}-dbg \
11 libgcov-dev \
12 "
13
14FILES_${PN} = "${base_libdir}/libgcc*.so.*"
15FILES_${PN}-dev = " \
16 ${base_libdir}/libgcc*.so \
17 ${libdir}/${TARGET_SYS}/${BINV}/*crt* \
18 ${libdir}/${TARGET_SYS}/${BINV}/64 \
19 ${libdir}/${TARGET_SYS}/${BINV}/32 \
20 ${libdir}/${TARGET_SYS}/${BINV}/x32 \
21 ${libdir}/${TARGET_SYS}/${BINV}/n32 \
22 ${libdir}/${TARGET_SYS}/${BINV}/libgcc*"
23FILES_libgcov-dev = " \
24 ${libdir}/${TARGET_SYS}/${BINV}/libgcov.a \
25 "
26FILES_${PN}-dbg += "${base_libdir}/.debug/"
27
28do_configure () {
29 target=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-nativesdk##`
30 install -d ${D}${base_libdir} ${D}${libdir}
31 cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/* ${B}
32 mkdir -p ${B}/${BPN}
33 cd ${B}/${BPN}
34 chmod a+x ${S}/${BPN}/configure
35 ${S}/${BPN}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
36}
37
38do_compile () {
39 target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##`
40 cd ${B}/${BPN}
41 oe_runmake MULTIBUILDTOP=${B}/$target/${BPN}/
42}
43
44do_install () {
45 target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##`
46 cd ${B}/${BPN}
47 oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/${BPN}/ install
48
49 # Move libgcc_s into /lib
50 mkdir -p ${D}${base_libdir}
51 if [ -f ${D}${libdir}/nof/libgcc_s.so ]; then
52 mv ${D}${libdir}/nof/libgcc* ${D}${base_libdir}
53 else
54 mv ${D}${libdir}/libgcc* ${D}${base_libdir} || true
55 fi
56
57 # install the runtime in /usr/lib/ not in /usr/lib/gcc on target
58 # so that cross-gcc can find it in the sysroot
59
60 mv ${D}${libdir}/gcc/* ${D}${libdir}
61 rm -rf ${D}${libdir}/gcc/
62 # unwind.h is installed here which is shipped in gcc-cross
63 # as well as target gcc and they are identical so we dont
64 # ship one with libgcc here
65 rm -rf ${D}${libdir}/${TARGET_SYS}/${BINV}/include
66}
67
68do_package[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
69do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
70do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
71do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
72
73BBCLASSEXTEND = "nativesdk"
74
75INSANE_SKIP_${PN}-dev = "staticdev"
76INSANE_SKIP_${MLPREFIX}libgcov-dev = "staticdev"
77
78addtask multilib_install after do_install before do_package do_populate_sysroot
79# this makes multilib gcc files findable for target gcc
80# e.g.
81# /usr/lib/i586-pokymllib32-linux/4.7/
82# by creating this symlink to it
83# /usr/lib64/x86_64-poky-linux/4.7/32
84
85python do_multilib_install() {
86 import re
87
88 multilibs = d.getVar('MULTILIB_VARIANTS', True)
89 if not multilibs or bb.data.inherits_class('nativesdk', d):
90 return
91
92 binv = d.getVar('BINV', True)
93
94 mlprefix = d.getVar('MLPREFIX', True)
95 if ('%slibgcc' % mlprefix) != d.getVar('PN', True):
96 return
97
98 if mlprefix:
99 orig_tune = d.getVar('DEFAULTTUNE_MULTILIB_ORIGINAL', True)
100 orig_tune_params = get_tune_parameters(orig_tune, d)
101 orig_tune_baselib = orig_tune_params['baselib']
102 orig_tune_bitness = orig_tune_baselib.replace('lib', '')
103 if not orig_tune_bitness:
104 orig_tune_bitness = '32'
105
106 src = '../../../' + orig_tune_baselib + '/' + \
107 d.getVar('TARGET_SYS_MULTILIB_ORIGINAL', True) + '/' + binv + '/'
108
109 dest = d.getVar('D', True) + d.getVar('libdir', True) + '/' + \
110 d.getVar('TARGET_SYS', True) + '/' + binv + '/' + orig_tune_bitness
111
112 if os.path.lexists(dest):
113 os.unlink(dest)
114 os.symlink(src, dest)
115 return
116
117
118 for ml in multilibs.split():
119 tune = d.getVar('DEFAULTTUNE_virtclass-multilib-' + ml, True)
120 if not tune:
121 bb.warn('DEFAULTTUNE_virtclass-multilib-%s is not defined. Skipping...' % ml)
122 continue
123
124 tune_parameters = get_tune_parameters(tune, d)
125 tune_baselib = tune_parameters['baselib']
126 if not tune_baselib:
127 bb.warn("Tune %s doesn't have a baselib set. Skipping..." % tune)
128 continue
129
130 tune_arch = tune_parameters['arch']
131 tune_bitness = tune_baselib.replace('lib', '')
132 if not tune_bitness:
133 tune_bitness = '32' # /lib => 32bit lib
134
135 src = '../../../' + tune_baselib + '/' + \
136 tune_arch + d.getVar('TARGET_VENDOR', True) + 'ml' + ml + \
137 '-' + d.getVar('TARGET_OS', True) + '/' + binv + '/'
138
139 dest = d.getVar('D', True) + d.getVar('libdir', True) + '/' + \
140 d.getVar('TARGET_SYS', True) + '/' + binv + '/' + tune_bitness
141
142 if os.path.lexists(dest):
143 os.unlink(dest)
144 os.symlink(src, dest)
145}