[oe-commits] Wolfgang Denk : populate_sdk_base.bbclass: Allow installation of ix86 SDK on x86_64 host

git at git.openembedded.org git at git.openembedded.org
Tue Jan 22 15:47:27 UTC 2013


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

Author: Wolfgang Denk <wd at denx.de>
Date:   Tue Jan 22 13:18:05 2013 +0100

populate_sdk_base.bbclass: Allow installation of ix86 SDK on x86_64 host

Commit c04f5435 "populate_sdk_base.bbclass: use SDK_ARCH instead
of SDKMACHINE" prevents not only the installation of 64 bit SDK
configurations on 32 bit hosts (which indeed cannot work), but also
the legitimate installation of a 32 bit SDK on a 64 bit host.

Fix this.

While there, also make sure we use the same patterns ("i[3-6]86" resp.
"x86[-_]64" to get unified strings for both INST_ARCH and SDK_ARCH.

Signed-off-by: Wolfgang Denk <wd at denx.de>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/populate_sdk_base.bbclass |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index da846b4..c587af8 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -122,11 +122,14 @@ fakeroot create_shar() {
 #!/bin/bash
 
 INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
-SDK_ARCH=$(echo ${SDK_ARCH} | sed -e "s/i[5-6]86/ix86/")
+SDK_ARCH=$(echo ${SDK_ARCH} | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
 
 if [ "$INST_ARCH" != "$SDK_ARCH" ]; then
-	echo "Error: Installation machine not supported!"
-	exit 1
+	# Allow for installation of ix86 SDK on x86_64 host
+	if [ "$INST_ARCH" != x86_64 -o "$SDK_ARCH" != ix86 ]; then
+		echo "Error: Installation machine not supported!"
+		exit 1
+	fi
 fi
 
 DEFAULT_INSTALL_DIR="${SDKPATH}"





More information about the Openembedded-commits mailing list