From f47eeddbd692ac3c6109c18c9f04a3ad4dc789ba Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 8 Jun 2010 20:33:16 +0100 Subject: gcc-runtime: Various bug fixes * Use the -nostdinc++ to CXX fixing libstdc++ * Generate libgcc in gcc-cross, save the result and use in gcc-runtime * Fix the layout of the crt*.o files so the SDK compiler can find them Signed-off-by: Richard Purdie --- meta/packages/gcc/gcc-package-cross.inc | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'meta/packages/gcc/gcc-package-cross.inc') diff --git a/meta/packages/gcc/gcc-package-cross.inc b/meta/packages/gcc/gcc-package-cross.inc index 999925a6f..8a170d083 100644 --- a/meta/packages/gcc/gcc-package-cross.inc +++ b/meta/packages/gcc/gcc-package-cross.inc @@ -16,18 +16,21 @@ do_install () { rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/$d done - # gcc-runtime requires some headers, we stash them here + # gcc-runtime installs libgcc into a special location in staging since it breaks doing a standalone build if [ "${PN}" == "gcc-cross" -o "${PN}" == "gcc-crosssdk" ]; then - install -d ${D}${includedir}/gcc-build-internal-${TARGET_SYS} - for f in *.h *.c libgcc.mvars; do - cp ${B}/gcc/$f ${D}${includedir}/gcc-build-internal-${TARGET_SYS}/ - done - # Special for PowerPC (and possibly others) - if [ -f ${B}/gcc/tramp.S ]; then - cp ${B}/gcc/*.S ${D}${includedir}/gcc-build-internal-${TARGET_SYS}/ - fi - if [ -f libgcc.mvars]; then - cp ${B}/gcc/libgcc.mvars ${D}${includedir}/gcc-build-internal-${TARGET_SYS}/ - fi + dest=${D}/${includedir}/gcc-build-internal-${TARGET_SYS} + oe_runmake "DESTDIR=$dest" libdir=${target_libdir} base_libdir=${target_base_libdir} prefix=${target_prefix} exec_prefix=${target_exec_prefix} install-target-libgcc + + # Ideally here we'd override the libgcc Makefile's idea of slibdir but + # for now, we just move the files to the correct location + + install -d $dest${target_base_libdir} + mv $dest${target_exec_prefix}/${TARGET_SYS}/lib*/* $dest${target_base_libdir} + rm -rf $dest${target_exec_prefix}/${TARGET_SYS} + + # Also need to move gcc from /usr/lib/gcc/* to /usr/lib/ else the search paths won't find the crt*.o files + + mv $dest${target_libdir}/gcc/* $dest${target_libdir}/ + rmdir $dest${target_libdir}/gcc fi } -- cgit v1.2.3