summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-06-08 20:33:16 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-06-08 20:33:16 +0100
commitf47eeddbd692ac3c6109c18c9f04a3ad4dc789ba (patch)
treeabe9f2ef67deb85c5cde312123b53aac4daaf225 /meta
parentd579b7c746b7113d5a4867b851ed2dc7733299a8 (diff)
downloadopenembedded-core-f47eeddbd692ac3c6109c18c9f04a3ad4dc789ba.tar.gz
openembedded-core-f47eeddbd692ac3c6109c18c9f04a3ad4dc789ba.tar.bz2
openembedded-core-f47eeddbd692ac3c6109c18c9f04a3ad4dc789ba.tar.xz
openembedded-core-f47eeddbd692ac3c6109c18c9f04a3ad4dc789ba.zip
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>
Diffstat (limited to 'meta')
-rw-r--r--meta/packages/gcc/gcc-configure-runtime.inc10
-rw-r--r--meta/packages/gcc/gcc-cross-canadian_4.3.3.bb2
-rw-r--r--meta/packages/gcc/gcc-cross.inc2
-rw-r--r--meta/packages/gcc/gcc-cross_4.3.3.bb2
-rw-r--r--meta/packages/gcc/gcc-package-cross.inc27
-rw-r--r--meta/packages/gcc/gcc-package-runtime.inc4
-rw-r--r--meta/packages/gcc/gcc-runtime_4.3.3.bb3
7 files changed, 29 insertions, 21 deletions
diff --git a/meta/packages/gcc/gcc-configure-runtime.inc b/meta/packages/gcc/gcc-configure-runtime.inc
index 7b43aabf9..180ca8d0e 100644
--- a/meta/packages/gcc/gcc-configure-runtime.inc
+++ b/meta/packages/gcc/gcc-configure-runtime.inc
@@ -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
diff --git a/meta/packages/gcc/gcc-cross-canadian_4.3.3.bb b/meta/packages/gcc/gcc-cross-canadian_4.3.3.bb
index 64030ad32..ae3aab27b 100644
--- a/meta/packages/gcc/gcc-cross-canadian_4.3.3.bb
+++ b/meta/packages/gcc/gcc-cross-canadian_4.3.3.bb
@@ -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"
diff --git a/meta/packages/gcc/gcc-cross.inc b/meta/packages/gcc/gcc-cross.inc
index 8f13a36a8..02b23ffce 100644
--- a/meta/packages/gcc/gcc-cross.inc
+++ b/meta/packages/gcc/gcc-cross.inc
@@ -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
}
diff --git a/meta/packages/gcc/gcc-cross_4.3.3.bb b/meta/packages/gcc/gcc-cross_4.3.3.bb
index dbb6352d4..76d32673c 100644
--- a/meta/packages/gcc/gcc-cross_4.3.3.bb
+++ b/meta/packages/gcc/gcc-cross_4.3.3.bb
@@ -1,4 +1,4 @@
-PR = "r10"
+PR = "r12"
require gcc-${PV}.inc
require gcc-cross4.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
}
diff --git a/meta/packages/gcc/gcc-package-runtime.inc b/meta/packages/gcc/gcc-package-runtime.inc
index 908d2d513..40a9ed0d7 100644
--- a/meta/packages/gcc/gcc-package-runtime.inc
+++ b/meta/packages/gcc/gcc-package-runtime.inc
@@ -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 = "\
diff --git a/meta/packages/gcc/gcc-runtime_4.3.3.bb b/meta/packages/gcc/gcc-runtime_4.3.3.bb
index b625668be..f94e07ce2 100644
--- a/meta/packages/gcc/gcc-runtime_4.3.3.bb
+++ b/meta/packages/gcc/gcc-runtime_4.3.3.bb
@@ -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"