rust/compiler
Tomoaki Kawada da9ca41c31 Add SOLID targets
SOLID[1] is an embedded development platform provided by Kyoto
Microcomputer Co., Ltd. This commit introduces a basic Tier 3 support
for SOLID.

# New Targets

The following targets are added:

 - `aarch64-kmc-solid_asp3`
 - `armv7a-kmc-solid_asp3-eabi`
 - `armv7a-kmc-solid_asp3-eabihf`

SOLID's target software system can be divided into two parts: an
RTOS kernel, which is responsible for threading and synchronization,
and Core Services, which provides filesystems, networking, and other
things. The RTOS kernel is a μITRON4.0[2][3]-derived kernel based on
the open-source TOPPERS RTOS kernels[4]. For uniprocessor systems
(more precisely, systems where only one processor core is allocated for
SOLID), this will be the TOPPERS/ASP3 kernel. As μITRON is
traditionally only specified at the source-code level, the ABI is
unique to each implementation, which is why `asp3` is included in the
target names.

More targets could be added later, as we support other base kernels
(there are at least three at the point of writing) and are interested
in supporting other processor architectures in the future.

# C Compiler

Although SOLID provides its own supported C/C++ build toolchain, GNU Arm
Embedded Toolchain seems to work for the purpose of building Rust.

# Unresolved Questions

A μITRON4 kernel can support `Thread::unpark` natively, but it's not
used by this commit's implementation because the underlying kernel
feature is also used to implement `Condvar`, and it's unclear whether
`std` should guarantee that parking tokens are not clobbered by other
synchronization primitives.

# Unsupported or Unimplemented Features

Most features are implemented. The following features are not
implemented due to the lack of native support:

- `fs::File::{file_attr, truncate, duplicate, set_permissions}`
- `fs::{symlink, link, canonicalize}`
- Process creation
- Command-line arguments

Backtrace generation is not really a good fit for embedded targets, so
it's intentionally left unimplemented. Unwinding is functional, however.

## Dynamic Linking

Dynamic linking is not supported. The target platform supports dynamic
linking, but enabling this in Rust causes several problems.

 - The linker invocation used to build the shared object of `std` is
   too long for the platform-provided linker to handle.

 - A linker script with specific requirements is required for the
   compiled shared object to be actually loadable.

As such, we decided to disable dynamic linking for now. Regardless, the
users can try to create shared objects by manually invoking the linker.

## Executable

Building an executable is not supported as the notion of "executable
files" isn't well-defined for these targets.

[1] https://solid.kmckk.com/SOLID/
[2] http://ertl.jp/ITRON/SPEC/mitron4-e.html
[3] https://en.wikipedia.org/wiki/ITRON_project
[4] https://toppers.jp/
2021-09-28 11:31:47 +09:00
..
rustc Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_apfloat Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_arena Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_ast Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_ast_lowering rustc_index: Add some map-like APIs to IndexVec 2021-09-22 03:11:29 +03:00
rustc_ast_passes Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_ast_pretty Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_attr Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_borrowck Check that TAIT generics are fully generic in mir typeck instead of wf-check, as wf-check can by definition only check TAIT in return position and not account for TAITs defined in the body of the function 2021-09-23 13:35:16 +00:00
rustc_builtin_macros Auto merge of #89139 - camsteffen:write-perf, r=Mark-Simulacrum 2021-09-23 02:10:26 +00:00
rustc_codegen_cranelift Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_codegen_llvm Rollup merge of #89041 - sticnarf:sticnarf/fat-lto-dwarf, r=nagisa 2021-09-22 19:03:21 +02:00
rustc_codegen_ssa Support #[track_caller] on closures and generators 2021-09-22 15:19:33 -05:00
rustc_const_eval Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_data_structures Auto merge of #89158 - the8472:rollup-3e4ijth, r=the8472 2021-09-21 22:07:32 +00:00
rustc_driver Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_error_codes Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_errors Rollup merge of #89046 - oli-obk:fix_oflo, r=estebank 2021-09-22 19:03:22 +02:00
rustc_expand Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_feature Support #[track_caller] on closures and generators 2021-09-22 15:19:33 -05:00
rustc_fs_util Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_graphviz Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_hir Auto merge of #89103 - Mark-Simulacrum:migrate-2021, r=estebank 2021-09-21 19:25:49 +00:00
rustc_hir_pretty Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_incremental Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_index rustc_index: Add some map-like APIs to IndexVec 2021-09-22 03:11:29 +03:00
rustc_infer Auto merge of #89211 - workingjubilee:rollup-fj4eduk, r=workingjubilee 2021-09-24 01:48:02 +00:00
rustc_interface Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_lexer Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_lint Auto merge of #88865 - guswynn:must_not_suspend, r=oli-obk 2021-09-22 06:43:33 +00:00
rustc_lint_defs Auto merge of #88865 - guswynn:must_not_suspend, r=oli-obk 2021-09-22 06:43:33 +00:00
rustc_llvm Rollup merge of #89041 - sticnarf:sticnarf/fat-lto-dwarf, r=nagisa 2021-09-22 19:03:21 +02:00
rustc_macros Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_metadata Auto merge of #89016 - lcnr:non_blanket_impls, r=nikomatsakis,michaelwoerister 2021-09-23 15:44:53 +00:00
rustc_middle Auto merge of #89211 - workingjubilee:rollup-fj4eduk, r=workingjubilee 2021-09-24 01:48:02 +00:00
rustc_mir_build Auto merge of #89158 - the8472:rollup-3e4ijth, r=the8472 2021-09-21 22:07:32 +00:00
rustc_mir_dataflow Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_mir_transform Support #[track_caller] on closures and generators 2021-09-22 15:19:33 -05:00
rustc_monomorphize Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_parse Rollup merge of #89023 - Wardenfar:issue-85066, r=nagisa 2021-09-23 17:31:42 -07:00
rustc_parse_format Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_passes Auto merge of #88865 - guswynn:must_not_suspend, r=oli-obk 2021-09-22 06:43:33 +00:00
rustc_plugin_impl Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_privacy Auto merge of #89103 - Mark-Simulacrum:migrate-2021, r=estebank 2021-09-21 19:25:49 +00:00
rustc_query_impl Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_query_system Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_resolve Auto merge of #89158 - the8472:rollup-3e4ijth, r=the8472 2021-09-21 22:07:32 +00:00
rustc_save_analysis Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_serialize Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_session Rollup merge of #89133 - FabianWolff:issue-79546, r=michaelwoerister 2021-09-22 19:03:24 +02:00
rustc_span Auto merge of #87064 - Aaron1011:new-closure-track-caller, r=estebank 2021-09-23 12:26:51 +00:00
rustc_symbol_mangling Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_target Add SOLID targets 2021-09-28 11:31:47 +09:00
rustc_trait_selection Auto merge of #88804 - Mark-Simulacrum:never-algo-v2, r=nikomatsakis,jackh726 2021-09-23 22:45:22 +00:00
rustc_traits Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_ty_utils Auto merge of #89103 - Mark-Simulacrum:migrate-2021, r=estebank 2021-09-21 19:25:49 +00:00
rustc_type_ir Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_typeck Auto merge of #89211 - workingjubilee:rollup-fj4eduk, r=workingjubilee 2021-09-24 01:48:02 +00:00