diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/libgcc_4.6.bb')
-rw-r--r-- | meta/recipes-devtools/gcc/libgcc_4.6.bb | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/meta/recipes-devtools/gcc/libgcc_4.6.bb b/meta/recipes-devtools/gcc/libgcc_4.6.bb index 9a8b20d87c..9db7243531 100644 --- a/meta/recipes-devtools/gcc/libgcc_4.6.bb +++ b/meta/recipes-devtools/gcc/libgcc_4.6.bb @@ -1,6 +1,7 @@ require gcc-${PV}.inc INHIBIT_DEFAULT_DEPS = "1" + DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" PKGSUFFIX = "" @@ -23,15 +24,26 @@ FILES_libgcov${PKGSUFFIX}-dev = " \ FILES_${PN}-dbg += "${base_libdir}/.debug/" -do_configure[noexec] = "1" -do_compile[noexec] = "1" - -do_install () { +do_configure () { target=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-nativesdk##` - - # Install libgcc from our gcc-cross saved data install -d ${D}${base_libdir} ${D}${libdir} - cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/* ${D} + cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/* ${B} + mkdir -p ${B}/${PN} + cd ${B}/${PN} + chmod a+x ${S}/${PN}/configure + ${S}/${PN}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} +} + +do_compile () { + target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##` + cd ${B}/${PN} + oe_runmake MULTIBUILDTOP=${B}/$target/${PN}/ +} + +do_install () { + target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##` + cd ${B}/${PN} + oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/${PN}/ install # Move libgcc_s into /lib mkdir -p ${D}${base_libdir} @@ -41,8 +53,11 @@ do_install () { mv ${D}${libdir}/libgcc* ${D}${base_libdir} || true fi - chown -R root:root ${D} - chmod +x ${D}${base_libdir}/libgcc_s.so.* + # 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/ } do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_package" |