Changes in tools/autotool.py [84eb4edd:9ce911d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/autotool.py
r84eb4edd r9ce911d 54 54 PACKAGE_GCC = "preferably version 4.7.0 or newer" 55 55 PACKAGE_CROSS = "use tools/toolchain.sh to build the cross-compiler toolchain" 56 PACKAGE_CLANG = "reasonably recent version of clang needs to be installed"57 56 58 57 COMPILER_FAIL = "The compiler is probably not capable to compile HelenOS." … … 211 210 target = None 212 211 gnu_target = None 212 clang_target = None 213 213 helenos_target = None 214 214 cc_args = [] … … 220 220 if (config['CROSS_TARGET'] == "arm32"): 221 221 gnu_target = "arm-linux-gnueabi" 222 clang_target = "arm-unknown-none" 222 223 helenos_target = "arm-helenos-gnueabi" 223 224 224 225 if (config['CROSS_TARGET'] == "ia32"): 225 226 gnu_target = "i686-pc-linux-gnu" 227 clang_target = "i686-unknown-none" 226 228 helenos_target = "i686-pc-helenos" 227 229 … … 229 231 cc_args.append("-mabi=32") 230 232 gnu_target = "mipsel-linux-gnu" 233 clang_target = "mipsel-unknown-none" 231 234 helenos_target = "mipsel-helenos" 232 235 … … 234 237 target = config['PLATFORM'] 235 238 gnu_target = "amd64-linux-gnu" 239 clang_target = "x86_64-unknown-none" 236 240 helenos_target = "amd64-helenos" 237 241 … … 239 243 target = config['PLATFORM'] 240 244 gnu_target = "arm-linux-gnueabi" 245 clang_target = "arm-unknown-none-eabi" 241 246 helenos_target = "arm-helenos-gnueabi" 242 247 … … 244 249 target = config['PLATFORM'] 245 250 gnu_target = "i686-pc-linux-gnu" 251 clang_target = "i686-unknown-none" 246 252 helenos_target = "i686-pc-helenos" 247 253 … … 258 264 target = config['PLATFORM'] 259 265 gnu_target = "mipsel-linux-gnu" 266 clang_target = "mipsel-unknown-none" 260 267 helenos_target = "mipsel-helenos" 261 268 … … 263 270 target = "mips32eb" 264 271 gnu_target = "mips-linux-gnu" 272 clang_target = "mips-unknown-none" 265 273 helenos_target = "mips-helenos" 266 274 … … 272 280 target = config['PLATFORM'] 273 281 gnu_target = "mips64el-linux-gnu" 282 clang_target = "mips64el-unknown-none" 274 283 helenos_target = "mips64el-helenos" 275 284 … … 277 286 target = config['PLATFORM'] 278 287 gnu_target = "ppc-linux-gnu" 288 clang_target = "ppc-unknown-none" 279 289 helenos_target = "ppc-helenos" 280 290 … … 282 292 target = config['PLATFORM'] 283 293 gnu_target = "riscv64-unknown-linux-gnu" 294 clang_target = "riscv-unknown-none" 284 295 helenos_target = "riscv64-helenos" 285 296 … … 287 298 target = config['PLATFORM'] 288 299 gnu_target = "sparc64-linux-gnu" 300 clang_target = "sparc-unknown-none" 289 301 helenos_target = "sparc64-helenos" 290 302 291 return (target, cc_args, gnu_target, helenos_target)303 return (target, cc_args, gnu_target, clang_target, helenos_target) 292 304 293 305 def check_app(args, name, details): … … 339 351 return found 340 352 341 def check_clang(path, prefix, common, details):342 "Check for clang"343 344 common['CLANG'] = "%sclang" % prefix345 346 if (not path is None):347 common['CLANG'] = "%s/%s" % (path, common['CLANG'])348 349 check_app([common['CLANG'], "--version"], "clang", details)350 351 353 def check_gcc(path, prefix, common, details): 352 354 "Check for GCC" … … 425 427 outf.close() 426 428 427 args = common['CC_AUTOGEN'].split(' ') 429 args = [common['CC']] 430 args.extend(common['CC_ARGS']) 428 431 args.extend(["-S", "-o", PROBE_OUTPUT, PROBE_SOURCE]) 429 432 … … 544 547 outf.close() 545 548 546 args = common['CC_AUTOGEN'].split(' ') 549 args = [common['CC']] 550 args.extend(common['CC_ARGS']) 547 551 args.extend(["-S", "-o", PROBE_INT128_OUTPUT, PROBE_INT128_SOURCE]) 548 552 … … 848 852 849 853 # Compiler 854 common['CC_ARGS'] = [] 850 855 if (config['COMPILER'] == "gcc_cross"): 851 target, cc_args, gnu_target, helenos_target = get_target(config)856 target, cc_args, gnu_target, clang_target, helenos_target = get_target(config) 852 857 853 858 if (target is None) or (gnu_target is None): … … 862 867 863 868 check_common(common, "GCC") 864 common['CC'] = " ".join([common['GCC']] + cc_args)865 common['CC_A UTOGEN'] = common['CC']869 common['CC'] = common['GCC'] 870 common['CC_ARGS'].extend(cc_args) 866 871 867 872 if (config['COMPILER'] == "gcc_helenos"): 868 target, cc_args, gnu_target, helenos_target = get_target(config)873 target, cc_args, gnu_target, clang_target, helenos_target = get_target(config) 869 874 870 875 if (target is None) or (helenos_target is None): … … 879 884 880 885 check_common(common, "GCC") 881 common['CC'] = " ".join([common['GCC']] + cc_args)882 common['CC_A UTOGEN'] = common['CC']886 common['CC'] = common['GCC'] 887 common['CC_ARGS'].extend(cc_args) 883 888 884 889 if (config['COMPILER'] == "gcc_native"): … … 888 893 check_common(common, "GCC") 889 894 common['CC'] = common['GCC'] 890 common['CC_AUTOGEN'] = common['CC']891 895 892 896 if (config['COMPILER'] == "icc"): … … 896 900 897 901 common['CC'] = "icc" 898 common['CC_AUTOGEN'] = common['CC']899 902 900 903 if (config['COMPILER'] == "clang"): 901 target, cc_args, gnu_target, helenos_target = get_target(config)902 903 if (target is None) or (gnu_target is None) :904 print_error(["Unsupported compiler target .",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.", 905 908 "Please contact the developers of HelenOS."]) 906 909 … … 908 911 prefix = "%s-" % gnu_target 909 912 910 check_binutils(path, prefix, common, PACKAGE_CROSS) 911 check_clang(path, prefix, common, PACKAGE_CLANG) 912 913 check_common(common, "CLANG") 914 common['CC'] = " ".join([common['CLANG']] + cc_args) 915 common['CC_AUTOGEN'] = common['CC'] + " -no-integrated-as" 916 917 if (config['INTEGRATED_AS'] == "yes"): 918 common['CC'] += " -integrated-as" 919 920 if (config['INTEGRATED_AS'] == "no"): 921 common['CC'] += " -no-integrated-as" 913 check_app(["clang", "--version"], "clang compiler", "preferably version 1.0 or newer") 914 check_gcc(path, prefix, common, PACKAGE_GCC) 915 check_binutils(path, prefix, common, PACKAGE_BINUTILS) 916 917 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 922 923 923 924 check_python()
Note:
See TracChangeset
for help on using the changeset viewer.