2019-12-01 23:29:12 +00:00
|
|
|
## Bootstrapping OpenJDK 8
|
|
|
|
|
2019-12-04 01:34:11 +00:00
|
|
|
```sh
|
2024-03-02 13:34:24 +00:00
|
|
|
sudo emerge -a1 dev-java/openjdk:8::gentoo-bootstrap
|
2019-12-07 16:08:41 +00:00
|
|
|
sudo emerge -av dev-java/openjdk:8
|
2019-12-07 16:37:47 +00:00
|
|
|
sudo emerge -a --depclean # Remove old software that was used for bootstrapping
|
2019-12-01 23:29:12 +00:00
|
|
|
```
|
|
|
|
|
2022-01-15 14:00:01 +00:00
|
|
|
Notes:
|
|
|
|
1. you need to do it in two steps as currently ant-core:bootstrap is not co-installable
|
2019-12-07 16:08:41 +00:00
|
|
|
with ant-core:0 from the Gentoo tree.
|
2024-03-02 13:34:24 +00:00
|
|
|
2. Last tested on GCC 13. New versions of GCC are known to occasionally break builds
|
2022-01-15 14:00:01 +00:00
|
|
|
and might need additional patches.
|
|
|
|
|
2019-12-07 16:08:41 +00:00
|
|
|
|
2023-09-24 16:35:13 +01:00
|
|
|
## Bootstrapping OpenJDK 17
|
2023-08-31 22:18:16 +01:00
|
|
|
|
2019-12-04 01:34:11 +00:00
|
|
|
```sh
|
2024-03-02 13:34:24 +00:00
|
|
|
sudo emerge -a1v dev-java/openjdk:17::gentoo-bootstrap
|
2019-12-01 23:29:12 +00:00
|
|
|
```
|
|
|
|
At this point you can remove this overlay and install OpenJDK from main tree:
|
2019-12-04 01:34:11 +00:00
|
|
|
```sh
|
2023-09-24 16:35:13 +01:00
|
|
|
sudo emerge -a dev-java/openjdk:17
|
2019-11-29 22:30:06 +00:00
|
|
|
```
|
2019-12-07 01:19:45 +00:00
|
|
|
|
|
|
|
## Bootstrapping story
|
|
|
|
|
|
|
|
We first compile fastjar and jikes java compiler both of which are written in C++.
|
|
|
|
This is enough to compile an old version of GNU Classpath 0.93. Then we compile an old
|
|
|
|
version of JamVM 1.5.1. This serves as our initial Java Runtime Environment.
|
|
|
|
|
|
|
|
We use this to compile ant 1.8.1 which then allows us to build ecj-3.2. This allows us
|
|
|
|
to compile GNU Classpath 0.99 which comes with more java tools (e.g. javah). Then we
|
|
|
|
compile JamVM 2.0.0. This serves as our second Java environment.
|
|
|
|
|
|
|
|
Finally, we compile git snapshot of GNU Classpath which has a much better support for Java 1.6.
|
|
|
|
Then we compile a slightly patched ecj-4.2. Together with JamVM 2.0.0 this will serve as
|
2021-12-07 20:09:01 +00:00
|
|
|
Java environment that can bootstrap Icedtea 2 (Java 7). Then we use it to build Icedtea 3
|
|
|
|
and subsequent OpenJDK versions.
|
2023-02-04 18:38:46 +00:00
|
|
|
|
|
|
|
## Bootstrapping rust
|
|
|
|
|
|
|
|
We use `mrustc` to build rustc-1.54 and then we build each subsequent rustc version until
|
|
|
|
we reach up to date rustc.
|
|
|
|
|
2024-03-02 13:34:24 +00:00
|
|
|
mrustc is ocasionally broken on some versions of GCC. Last tested with GCC 13.
|
2023-08-31 22:18:16 +01:00
|
|
|
|
|
|
|
## Bootstrapping go
|
|
|
|
|
|
|
|
```sh
|
|
|
|
sudo emerge -a1v =dev-lang/go-1.4
|
|
|
|
sudo emerge -a1v =dev-lang/go-1.17.13
|
|
|
|
sudo emerge -a1uv dev-lang/go
|
|
|
|
```
|