Changeset 4c53333 in mainline for tools/autotool.py
- Timestamp:
- 2013-07-11T08:21:10Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 64e63ce1
- Parents:
- 80445cf (diff), c8bb1633 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/autotool.py
r80445cf r4c53333 181 181 print_error(["Failed to determine the value %s." % key, 182 182 "Please contact the developers of HelenOS."]) 183 184 def get_target(config): 185 target = None 186 gnu_target = None 187 clang_target = None 188 cc_args = [] 189 190 if (config['PLATFORM'] == "abs32le"): 191 check_config(config, "CROSS_TARGET") 192 target = config['CROSS_TARGET'] 193 194 if (config['CROSS_TARGET'] == "arm32"): 195 gnu_target = "arm-linux-gnueabi" 196 clang_target = "arm-unknown-linux" 197 198 if (config['CROSS_TARGET'] == "ia32"): 199 gnu_target = "i686-pc-linux-gnu" 200 clang_target = "i386-unknown-linux" 201 202 if (config['CROSS_TARGET'] == "mips32"): 203 gnu_target = "mipsel-linux-gnu" 204 clang_target = "mipsel-unknown-linux" 205 common['CC_ARGS'].append("-mabi=32") 206 207 if (config['PLATFORM'] == "amd64"): 208 target = config['PLATFORM'] 209 gnu_target = "amd64-linux-gnu" 210 clang_target = "x86_64-unknown-linux" 211 212 if (config['PLATFORM'] == "arm32"): 213 target = config['PLATFORM'] 214 gnu_target = "arm-linux-gnueabi" 215 clang_target = "arm-unknown-linux" 216 217 if (config['PLATFORM'] == "ia32"): 218 target = config['PLATFORM'] 219 gnu_target = "i686-pc-linux-gnu" 220 clang_target = "i386-unknown-linux" 221 222 if (config['PLATFORM'] == "ia64"): 223 target = config['PLATFORM'] 224 gnu_target = "ia64-pc-linux-gnu" 225 226 if (config['PLATFORM'] == "mips32"): 227 check_config(config, "MACHINE") 228 cc_args.append("-mabi=32") 229 230 if ((config['MACHINE'] == "msim") or (config['MACHINE'] == "lmalta")): 231 target = config['PLATFORM'] 232 gnu_target = "mipsel-linux-gnu" 233 clang_target = "mipsel-unknown-linux" 234 235 if ((config['MACHINE'] == "bmalta")): 236 target = "mips32eb" 237 gnu_target = "mips-linux-gnu" 238 clang_target = "mips-unknown-linux" 239 240 if (config['PLATFORM'] == "mips64"): 241 check_config(config, "MACHINE") 242 cc_args.append("-mabi=64") 243 244 if (config['MACHINE'] == "msim"): 245 target = config['PLATFORM'] 246 gnu_target = "mips64el-linux-gnu" 247 clang_target = "mips64el-unknown-linux" 248 249 if (config['PLATFORM'] == "ppc32"): 250 target = config['PLATFORM'] 251 gnu_target = "ppc-linux-gnu" 252 clang_target = "powerpc-unknown-linux" 253 254 if (config['PLATFORM'] == "sparc64"): 255 target = config['PLATFORM'] 256 gnu_target = "sparc64-linux-gnu" 257 clang_target = "sparc-unknown-linux" 258 259 return (target, cc_args, gnu_target, clang_target) 183 260 184 261 def check_app(args, name, details): … … 563 640 outmk.write('#########################################\n') 564 641 outmk.write('## AUTO-GENERATED FILE, DO NOT EDIT!!! ##\n') 642 outmk.write('## Generated by: tools/autotool.py ##\n') 565 643 outmk.write('#########################################\n\n') 566 644 … … 580 658 outhd.write('/***************************************\n') 581 659 outhd.write(' * AUTO-GENERATED FILE, DO NOT EDIT!!! *\n') 660 outhd.write(' * Generated by: tools/autotool.py *\n') 582 661 outhd.write(' ***************************************/\n\n') 583 662 … … 640 719 common['CC_ARGS'] = [] 641 720 if (config['COMPILER'] == "gcc_cross"): 642 if (config['PLATFORM'] == "abs32le"): 643 check_config(config, "CROSS_TARGET") 644 target = config['CROSS_TARGET'] 645 646 if (config['CROSS_TARGET'] == "arm32"): 647 gnu_target = "arm-linux-gnueabi" 648 649 if (config['CROSS_TARGET'] == "ia32"): 650 gnu_target = "i686-pc-linux-gnu" 651 652 if (config['CROSS_TARGET'] == "mips32"): 653 gnu_target = "mipsel-linux-gnu" 654 common['CC_ARGS'].append("-mabi=32") 721 target, cc_args, gnu_target, clang_target = get_target(config) 655 722 656 if (config['PLATFORM'] == "amd64"): 657 target = config['PLATFORM'] 658 gnu_target = "amd64-linux-gnu" 659 660 if (config['PLATFORM'] == "arm32"): 661 target = config['PLATFORM'] 662 gnu_target = "arm-linux-gnueabi" 663 664 if (config['PLATFORM'] == "ia32"): 665 target = config['PLATFORM'] 666 gnu_target = "i686-pc-linux-gnu" 667 668 if (config['PLATFORM'] == "ia64"): 669 target = config['PLATFORM'] 670 gnu_target = "ia64-pc-linux-gnu" 671 672 if (config['PLATFORM'] == "mips32"): 673 check_config(config, "MACHINE") 674 common['CC_ARGS'].append("-mabi=32") 675 676 if ((config['MACHINE'] == "lgxemul") or (config['MACHINE'] == "msim")): 677 target = config['PLATFORM'] 678 gnu_target = "mipsel-linux-gnu" 679 680 if (config['MACHINE'] == "bgxemul"): 681 target = "mips32eb" 682 gnu_target = "mips-linux-gnu" 683 684 if (config['PLATFORM'] == "mips64"): 685 check_config(config, "MACHINE") 686 common['CC_ARGS'].append("-mabi=64") 687 688 if (config['MACHINE'] == "msim"): 689 target = config['PLATFORM'] 690 gnu_target = "mips64el-linux-gnu" 691 692 if (config['PLATFORM'] == "ppc32"): 693 target = config['PLATFORM'] 694 gnu_target = "ppc-linux-gnu" 695 696 if (config['PLATFORM'] == "sparc64"): 697 target = config['PLATFORM'] 698 gnu_target = "sparc64-linux-gnu" 723 if (target is None) or (gnu_target is None): 724 print_error(["Unsupported compiler target for GNU GCC.", 725 "Please contact the developers of HelenOS."]) 699 726 700 727 path = "%s/%s/bin" % (cross_prefix, target) … … 706 733 check_common(common, "GCC") 707 734 common['CC'] = common['GCC'] 735 common['CC_ARGS'].extend(cc_args) 708 736 709 737 if (config['COMPILER'] == "gcc_native"): … … 720 748 check_binutils(None, binutils_prefix, common, PACKAGE_BINUTILS) 721 749 722 if (config['COMPILER'] == "suncc"):723 common['CC'] = "suncc"724 check_app([common['CC'], "-V"], "Sun Studio Compiler", "support is experimental")725 check_gcc(None, "", common, PACKAGE_GCC)726 check_binutils(None, binutils_prefix, common, PACKAGE_BINUTILS)727 728 750 if (config['COMPILER'] == "clang"): 751 target, cc_args, gnu_target, clang_target = get_target(config) 752 753 if (target is None) or (gnu_target is None) or (clang_target is None): 754 print_error(["Unsupported compiler target for clang.", 755 "Please contact the developers of HelenOS."]) 756 757 path = "%s/%s/bin" % (cross_prefix, target) 758 prefix = "%s-" % gnu_target 759 760 check_app(["clang", "--version"], "clang compiler", "preferably version 1.0 or newer") 761 check_gcc(path, prefix, common, PACKAGE_GCC) 762 check_binutils(path, prefix, common, PACKAGE_BINUTILS) 763 764 check_common(common, "GCC") 729 765 common['CC'] = "clang" 730 check_app([common['CC'], "--version"], "Clang compiler", "preferably version 1.0 or newer") 731 check_gcc(None, "", common, PACKAGE_GCC) 732 check_binutils(None, binutils_prefix, common, PACKAGE_BINUTILS) 766 common['CC_ARGS'].extend(cc_args) 767 common['CC_ARGS'].append("-target") 768 common['CC_ARGS'].append(clang_target) 769 common['CLANG_TARGET'] = clang_target 733 770 734 771 # Platform-specific utilities
Note:
See TracChangeset
for help on using the changeset viewer.