'i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5363)'
"""
- import os
return os.popen("%s --version" % gcc ).readline().split()[2]
-
def create_cross_env(bb,d):
"""
Create a tar.bz2 of the current toolchain
if len(prefix) == 0:
return ""
- import tarfile, socket, time, os
+ import tarfile, socket, time
ice_dir = bb.data.expand('${CROSS_DIR}', d)
prefix = bb.data.expand('${HOST_PREFIX}' , d)
distro = bb.data.expand('${DISTRO}', d)
os.stat(os.path.join(ice_dir, target_sys, 'lib', 'libstdc++.so'))
os.stat(os.path.join(ice_dir, target_sys, 'bin', 'g++'))
except: # no cross compiler built yet
- bb.error('no cross compiler built yet?')
return ""
VERSION = icc_determine_gcc_version( os.path.join(ice_dir,target_sys,"bin","g++") )
#check if user has specified a specific icecc-create-env script
#if not use the OE provided one
- cr_env_script = bb.data.getVar('ICECC_ENV_EXEC', d) or bb.data.expand('${STAGING_DIR}', d)+"/ice/icecc-create-env"
+ cr_env_script = bb.data.expand('${ICECC_ENV_EXEC}', d)
+ if cr_env_script == "${ICECC_ENV_EXEC}":
+ cr_env_script = bb.data.expand('${STAGING_DIR}', d)+"/ice/icecc-create-env"
#call the modified create-env script
result=os.popen("%s %s %s %s %s %s" %(cr_env_script,
"--silent",
- os.path.join(ice_dir,target_sys,'bin','gcc'),
- os.path.join(ice_dir,target_sys,'bin','g++'),
- os.path.join(ice_dir,target_sys,'bin','as'),
+ os.path.join(ice_dir, 'bin', "%s-gcc" % target_sys),
+ os.path.join(ice_dir, 'bin', "%s-g++" % target_sys),
+ os.path.join(ice_dir, 'bin', "%s-as" % target_sys),
os.path.join(ice_dir,"ice",cross_name) ) )
return tar_file
def create_native_env(bb,d):
- import tarfile, socket, time, os
+ import tarfile, socket, time
ice_dir = bb.data.expand('${CROSS_DIR}', d)
prefix = bb.data.expand('${HOST_PREFIX}' , d)
distro = bb.data.expand('${DISTRO}', d)
#check if user has specified a specific icecc-create-env script
#if not use the OE provided one
- cr_env_script = bb.data.getVar('ICECC_ENV_EXEC', d) or bb.data.expand('${STAGING_DIR}', d)+"/ice/icecc-create-env"
+ cr_env_script = bb.data.expand('${ICECC_ENV_EXEC}', d)
+ if cr_env_script == "${ICECC_ENV_EXEC}":
+ cr_env_script = bb.data.expand('${STAGING_DIR}', d)+"/ice/icecc-create-env"
result=os.popen("%s %s %s %s %s %s" %(cr_env_script,
"--silent",
os.popen("%s gcc" % "which").read()[:-1],
def get_cross_kernel_cc(bb,d):
kernel_cc = bb.data.expand('${KERNEL_CC}', d)
- kernel_cc = kernel_cc.replace('ccache', '')
+ kernel_cc = kernel_cc.replace('ccache', '').strip()
+ kernel_cc = kernel_cc.split(' ')[0]
kernel_cc = kernel_cc.strip()
return kernel_cc
def create_cross_kernel_env(bb,d):
- import tarfile, socket, time, os
+ import tarfile, socket, time
ice_dir = bb.data.expand('${CROSS_DIR}', d)
prefix = bb.data.expand('${HOST_PREFIX}' , d)
distro = bb.data.expand('${DISTRO}', d)
try:
os.stat(os.path.join(ice_dir, 'bin', kernel_cc))
except: # no cross compiler built yet
- bb.error('no kernel cross compiler built yet')
return ""
VERSION = icc_determine_gcc_version( os.path.join(ice_dir,"bin",kernel_cc) )
cr_env_script = bb.data.getVar('ICECC_ENV_EXEC', d) or bb.data.expand('${STAGING_DIR}', d)+"/ice/icecc-create-env"
result=os.popen("%s %s %s %s %s %s" %(cr_env_script,
"--silent",
- os.path.join(ice_dir,'bin',kernel_cc),
- os.path.join(ice_dir,target_sys,'bin','g++'),
- os.path.join(ice_dir,target_sys,'bin','as'),
- os.path.join(ice_dir,"ice",cross_name) ) )
+ os.path.join(ice_dir, 'bin', kernel_cc),
+ os.path.join(ice_dir, 'bin', "%s-g++" % target_sys),
+ os.path.join(ice_dir, 'bin', "%s-as" % target_sys),
+ os.path.join(ice_dir, "ice", cross_name) ) )
return tar_file
"""
Create Symlinks for the icecc in the staging directory
"""
- import os
-
staging = os.path.join(bb.data.expand('${STAGING_DIR}', d), "ice", type)
#check if the icecc path is set by the user
#"system" package blacklist contains a list of packages that can not distribute compile tasks
#for one reason or the other
- system_package_blacklist = [ "uclibc", "glibc", "gcc", "qemu", "bind", "u-boot", "dhcp-forwarder", "enchant" ]
+ system_package_blacklist = [ "uclibc", "glibc", "gcc", "qemu", "bind", "u-boot", "dhcp-forwarder", "enchant", "connman" ]
user_package_blacklist = (bb.data.getVar('ICECC_USER_PACKAGE_BL', d) or "").split()
package_blacklist = system_package_blacklist + user_package_blacklist
for black in package_blacklist:
if black in package_tmp:
bb.note(package_tmp, ' found in blacklist, disable icecc')
- bb.data.setVar("PARALLEL_MAKE" , "", d)
+ fallback_parallel = bb.data.getVar('ICECC_FALLBACK_PARALLEL', d) or ""
+ bb.data.setVar("PARALLEL_MAKE", fallback_parallel, d)
return ""
prefix = bb.data.expand('${HOST_PREFIX}', d)
set_icecc_env() {
- ICECC_PATH=${@icc_path(bb,d)}
- if test x${ICECC_PATH} != x; then
- export PATH=${ICECC_PATH}$PATH
+ ICE_PATH=${@icc_path(bb,d)}
+ if test x${ICE_PATH} != x; then
+ export PATH=${ICE_PATH}$PATH
export CCACHE_PATH=$PATH
#check if we are building a kernel and select gcc-cross-kernel
if [ "${@check_for_kernel(bb,d)}" = "yes" ]; then