summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools/gcc
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-22 10:04:03 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-22 18:30:07 +0100
commit430b1d6fcbf60df35036fe5bbf8e55f7fb8f5341 (patch)
treee9e4e08514e5733a70a72e94124a3a89a4c34fe7 /meta/recipes-devtools/gcc
parentcbb63ca9e7e6d397198808e862f812f1012c74a7 (diff)
downloadopenembedded-core-430b1d6fcbf60df35036fe5bbf8e55f7fb8f5341.tar.gz
openembedded-core-430b1d6fcbf60df35036fe5bbf8e55f7fb8f5341.tar.bz2
openembedded-core-430b1d6fcbf60df35036fe5bbf8e55f7fb8f5341.zip
gcc-cross.inc: Clean up after merge
* Remove the duplicate EXTRA_OECONF_PATHS that is overwritten * Merge the do_compile and do_compile_prepend * Group dependency and configuration variables together Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross.inc48
1 files changed, 18 insertions, 30 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
index bf22101807..a09fd54327 100644
--- a/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -1,26 +1,38 @@
inherit cross
+INHIBIT_DEFAULT_DEPS = "1"
+EXTRADEPENDS = ""
DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc ${EXTRADEPENDS} ${NATIVEDEPS}"
PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
+python () {
+ if d.getVar("TARGET_OS", True).startswith("linux"):
+ d.setVar("EXTRADEPENDS", "linux-libc-headers")
+}
require gcc-configure-common.inc
-EXTRA_OECONF += " --enable-poison-system-directories \
- "
+EXTRA_OECONF += " --enable-poison-system-directories"
+EXTRA_OECONF_append_sh4 = " --with-multilib-list= --enable-incomplete-targets "
-INHIBIT_DEFAULT_DEPS = "1"
+EXTRA_OECONF += "--disable-libunwind-exceptions \
+ --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native} \
+ --with-system-zlib "
EXTRA_OECONF_PATHS = " \
- --with-headers=${STAGING_DIR_TARGET}${SYSTEMHEADERS} \
- --with-gxx-include-dir=${STAGING_DIR_TARGET}${target_includedir}/c++ \
+ --with-gxx-include-dir=${STAGING_DIR_TARGET}${target_includedir}/c++ \
--with-sysroot=${STAGING_DIR_TARGET} \
--with-build-sysroot=${STAGING_DIR_TARGET}"
+ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}"
+
+LIBGCCS_VAR = "-lgcc_s"
+LIBGCCS_VAR_avr32 = ""
+
do_configure_prepend () {
sed -i 's/BUILD_INFO=info/BUILD_INFO=/' ${S}/gcc/configure
}
-do_compile_prepend () {
+do_compile () {
export CC="${BUILD_CC}"
export AR_FOR_TARGET="${TARGET_SYS}-ar"
export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib"
@@ -31,18 +43,7 @@ do_compile_prepend () {
export CPPFLAGS_FOR_TARGET="${TARGET_CPPFLAGS}"
export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}"
export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}"
-}
-
-LIBGCCS_VAR = "-lgcc_s"
-LIBGCCS_VAR_avr32 = ""
-EXTRADEPENDS = ""
-python () {
- if d.getVar("TARGET_OS", True).startswith("linux"):
- d.setVar("EXTRADEPENDS", "linux-libc-headers")
-}
-
-do_compile () {
oe_runmake all-host all-target-libgcc
# now generate script to drive testing
echo "#!/usr/bin/env sh" >${B}/${TARGET_PREFIX}testgcc
@@ -137,19 +138,6 @@ STOP
}
-EXTRA_OECONF_append_sh4 = " --with-multilib-list= --enable-incomplete-targets "
-
-EXTRA_OECONF += "--disable-libunwind-exceptions \
- --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native} \
- --with-system-zlib "
-
-EXTRA_OECONF_PATHS = " \
- --with-gxx-include-dir=${STAGING_DIR_TARGET}${target_includedir}/c++ \
- --with-sysroot=${STAGING_DIR_TARGET} \
- --with-build-sysroot=${STAGING_DIR_TARGET}"
-
-ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}"
-
INHIBIT_PACKAGE_STRIP = "1"
# Compute how to get from libexecdir to bindir in python (easier than shell)