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