Adding Sparc/LEON3 support to Genode

Christian Helmuth christian.helmuth at ...1...
Tue Aug 5 09:52:11 CEST 2014

Hello Johannes,

We walked a long rocky road with third-party tool chains until we
decided to go for our own. The main reason for issues with other tools
was the lacking support for C++ without a full fledged libC runtime.

You may find our tool-chain script in tool/tool_chain, which
officially supports x86 and arm. There are also traces of support for
microblaze, but we did not test it years. Maybe you can add LEON3 to
the script and get rid of those undefined references to libC symbols
we do not provide in our runtime.

Christian Helmuth
Genode Labs · · /ˈdʒiː.nəʊd/

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth

On Mon, Aug 04, 2014 at 06:24:58PM +0200, Johannes Schlatow wrote:
> Hey guys,
> I'm trying to add a new architecture, namely the LEON3, to Genode.
> Some time ago, I already added rudimentary LEON3 support to Fiasco.OC.
> Thus I thought it shouldn't take too much of an effort to get this
> working with Genode on top of it.
> The LEON3 port for Fiasco.OC was based on the l4re snapshot from April
> 2013. I therefore (back)ported the implementation to Genode's foc clone.
> You can find the code at github [1] (beware, it's not tested yet).
> I also added the foc_leon3 build target along with the required
> platform-specific code to Genode [2].
> Unfortunately, I got stuck a little at this point. I.e. when I run e.g.
> 'make run/printf' for this target, I get a couple of linker errors that
> I cannot relate to anything in the Genode source code, e.g.:
>   repos/os/src/init/ undefined reference to `atexit'
>   `.text.__sparc_get_pc_thunk.l7' referenced in section `.text'
>   of /build/foc_leon3/var/libcache/cxx/cxx.lib.a(supc++.o):
>   defined in discarded section
>   `.text.__sparc_get_pc_thunk.l7[__sparc_get_pc_thunk.l7]'
>   of build/foc_leon3/var/libcache/cxx/cxx.lib.a(supc++.o)
>   build/foc_leon3/var/libcache/cxx/cxx.lib.a(supc++.o):
>   In function `__gnu_cxx::__verbose_terminate_handler()':
>   (.text+0x31cc): undefined reference to `_impure_ptr'
> I assume these errors might be related to the tool chain but this is a
> rather wild guess. Do you have any (more educated) suggestions?
> I'm using the dev version of the bare-c compiler provided by gaisler [3]
> which bases on gcc 4.6.0. Of course, this is not an optimal solution
> but the best I could achieve so far.
> [1]
> [2]
> [3]
> Cheers
>  Johannes

More information about the users mailing list