Changeset a0a273e in mainline for tools/autotool.py
- Timestamp:
- 2017-10-03T18:12:17Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a41cda7
- Parents:
- 0f28387
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/autotool.py
r0f28387 ra0a273e 210 210 target = None 211 211 gnu_target = None 212 clang_target = None213 212 helenos_target = None 214 213 cc_args = [] … … 220 219 if (config['CROSS_TARGET'] == "arm32"): 221 220 gnu_target = "arm-linux-gnueabi" 222 clang_target = "arm-unknown-none"223 221 helenos_target = "arm-helenos-gnueabi" 224 222 225 223 if (config['CROSS_TARGET'] == "ia32"): 226 224 gnu_target = "i686-pc-linux-gnu" 227 clang_target = "i686-unknown-none"228 225 helenos_target = "i686-pc-helenos" 229 226 … … 231 228 cc_args.append("-mabi=32") 232 229 gnu_target = "mipsel-linux-gnu" 233 clang_target = "mipsel-unknown-none"234 230 helenos_target = "mipsel-helenos" 235 231 … … 237 233 target = config['PLATFORM'] 238 234 gnu_target = "amd64-linux-gnu" 239 clang_target = "x86_64-unknown-none"240 235 helenos_target = "amd64-helenos" 241 236 … … 243 238 target = config['PLATFORM'] 244 239 gnu_target = "arm-linux-gnueabi" 245 clang_target = "arm-unknown-none-eabi"246 240 helenos_target = "arm-helenos-gnueabi" 247 241 … … 249 243 target = config['PLATFORM'] 250 244 gnu_target = "i686-pc-linux-gnu" 251 clang_target = "i686-unknown-none"252 245 helenos_target = "i686-pc-helenos" 253 246 … … 264 257 target = config['PLATFORM'] 265 258 gnu_target = "mipsel-linux-gnu" 266 clang_target = "mipsel-unknown-none"267 259 helenos_target = "mipsel-helenos" 268 260 … … 270 262 target = "mips32eb" 271 263 gnu_target = "mips-linux-gnu" 272 clang_target = "mips-unknown-none"273 264 helenos_target = "mips-helenos" 274 265 … … 280 271 target = config['PLATFORM'] 281 272 gnu_target = "mips64el-linux-gnu" 282 clang_target = "mips64el-unknown-none"283 273 helenos_target = "mips64el-helenos" 284 274 … … 286 276 target = config['PLATFORM'] 287 277 gnu_target = "ppc-linux-gnu" 288 clang_target = "ppc-unknown-none"289 278 helenos_target = "ppc-helenos" 290 279 … … 292 281 target = config['PLATFORM'] 293 282 gnu_target = "riscv64-unknown-linux-gnu" 294 clang_target = "riscv-unknown-none"295 283 helenos_target = "riscv64-helenos" 296 284 … … 298 286 target = config['PLATFORM'] 299 287 gnu_target = "sparc64-linux-gnu" 300 clang_target = "sparc-unknown-none"301 288 helenos_target = "sparc64-helenos" 302 289 303 return (target, cc_args, gnu_target, clang_target,helenos_target)290 return (target, cc_args, gnu_target, helenos_target) 304 291 305 292 def check_app(args, name, details): … … 351 338 return found 352 339 340 def check_clang(path, prefix, common, details): 341 "Check for clang" 342 343 common['CLANG'] = "%sclang" % prefix 344 345 if (not path is None): 346 common['CLANG'] = "%s/%s" % (path, common['CLANG']) 347 348 check_app([common['CLANG'], "--version"], "clang", details) 349 353 350 def check_gcc(path, prefix, common, details): 354 351 "Check for GCC" … … 427 424 outf.close() 428 425 429 args = [common['CC']] 430 args.extend(common['CC_ARGS']) 426 args = common['CC_AUTOGEN'].split(' ') 431 427 args.extend(["-S", "-o", PROBE_OUTPUT, PROBE_SOURCE]) 432 428 … … 547 543 outf.close() 548 544 549 args = [common['CC']] 550 args.extend(common['CC_ARGS']) 545 args = common['CC_AUTOGEN'].split(' ') 551 546 args.extend(["-S", "-o", PROBE_INT128_OUTPUT, PROBE_INT128_SOURCE]) 552 547 … … 852 847 853 848 # Compiler 854 common['CC_ARGS'] = []855 849 if (config['COMPILER'] == "gcc_cross"): 856 target, cc_args, gnu_target, clang_target,helenos_target = get_target(config)850 target, cc_args, gnu_target, helenos_target = get_target(config) 857 851 858 852 if (target is None) or (gnu_target is None): … … 867 861 868 862 check_common(common, "GCC") 869 common['CC'] = common['GCC']870 common['CC_A RGS'].extend(cc_args)863 common['CC'] = " ".join([common['GCC']] + cc_args) 864 common['CC_AUTOGEN'] = common['CC'] 871 865 872 866 if (config['COMPILER'] == "gcc_helenos"): 873 target, cc_args, gnu_target, clang_target,helenos_target = get_target(config)867 target, cc_args, gnu_target, helenos_target = get_target(config) 874 868 875 869 if (target is None) or (helenos_target is None): … … 884 878 885 879 check_common(common, "GCC") 886 common['CC'] = common['GCC']887 common['CC_A RGS'].extend(cc_args)880 common['CC'] = " ".join([common['GCC']] + cc_args) 881 common['CC_AUTOGEN'] = common['CC'] 888 882 889 883 if (config['COMPILER'] == "gcc_native"): … … 893 887 check_common(common, "GCC") 894 888 common['CC'] = common['GCC'] 889 common['CC_AUTOGEN'] = common['CC'] 895 890 896 891 if (config['COMPILER'] == "icc"): … … 900 895 901 896 common['CC'] = "icc" 897 common['CC_AUTOGEN'] = common['CC'] 902 898 903 899 if (config['COMPILER'] == "clang"): 904 target, cc_args, gnu_target, clang_target,helenos_target = get_target(config)905 906 if (target is None) or (gnu_target is None) or (clang_target is None):907 print_error(["Unsupported compiler target for clang.",900 target, cc_args, gnu_target, helenos_target = get_target(config) 901 902 if (target is None) or (gnu_target is None): 903 print_error(["Unsupported compiler target.", 908 904 "Please contact the developers of HelenOS."]) 909 905 … … 911 907 prefix = "%s-" % gnu_target 912 908 913 check_ app(["clang", "--version"], "clang compiler", "preferably version 1.0 or newer")909 check_clang(path, prefix, common, "") 914 910 check_gcc(path, prefix, common, PACKAGE_GCC) 915 911 check_binutils(path, prefix, common, PACKAGE_BINUTILS) 916 912 917 913 check_common(common, "GCC") 918 common['CC'] = "clang" 919 common['CC_ARGS'].extend(cc_args) 920 common['CC_ARGS'].append("-target") 921 common['CC_ARGS'].append(clang_target) 922 common['CLANG_TARGET'] = clang_target 914 check_common(common, "CLANG") 915 common['CC'] = " ".join([common['CLANG']] + cc_args) 916 common['CC_AUTOGEN'] = common['CC'] + " -no-integrated-as" 917 918 if (config['INTEGRATED_AS'] == "yes"): 919 common['CC'] += " -integrated-as" 920 921 if (config['INTEGRATED_AS'] == "no"): 922 common['CC'] += " -no-integrated-as" 923 923 924 924 check_python()
Note:
See TracChangeset
for help on using the changeset viewer.