icecc.bbclass: fix irt changes in toolchains installation
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Fri, 4 Jun 2010 12:50:41 +0000 (16:50 +0400)
committerDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Fri, 4 Jun 2010 12:50:41 +0000 (16:50 +0400)
The installation of toolchains in /cross/ has changed a bit, resulting
in failures of icecc.bbclass to find necessary files (libstdc++.so, g++, etc.)
Fix that by pointing the class file to libstdc++ in staging and corrent name
of target g++.

Also correct the name of kernel toolchain tarball.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
classes/icecc.bbclass

index fb6045d..8c19cab 100644 (file)
@@ -47,6 +47,7 @@ def create_cross_env(bb,d):
 
     import tarfile, socket, time
     ice_dir = bb.data.expand('${CROSS_DIR}', d)
+    staging_dir = bb.data.expand('${STAGING_DIR_TARGET}', d)
     prefix  = bb.data.expand('${HOST_PREFIX}' , d)
     distro  = bb.data.expand('${DISTRO}', d)
     target_sys = bb.data.expand('${TARGET_SYS}',  d)
@@ -57,12 +58,12 @@ def create_cross_env(bb,d):
     # Stupid check to determine if we have built a libc and a cross
     # compiler.
     try:
-        os.stat(os.path.join(ice_dir, target_sys, 'lib', 'libstdc++.so'))
-        os.stat(os.path.join(ice_dir, target_sys, 'bin', 'g++'))
+        os.stat(os.path.join(staging_dir, 'usr', 'lib', 'libstdc++.so'))
+        os.stat(os.path.join(ice_dir, 'bin', "%s-g++" % target_sys))
     except: # no cross compiler built yet
         return ""
 
-    VERSION = icc_determine_gcc_version( os.path.join(ice_dir,target_sys,"bin","g++") )
+    VERSION = icc_determine_gcc_version( os.path.join(ice_dir,"bin","%s-g++" % target_sys) )
     cross_name = prefix + distro + "-" + target_sys + "-" + float + "-" + VERSION + "-" + name
     tar_file = os.path.join(ice_dir, 'ice', cross_name + '.tar.gz')
 
@@ -159,7 +160,7 @@ def create_cross_kernel_env(bb,d):
         return ""
 
     VERSION = icc_determine_gcc_version( os.path.join(ice_dir,"bin",kernel_cc) )
-    cross_name = prefix + distro + "-" + target_sys + "-" + float + "-" + VERSION + "-" + name
+    cross_name = prefix + distro + "-kernel-" + target_sys + "-" + float + "-" + VERSION + "-" + name
     tar_file = os.path.join(ice_dir, 'ice', cross_name + '.tar.gz')
 
     try: