Group: Software/research/ProgrammingLanguages
(→Compilers features and languages: Go: Add workaround for the lack of automake support. The example compile and runs fine with autoreconf -fi && ./configure && make) |
(→Compilers features and languages: clarify that the link rule is per target) |
||
Line 76: | Line 76: | ||
! Go | ! Go | ||
| {{yes|basic support for gccgo}} | | {{yes|basic support for gccgo}} | ||
− | | {{orange|no}}<ref>While automake isn't supported, it's still possible to use it if we add a rule to handle .go files in our Makefile.am. [https://mail.gnu.org/archive/html/automake-patches/2001-07/msg00012.html For some reasons] we then also need to add | + | | {{orange|no}}<ref>While automake isn't supported, it's still possible to use it if we add a rule to handle .go files in our Makefile.am. [https://mail.gnu.org/archive/html/automake-patches/2001-07/msg00012.html For some reasons] we then also need to add link rules for every program/library we create. I've created a [https://framagit.org/GNUtoo/autotools-go-hello-world autotools-go-hello-world] project to show how to use autoconf and automake together with go.</ref> |
| {{yes}} | | {{yes}} | ||
| {{yes}} | | {{yes}} |
Revision as of 10:14, 26 January 2023
Contents
Introduction
The goal of this page is to understand the status of various programming languages and toolchains. It can help people deciding on a programming language to choose or to learn, or enable people to understand where distributions need contributions to support well a language.
It could also contain information on what language works where or if we can target specific operating systems with free software or not.
Toolchain status
Compilers features and languages
Language | Autoconf | Automake | Libtool[1] | GCC 12 support[2] | Shared libraries[3] | Microcontrollers[4] | Strict specifications[5] |
---|---|---|---|---|---|---|---|
Ada | Yes | ? | |||||
C | Yes | Yes | Yes | Yes | defaults to shared libraries | GCC, SDCC | Drafts are available gratis, probably not under free licenses.[6] |
C++ | Yes | Yes | Yes | Yes | defaults to shared libraries | GCC, other? | ? |
D | Yes | ? | |||||
Erlang | Yes | No | ? | ||||
Fortran | Fortran 77, Fortran 90, Fortran 95 | Fortran 77, Fortran 9x | Fortran, Fortran 77 | Yes | ? | ||
Go | basic support for gccgo | no[7] | Yes | Yes | ? | ||
Java | with CGJ | with CGJ | No | ? | |||
Objective-C | Yes | Yes | Yes | ? | |||
Objective-C++ | Yes | Yes | Yes | ? | |||
Rust | No | No | No | Work in progress | No[8] | ||
Unified Parallel C. | partial | No | ? | ||||
Vala | partial | valac uses GCC | depends on glib | ? |
Compilers bootstraping
Compiler | Languages | Dependencies |
---|---|---|
gcc-ada |
|
Depends on gcc-ada |
valac |
|
valac depends on itself but translated C files are provided by upstream |
Interpreters features and languages
Language | Interpreter | Dependencies | Microcontrollers[4] | Strict specifications[5] |
---|---|---|---|---|
Python | CPython | C, some C libraries | No | ? |
MicroPython | C, some C libraries | Yes |
Build system status
Build system | Cross compilation | Easy to support in distributions |
---|---|---|
Autotools | Yes | Yes |
setup.py | ? | Yes |
Didstributions status
Guix status
Guix is the most strict FSDG compliant distribution with regard to languages support: it requires the bootstrap process to be reproducible.
While there are still binary compilers being used in the bootstrap process for some languages, other languages are completely bootstrapped from source.
Language | Toolchain | GNU/Hurd i586 | GNU/Linux armv7h | GNU/Linux aarch64 | GNU/Linux i686 | GNU/Linux mips64el | GNU/Linux powerpc | GNU/Linux powerpc64le | GNU/Linux riscv64 | GNU/Linux x86_64 | Mingw i686 | Mingw x86_64 |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Ada | No | |||||||||||
C | gcc-toolchain | Yes | Yes | Yes | Reduced Binary Seed of about 145MiB[9] | Yes | Yes | Yes | Yes | Reduced Binary Seed of about 145MiB[9] | Yes | Yes |
C# | No | |||||||||||
Haskell | ghc | No | No | No | Bootstrapped from ghc-4 binaries | No | No | No | No | Bootstrapped from ghc-4 binaries | No | No |
Java | openjdk | ? | ? | ? | bootstraped from source[10] | ? | ? | ? | ? | bootstraped from source[10] | ? | ? |
Rust | rustc | No[11] | No[11] | Bootstrapped from source with mrustc[11] | No[11] | No[11] | No[11] | No[11] | Bootstrapped from source with mrustc[11] | Bootstrapped from source with mrustc[11] | No[11] | No[11] |
Parabola status
Parabola has a policy which requires all the packages to be built from source. But it doesn't have a policy to reduce the size of the bootstrap binaries, so there can be circular dependencies.
Language | Toolchain | GNU/Linux armv7h | GNU/Linux i686 | GNU/Linux x86_64 |
---|---|---|---|---|
Ada | gcc-ada | No | Yes | Yes |
C | gcc-toolchain | Yes | Yes | Yes |
C# | mono | Yes | Yes | Yes |
Haskell | ghc | No | Yes | Yes |
Java | openjdk | Yes | Yes | Yes |
Rust | rustc | Yes | Yes | Yes |
Vala | valac | Yes | Yes | Yes |
Standalone toolchains
Programming languages | Distributor | Release | Host | Target | Source code review | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Adacore | 2021[12] | GNU/Linux (i686?) | ARM ELF 32bit |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GNU/Linux i686 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GNU/Linux x86_64 | RISCV ELF 32bit | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GNU/Linux x86_64 | RISCV ELF 64bit | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GNU/Linux x86_64 |
References
- ↑ libtool is part of the autotools and it abstracts linking to make it work on a lot of operating systems. The status of the programming languages other than C and C++ can be found here: https://www.gnu.org/software/libtool/manual/libtool.html#Tags
- ↑ Compared with other compilers like LLVM and rustc, GCC supports many CPU architectures and it's quite well integrated with various other software (gdb, gprof, build systems, etc). It also has long term support in mind as it continues to support other programming language standards. It also has good documentation that explain how it handles C code for instance. In addition it's a GNU project, so it has users freedom in mind. In addition Guix has made GCC bootstrapable from a binary that is less than 1KB, and it doesn't require huge resources to build or bootstrap.
- ↑ 4.04.1 Can we compile and/or run code for/on microcontrollers, if so which compilers/interpreters are used / necessary for that.
- ↑ 5.05.1 Having a standard or something similar to refer to enables people to write code that can still be used without requiring too much maintenance to adapt to newer compiler versions.
- ↑ Ideally the specifications should be available under free licenses.
- ↑ While automake isn't supported, it's still possible to use it if we add a rule to handle .go files in our Makefile.am. For some reasons we then also need to add link rules for every program/library we create. I've created a autotools-go-hello-world project to show how to use autoconf and automake together with go.
- ↑ See one of the two talks on rust in GNU cauldron 2022.
- ↑ 9.09.1 https://guix.gnu.org/en/manual/devel/en/guix.html#Bootstrapping
- ↑ 10.010.1 In gnu/packages/java.scm icedtea-7 depends on jamvm which depends on jamvm-1-bootstrap which is built from source. The source bootstrap is not architecture specific.
- ↑ 11.0011.0111.0211.0311.0411.0511.0611.0711.0811.0911.10 See supported-systems in the rust 1.54 package definition
- ↑ This release also had additional hosts like Windows and darwin, and additional targets too like "Raspberry Pi 2 Linux (32bits)" but I didn't look into them.
- ↑ Here we used GNU/Linux x86_64 host and target source code for the review. I hope that all the host/target combination have the same source but I didn't check.
- ↑ So far I used 'guix package --show=<package-name>' to find the license. I also didn't check license compatibilities.