Patchwork [meta-oe/denzil,6/6] libgcc-4.5: Fix nativesdk build problem

login
register
mail settings
Submitter Koen Kooi
Date May 2, 2012, 9:45 a.m.
Message ID <1335951932-6143-6-git-send-email-koen@dominion.thruhere.net>
Download mbox | patch
Permalink /patch/26815/
State New, archived
Headers show

Comments

Koen Kooi - May 2, 2012, 9:45 a.m.
From: Khem Raj <raj.khem@gmail.com>

We need to use BPN instead of PN so we
access libgcc and not libgcc-nativesdk

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Tested-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 toolchain-layer/recipes-devtools/gcc/libgcc_4.5.bb |   32 +++++++++++---------
 1 file changed, 18 insertions(+), 14 deletions(-)

Patch

diff --git a/toolchain-layer/recipes-devtools/gcc/libgcc_4.5.bb b/toolchain-layer/recipes-devtools/gcc/libgcc_4.5.bb
index ecef5e7..3f63931 100644
--- a/toolchain-layer/recipes-devtools/gcc/libgcc_4.5.bb
+++ b/toolchain-layer/recipes-devtools/gcc/libgcc_4.5.bb
@@ -4,11 +4,14 @@  INHIBIT_DEFAULT_DEPS = "1"
 
 DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
 
+PKGSUFFIX = ""
+PKGSUFFIX_virtclass-nativesdk = "-nativesdk"
+
 PACKAGES = "\
   ${PN} \
   ${PN}-dev \
   ${PN}-dbg \
-  libgcov-dev \
+  libgcov${PKGSUFFIX}-dev \
   "
 
 FILES_${PN} = "${base_libdir}/libgcc*.so.*"
@@ -16,31 +19,31 @@  FILES_${PN}-dev = " \
   ${base_libdir}/libgcc*.so \
   ${libdir}/${TARGET_SYS}/${BINV}/crt* \
   ${libdir}/${TARGET_SYS}/${BINV}/libgcc*"
-FILES_libgcov-dev = " \
-  ${libdir}/${TARGET_SYS}/${BINV}/libgcov.a"
-
+FILES_libgcov${PKGSUFFIX}-dev = " \
+  ${libdir}/${TARGET_SYS}/${BINV}/libgcov.a \
+  "
 FILES_${PN}-dbg += "${base_libdir}/.debug/"
 
 do_configure () {
 	target=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-nativesdk##`
 	install -d ${D}${base_libdir} ${D}${libdir}
 	cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/* ${B}
-	mkdir -p ${B}/${PN}
-	cd ${B}/${PN}
-	chmod a+x ${S}/${PN}/configure
-	${S}/${PN}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
+	mkdir -p ${B}/${BPN}
+	cd ${B}/${BPN}
+	chmod a+x ${S}/${BPN}/configure
+	${S}/${BPN}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
 }
 
 do_compile () {
 	target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##`
-	cd ${B}/${PN}
-	oe_runmake MULTIBUILDTOP=${B}/$target/${PN}/
+	cd ${B}/${BPN}
+	oe_runmake MULTIBUILDTOP=${B}/$target/${BPN}/
 }
 
 do_install () {
 	target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##`
-	cd ${B}/${PN}
-	oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/${PN}/ install
+	cd ${B}/${BPN}
+	oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/${BPN}/ install
 
 	# Move libgcc_s into /lib
 	mkdir -p ${D}${base_libdir}
@@ -63,5 +66,6 @@  do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_package"
 
 BBCLASSEXTEND = "nativesdk"
 
-INSANE_SKIP_libgcc-dev = "staticdev"
-INSANE_SKIP_libgcov-dev = "staticdev"
+INSANE_SKIP_${PN}-dev = "staticdev"
+INSANE_SKIP_libgcov${PKGSUFFIX}-dev = "staticdev"
+