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 <rpurdie@linux.intel.com>
This commit is contained in:
parent
d579b7c746
commit
f47eeddbd6
|
@ -6,20 +6,20 @@ EXTRA_OECONF_PATHS = " \
|
|||
--with-sysroot=${STAGING_DIR_TARGET} \
|
||||
--with-build-sysroot=${STAGING_DIR_TARGET}"
|
||||
|
||||
RUNTIMETARGET = "libgcc libssp libstdc++-v3"
|
||||
RUNTIMETARGET = "libssp libstdc++-v3"
|
||||
# ?
|
||||
# libiberty
|
||||
# libmudflap
|
||||
# libgfortran
|
||||
|
||||
do_configure () {
|
||||
cp ${STAGING_DIR_NATIVE}${prefix_native}/include/gcc-build-internal-${TARGET_SYS}/* ${S}/gcc
|
||||
export CXX="${CXX} -nostdinc++"
|
||||
for d in ${RUNTIMETARGET}; do
|
||||
echo "Configuring $d"
|
||||
mkdir -p ${B}/$d/
|
||||
cd ${B}/$d/
|
||||
chmod a+x ${S}/$d/configure
|
||||
${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF_PATHS}
|
||||
${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
|
||||
done
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,10 @@ do_compile () {
|
|||
}
|
||||
|
||||
do_install () {
|
||||
# Install libgcc from our gcc-cross saved data
|
||||
install -d ${D}${base_libdir} ${D}${libdir}
|
||||
cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-${TARGET_SYS}/* ${D}
|
||||
|
||||
for d in ${RUNTIMETARGET}; do
|
||||
cd ${B}/$d/
|
||||
oe_runmake 'DESTDIR=${D}' install
|
||||
|
|
|
@ -5,7 +5,7 @@ require gcc-cross-canadian.inc
|
|||
require gcc-configure-sdk.inc
|
||||
require gcc-package-sdk.inc
|
||||
|
||||
PR = "r9"
|
||||
PR = "r12"
|
||||
|
||||
DEPENDS += "gmp-nativesdk mpfr-nativesdk"
|
||||
RDEPENDS_${PN} += "mpfr-nativesdk"
|
||||
|
|
|
@ -11,6 +11,6 @@ require gcc-configure-cross.inc
|
|||
require gcc-package-cross.inc
|
||||
|
||||
do_compile () {
|
||||
oe_runmake all-host
|
||||
oe_runmake all-host all-target-libgcc
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
PR = "r10"
|
||||
PR = "r12"
|
||||
|
||||
require gcc-${PV}.inc
|
||||
require gcc-cross4.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
|
||||
}
|
||||
|
|
|
@ -17,8 +17,8 @@ PACKAGES = "\
|
|||
FILES_libgcc = "${base_libdir}/libgcc*.so.*"
|
||||
FILES_libgcc-dev = " \
|
||||
${base_libdir}/libgcc*.so \
|
||||
${libdir}/gcc/${TARGET_SYS}/${BINV}/crt* \
|
||||
${libdir}/gcc/${TARGET_SYS}/${BINV}/libgcc*"
|
||||
${libdir}/${TARGET_SYS}/${BINV}/crt* \
|
||||
${libdir}/${TARGET_SYS}/${BINV}/libgcc*"
|
||||
|
||||
FILES_libg2c = "${target_libdir}/libg2c.so.*"
|
||||
FILES_libg2c-dev = "\
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
PR = "r10"
|
||||
PR = "r12"
|
||||
|
||||
require gcc-${PV}.inc
|
||||
require gcc-configure-runtime.inc
|
||||
|
@ -8,3 +8,4 @@ SRC_URI_append = "file://fortran-cross-compile-hack.patch;patch=1"
|
|||
|
||||
ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
|
||||
|
||||
EXTRA_OECONF += "--disable-libunwind-exceptions"
|
||||
|
|
Loading…
Reference in New Issue