Changes in tools/autotool.py [7f25c4e:6db5d4b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/autotool.py
r7f25c4e r6db5d4b 182 182 "Please contact the developers of HelenOS."]) 183 183 184 def get_target(config , needs_clang = False):184 def get_target(config): 185 185 target = None 186 186 gnu_target = None … … 194 194 if (config['CROSS_TARGET'] == "arm32"): 195 195 gnu_target = "arm-linux-gnueabi" 196 clang_target = "arm-unknown-linux" 196 197 197 198 if (config['CROSS_TARGET'] == "ia32"): 198 199 gnu_target = "i686-pc-linux-gnu" 200 clang_target = "i386-unknown-linux" 199 201 200 202 if (config['CROSS_TARGET'] == "mips32"): 201 203 gnu_target = "mipsel-linux-gnu" 204 clang_target = "mipsel-unknown-linux" 202 205 common['CC_ARGS'].append("-mabi=32") 203 206 … … 205 208 target = config['PLATFORM'] 206 209 gnu_target = "amd64-linux-gnu" 207 clang_target = "x86_64-u known-linux"210 clang_target = "x86_64-unknown-linux" 208 211 209 212 if (config['PLATFORM'] == "arm32"): 210 213 target = config['PLATFORM'] 211 214 gnu_target = "arm-linux-gnueabi" 215 clang_target = "arm-unknown-linux" 212 216 213 217 if (config['PLATFORM'] == "ia32"): 214 218 target = config['PLATFORM'] 215 219 gnu_target = "i686-pc-linux-gnu" 216 clang_target = "i386-u known-linux"220 clang_target = "i386-unknown-linux" 217 221 218 222 if (config['PLATFORM'] == "ia64"): … … 224 228 cc_args.append("-mabi=32") 225 229 226 if ((config['MACHINE'] == " lgxemul") or (config['MACHINE'] == "msim")):230 if ((config['MACHINE'] == "msim") or (config['MACHINE'] == "lmalta")): 227 231 target = config['PLATFORM'] 228 232 gnu_target = "mipsel-linux-gnu" 229 230 if (config['MACHINE'] == "bgxemul"): 233 clang_target = "mipsel-unknown-linux" 234 235 if ((config['MACHINE'] == "bmalta")): 231 236 target = "mips32eb" 232 237 gnu_target = "mips-linux-gnu" 238 clang_target = "mips-unknown-linux" 233 239 234 240 if (config['PLATFORM'] == "mips64"): … … 239 245 target = config['PLATFORM'] 240 246 gnu_target = "mips64el-linux-gnu" 247 clang_target = "mips64el-unknown-linux" 241 248 242 249 if (config['PLATFORM'] == "ppc32"): 243 250 target = config['PLATFORM'] 244 251 gnu_target = "ppc-linux-gnu" 252 clang_target = "powerpc-unknown-linux" 245 253 246 254 if (config['PLATFORM'] == "sparc64"): 247 255 target = config['PLATFORM'] 248 256 gnu_target = "sparc64-linux-gnu" 249 250 if (target is None) or (gnu_target is None) or (clang_target is None and needs_clang): 251 print_error(["Failed to determine target for compiler.", 252 "Please contact the developers of HelenOS."]) 257 clang_target = "sparc-unknown-linux" 253 258 254 259 return (target, cc_args, gnu_target, clang_target) … … 714 719 common['CC_ARGS'] = [] 715 720 if (config['COMPILER'] == "gcc_cross"): 716 target, cc_args, gnu_target, clang_target_unused = get_target(config) 717 721 target, cc_args, gnu_target, clang_target = get_target(config) 722 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."]) 726 718 727 path = "%s/%s/bin" % (cross_prefix, target) 719 728 prefix = "%s-" % gnu_target … … 740 749 741 750 if (config['COMPILER'] == "clang"): 742 target, cc_args, gnu_target, clang_target = get_target(config, True) 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 743 757 path = "%s/%s/bin" % (cross_prefix, target) 744 758 prefix = "%s-" % gnu_target 745 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") 746 765 common['CC'] = "clang" 747 766 common['CC_ARGS'].extend(cc_args) 748 767 common['CC_ARGS'].append("-target") 749 768 common['CC_ARGS'].append(clang_target) 750 check_app([common['CC'], "--version"], "Clang compiler", "preferably version 1.0 or newer") 751 check_gcc(path, prefix, common, PACKAGE_GCC) 752 check_binutils(path, prefix, common, PACKAGE_BINUTILS) 769 common['CLANG_TARGET'] = clang_target 753 770 754 771 # Platform-specific utilities
Note:
See TracChangeset
for help on using the changeset viewer.