diff options
| author | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-16 10:51:24 +0000 |
|---|---|---|
| committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-16 10:51:24 +0000 |
| commit | 01f75c1b48e1a087263427488245c0c79a2f87e3 (patch) | |
| tree | fe51a461c32f7be31bafa31e8ccdc1d65ae25396 /meta/classes/icecc.bbclass | |
| parent | a59f67fdb9077c84f80577aeab5b4cce37539d0d (diff) | |
| download | poky-01f75c1b48e1a087263427488245c0c79a2f87e3.tar.gz | |
rootfs_rpm/icecc: Sync whitespace with OE.dev
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/classes/icecc.bbclass')
| -rw-r--r-- | meta/classes/icecc.bbclass | 35 |
1 files changed, 10 insertions, 25 deletions
diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass index 724074231d..be37318d91 100644 --- a/meta/classes/icecc.bbclass +++ b/meta/classes/icecc.bbclass | |||
| @@ -39,7 +39,6 @@ def create_cross_env(bb,d): | |||
| 39 | """ | 39 | """ |
| 40 | Create a tar.bz2 of the current toolchain | 40 | Create a tar.bz2 of the current toolchain |
| 41 | """ | 41 | """ |
| 42 | |||
| 43 | # Constin native-native compilation no environment needed if | 42 | # Constin native-native compilation no environment needed if |
| 44 | # host prefix is empty (let us duplicate the query for ease) | 43 | # host prefix is empty (let us duplicate the query for ease) |
| 45 | prefix = bb.data.expand('${HOST_PREFIX}', d) | 44 | prefix = bb.data.expand('${HOST_PREFIX}', d) |
| @@ -54,7 +53,6 @@ def create_cross_env(bb,d): | |||
| 54 | target_prefix = bb.data.expand('${TARGET_PREFIX}', d) | 53 | target_prefix = bb.data.expand('${TARGET_PREFIX}', d) |
| 55 | float = bb.data.getVar('TARGET_FPU', d) or "hard" | 54 | float = bb.data.getVar('TARGET_FPU', d) or "hard" |
| 56 | name = socket.gethostname() | 55 | name = socket.gethostname() |
| 57 | |||
| 58 | 56 | ||
| 59 | # Stupid check to determine if we have built a libc and a cross | 57 | # Stupid check to determine if we have built a libc and a cross |
| 60 | # compiler. | 58 | # compiler. |
| @@ -94,7 +92,6 @@ def create_cross_env(bb,d): | |||
| 94 | 92 | ||
| 95 | 93 | ||
| 96 | def create_native_env(bb,d): | 94 | def create_native_env(bb,d): |
| 97 | |||
| 98 | import tarfile, socket, time | 95 | import tarfile, socket, time |
| 99 | ice_dir = bb.data.expand('${CROSS_DIR}', d) | 96 | ice_dir = bb.data.expand('${CROSS_DIR}', d) |
| 100 | prefix = bb.data.expand('${HOST_PREFIX}' , d) | 97 | prefix = bb.data.expand('${HOST_PREFIX}' , d) |
| @@ -103,8 +100,7 @@ def create_native_env(bb,d): | |||
| 103 | target_prefix = bb.data.expand('${TARGET_PREFIX}', d) | 100 | target_prefix = bb.data.expand('${TARGET_PREFIX}', d) |
| 104 | float = bb.data.getVar('TARGET_FPU', d) or "hard" | 101 | float = bb.data.getVar('TARGET_FPU', d) or "hard" |
| 105 | name = socket.gethostname() | 102 | name = socket.gethostname() |
| 106 | 103 | ||
| 107 | |||
| 108 | archive_name = "local-host-env" + "-" + name | 104 | archive_name = "local-host-env" + "-" + name |
| 109 | tar_file = os.path.join(ice_dir, 'ice', archive_name + '.tar.gz') | 105 | tar_file = os.path.join(ice_dir, 'ice', archive_name + '.tar.gz') |
| 110 | 106 | ||
| @@ -120,7 +116,6 @@ def create_native_env(bb,d): | |||
| 120 | # directory already exists, continue | 116 | # directory already exists, continue |
| 121 | pass | 117 | pass |
| 122 | 118 | ||
| 123 | |||
| 124 | #check if user has specified a specific icecc-create-env script | 119 | #check if user has specified a specific icecc-create-env script |
| 125 | #if not use the OE provided one | 120 | #if not use the OE provided one |
| 126 | cr_env_script = bb.data.getVar('ICECC_ENV_EXEC', d) or bb.data.expand('${STAGING_DIR}', d)+"/ice/icecc-create-env" | 121 | cr_env_script = bb.data.getVar('ICECC_ENV_EXEC', d) or bb.data.expand('${STAGING_DIR}', d)+"/ice/icecc-create-env" |
| @@ -135,7 +130,6 @@ def create_native_env(bb,d): | |||
| 135 | 130 | ||
| 136 | 131 | ||
| 137 | def create_cross_kernel_env(bb,d): | 132 | def create_cross_kernel_env(bb,d): |
| 138 | |||
| 139 | import tarfile, socket, time | 133 | import tarfile, socket, time |
| 140 | ice_dir = bb.data.expand('${CROSS_DIR}', d) | 134 | ice_dir = bb.data.expand('${CROSS_DIR}', d) |
| 141 | prefix = bb.data.expand('${HOST_PREFIX}' , d) | 135 | prefix = bb.data.expand('${HOST_PREFIX}' , d) |
| @@ -146,7 +140,6 @@ def create_cross_kernel_env(bb,d): | |||
| 146 | name = socket.gethostname() | 140 | name = socket.gethostname() |
| 147 | kernel_cc = bb.data.expand('${KERNEL_CC}', d) | 141 | kernel_cc = bb.data.expand('${KERNEL_CC}', d) |
| 148 | kernel_cc = kernel_cc[:-1] | 142 | kernel_cc = kernel_cc[:-1] |
| 149 | |||
| 150 | 143 | ||
| 151 | # Stupid check to determine if we have built a libc and a cross | 144 | # Stupid check to determine if we have built a libc and a cross |
| 152 | # compiler. | 145 | # compiler. |
| @@ -197,8 +190,8 @@ def create_env(bb,d): | |||
| 197 | return create_native_env(bb,d) | 190 | return create_native_env(bb,d) |
| 198 | else: | 191 | else: |
| 199 | return create_cross_env(bb,d) | 192 | return create_cross_env(bb,d) |
| 200 | 193 | ||
| 201 | 194 | ||
| 202 | def create_path(compilers, type, bb, d): | 195 | def create_path(compilers, type, bb, d): |
| 203 | """ | 196 | """ |
| 204 | Create Symlinks for the icecc in the staging directory | 197 | Create Symlinks for the icecc in the staging directory |
| @@ -208,7 +201,6 @@ def create_path(compilers, type, bb, d): | |||
| 208 | #check if the icecc path is set by the user | 201 | #check if the icecc path is set by the user |
| 209 | icecc = bb.data.getVar('ICECC_PATH', d) or os.popen("%s icecc" % "which").read()[:-1] | 202 | icecc = bb.data.getVar('ICECC_PATH', d) or os.popen("%s icecc" % "which").read()[:-1] |
| 210 | 203 | ||
| 211 | |||
| 212 | # Create the dir if necessary | 204 | # Create the dir if necessary |
| 213 | try: | 205 | try: |
| 214 | os.stat(staging) | 206 | os.stat(staging) |
| @@ -225,28 +217,22 @@ def create_path(compilers, type, bb, d): | |||
| 225 | return staging + ":" | 217 | return staging + ":" |
| 226 | 218 | ||
| 227 | 219 | ||
| 228 | |||
| 229 | |||
| 230 | |||
| 231 | def use_icc_version(bb,d): | 220 | def use_icc_version(bb,d): |
| 232 | |||
| 233 | icecc_ver = "yes" | 221 | icecc_ver = "yes" |
| 234 | system_class_blacklist = [ "none" ] | 222 | system_class_blacklist = [ "none" ] |
| 235 | 223 | ||
| 236 | for black in system_class_blacklist: | 224 | for black in system_class_blacklist: |
| 237 | if bb.data.inherits_class(black, d): | 225 | if bb.data.inherits_class(black, d): |
| 238 | icecc_ver = "no" | 226 | icecc_ver = "no" |
| 239 | 227 | ||
| 240 | |||
| 241 | user_class_blacklist = bb.data.getVar('ICECC_USER_CLASS_BL', d) or "none" | 228 | user_class_blacklist = bb.data.getVar('ICECC_USER_CLASS_BL', d) or "none" |
| 242 | user_class_blacklist = user_class_blacklist.split() | 229 | user_class_blacklist = user_class_blacklist.split() |
| 243 | 230 | ||
| 244 | for black in user_class_blacklist: | 231 | for black in user_class_blacklist: |
| 245 | if bb.data.inherits_class(black, d): | 232 | if bb.data.inherits_class(black, d): |
| 246 | icecc_ver = "no" | 233 | icecc_ver = "no" |
| 247 | |||
| 248 | return icecc_ver | ||
| 249 | 234 | ||
| 235 | return icecc_ver | ||
| 250 | 236 | ||
| 251 | 237 | ||
| 252 | def icc_path(bb,d,compile): | 238 | def icc_path(bb,d,compile): |
| @@ -295,11 +281,11 @@ def icc_path(bb,d,compile): | |||
| 295 | def icc_version(bb,d): | 281 | def icc_version(bb,d): |
| 296 | return create_env(bb,d) | 282 | return create_env(bb,d) |
| 297 | 283 | ||
| 298 | def check_for_kernel(bb,d): | ||
| 299 | if bb.data.inherits_class("kernel", d): | ||
| 300 | return "yes" | ||
| 301 | 284 | ||
| 302 | return "no" | 285 | def check_for_kernel(bb,d): |
| 286 | if bb.data.inherits_class("kernel", d): | ||
| 287 | return "yes" | ||
| 288 | return "no" | ||
| 303 | 289 | ||
| 304 | 290 | ||
| 305 | def get_cross_kernel_ver(bb,d): | 291 | def get_cross_kernel_ver(bb,d): |
| @@ -332,4 +318,3 @@ do_compile_prepend() { | |||
| 332 | export ICECC_VERSION="NONE" | 318 | export ICECC_VERSION="NONE" |
| 333 | fi | 319 | fi |
| 334 | } | 320 | } |
| 335 | |||
