mirror of
https://git.yoctoproject.org/poky
synced 2026-02-27 03:49:41 +01:00
As discussed on the mailing lists, using a suffix to package names is hard and has lead to many recipes having to do PKGSUFFIX games. Its looking extremely hard to scale nativesdk much further without hacking many recipes. By comparison, using a prefix like multilib does works much better and doesn't involve "hacking" as many recipes. This change converts nativesdk to use a prefix using the existing multilib infrastructure. (From OE-Core rev: 81813c0e322dc04ce4b069117188d8a54dfddb8c) 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_package"
|
|
do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_package"
|
|
do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_package"
|
|
do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_package"
|
|
|
|
BBCLASSEXTEND = "nativesdk"
|
|
|
|
INSANE_SKIP_${PN}-dev = "staticdev"
|
|
INSANE_SKIP_${MLPREFIX}libgcov-dev = "staticdev"
|