Changeset b08941d in mainline
- Timestamp:
- 2017-10-09T15:33:26Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 591b989
- Parents:
- 07cb0108
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/autotool.py
r07cb0108 rb08941d 209 209 210 210 def get_target(config): 211 target= None211 platform = None 212 212 gnu_target = None 213 213 helenos_target = None 214 target = None 214 215 cc_args = [] 215 216 216 217 if (config['PLATFORM'] == "abs32le"): 217 218 check_config(config, "CROSS_TARGET") 218 target= config['CROSS_TARGET']219 platform = config['CROSS_TARGET'] 219 220 220 221 if (config['CROSS_TARGET'] == "arm32"): … … 232 233 233 234 if (config['PLATFORM'] == "amd64"): 234 target= config['PLATFORM']235 platform = config['PLATFORM'] 235 236 gnu_target = "amd64-linux-gnu" 236 237 helenos_target = "amd64-helenos" 237 238 238 239 if (config['PLATFORM'] == "arm32"): 239 target= config['PLATFORM']240 platform = config['PLATFORM'] 240 241 gnu_target = "arm-linux-gnueabi" 241 242 helenos_target = "arm-helenos-gnueabi" 242 243 243 244 if (config['PLATFORM'] == "ia32"): 244 target= config['PLATFORM']245 platform = config['PLATFORM'] 245 246 gnu_target = "i686-pc-linux-gnu" 246 247 helenos_target = "i686-pc-helenos" 247 248 248 249 if (config['PLATFORM'] == "ia64"): 249 target= config['PLATFORM']250 platform = config['PLATFORM'] 250 251 gnu_target = "ia64-pc-linux-gnu" 251 252 helenos_target = "ia64-pc-helenos" … … 256 257 257 258 if ((config['MACHINE'] == "msim") or (config['MACHINE'] == "lmalta")): 258 target= config['PLATFORM']259 platform = config['PLATFORM'] 259 260 gnu_target = "mipsel-linux-gnu" 260 261 helenos_target = "mipsel-helenos" 261 262 262 263 if ((config['MACHINE'] == "bmalta")): 263 target= "mips32eb"264 platform = "mips32eb" 264 265 gnu_target = "mips-linux-gnu" 265 266 helenos_target = "mips-helenos" … … 270 271 271 272 if (config['MACHINE'] == "msim"): 272 target= config['PLATFORM']273 platform = config['PLATFORM'] 273 274 gnu_target = "mips64el-linux-gnu" 274 275 helenos_target = "mips64el-helenos" 275 276 276 277 if (config['PLATFORM'] == "ppc32"): 277 target= config['PLATFORM']278 platform = config['PLATFORM'] 278 279 gnu_target = "ppc-linux-gnu" 279 280 helenos_target = "ppc-helenos" 280 281 281 282 if (config['PLATFORM'] == "riscv64"): 282 target= config['PLATFORM']283 platform = config['PLATFORM'] 283 284 gnu_target = "riscv64-unknown-linux-gnu" 284 285 helenos_target = "riscv64-helenos" 285 286 286 287 if (config['PLATFORM'] == "sparc64"): 287 target= config['PLATFORM']288 platform = config['PLATFORM'] 288 289 gnu_target = "sparc64-linux-gnu" 289 290 helenos_target = "sparc64-helenos" 290 291 291 return (target, cc_args, gnu_target, helenos_target) 292 if (config['COMPILER'] == "gcc_helenos"): 293 target = helenos_target 294 else: 295 target = gnu_target 296 297 return (platform, cc_args, target) 292 298 293 299 def check_app(args, name, details): … … 847 853 check_app(["unzip"], "unzip utility", "usually part of zip/unzip utilities") 848 854 855 platform, cc_args, target = get_target(config) 856 857 if (platform is None) or (target is None): 858 print_error(["Unsupported compiler target.", 859 "Please contact the developers of HelenOS."]) 860 861 path = "%s/%s/bin" % (cross_prefix, target) 862 863 # Compatibility with earlier toolchain paths. 864 if not os.path.exists(path): 865 if (config['COMPILER'] == "gcc_helenos"): 866 check_path = "%s/%s/%s" % (cross_helenos_prefix, platform, target) 867 if not os.path.exists(check_path): 868 print_error(["Toolchain for target is not installed, or CROSS_PREFIX is not set correctly."]) 869 path = "%s/%s/bin" % (cross_helenos_prefix, platform) 870 else: 871 check_path = "%s/%s/%s" % (cross_prefix, platform, target) 872 if not os.path.exists(check_path): 873 print_error(["Toolchain for target is not installed, or CROSS_PREFIX is not set correctly."]) 874 path = "%s/%s/bin" % (cross_prefix, platform) 875 876 prefix = "%s-" % target 877 849 878 # Compiler 850 if (config['COMPILER'] == "gcc_cross"): 851 target, cc_args, gnu_target, helenos_target = get_target(config) 852 853 if (target is None) or (gnu_target is None): 854 print_error(["Unsupported compiler target for GNU GCC.", 855 "Please contact the developers of HelenOS."]) 856 857 path = "%s/%s/bin" % (cross_prefix, target) 858 prefix = "%s-" % gnu_target 859 860 check_gcc(path, prefix, common, PACKAGE_CROSS) 861 check_binutils(path, prefix, common, PACKAGE_CROSS) 862 863 check_common(common, "GCC") 864 common['CC'] = " ".join([common['GCC']] + cc_args) 865 common['CC_AUTOGEN'] = common['CC'] 866 867 if (config['COMPILER'] == "gcc_helenos"): 868 target, cc_args, gnu_target, helenos_target = get_target(config) 869 870 if (target is None) or (helenos_target is None): 871 print_error(["Unsupported compiler target for GNU GCC.", 872 "Please contact the developers of HelenOS."]) 873 874 path = "%s/%s/bin" % (cross_helenos_prefix, target) 875 prefix = "%s-" % helenos_target 876 879 if (config['COMPILER'] == "gcc_cross" or config['COMPILER'] == "gcc_helenos"): 877 880 check_gcc(path, prefix, common, PACKAGE_CROSS) 878 881 check_binutils(path, prefix, common, PACKAGE_CROSS) … … 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.",905 "Please contact the developers of HelenOS."])906 907 path = "%s/%s/bin" % (cross_prefix, target)908 prefix = "%s-" % gnu_target909 910 904 check_binutils(path, prefix, common, PACKAGE_CROSS) 911 905 check_clang(path, prefix, common, PACKAGE_CLANG)
Note:
See TracChangeset
for help on using the changeset viewer.