blob: fab1761177c6d22352016f5bbb14c01351acc874 [file] [log] [blame]
Brad Bishopbec4ebc2022-08-03 09:55:16 -04001require recipes-core/glibc/glibc-package.inc
2
3require license.inc
4
5INHIBIT_DEFAULT_DEPS = "1"
6
7LIC_FILES_CHKSUM = "\
8 file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \
9 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420 \
10"
11
12PROVIDES += "\
13 linux-libc-headers \
14 virtual/${TARGET_PREFIX}gcc \
15 virtual/${TARGET_PREFIX}g++ \
16 virtual/${TARGET_PREFIX}gcc-initial \
17 virtual/${TARGET_PREFIX}binutils \
18 virtual/${TARGET_PREFIX}libc-for-gcc \
19 virtual/${TARGET_PREFIX}compilerlibs \
20 virtual/libc \
21 virtual/libintl \
22 virtual/libiconv \
23 virtual/crypt \
24 glibc-mtrace \
25 glibc-thread-db \
26 glibc \
27 libc-mtrace \
28 gcc-runtime \
29 libgcc \
30 libg2c \
31 libg2c-dev \
32 libssp \
33 libssp-dev \
34 libssp-staticdev \
35 libgfortran \
36 libgfortran-dev \
37 libgfortran-staticdev \
38 libmudflap \
39 libmudflap-dev \
40 libgomp \
41 libgomp-dev \
42 libgomp-staticdev \
43 libitm \
44 libitm-dev \
45 libitm-staticdev \
46 libquadmath \
47 libquadmath-dev \
48 libquadmath-staticdev \
49 virtual/linux-libc-headers \
50 libgcov-staticdev \
51 virtual/libc-locale \
52"
53
54PV = "${EAT_VER_MAIN}"
55
56BINV = "${EAT_VER_GCC}"
57
58SRC_URI = "file://SUPPORTED"
59
60do_install() {
61 # Add stubs for files OE-core expects
62 install -d ${S}/nscd/
63 touch ${S}/nscd/nscd.init
64 touch ${S}/nscd/nscd.conf
65 touch ${S}/nscd/nscd.service
66 touch ${S}/../makedbs.sh
67
68 install -d ${D}${base_libdir}
69 install -d ${D}${base_sbindir}
70 install -d ${D}${bindir}
71 install -d ${D}${sbindir}
72 install -d ${D}${libdir}
73 install -d ${D}${libexecdir}
74 install -d ${D}${datadir}
75 install -d ${D}${includedir}
76 install -d ${D}/include
77 install -d ${D}${libdir}/${TARGET_SYS}/${EAT_VER_GCC}
Patrick Williams8dd68482022-10-04 07:57:18 -050078 install -d ${D}${libdir}/gcc/${TARGET_SYS}/${EAT_VER_GCC}/include
Brad Bishopbec4ebc2022-08-03 09:55:16 -040079
80 CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership"
81 cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/${EAT_LIBDIR}/* ${D}${base_libdir}
82 cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/* ${D}${base_libdir}
83 cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/${EAT_LIBDIR}/* ${D}${libdir}
84 cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/share/* ${D}${datadir}
85 cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/include/* ${D}${includedir}
86
87 cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/include/* ${D}${includedir}
88 if [ -d ${D}${includedir}/c++/${EAT_VER_GCC}/${EAT_TARGET_SYS} ]; then
89 mv ${D}${includedir}/c++/${EAT_VER_GCC}/${EAT_TARGET_SYS} ${D}${includedir}/c++/${EAT_VER_GCC}/${TARGET_SYS}
90 fi
91 ln -sf ../usr/include/c++ ${D}/include/c++
92
93 cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/bin/* ${D}${bindir}
94 cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/sbin/* ${D}${sbindir}
95 cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/sbin/* ${D}${base_sbindir}
96 rm -rf ${D}${bindir}/gdbserver
97 sed -i -e 's#/arm/tools/gnu/bash/4.2/rhe6-x86_64##' ${D}${bindir}/tzselect
98 sed -i -e 's#/arm/tools/gnu/bash/4.2/rhe6-x86_64##' ${D}${bindir}/ldd
99 sed -i -e 's#/usr/bin/bash#/bin/sh#' ${D}${bindir}/tzselect
100 sed -i -e 's#/usr/bin/bash#/bin/sh#' ${D}${bindir}/ldd
101 sed -i -e 's#/bin/bash#/bin/sh#' ${D}${bindir}/tzselect
102 sed -i -e 's#/bin/bash#/bin/sh#' ${D}${bindir}/ldd
103
104 cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/crt*.o ${D}${libdir}/${TARGET_SYS}/${EAT_VER_GCC}/
105 cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/libgcc* ${D}${libdir}/${TARGET_SYS}/${EAT_VER_GCC}/
106 cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/libgcov* ${D}${libdir}/gcc/${TARGET_SYS}/${EAT_VER_GCC}/
Patrick Williams8dd68482022-10-04 07:57:18 -0500107 cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include/ssp ${D}${libdir}/gcc/${TARGET_SYS}/${EAT_VER_GCC}/include || true
108 cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include/sanitizers ${D}${libdir}/gcc/${TARGET_SYS}/${EAT_VER_GCC}/include || true
109 cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include/quadmath* ${D}${libdir}/gcc/${TARGET_SYS}/${EAT_VER_GCC}/include || true
110 cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include/omp.h ${D}${libdir}/gcc/${TARGET_SYS}/${EAT_VER_GCC}/include || true
111 cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include/openacc.h ${D}${libdir}/gcc/${TARGET_SYS}/${EAT_VER_GCC}/include || true
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400112 cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/finclude ${D}${libdir}/gcc/${TARGET_SYS}/${EAT_VER_GCC}/
113
114 # fix up the copied symlinks (they are still pointing to the multiarch directory)
115 linker_name="${@bb.utils.contains("TUNE_FEATURES", "aarch64", "ld-linux-aarch64.so.1", bb.utils.contains("TUNE_FEATURES", "callconvention-hard", "ld-linux-armhf.so.3", "ld-linux.so.3",d), d)}"
116 if [ -f ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/ld-${EAT_VER_LIBC}.so ]; then
117 ln -sf ld-${EAT_VER_LIBC}.so ${D}${base_libdir}/${linker_name}
118 else
119 cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/lib/${linker_name} ${D}${base_libdir}/
120 fi
121 ln -sf ../../lib/librt.so.1 ${D}${libdir}/librt.so
122 ln -sf ../../lib/libcrypt.so.1 ${D}${libdir}/libcrypt.so
123 ln -sf ../../lib/libresolv.so.2 ${D}${libdir}/libresolv.so
124 ln -sf ../../lib/libnss_hesiod.so.2 ${D}${libdir}/libnss_hesiod.so
125 ln -sf ../../lib/libutil.so.1 ${D}${libdir}/libutil.so
126 ln -sf ../../lib/libBrokenLocale.so.1 ${D}${libdir}/libBrokenLocale.so
127 ln -sf ../../lib/libpthread.so.0 ${D}${libdir}/libpthread.so
128 ln -sf ../../lib/libthread_db.so.1 ${D}${libdir}/libthread_db.so
129 ln -sf ../../lib/libanl.so.1 ${D}${libdir}/libanl.so
130 ln -sf ../../lib/libdl.so.2 ${D}${libdir}/libdl.so
131 ln -sf ../../lib/libnss_db.so.2 ${D}${libdir}/libnss_db.so
132 ln -sf ../../lib/libnss_dns.so.2 ${D}${libdir}/libnss_dns.so
133 ln -sf ../../lib/libnss_files.so.2 ${D}${libdir}/libnss_files.so
134 ln -sf ../../lib/libnss_compat.so.2 ${D}${libdir}/libnss_compat.so
135 ln -sf ../../lib/libm.so.6 ${D}${libdir}/libm.so
136 ln -sf ../../lib/libc_malloc_debug.so.0 ${D}${libdir}/libc_malloc_debug.so
137
138 # remove potential .so duplicates from base_libdir
139 # for all symlinks created above in libdir
140 rm -f ${D}${base_libdir}/librt.so
141 rm -f ${D}${base_libdir}/libcrypt.so
142 rm -f ${D}${base_libdir}/libresolv.so
143 rm -f ${D}${base_libdir}/libnss_hesiod.so
144 rm -f ${D}${base_libdir}/libutil.so
145 rm -f ${D}${base_libdir}/libBrokenLocale.so
146 rm -f ${D}${base_libdir}/libpthread.so
147 rm -f ${D}${base_libdir}/libthread_db.so
148 rm -f ${D}${base_libdir}/libanl.so
149 rm -f ${D}${base_libdir}/libdl.so
150 rm -f ${D}${base_libdir}/libnss_db.so
151 rm -f ${D}${base_libdir}/libnss_dns.so
152 rm -f ${D}${base_libdir}/libnss_files.so
153 rm -f ${D}${base_libdir}/libnss_compat.so
154 rm -f ${D}${base_libdir}/libm.so
155
156 # Move these completely to ${libdir} and delete duplicates in ${base_libdir}
157 for lib in asan hwasan atomic gfortran gomp itm lsan sanitizer stdc++ tsan ubsan; do
158 if [ -e ${D}${base_libdir}/lib${lib}.spec ] ; then
159 mv ${D}${base_libdir}/lib${lib}.spec ${D}${libdir}
160 fi
161 if [ -e ${D}${base_libdir}/lib${lib}.a ] ; then
162 mv ${D}${base_libdir}/lib${lib}.a ${D}${libdir}
163 fi
164 rm -f ${D}${base_libdir}/lib${lib}*
165 done
166
167 # Clean up duplicate libs that are both in base_libdir and libdir
168 rm -f ${D}${libdir}/libgcc*
169
170 # Besides ld-${EAT_VER_LIBC}.so, other libs can have duplicates like lib*-${EAT_VER_LIBC}.so
171 # Only remove them if both are regular files and are identical
172 for i in ${D}${base_libdir}/lib*-${EAT_VER_LIBC}.so; do
173 if [ ! -e $i ] ; then
174 continue
175 fi
176
177 f=$(echo $i | sed 's/-${EAT_VER_LIBC}//')
178 l=$(ls $f.*)
179 if [ $(readlink -f $i ) = $l ]; then
180 echo "$i is a symlink of $l, keep it"
181 elif [ $(readlink -f $l ) = $i ]; then
182 echo "$l is a symlink of $i, keep it"
183 else
184 cmp -s $i $l
185 if [ $? -eq 0 ]; then
186 echo "$i is a duplicate of $l, remove it"
187 rm $i
188 else
189 echo "$i and $l are different files, keep them both"
190 fi
191 fi
192 done
193
194 if [ -d ${D}${base_libdir}/arm-linux-gnueabi ]; then
195 rm -rf ${D}${base_libdir}/arm-linux-gnueabi
196 fi
197
198 if [ -d ${D}${base_libdir}/ldscripts ]; then
199 rm -rf ${D}${base_libdir}/ldscripts
200 fi
201
202 # Provided by libnsl2
203 rm -rf ${D}${includedir}/rpcsvc/yppasswd.*
204 # Provided by quota
205 rm -rf ${D}${includedir}/rpcsvc/rquota.*
206
207 if [ -f ${D}${libdir}/libc.so ];then
208 sed -i -e "s# /${EAT_LIBDIR}/${EAT_TARGET_SYS}# ../../${EAT_LIBDIR}#g" -e "s# /usr/${EAT_LIBDIR}/# /usr/lib/#g" -e "s# /usr/${EAT_LIBDIR}/${EAT_TARGET_SYS}# .#g" -e "s# /${EAT_LIBDIR}/ld-linux# ../../${EAT_LIBDIR}/ld-linux#g" ${D}${libdir}/libc.so
209 sed -i -e "s# /${EAT_LIBDIR}/libc.so.6# /lib/libc.so.6#g" ${D}${libdir}/libc.so
210 sed -i -e "s# /lib# ../../lib#g" -e "s# /usr/lib# .#g" ${D}${libdir}/libc.so
211 fi
212
213 if [ -f ${D}${base_libdir}/libc.so ];then
214 sed -i -e "s# /${EAT_LIBDIR}/${EAT_TARGET_SYS}# ../../lib#g" -e "s# /usr/${EAT_LIBDIR}/${EAT_TARGET_SYS}# .#g" -e "s# /${EAT_LIBDIR}/# /lib/#g" ${D}${base_libdir}/libc.so
215 if [ -f ${D}${base_libdir}/libc.so.6 ]; then
216 sed -i -e "s# /usr/${EAT_LIBDIR}/libc.so.6# /lib/libc.so.6#g" -e "s# /${EAT_LIBDIR}/libc.so.6# /lib/libc.so.6#g" ${D}${base_libdir}/libc.so.6
217 fi
218 fi
219
220 # Remove if empty
221 rmdir ${D}${bindir} || true
222 rmdir ${D}${sbindir} || true
223 rmdir ${D}${base_sbindir} || true
224 rmdir ${D}${libexecdir} || true
225
226 # Remove unused /usr/share/info/dir
227 rm -f ${D}${infodir}/dir
228}
229
230# External toolchain doesn't provide multilib support so make corresponding
231# install API as an empty API to avoid an unnecessary errors.
232oe_multilib_header () {
233 return
234}
235
236PACKAGES_DYNAMIC = "^locale-base-.* \
237 ^glibc-gconv-.* ^glibc-charmap-.* ^glibc-localedata-.* ^glibc-binary-localedata-.* \
238 ^${MLPREFIX}glibc-gconv$"
239
240# PACKAGES is split up according to the 'source' recipes/includes in OE-core
241# Stylistic differences are kept to make copy/pasting easier.
242
243# From gcc-runtime.inc
244
245PACKAGES += "\
246 gcc-runtime-dbg \
247 libstdc++ \
248 libstdc++-precompile-dev \
249 libstdc++-dev \
250 libstdc++-staticdev \
251 libg2c \
252 libg2c-dev \
253 libssp \
254 libssp-dev \
255 libssp-staticdev \
256 libmudflap \
257 libmudflap-dev \
258 libmudflap-staticdev \
259 libquadmath \
260 libquadmath-dev \
261 libquadmath-staticdev \
262 libgomp \
263 libgomp-dev \
264 libgomp-staticdev \
265 libatomic \
266 libatomic-dev \
267 libatomic-staticdev \
268 libitm \
269 libitm-dev \
270 libitm-staticdev \
271"
272
273# From gcc-sanitizers.inc
274
275PACKAGES += "gcc-sanitizers gcc-sanitizers-dbg"
276PACKAGES += "libasan libubsan liblsan libtsan"
277PACKAGES += "libasan-dev libubsan-dev liblsan-dev libtsan-dev"
278PACKAGES += "libasan-staticdev libubsan-staticdev liblsan-staticdev libtsan-staticdev"
279
280# From libgfortran.inc:
281
282PACKAGES += "\
283 libgfortran-dbg \
284 libgfortran \
285 libgfortran-dev \
286 libgfortran-staticdev \
287"
288
289# libgcc.inc uses ${PN}, so replace that
290
291PACKAGES += "\
292 libgcc \
293 libgcc-dev \
294 libgcc-dbg \
295"
296
297# ... and the leftovers
298
299PACKAGES =+ "\
300 ${PN}-mtrace \
301 libgcov-staticdev \
302 linux-libc-headers \
303 linux-libc-headers-dev \
304"
305
306# Re-order PACKAGES list in order to shift ${PN}-dev towards the end as
307# it is meant to pick up remaining dev libraries and headers that aren't
308# picked up by other packages. And since some static libraries needs to
309# be packaged in ${PN}-dev, so we need to keep ${PN}-staticdev later in
310# order.
311
312PACKAGES := "${@oe.utils.str_filter_out('${PN}-dev', '${PACKAGES}', d)}"
313PACKAGES := "${@oe.utils.str_filter_out('${PN}-staticdev', '${PACKAGES}', d)}"
314PACKAGES += "\
315 ${PN}-dev \
316 ${PN}-staticdev \
317"
318
319INSANE_SKIP:${PN}-dbg = "staticdev"
320INSANE_SKIP:${PN}-utils += "ldflags"
321INSANE_SKIP:libstdc++ += "ldflags"
322INSANE_SKIP:libgfortran += "ldflags"
323INSANE_SKIP:libgcc += "ldflags dev-deps"
324INSANE_SKIP:libgcc-dev += "staticdev"
325INSANE_SKIP:libgfortran += "ldflags dev-deps"
326INSANE_SKIP:libstdc++ += "ldflags dev-deps"
327INSANE_SKIP:libatomic += "ldflags"
328INSANE_SKIP:libasan += "ldflags"
329INSANE_SKIP:libubsan += "ldflags"
330INSANE_SKIP:libssp += "ldflags"
331INSANE_SKIP:libgomp += "ldflags"
332INSANE_SKIP:libitm += "ldflags"
333INSANE_SKIP:gdbserver += "ldflags"
334
335# OE-core has literally listed 'glibc' in LIBC_DEPENDENCIES :/
336RPROVIDES:${PN} = "glibc rtld(GNU_HASH)"
337# Add runtime provides for the other libc* packages as well
338RPROVIDES:${PN}-dev = "glibc-dev"
339RPROVIDES:${PN}-doc = "glibc-doc"
340RPROVIDES:${PN}-dbg = "glibc-dbg"
341RPROVIDES:${PN}-pic = "glibc-pic"
342RPROVIDES:${PN}-utils = "glibc-utils"
343RPROVIDES:${PN}-mtrace = "glibc-mtrace libc-mtrace"
344
345PKG:${PN} = "glibc"
346PKG:${PN}-dev = "glibc-dev"
347PKG:${PN}-doc = "glibc-doc"
348PKG:${PN}-dbg = "glibc-dbg"
349PKG:${PN}-pic = "glibc-pic"
350PKG:${PN}-utils = "glibc-utils"
351PKG:${PN}-mtrace = "glibc-mtrace"
352PKG:${PN}-gconv = "glibc-gconv"
353PKG:${PN}-extra-nss = "glibc-extra-nss"
354PKG:${PN}-thread-db = "glibc-thread-db"
355PKG:${PN}-pcprofile = "glibc-pcprofile"
356PKG:${PN}-staticdev = "glibc-staticdev"
357
358PKGV = "${EAT_VER_LIBC}"
359PKGV:${PN} = "${EAT_VER_LIBC}"
360PKGV:${PN}-dev = "${EAT_VER_LIBC}"
361PKGV:${PN}-doc = "${EAT_VER_LIBC}"
362PKGV:${PN}-dbg = "${EAT_VER_LIBC}"
363PKGV:${PN}-pic = "${EAT_VER_LIBC}"
364PKGV:${PN}-utils = "${EAT_VER_LIBC}"
365PKGV:${PN}-mtrace = "${EAT_VER_LIBC}"
366PKGV:${PN}-gconv = "${EAT_VER_LIBC}"
367PKGV:${PN}-extra-nss = "${EAT_VER_LIBC}"
368PKGV:${PN}-thread-db = "${EAT_VER_LIBC}"
369PKGV:${PN}-pcprofile = "${EAT_VER_LIBC}"
370PKGV:${PN}-staticdev = "${EAT_VER_LIBC}"
371PKGV:catchsegv = "${EAT_VER_LIBC}"
372PKGV:glibc-extra-nss = "${EAT_VER_LIBC}"
373PKGV:glibc-thread-db = "${EAT_VER_LIBC}"
374
375PKGV:libmemusage = "${EAT_VER_LIBC}"
376PKGV:libsegfault = "${EAT_VER_LIBC}"
377PKGV:libsotruss = "${EAT_VER_LIBC}"
378PKGV:sln = "${EAT_VER_LIBC}"
379PKGV:nscd = "${EAT_VER_LIBC}"
380PKGV:ldd = "${EAT_VER_LIBC}"
381
382PKGV:libasan-dev = "${EAT_VER_GCC}"
383PKGV:libasan = "${EAT_VER_GCC}"
384PKGV:libasan-staticdev = "${EAT_VER_GCC}"
385PKGV:libatomic-dev = "${EAT_VER_GCC}"
386PKGV:libatomic = "${EAT_VER_GCC}"
387PKGV:libatomic-staticdev = "${EAT_VER_GCC}"
388PKGV:libg2c-dev = "${EAT_VER_GCC}"
389PKGV:libg2c = "${EAT_VER_GCC}"
390PKGV:libgcc-dev = "${EAT_VER_GCC}"
391PKGV:libgcc = "${EAT_VER_GCC}"
392PKGV:libgfortran-dbg = "${EAT_VER_GCC}"
393PKGV:libgfortran-dev = "${EAT_VER_GCC}"
394PKGV:libgfortran = "${EAT_VER_GCC}"
395PKGV:libgfortran-staticdev = "${EAT_VER_GCC}"
396PKGV:libgomp-dev = "${EAT_VER_GCC}"
397PKGV:libgomp = "${EAT_VER_GCC}"
398PKGV:libgomp-staticdev = "${EAT_VER_GCC}"
399PKGV:libitm-dev = "${EAT_VER_GCC}"
400PKGV:libitm = "${EAT_VER_GCC}"
401PKGV:libitm-staticdev = "${EAT_VER_GCC}"
402PKGV:liblsan-dev = "${EAT_VER_GCC}"
403PKGV:liblsan = "${EAT_VER_GCC}"
404PKGV:liblsan-staticdev = "${EAT_VER_GCC}"
405PKGV:libmudflap-dev = "${EAT_VER_GCC}"
406PKGV:libmudflap = "${EAT_VER_GCC}"
407PKGV:libmudflap-staticdev = "${EAT_VER_GCC}"
408PKGV:libquadmath-dev = "${EAT_VER_GCC}"
409PKGV:libquadmath = "${EAT_VER_GCC}"
410PKGV:libquadmath-staticdev = "${EAT_VER_GCC}"
411PKGV:libssp-dev = "${EAT_VER_GCC}"
412PKGV:libssp = "${EAT_VER_GCC}"
413PKGV:libssp-staticdev = "${EAT_VER_GCC}"
414PKGV:libstdc++-dbg = "${EAT_VER_GCC}"
415PKGV:libstdc++-dev = "${EAT_VER_GCC}"
416PKGV:libstdc++ = "${EAT_VER_GCC}"
417PKGV:libstdc++-precompile-dev = "${EAT_VER_GCC}"
418PKGV:libstdc++-staticdev = "${EAT_VER_GCC}"
419PKGV:libtsan-dev = "${EAT_VER_GCC}"
420PKGV:libtsan = "${EAT_VER_GCC}"
421PKGV:libtsan-staticdev = "${EAT_VER_GCC}"
422PKGV:libubsan-dev = "${EAT_VER_GCC}"
423PKGV:libubsan = "${EAT_VER_GCC}"
424PKGV:libubsan-staticdev = "${EAT_VER_GCC}"
425
426PKGV:linux-libc-headers-dev = "${EAT_VER_KERNEL}"
427PKGV:linux-libc-headers = "${EAT_VER_KERNEL}"
428
429PKGV:gdbserver = "${EAT_VER_GDBSERVER}"
430
431ALLOW_EMPTY:${PN}-mtrace = "1"
432FILES:${PN}-mtrace = "${bindir}/mtrace"
433
434FILES:libgcov-staticdev = "${libdir}/gcc/${TARGET_SYS}/${BINV}/libgcov.a"
435
436FILES:libsegfault = "${base_libdir}/libSegFault*"
437
438FILES:catchsegv = "${bindir}/catchsegv"
439RDEPENDS:catchsegv = "libsegfault"
440
441# From libgfortran.inc:
442
443FILES:libgfortran = "${libdir}/libgfortran.so.*"
444FILES:libgfortran-dev = "\
445 ${libdir}/libgfortran*.so \
446 ${libdir}/libgfortran.spec \
447 ${libdir}/libgfortran.la \
448 ${libdir}/gcc/${TARGET_SYS}/${BINV}/libgfortranbegin.* \
449 ${libdir}/gcc/${TARGET_SYS}/${BINV}/libcaf_single* \
450 ${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude/ \
451"
452FILES:libgfortran-staticdev = "${libdir}/libgfortran.a"
453
454
455# From gcc-sanitizers.inc:
456
457FILES:libasan += "${libdir}/libasan.so.* ${libdir}/libhwasan.so.*"
458FILES:libasan-dev += "\
459 ${libdir}/libasan_preinit.o \
460 ${libdir}/libasan.so \
461 ${libdir}/libhwasan.so \
462 ${libdir}/libasan.la \
463"
464FILES:libasan-staticdev += "${libdir}/libasan.a \
465 ${libdir}/libhwasan.a \
466"
467
468FILES:libubsan += "${libdir}/libubsan.so.*"
469FILES:libubsan-dev += "\
470 ${libdir}/libubsan.so \
471 ${libdir}/libubsan.la \
472"
473FILES:libubsan-staticdev += "${libdir}/libubsan.a"
474
475FILES:liblsan += "${libdir}/liblsan.so.*"
476FILES:liblsan-dev += "\
477 ${libdir}/liblsan.so \
478 ${libdir}/liblsan.la \
479 ${libdir}/liblsan_preinit.o \
480"
481FILES:liblsan-staticdev += "${libdir}/liblsan.a"
482
483FILES:libtsan += "${libdir}/libtsan.so.*"
484FILES:libtsan-dev += "\
485 ${libdir}/libtsan.so \
486 ${libdir}/libtsan.la \
487 ${libdir}/libtsan_*.o \
488"
489FILES:libtsan-staticdev += "${libdir}/libtsan.a"
490
491FILES:gcc-sanitizers = "${libdir}/*.spec ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/sanitizer/*.h"
492
493# From libgcc.inc:
494
495FILES:libgcc = "${base_libdir}/libgcc_s.so.1"
496
497FILES:libgcc-dev = "\
498 ${base_libdir}/libgcc*.so \
499 ${@oe.utils.conditional('BASETARGET_SYS', '${TARGET_SYS}', '', '${libdir}/${BASETARGET_SYS}', d)} \
500 ${libdir}/${TARGET_SYS}/${BINV}* \
501 ${libdir}/${TARGET_ARCH}${TARGET_VENDOR}* \
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400502"
503
504FILES:linux-libc-headers = ""
505FILES:linux-libc-headers-dev = "\
506 ${includedir}/asm* \
507 ${includedir}/linux \
508 ${includedir}/mtd \
509 ${includedir}/rdma \
510 ${includedir}/scsi \
511 ${includedir}/sound \
512 ${includedir}/video \
513"
514FILES:${PN} += "\
515 ${libdir}/bin \
516 ${libdir}/locale \
517 ${libdir}/gconv/gconv-modules \
518 ${datadir}/zoneinfo \
519 ${base_libdir}/libcrypt*.so.* \
520 ${base_libdir}/libcrypt-*.so \
521 ${base_libdir}/libc.so.* \
522 ${base_libdir}/libc-*.so \
523 ${base_libdir}/libm.so.* \
524 ${base_libdir}/libmemusage.so \
525 ${base_libdir}/libm-*.so \
526 ${base_libdir}/ld*.so.* \
527 ${base_libdir}/ld-*.so \
528 ${base_libdir}/libpthread*.so.* \
529 ${base_libdir}/libpthread*.so \
530 ${base_libdir}/libpthread-*.so \
531 ${base_libdir}/libresolv*.so.* \
532 ${base_libdir}/libresolv-*.so \
533 ${base_libdir}/librt*.so.* \
534 ${base_libdir}/librt-*.so \
535 ${base_libdir}/libutil*.so.* \
536 ${base_libdir}/libutil-*.so \
537 ${base_libdir}/libnss_files*.so.* \
538 ${base_libdir}/libnss_files-*.so \
539 ${base_libdir}/libnss_compat*.so.* \
540 ${base_libdir}/libnss_compat-*.so \
541 ${base_libdir}/libnss_dns*.so.* \
542 ${base_libdir}/libnss_dns-*.so \
543 ${base_libdir}/libnss_nis*.so.* \
544 ${base_libdir}/libnss_nisplus-*.so \
545 ${base_libdir}/libnss_nisplus*.so.* \
546 ${base_libdir}/libnss_nis-*.so \
547 ${base_libdir}/libnss_hesiod*.so.* \
548 ${base_libdir}/libnss_hesiod-*.so \
549 ${base_libdir}/libdl*.so.* \
550 ${base_libdir}/libdl-*.so \
551 ${base_libdir}/libanl*.so.* \
552 ${base_libdir}/libanl-*.so \
553 ${base_libdir}/libBrokenLocale*.so.* \
554 ${base_libdir}/libBrokenLocale-*.so \
555 ${base_libdir}/libthread_db*.so.* \
556 ${base_libdir}/libthread_db-*.so \
557 ${base_libdir}/libmemusage.so \
558 ${base_libdir}/libSegFault.so \
559 ${base_libdir}/libpcprofile.so \
560 "
561
562FILES:${PN}-dbg += "${base_libdir}/debug"
563
564# From gcc-runtime.inc
565
566# include python debugging scripts
567FILES:gcc-runtime-dbg += "\
568 ${libdir}/libstdc++.so.*-gdb.py \
569 ${datadir}/gcc-${BINV}/python/libstdcxx \
570"
571
572FILES:libg2c = "${target_libdir}/libg2c.so.*"
573SUMMARY:libg2c = "Companion runtime library for g77"
574FILES:libg2c-dev = "\
575 ${libdir}/libg2c.so \
576 ${libdir}/libg2c.a \
577 ${libdir}/libfrtbegin.a \
578"
579SUMMARY:libg2c-dev = "Companion runtime library for g77 - development files"
580
581FILES:libstdc++ = "${libdir}/libstdc++.so.*"
582SUMMARY:libstdc++ = "GNU standard C++ library"
583FILES:libstdc++-dev = "\
584 /include/c++ \
585 ${includedir}/c++/ \
586 ${libdir}/libstdc++.so \
587 ${libdir}/libstdc++*.la \
588 ${libdir}/libsupc++.la \
589"
590SUMMARY:libstdc++-dev = "GNU standard C++ library - development files"
591
592FILES:libstdc++-staticdev = "\
593 ${libdir}/libstdc++*.a \
594 ${libdir}/libsupc++.a \
595"
596SUMMARY:libstdc++-staticdev = "GNU standard C++ library - static development files"
597
598FILES:libstdc++-precompile-dev = "${includedir}/c++/${TARGET_SYS}/bits/*.gch"
599SUMMARY:libstdc++-precompile-dev = "GNU standard C++ library - precompiled header files"
600
601FILES:libssp = "${libdir}/libssp.so.*"
602SUMMARY:libssp = "GNU stack smashing protection library"
603FILES:libssp-dev = "\
604 ${libdir}/libssp*.so \
605 ${libdir}/libssp*_nonshared.a \
606 ${libdir}/libssp*.la \
607 ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ssp \
608"
609SUMMARY:libssp-dev = "GNU stack smashing protection library - development files"
610FILES:libssp-staticdev = "${libdir}/libssp*.a"
611SUMMARY:libssp-staticdev = "GNU stack smashing protection library - static development files"
612
613FILES:libquadmath = "${libdir}/libquadmath*.so.*"
614SUMMARY:libquadmath = "GNU quad-precision math library"
615FILES:libquadmath-dev = "\
616 ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/quadmath* \
617 ${libdir}/libquadmath*.so \
618 ${libdir}/libquadmath.la \
619"
620SUMMARY:libquadmath-dev = "GNU quad-precision math library - development files"
621FILES:libquadmath-staticdev = "${libdir}/libquadmath.a"
622SUMMARY:libquadmath-staticdev = "GNU quad-precision math library - static development files"
623
624# NOTE: mudflap has been removed as of gcc 4.9 and has been superseded by the address sanitiser
625FILES:libmudflap = "${libdir}/libmudflap*.so.*"
626SUMMARY:libmudflap = "Pointer debugging library for gcc"
627FILES:libmudflap-dev = "\
628 ${libdir}/libmudflap*.so \
629 ${libdir}/libmudflap.la \
630"
631SUMMARY:libmudflap-dev = "Pointer debugging library for gcc - development files"
632FILES:libmudflap-staticdev = "${libdir}/libmudflap.a"
633SUMMARY:libmudflap-staticdev = "Pointer debugging library for gcc - static development files"
634
635FILES:libgomp = "${libdir}/libgomp*${SOLIBS}"
636SUMMARY:libgomp = "GNU OpenMP parallel programming library"
637FILES:libgomp-dev = "\
638 ${libdir}/libgomp*${SOLIBSDEV} \
639 ${libdir}/libgomp*.la \
640 ${libdir}/libgomp.spec \
641 ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/omp.h \
642 ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/openacc.h \
643"
644SUMMARY:libgomp-dev = "GNU OpenMP parallel programming library - development files"
645FILES:libgomp-staticdev = "${libdir}/libgomp*.a"
646SUMMARY:libgomp-staticdev = "GNU OpenMP parallel programming library - static development files"
647
648FILES:libatomic = "${libdir}/libatomic.so.*"
649SUMMARY:libatomic = "GNU C++11 atomics support library"
650FILES:libatomic-dev = "\
651 ${libdir}/libatomic.so \
652 ${libdir}/libatomic.la \
653"
654SUMMARY:libatomic-dev = "GNU C++11 atomics support library - development files"
655FILES:libatomic-staticdev = "${libdir}/libatomic.a"
656SUMMARY:libatomic-staticdev = "GNU C++11 atomics support library - static development files"
657
658FILES:libitm = "${libdir}/libitm.so.*"
659SUMMARY:libitm = "GNU transactional memory support library"
660FILES:libitm-dev = "\
661 ${libdir}/libitm.so \
662 ${libdir}/libitm.la \
663 ${libdir}/libitm.spec \
664"
665SUMMARY:libitm-dev = "GNU transactional memory support library - development files"
666FILES:libitm-staticdev = "${libdir}/libitm.a"
667SUMMARY:libitm-staticdev = "GNU transactional memory support library - static development files"
668
669EAT_VER_MAIN ??= ""
670
671python () {
672 if not d.getVar("EAT_VER_MAIN", False):
673 raise bb.parse.SkipPackage("External ARM toolchain not configured (EAT_VER_MAIN not set).")
674 if d.getVar('TCLIBC', True) != "glibc":
675 raise bb.parse.SkipPackage("incompatible with %s" % d.getVar('TCLIBC', True))
676}