Adding Sparc/LEON3 support to Genode
Norman Feske
norman.feske at ...1...
Tue Aug 12 10:40:15 CEST 2014
Hi Johannes,
> binutils 2.22 doesn't fully support LEON3 (missing CAS
> instruction). I therefore did a quick attempt of bumping the version
> numbers in the script to binutils 2.24 and gcc 4.8.2, which however
> fails with undefined type uint64_t errors in libstdc++v3.
why not updating binutils to version 2.22 but keep the current version
of GCC? As far es I know, binutils and GCC are pretty well decoupled.
> I think there are basically three options for me:
>
> 1. Figure out how to compile the tool chain with the newer versions of
> binutils and gcc, which may, however, have uncertain effects on
> Genode (?).
We are planning to upgrade the tool chain for the 14.11 release. So your
effort would be well-spent. :-)
> 2. Backport the missing LEON3 features to the versions currently used
> for the Genode tool chain.
I would not recommend to go this route. You would need to dive right
into the inner guts of the tool chain, which is not easy. Also your work
will become obsolete once the tool chain gets updated the next time.
> 3. Somehow work around the libc issues with the gaisler tool chain (if
> possible at all).
I am afraid that this approach would open a new can of worms. Please
revisit the rationale behind our tool chain [1].
[1]
http://genode.org/download/tool-chain#Background_information_-_Why_do_we_need_a_special_tool_chain?
In short, existing tool chains are either missing proper C++ support
(so-called bare-metal tool chains) or expect a specific OS environment
(i.e., glibc on Linux). The former variant does not suffice for
compiling Genode because support libraries like libsupc++ are not
shipped with them. The latter type (as apparently the gaisler tool
chain) presumes certain properties from the environment (e.g., the way
how TLS is handled) and a complete C runtime. Both conditions are not
met by Genode's low-level environment. Genode's tool chain is a
bare-metal tool chain with complete C++ support, but stripped from the
dependency from a complete C runtime.
> Do you have any comments on this? I guess I'd go for the second option
> unless you have any other suggestions.
I recommend to first just update binutils but keep the current GCC
version. If this does not work, it would be sensible to upgrade the tool
chain altogether. We would happily lend a helping hand with that.
Cheers
Norman
--
Dr.-Ing. Norman Feske
Genode Labs
http://www.genode-labs.com · http://genode.org
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
More information about the users
mailing list