Patchwork [13/28] gcc-cross-canadian: Merge 4.7 and 4.8 recipes into common include

login
register
mail settings
Submitter Richard Purdie
Date Aug. 22, 2013, 11:29 a.m.
Message ID <1377171000-6469-13-git-send-email-richard.purdie@linuxfoundation.org>
Download mbox | patch
Permalink /patch/56203/
State Accepted
Commit 3296c896f5a5ef7dd50ab4e00ddbf1c2476462dc
Headers show

Comments

Richard Purdie - Aug. 22, 2013, 11:29 a.m.
This removes duplication and follows the pattern of the other gcc recipes.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-devtools/gcc/gcc-cross-canadian.inc   | 19 ++++++++++++++++++
 .../recipes-devtools/gcc/gcc-cross-canadian_4.7.bb | 23 ----------------------
 .../recipes-devtools/gcc/gcc-cross-canadian_4.8.bb | 20 -------------------
 3 files changed, 19 insertions(+), 43 deletions(-)

Patch

diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index 10ddacf..85c3166 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -7,3 +7,22 @@  BPN = "gcc"
 DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-${HOST_PREFIX}libc-for-gcc nativesdk-gettext"
 
 GCCMULTILIB = "--enable-multilib"
+
+require gcc-configure-sdk.inc
+require gcc-package-sdk.inc
+
+ELFUTILS = "nativesdk-elfutils"
+DEPENDS += "nativesdk-gmp nativesdk-mpfr nativesdk-libmpc ${ELFUTILS} nativesdk-zlib"
+RDEPENDS_${PN} += "nativesdk-mpfr nativesdk-libmpc ${ELFUTILS}"
+
+SYSTEMHEADERS = "/usr/include"
+SYSTEMLIBS = "${target_base_libdir}/"
+SYSTEMLIBS1 = "${target_libdir}/"
+
+EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \
+		--disable-libgomp --disable-libmudflap \
+		--with-mpfr=${STAGING_DIR_HOST}${layout_exec_prefix} \
+		--with-mpc=${STAGING_DIR_HOST}${layout_exec_prefix}"
+
+# gcc 4.7 needs -isystem
+export ARCH_FLAGS_FOR_TARGET = "--sysroot=${STAGING_DIR_TARGET} -isystem=${target_includedir}"
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian_4.7.bb b/meta/recipes-devtools/gcc/gcc-cross-canadian_4.7.bb
index 53c4632..355757c 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-canadian_4.7.bb
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian_4.7.bb
@@ -1,26 +1,3 @@ 
-inherit cross-canadian
-
 require recipes-devtools/gcc/gcc-${PV}.inc
 require gcc-cross-canadian.inc
-require gcc-configure-sdk.inc
-require gcc-package-sdk.inc
-
-DEPENDS += "nativesdk-gmp nativesdk-mpfr nativesdk-libmpc nativesdk-elfutils"
-RDEPENDS_${PN} += "nativesdk-mpfr nativesdk-libmpc nativesdk-elfutils"
-
-SYSTEMHEADERS = "/usr/include"
-SYSTEMLIBS = "${target_base_libdir}/"
-SYSTEMLIBS1 = "${target_libdir}/"
-
-EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \
-		--disable-libgomp --disable-libmudflap \
-		--with-mpfr=${STAGING_DIR_HOST}${layout_exec_prefix} \
-		--with-mpc=${STAGING_DIR_HOST}${layout_exec_prefix}"
-
-# to find libmpfr
-# export LD_LIBRARY_PATH = "{STAGING_DIR_HOST}${layout_exec_prefix}"
-
-PARALLEL_MAKE = ""
 
-# gcc 4.7 needs -isystem
-export ARCH_FLAGS_FOR_TARGET = "--sysroot=${STAGING_DIR_TARGET} -isystem=${target_includedir}"
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian_4.8.bb b/meta/recipes-devtools/gcc/gcc-cross-canadian_4.8.bb
index bf49c3d..bf53c5c 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-canadian_4.8.bb
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian_4.8.bb
@@ -1,25 +1,5 @@ 
-inherit cross-canadian
-
 require recipes-devtools/gcc/gcc-${PV}.inc
 require gcc-cross-canadian.inc
-require gcc-configure-sdk.inc
-require gcc-package-sdk.inc
-
-ELFUTILS = "nativesdk-elfutils"
-DEPENDS += "nativesdk-gmp nativesdk-mpfr nativesdk-libmpc ${ELFUTILS} nativesdk-zlib"
-RDEPENDS_${PN} += "nativesdk-mpfr nativesdk-libmpc ${ELFUTILS}"
-
-SYSTEMHEADERS = "/usr/include"
-SYSTEMLIBS = "${target_base_libdir}/"
-SYSTEMLIBS1 = "${target_libdir}/"
 
-EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \
-		--disable-libgomp --disable-libmudflap \
-		--with-mpfr=${STAGING_DIR_HOST}${layout_exec_prefix} \
-		--with-mpc=${STAGING_DIR_HOST}${layout_exec_prefix}"
 
-# to find libmpfr
-# export LD_LIBRARY_PATH = "{STAGING_DIR_HOST}${layout_exec_prefix}"
 
-# gcc 4.7 needs -isystem
-export ARCH_FLAGS_FOR_TARGET = "--sysroot=${STAGING_DIR_TARGET} -isystem=${target_includedir}"