1require libgcc-common.inc
2
3DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ virtual/${MLPREFIX}libc"
4
5do_install:append:class-target () {
6	if [ "${TCLIBC}" != "glibc" ]; then
7		case "${TARGET_OS}" in
8			"linux-musl" | "linux-*spe") extra_target_os="linux";;
9			"linux-musleabi") extra_target_os="linux-gnueabi";;
10			*) extra_target_os="linux";;
11		esac
12		if [ ! -e ${D}${libdir}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os ]; then
13			ln -s ${TARGET_SYS} ${D}${libdir}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os
14		fi
15	fi
16	if [ -n "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" ]; then
17		case "${TARGET_OS}" in
18			"linux-musleabi") extra_target_os="linux-musleabihf";;
19			"linux-gnueabi") extra_target_os="linux-gnueabihf";;
20		esac
21		if [ ! -e ${D}${libdir}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os ]; then
22			ln -s ${TARGET_SYS} ${D}${libdir}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os
23		fi
24	fi
25}
26
27PACKAGES = "\
28    ${PN} \
29    ${PN}-dev \
30    ${PN}-dbg \
31"
32
33# All libgcc source is marked with the exception.
34#
35LICENSE:${PN} = "GPL-3.0-with-GCC-exception"
36LICENSE:${PN}-dev = "GPL-3.0-with-GCC-exception"
37LICENSE:${PN}-dbg = "GPL-3.0-with-GCC-exception"
38
39
40FILES:${PN}-dev = "\
41    ${base_libdir}/libgcc*.so \
42    ${@oe.utils.conditional('BASETARGET_SYS', '${TARGET_SYS}', '', '${libdir}/${BASETARGET_SYS}', d)} \
43    ${libdir}/${TARGET_SYS}/${BINV}* \
44    ${libdir}/${TARGET_ARCH}${TARGET_VENDOR}* \
45"
46
47do_package[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
48do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
49do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
50do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
51
52INSANE_SKIP:${PN}-dev = "staticdev"
53
54