Talk:Coreboot
From Gentoo Wiki
Note
This is a Talk page - please see the documentation about using talk pages. Add newer comments below older ones, sign comments using four tildes (
This is a Talk page - please see the documentation about using talk pages. Add newer comments below older ones, sign comments using four tildes (
~~~~
), and indent successive comments with colons (:
).
Add new sections at the bottom of the page, under a heading (== ==
). Please remember to mark sections as "open for discussion" using {{talk|open}}
, so they will show up in the list of open discussions.Ada and gcc
Talk status
This discussion is still ongoing.
I installed dev-lang/gnat-gpl (which requires 6 GB space in PORTAGE_TMPDIR):
root #
emerge --ask dev-lang/gnat-gpl
Then I ran make crossgcc CPUS=4
and got "No compatible Ada compiler (GNAT) found":
user $
make crossgcc CPUS=4
Welcome to the coreboot cross toolchain builder v51d23c589b (2021-01-05) Building toolchain using 4 thread(s). Target architecture is i386-elf WARNING No compatible Ada compiler (GNAT) found. You can continue without Ada support, but this will limit the features of coreboot (e.g. native graphics initialization won't be available on most Intel boards). Usually, you can install GNAT with your package management system (the package is called `gnat` or `gcc-ada`). It has to match the `gcc` package in version. If there are multiple versions of GCC in- stalled, you can point this script to the matching version through the `CC` and `CXX` environment variables. e.g. on Ubuntu 14.04, if `gcc` is `gcc-4.8`: apt-get install gnat-4.8 && make crossgcc on Ubuntu 16.04, if `gcc` is `gcc-5`: apt-get install gnat-5 && make crossgcc Press Ctrl-C to abort, Enter to continue...
As I see, Ada compiler version is 8.3.1:
user $
equery list -po dev-lang/gnat-gpl
* Searching for gnat-gpl in dev-lang ... [-P-] [ ] dev-lang/gnat-gpl-2016-r4:4.9.4 [-P-] [ ] dev-lang/gnat-gpl-2017-r1:6.3.0 [-P-] [ ] dev-lang/gnat-gpl-2018-r3:7.3.1 [IP-] [ ] dev-lang/gnat-gpl-2019-r2:8.3.1
But default GCC version is 9.3.0:
user $
eselect gcc list
[1] x86_64-pc-linux-gnu-8.3.1 [2] x86_64-pc-linux-gnu-9.3.0 *
So I had to do
root #
eselect gcc set x86_64-pc-linux-gnu-8.3.1
* Switching native-compiler to x86_64-pc-linux-gnu-8.3.1 ... >>> Regenerating /etc/ld.so.cache... [ ok ] * If you intend to use the gcc from the new profile in an already * running shell, please remember to do: * . /etc/profile
Now make crossgcc
starts compiling.
Why I'm writing here:
- This part of Gentoo documentation should be improved: Coreboot#Compiling
- Probably Project:Ada documentation should be improved too
- I hope there is some better way than using
eselect gcc set x86_64-pc-linux-gnu-8.3.1
, so I decided to not change the documentation right now, but find a better options.