mirror of
https://git.yoctoproject.org/poky
synced 2026-04-24 21:32:12 +02:00
Currently, do_rootfs has a dependency on all the do_package output being present due to its usage of the pkgdata directories. This means that if you run: bitbake xxxx-image -c rootfs you end up having to fetch and unpack all the do_package data which is usually large and inefficient. It also means rm_work has to leave all the do_package data lying around so rootfs works. This patch splits the actual creation of the pkgdata directory off into a separate task, "packagedata" which happens immediately after do_package. We can then remap the dependencies so this task is depended upon, not do_package. Sstate can then be programmed not to require do_package at the appropriate times. Whilst this patch doesn't do so, it opens the possibility of rm_work wiping out the do_package output from WORKDIR as long as it also removed the do_package stamp (both normal and setscene variants) and allowing more space savings with rm_work which has been regularly requested. (From OE-Core rev: 6107ee294afde395e39d084c33e8e94013c625a9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
73 lines
2.1 KiB
BlitzBasic
73 lines
2.1 KiB
BlitzBasic
require recipes-devtools/gcc/gcc-${PV}.inc
|
|
|
|
INHIBIT_DEFAULT_DEPS = "1"
|
|
|
|
DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
|
|
|
|
PACKAGES = "\
|
|
${PN} \
|
|
${PN}-dev \
|
|
${PN}-dbg \
|
|
libgcov-dev \
|
|
"
|
|
|
|
FILES_${PN} = "${base_libdir}/libgcc*.so.*"
|
|
FILES_${PN}-dev = " \
|
|
${base_libdir}/libgcc*.so \
|
|
${libdir}/${TARGET_SYS}/${BINV}/*crt* \
|
|
${libdir}/${TARGET_SYS}/${BINV}/libgcc*"
|
|
FILES_libgcov-dev = " \
|
|
${libdir}/${TARGET_SYS}/${BINV}/libgcov.a \
|
|
"
|
|
FILES_${PN}-dbg += "${base_libdir}/.debug/"
|
|
|
|
do_configure () {
|
|
target=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-nativesdk##`
|
|
install -d ${D}${base_libdir} ${D}${libdir}
|
|
cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/* ${B}
|
|
mkdir -p ${B}/${BPN}
|
|
cd ${B}/${BPN}
|
|
chmod a+x ${S}/${BPN}/configure
|
|
${S}/${BPN}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
|
|
}
|
|
|
|
do_compile () {
|
|
target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##`
|
|
cd ${B}/${BPN}
|
|
oe_runmake MULTIBUILDTOP=${B}/$target/${BPN}/
|
|
}
|
|
|
|
do_install () {
|
|
target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##`
|
|
cd ${B}/${BPN}
|
|
oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/${BPN}/ install
|
|
|
|
# Move libgcc_s into /lib
|
|
mkdir -p ${D}${base_libdir}
|
|
if [ -f ${D}${libdir}/nof/libgcc_s.so ]; then
|
|
mv ${D}${libdir}/nof/libgcc* ${D}${base_libdir}
|
|
else
|
|
mv ${D}${libdir}/libgcc* ${D}${base_libdir} || true
|
|
fi
|
|
|
|
# install the runtime in /usr/lib/ not in /usr/lib/gcc on target
|
|
# so that cross-gcc can find it in the sysroot
|
|
|
|
mv ${D}${libdir}/gcc/* ${D}${libdir}
|
|
rm -rf ${D}${libdir}/gcc/
|
|
# unwind.h is installed here which is shipped in gcc-cross
|
|
# as well as target gcc and they are identical so we dont
|
|
# ship one with libgcc here
|
|
rm -rf ${D}${libdir}/${TARGET_SYS}/${BINV}/include
|
|
}
|
|
|
|
do_package[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
|
|
do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
|
|
do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
|
|
do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
|
|
|
|
BBCLASSEXTEND = "nativesdk"
|
|
|
|
INSANE_SKIP_${PN}-dev = "staticdev"
|
|
INSANE_SKIP_${MLPREFIX}libgcov-dev = "staticdev"
|