[oe-commits] Richard Purdie : gcc-package-cross: Switch to using pattern matching to detect when to stash libgcc into the sysroot

git version control git at git.openembedded.org
Tue Jul 5 10:25:17 UTC 2011


Module: openembedded-core.git
Branch: master
Commit: a39cbed2ec887fb83335ba93e92d971c84a0f4d8
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=a39cbed2ec887fb83335ba93e92d971c84a0f4d8

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Fri Jun 17 17:27:25 2011 +0100

gcc-package-cross: Switch to using pattern matching to detect when to stash libgcc into the sysroot

Currently, we stash libgcc if PN is gcc-cross or gcc-crosssdk. This patch
changes it to work for *gcc-cross and *-gcc-crosssdk which means it
will patch for multilib extended toolchains.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-devtools/gcc/gcc-package-cross.inc |   26 ++++++++++++----------
 1 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/meta/recipes-devtools/gcc/gcc-package-cross.inc b/meta/recipes-devtools/gcc/gcc-package-cross.inc
index 3d27788..15627e7 100644
--- a/meta/recipes-devtools/gcc/gcc-package-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-package-cross.inc
@@ -33,20 +33,22 @@ do_install () {
 	find ${D}${exec_prefix}/lib -name libiberty.h | xargs rm -f
 
 	# gcc-runtime installs libgcc into a special location in staging since it breaks doing a standalone build
-	if [ "${PN}" == "gcc-cross" -o "${PN}" == "gcc-crosssdk" ]; then
-		dest=${D}/${includedir}/gcc-build-internal-${MULTIMACH_TARGET_SYS}
-		oe_runmake "DESTDIR=$dest" libdir=${target_libdir} base_libdir=${target_base_libdir} prefix=${target_prefix} exec_prefix=${target_exec_prefix} install-target-libgcc
+	case ${PN} in
+		*gcc-cross|*gcc-crosssdk)
+			dest=${D}/${includedir}/gcc-build-internal-${MULTIMACH_TARGET_SYS}
+			oe_runmake "DESTDIR=$dest" libdir=${target_libdir} base_libdir=${target_base_libdir} prefix=${target_prefix} exec_prefix=${target_exec_prefix} install-target-libgcc
 
-		# Ideally here we'd override the libgcc Makefile's idea of slibdir but
-		# for now, we just move the files to the correct location
+			# Ideally here we'd override the libgcc Makefile's idea of slibdir but
+			# for now, we just move the files to the correct location
 
-		install -d $dest${target_base_libdir}
-		mv $dest${target_exec_prefix}/${TARGET_SYS}/lib*/* $dest${target_base_libdir}
-		rm -rf $dest${target_exec_prefix}/${TARGET_SYS}
+			install -d $dest${target_base_libdir}
+			mv $dest${target_exec_prefix}/${TARGET_SYS}/lib*/* $dest${target_base_libdir}
+			rm -rf $dest${target_exec_prefix}/${TARGET_SYS}
 
-		# Also need to move gcc from /usr/lib/gcc/* to /usr/lib/ else the search paths won't find the crt*.o files
+			# Also need to move gcc from /usr/lib/gcc/* to /usr/lib/ else the search paths won't find the crt*.o files
 
-		mv $dest${target_libdir}/gcc/* $dest${target_libdir}/
-		rmdir $dest${target_libdir}/gcc
-	fi
+			mv $dest${target_libdir}/gcc/* $dest${target_libdir}/
+			rmdir $dest${target_libdir}/gcc
+		;;
+	esac
 }





More information about the Openembedded-commits mailing list