summaryrefslogtreecommitdiff
path: root/meta/packages/gcc
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-03-29 22:27:13 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-03-29 22:27:13 +0100
commitcdaf6c804b703d58839e449041b12f698cb5ebbe (patch)
treeb2330e4295ffa036249dd058b42f5b9cf1ced6bb /meta/packages/gcc
parent7a7c2341c7be47e054bb1b7788ea1b5dcebbc732 (diff)
downloadopenembedded-core-cdaf6c804b703d58839e449041b12f698cb5ebbe.tar.gz
openembedded-core-cdaf6c804b703d58839e449041b12f698cb5ebbe.tar.bz2
openembedded-core-cdaf6c804b703d58839e449041b12f698cb5ebbe.zip
gcc-runtime: Add initial recipe
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/packages/gcc')
-rw-r--r--meta/packages/gcc/gcc-configure-runtime.inc5
-rw-r--r--meta/packages/gcc/gcc-configure-target.inc1
-rw-r--r--meta/packages/gcc/gcc-cross-initial.inc4
-rw-r--r--meta/packages/gcc/gcc-cross-intermediate.inc4
-rw-r--r--meta/packages/gcc/gcc-cross_4.3.3.bb6
-rw-r--r--meta/packages/gcc/gcc-package-cross.inc46
-rw-r--r--meta/packages/gcc/gcc-package-runtime.inc70
-rw-r--r--meta/packages/gcc/gcc-package-sdk.inc12
-rw-r--r--meta/packages/gcc/gcc-package-target.inc63
-rw-r--r--meta/packages/gcc/gcc-runtime_4.3.3.bb46
10 files changed, 142 insertions, 115 deletions
diff --git a/meta/packages/gcc/gcc-configure-runtime.inc b/meta/packages/gcc/gcc-configure-runtime.inc
new file mode 100644
index 0000000000..2fd3114911
--- /dev/null
+++ b/meta/packages/gcc/gcc-configure-runtime.inc
@@ -0,0 +1,5 @@
+require gcc-configure-common.inc
+
+EXTRA_OECONF_PATHS = " \
+ --with-local-prefix=${STAGING_DIR_TARGET}${prefix} \
+ --with-gxx-include-dir=${includedir}/c++/${BINV}/"
diff --git a/meta/packages/gcc/gcc-configure-target.inc b/meta/packages/gcc/gcc-configure-target.inc
index 44d6136240..2fd3114911 100644
--- a/meta/packages/gcc/gcc-configure-target.inc
+++ b/meta/packages/gcc/gcc-configure-target.inc
@@ -3,4 +3,3 @@ require gcc-configure-common.inc
EXTRA_OECONF_PATHS = " \
--with-local-prefix=${STAGING_DIR_TARGET}${prefix} \
--with-gxx-include-dir=${includedir}/c++/${BINV}/"
-
diff --git a/meta/packages/gcc/gcc-cross-initial.inc b/meta/packages/gcc/gcc-cross-initial.inc
index 4bd21232e1..a3545417ce 100644
--- a/meta/packages/gcc/gcc-cross-initial.inc
+++ b/meta/packages/gcc/gcc-cross-initial.inc
@@ -17,3 +17,7 @@ EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${target_prefix} \
--with-sysroot=${STAGING_DIR_TARGET} \
--with-build-sysroot=${STAGING_DIR_TARGET} \
${@get_gcc_fpu_setting(bb, d)}"
+
+do_compile () {
+ oe_runmake
+}
diff --git a/meta/packages/gcc/gcc-cross-intermediate.inc b/meta/packages/gcc/gcc-cross-intermediate.inc
index e298307b67..169419f247 100644
--- a/meta/packages/gcc/gcc-cross-intermediate.inc
+++ b/meta/packages/gcc/gcc-cross-intermediate.inc
@@ -16,6 +16,10 @@ EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${target_prefix} \
--with-build-sysroot=${STAGING_DIR_TARGET} \
${@get_gcc_fpu_setting(bb, d)}"
+do_compile () {
+ oe_runmake
+}
+
do_install () {
oe_runmake 'DESTDIR=${D}' install
}
diff --git a/meta/packages/gcc/gcc-cross_4.3.3.bb b/meta/packages/gcc/gcc-cross_4.3.3.bb
index 22efffa539..6122d4c423 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 = "r7"
+PR = "r10"
require gcc-${PV}.inc
require gcc-cross4.inc
@@ -10,3 +10,7 @@ SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
EXTRA_OECONF += "--disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}"
ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}"
+
+do_compile () {
+ oe_runmake all-host
+}
diff --git a/meta/packages/gcc/gcc-package-cross.inc b/meta/packages/gcc/gcc-package-cross.inc
index cb23b23f22..6c56504828 100644
--- a/meta/packages/gcc/gcc-package-cross.inc
+++ b/meta/packages/gcc/gcc-package-cross.inc
@@ -1,42 +1,11 @@
-INHIBIT_PACKAGE_STRIP ?= ""
-OLD_INHIBIT_PACKAGE_STRIP := "${INHIBIT_PACKAGE_STRIP}"
INHIBIT_PACKAGE_STRIP = "1"
-PACKAGES = "libgcc libssp libstdc++ libg2c libgfortran"
-
-# Called from within gcc-cross, so libdir is set wrong
-FILES_libg2c = "${target_libdir}/libg2c.so.*"
-
-FILES_libssp = "${target_libdir}/libssp.so.*"
-
-FILES_libgfortran = "${target_libdir}/libgfortran.so.*"
-
-FILES_libgcc = "${target_base_libdir}/libgcc_s.so.1"
-
-FILES_libstdc++ = "${target_libdir}/libstdc++.so.*"
-
do_install () {
- oe_runmake 'DESTDIR=${D}' install
+ oe_runmake 'DESTDIR=${D}' install-host
install -d ${D}${target_base_libdir}
install -d ${D}${target_libdir}
-
- for d in ${TARGET_SYS}/lib/nof ${TARGET_SYS}/lib64 ${TARGET_SYS}/lib; do
- if [ -d ${D}${prefix}/$d/ ]; then
- mv -f ${D}${prefix}/$d/libgcc* ${D}${target_base_libdir} || true
- mv -f ${D}${prefix}/$d/* ${D}${target_libdir} || true
- fi
- done
-
- # Manually run the target stripper since we won't get it run by
- # the packaging.
- if [ "x${OLD_INHIBIT_PACKAGE_STRIP}" != "x1" ]; then
- ${TARGET_PREFIX}strip ${D}${target_libdir}/libstdc++.so.* || true
- ${TARGET_PREFIX}strip ${D}${target_libdir}/libg2c.so.* || true
- ${TARGET_PREFIX}strip ${D}${target_base_libdir}/libgcc_s.so.* || true
- ${TARGET_PREFIX}strip ${D}${target_libdir}/libgfortran*.so* || true
- fi
-
+
# Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77
# gfortran is fully backwards compatible. This is a safe and practical solution.
ln -sf ${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ${CROSS_DIR}/bin/${TARGET_PREFIX}g77 || true
@@ -47,12 +16,9 @@ do_install () {
rm -rf ${D}${CROSS_DIR}/$d
done
- #fix up libsupc++ and libstdc++ la files
- for f in libssp.la libssp_nonshared.la libsupc++.la libstdc++.la ; do
- # Remove any -L options from dependency_libs - we should never need them as the
- # files are in the sysroot
- sed -i "s|\(dependency_libs\s*=.*\)-L\s*[^ ]*\(.*\)|\1\2|g" ${D}${target_libdir}/$f || true
- # Set libdir correctly
- sed -i "s|libdir\s*=.*|libdir='${target_libdir}'|g" ${D}${target_libdir}/$f || true
+ # gcc-runtime requires some headers, we stash them here
+ install -d ${D}${includedir}/gcc-build-internal
+ for f in auto-host.h gcov-iov.h gthr-default.h libgcc.mvars options.h tconfig.h tm.h; do
+ cp ${B}/gcc/$f ${D}${includedir}/gcc-build-internal/
done
}
diff --git a/meta/packages/gcc/gcc-package-runtime.inc b/meta/packages/gcc/gcc-package-runtime.inc
new file mode 100644
index 0000000000..646e58c589
--- /dev/null
+++ b/meta/packages/gcc/gcc-package-runtime.inc
@@ -0,0 +1,70 @@
+PACKAGES = "\
+ libgcc \
+ libgcc-dev \
+ libstdc++ \
+ libstdc++-precompile-dev \
+ libstdc++-dev \
+ libg2c \
+ libg2c-dev \
+ libssp \
+ libssp-dev \
+ libgfortran \
+ libgfortran-dev \
+ libmudflap \
+ libmudflap-dev \
+"
+
+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*"
+
+FILES_libg2c = "${target_libdir}/libg2c.so.*"
+FILES_libg2c-dev = "\
+ ${libdir}/libg2c.so \
+ ${libdir}/libg2c.a \
+ ${libdir}/libfrtbegin.a"
+
+FILES_libstdc++ = "${libdir}/libstdc++.so.*"
+FILES_libstdc++-dev = "\
+ ${includedir}/c++/${BINV} \
+ ${libdir}/libstdc++.so \
+ ${libdir}/libstdc++.la \
+ ${libdir}/libstdc++.a \
+ ${libdir}/libsupc++.la \
+ ${libdir}/libsupc++.a"
+
+FILES_libstdc++-precompile-dev = "${includedir}/c++/${BINV}/${TARGET_SYS}/bits/*.gch"
+
+FILES_libssp = "${libdir}/libssp.so.*"
+FILES_libssp-dev = " \
+ ${libdir}/libssp*.so \
+ ${libdir}/libssp*.a \
+ ${libdir}/libssp*.la \
+ ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ssp"
+
+FILES_libgfortran = "${libdir}/libgfortran.so.*"
+FILES_libgfortran-dev = " \
+ ${libdir}/libgfortran.a \
+ ${libdir}/libgfortran.so \
+ ${libdir}/libgfortranbegin.a"
+
+FILES_libmudflap = "${libdir}/libmudflap*.so.*"
+FILES_libmudflap-dev = "\
+ ${libdir}/libmudflap*.so \
+ ${libdir}/libmudflap*.a \
+ ${libdir}/libmudflap*.la"
+
+
+do_install () {
+ oe_runmake 'DESTDIR=${D}' install-target
+
+ # 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
+}
diff --git a/meta/packages/gcc/gcc-package-sdk.inc b/meta/packages/gcc/gcc-package-sdk.inc
index 0e66772d10..cdce1da1c7 100644
--- a/meta/packages/gcc/gcc-package-sdk.inc
+++ b/meta/packages/gcc/gcc-package-sdk.inc
@@ -1,5 +1,3 @@
-INHIBIT_PACKAGE_STRIP ?= ""
-OLD_INHIBIT_PACKAGE_STRIP := "${INHIBIT_PACKAGE_STRIP}"
INHIBIT_PACKAGE_STRIP = "1"
# Having anything auto depending on gcc-cross-sdk is a really bad idea...
@@ -30,7 +28,7 @@ FILES_${PN}-doc = "\
"
do_install () {
- oe_runmake 'DESTDIR=${D}' install
+ oe_runmake 'DESTDIR=${D}' install-host
# Cleanup some of the ${libdir}{,exec}/gcc stuff ...
rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
@@ -52,13 +50,5 @@ do_install () {
ln -sf "${bindir}/`basename $l`" "${D}${prefix}/${TARGET_SYS}/bin/`basename $l | sed -e 's,${TARGET_PREFIX},,'`"
done
ln -sf "${bindir}/${TARGET_PREFIX}gcc" "${D}${prefix}/${TARGET_SYS}/bin/cc"
-
- # Manually run the target stripper since we won't get it run by
- # the packaging.
- if [ "x${OLD_INHIBIT_PACKAGE_STRIP}" != "x1" ]; then
- ${TARGET_PREFIX}strip ${D}${prefix}/${TARGET_SYS}/lib/libstdc++.so.*
- ${TARGET_PREFIX}strip ${D}${prefix}/${TARGET_SYS}/lib/libg2c.so.* || true
- ${TARGET_PREFIX}strip ${D}${prefix}/${TARGET_SYS}/lib/libgcc_s.so.*
- fi
}
diff --git a/meta/packages/gcc/gcc-package-target.inc b/meta/packages/gcc/gcc-package-target.inc
index c1200b8bc7..f668211e71 100644
--- a/meta/packages/gcc/gcc-package-target.inc
+++ b/meta/packages/gcc/gcc-package-target.inc
@@ -5,11 +5,6 @@ PACKAGES = "\
g77 g77-symlinks \
gfortran gfortran-symlinks \
gcov gcov-symlinks \
- libmudflap libmudflap-dev \
- libgcc-dev \
- libstdc++-dev \
- libg2c-dev \
- libgfortran-dev \
${PN}-doc \
"
@@ -54,17 +49,6 @@ FILES_cpp-symlinks = "${bindir}/cpp"
FILES_gcov = "${bindir}/${TARGET_PREFIX}gcov"
FILES_gcov-symlinks = "${bindir}/gcov"
-FILES_libgcc = "${base_libdir}/libgcc*.so.*"
-FILES_libgcc-dev = "${base_libdir}/libgcc*.so"
-
-# Called from within gcc-cross, so libdir is set wrong
-FILES_libg2c = "${target_libdir}/libg2c.so.*"
-FILES_libg2c-dev = "\
- ${libdir}/libg2c.so \
- ${libdir}/libg2c.a \
- ${libdir}/libfrtbegin.a \
-"
-
FILES_g++ = "\
${bindir}/${TARGET_PREFIX}g++ \
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus \
@@ -74,26 +58,6 @@ FILES_g++-symlinks = "\
${bindir}/g++ \
"
-FILES_libstdc++ = "${libdir}/libstdc++.so.*"
-FILES_libstdc++-dev = "\
- ${includedir}/c++/${BINV} \
- ${libdir}/libstdc++.so \
- ${libdir}/libstdc++.la \
- ${libdir}/libstdc++.a \
- ${libdir}/libsupc++.la \
- ${libdir}/libsupc++.a \
-"
-
-FILES_libgfortran-dev = "${libdir}/libgfortran.a \
- ${libdir}/libgfortran.so \
- ${libdir}/libgfortranbegin.a"
-
-FILES_libmudflap = "${libdir}/libmudflap*.so.*"
-FILES_libmudflap-dev = "\
- ${libdir}/libmudflap*.so \
- ${libdir}/libmudflap*.a \
- ${libdir}/libmudflap*.a \
-"
FILES_${PN}-doc = "\
${infodir} \
@@ -102,7 +66,7 @@ FILES_${PN}-doc = "\
"
do_install () {
- autotools_do_install
+ oe_runmake 'DESTDIR=${D}' install-host
# Cleanup some of the ${libdir}{,exec}/gcc stuff ...
rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
@@ -111,28 +75,9 @@ do_install () {
# Hack around specs file assumptions
test -f ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/specs && sed -i -e '/^*cross_compile:$/ { n; s/1/0/; }' ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/specs
- # Move libgcc_s into /lib
- mkdir -p ${D}${base_libdir}
- if [ -f ${D}${libdir}/nof/libgcc_s.so ]; then
- mv ${D}${libdir}/nof/libgcc_s.so.* ${D}${base_libdir}
- else
- mv ${D}${libdir}/libgcc_s.so.* ${D}${base_libdir} || true
- fi
- rm -f ${D}${libdir}/libgcc_s.so || true
- ln -sf `echo ${libdir}/gcc/${TARGET_SYS}/${BINV} \
- | tr -s / \
- | sed -e 's,^/,,' -e 's,[^/]*,..,g'`/lib/libgcc_s.so.1 \
- ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/libgcc_s.so
-
- # We don't need libtool libraries
- rm -f ${D}${libdir}/libg2c.la &>/dev/null || true
-
# Cleanup manpages..
rm -rf ${D}${mandir}/man7
- # We use libiberty from binutils
- rm -f ${D}${libdir}/libiberty.a
-
cd ${D}${bindir}
# We care about g++ not c++
@@ -141,9 +86,6 @@ do_install () {
# We don't care about the gcc-<version> ones for this
rm -f *gcc-?.?*
- # These sometimes show up, they are strange, we remove them
- rm -f ${TARGET_ARCH}-*${TARGET_ARCH}-*
-
# Symlinks so we can use these trivially on the target
ln -sf ${TARGET_SYS}-g77 g77 || true
ln -sf ${TARGET_SYS}-gfortran gfortran || true
@@ -155,7 +97,4 @@ do_install () {
ln -sf gcc cc
ln -sf ${bindir}/${TARGET_SYS}-cpp ${D}${base_libdir}/cpp
ln -sf ${bindir}/${TARGET_SYS}-cpp ${D}${bindir}/cpp
-
- # Remove precompiled c++ headers as they are really big
- rm -rf ${D}${includedir}/c++/${BINV}/${TARGET_SYS}/bits/*.gch
}
diff --git a/meta/packages/gcc/gcc-runtime_4.3.3.bb b/meta/packages/gcc/gcc-runtime_4.3.3.bb
new file mode 100644
index 0000000000..080841ce8f
--- /dev/null
+++ b/meta/packages/gcc/gcc-runtime_4.3.3.bb
@@ -0,0 +1,46 @@
+PR = "r10"
+
+require gcc-${PV}.inc
+require gcc-configure-runtime.inc
+require gcc-package-runtime.inc
+
+SRC_URI_append = "file://fortran-cross-compile-hack.patch;patch=1"
+
+ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
+
+RUNTIMETARGET = "libgcc libssp libstdc++-v3"
+# ?
+# libiberty
+# libmudflap
+# libgfortran
+
+do_configure () {
+ cp ${CROSS_DIR}/include/gcc-build-internal/* ${S}/gcc
+ 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}
+ done
+}
+
+do_compile () {
+ for d in ${RUNTIMETARGET}; do
+ cd ${B}/$d/
+ oe_runmake
+ done
+}
+
+do_install () {
+ for d in ${RUNTIMETARGET}; do
+ cd ${B}/$d/
+ oe_runmake 'DESTDIR=${D}' install
+ done
+}
+
+INHIBIT_DEFAULT_DEPS = "1"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
+PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs"
+
+BBCLASSEXTEND = "nativesdk"