From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: [PATCH] gcc-cross-initial: Separate out libgcc-initial
Date: Thu, 24 Apr 2014 15:24:09 +0100 [thread overview]
Message-ID: <1398349449.16672.178.camel@ted> (raw)
Its useful to separate out the native (cross) binaries from the target
compilation. We already do this for libgcc, this now takes the same
approach for -initial.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/recipes-core/eglibc/eglibc-initial.inc b/meta/recipes-core/eglibc/eglibc-initial.inc
index 0f0e1cd..4cc6ffe 100644
--- a/meta/recipes-core/eglibc/eglibc-initial.inc
+++ b/meta/recipes-core/eglibc/eglibc-initial.inc
@@ -1,4 +1,4 @@
-DEPENDS = "linux-libc-headers virtual/${TARGET_PREFIX}gcc-initial"
+DEPENDS = "linux-libc-headers virtual/${TARGET_PREFIX}gcc-initial libgcc-initial"
PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
PACKAGES = ""
diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/eglibc/eglibc.inc
index 375b9bc..04c5d9a 100644
--- a/meta/recipes-core/eglibc/eglibc.inc
+++ b/meta/recipes-core/eglibc/eglibc.inc
@@ -33,7 +33,7 @@ siteconfig_do_siteconfig_gencache_prepend = " \
"
# nptl needs unwind support in gcc, which can't be built without glibc.
-DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial linux-libc-headers virtual/${TARGET_PREFIX}libc-initial"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial libgcc-initial linux-libc-headers virtual/${TARGET_PREFIX}libc-initial"
# nptl needs libgcc but dlopens it, so our shlibs code doesn't detect this
#RDEPENDS_${PN} += "${@['','libgcc']['nptl' in '${GLIBC_ADDONS}']}"
PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial.inc b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
index 8184538..b6f04de 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-initial.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
@@ -38,10 +38,11 @@ do_configure_prepend () {
}
do_compile () {
- oe_runmake all-gcc all-target-libgcc
+ oe_runmake all-gcc configure-target-libgcc
}
do_install () {
- oe_runmake 'DESTDIR=${D}' install-gcc install-target-libgcc
+ ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h )
+ oe_runmake 'DESTDIR=${D}' install-gcc
# We don't really need this (here shares/ contains man/, info/, locale/).
rm -rf ${D}${datadir}/
@@ -64,6 +65,14 @@ do_install () {
# so we overwirte the generated include-fixed/limits.h for gcc-cross-initial
# to get rid references to real limits.h
cp gcc/include-fixed/limits.h ${D}${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed/limits.h
+
+ # gcc-runtime installs libgcc into a special location in staging since it breaks doing a standalone build
+ case ${PN} in
+ *gcc-cross-initial-${TARGET_ARCH}|*gcc-crosssdk-initial-${TARGET_ARCH})
+ dest=${D}/${includedir}/gcc-build-internal-initial-${TARGET_SYS}
+ hardlinkdir . $dest
+ ;;
+ esac
}
#
# Override the default sysroot staging copy since this won't look like a target system
diff --git a/meta/recipes-devtools/gcc/libgcc-initial.inc b/meta/recipes-devtools/gcc/libgcc-initial.inc
new file mode 100644
index 0000000..2ba27a8
--- /dev/null
+++ b/meta/recipes-devtools/gcc/libgcc-initial.inc
@@ -0,0 +1,16 @@
+require libgcc-common.inc
+
+DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial"
+
+STAGINGCC = "gcc-cross-initial"
+STAGINGCC_class-nativesdk = "gcc-crosssdk-initial"
+PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
+
+PACKAGES = ""
+
+EXTRA_OECONF += "--disable-shared"
+
+LIBGCCBUILDTREENAME = "gcc-build-internal-initial-"
+
+do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}/"
+
diff --git a/meta/recipes-devtools/gcc/libgcc-initial_4.8.bb b/meta/recipes-devtools/gcc/libgcc-initial_4.8.bb
new file mode 100644
index 0000000..19f253f
--- /dev/null
+++ b/meta/recipes-devtools/gcc/libgcc-initial_4.8.bb
@@ -0,0 +1,2 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require libgcc-initial.inc
reply other threads:[~2014-04-24 14:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1398349449.16672.178.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.