]> git.openpandora.org Git - openembedded.git/commitdiff
qemu: Perform our sanity checks based on ENABLE_BINARY_LOCALE_GENERATION
authorTom Rini <tom_rini@mentor.com>
Mon, 1 Mar 2010 11:18:28 +0000 (11:18 +0000)
committerTom Rini <tom_rini@mentor.com>
Tue, 2 Mar 2010 17:36:21 +0000 (10:36 -0700)
Perform qemu-related checks not based on if we're ARM but based on if
we'll be using qemu for binary locale generation.  Clarify what the
first of these sanity checks does.  Next, change the check for a
provided qemu binary to be generic enough to work on all arches (and catch
distribution or user built versions of qemu).  While we're in here, correct
the gcc version check code in base.bbclass.

Signed-off-by: Tom Rini <tom_rini@mentor.com>
Acked-by: Denys Dmytriyenko <denis@denix.org>
Acked-by: Chris Larson <chris_larson@mentor.com>
classes/base.bbclass
classes/sanity.bbclass

index 358a9a2b685239723a9501ab78ea4e7fbc4e8411..65ad478cbc005a7b7126b4964340ebb8a93cda81 100644 (file)
@@ -1341,16 +1341,15 @@ def check_app_exists(app, d):
        return len(which(path, app)) != 0
 
 def check_gcc3(data):
-       # Primarly used by qemu to make sure we have a workable gcc-3.4.x.
-       # Start by checking for the program name as we build it, was not
-       # all host-provided gcc-3.4's will work.
-
+       # Primarly used by qemu to make sure we have a workable gcc-3.x.
+       # Start by checking for the program name as we build it as there
+       # are some distribtuion provided gcc-3.x's that will not work.
        gcc3_versions = 'gcc-3.4.6 gcc-3.4.4 gcc34 gcc-3.4 gcc-3.4.7 gcc-3.3 gcc33 gcc-3.3.6 gcc-3.2 gcc32'
 
        for gcc3 in gcc3_versions.split():
                if check_app_exists(gcc3, data):
                        return gcc3
-       
+
        return False
 
 # Patch handling
index b66c9a9877442f618139e919de939bc6b1ff1eac..a78e8edf8a3e004285aecd46f59bd86a88109fdc 100644 (file)
@@ -83,8 +83,10 @@ def check_sanity(e):
 
        required_utilities = "patch help2man diffstat texi2html makeinfo cvs svn bzip2 tar gzip gawk md5sum"
 
-       if data.getVar('TARGET_ARCH', e.data, True) == "arm":
-               # qemu-native needs gcc 3.x
+       # If we'll be running qemu, perform some sanity checks
+       if data.getVar('ENABLE_BINARY_LOCALE_GENERATION', e.data, True):
+               # Some versions of qemu-native needs gcc 3.x.  Do a special
+               # check here to allow for host 'gcc' is 3.x.
                if "qemu-native" not in assume_provided and "gcc3-native" in assume_provided:
                        gcc_version = commands.getoutput("${BUILD_PREFIX}gcc --version | head -n 1 | cut -f 3 -d ' '")
 
@@ -93,8 +95,7 @@ def check_sanity(e):
                                missing = missing + "gcc-3.x (needed for qemu-native),"
 
                if "qemu-native" in assume_provided:
-                       if not check_app_exists("qemu-arm", e.data):
-                               messages = messages + "qemu-native was in ASSUME_PROVIDED but the QEMU binaries (qemu-arm) can't be found in PATH"
+                       required_utilities += "qemu"
 
                try:
                        if os.path.exists("/proc/sys/vm/mmap_min_addr"):