Hi Yuxin,

I don't think you need to modify GCC, it is the compiler that you can use to generate required executables.  Making changes to it is a massive undertaking.

Instead of trying to reinvent stuff that has already been done, you really should read the Genode documentation and download and read the source code referenced by Norman Feske's suggestions.

From my reading of the Genode documents and source code, I would expect that you would find a considerable amount of code that you could you re-purpose for your specific requirements.

Cheers,
Tyga


 
----------------------------------------------------------------------

Message: 1
Date: Fri, 19 Jun 2015 22:46:40 +0800
From: Yuxin Ren <ryx@gwmail.gwu.edu>
To: Norman Feske <norman.feske@genode-labs.com>
Cc: "devel@sel4.systems" <devel@sel4.systems>
Subject: Re: [seL4] Does sel4 support c++
Message-ID:
        <CAAKbDrcbyh0YV+nHzhziiiXavn-=P_tW5bS2LUfPzHcBF-iMKg@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Thank you all!

If modifying the tool chain is the easiest way, I want to try it.
But I definitely want to avoid creating the tool chain from "bare metal".
I still prefer to reuse the existing tool chain like gcc
with minimal modification.

Could you give me some guidance how to create a custom tool chain, which
part I need to modify?
I am not familiar with gcc. So if I have to modify gcc, where can I get
more information or documentation?

Thanks a lot!!
Yuxin

On Thu, Jun 18, 2015 at 9:50 PM, Norman Feske <norman.feske@genode-labs.com>
wrote:

> Hello,
>
> > The easiest approach is possibly to create a custom tool chain, and port
> > the GCC C++ library that way. I know the people behind Genode did some
> > of this (http://genode.org/download/tool-chain), although I'm not sure
> > how much of the C++ standard library they actually support.
>
> more in-depth information about Genode's tool chain are provided by
> Section 7.2 of the documentation [1]. In short, the tool chain is a
> "bare metal" tool chain that does not depend on a C library, yet it
> still supports C++ (including exceptions and runtime type information).
>
> On Genode, the libc and STL (aka stdcxx) can be used optionally whereas
> the STL depends on the libc. The libc is based on FreeBSD's libc. The
> STL is GCC's version. Both libraries are available via Genode's ports
> mechanism.
>
> That said, as both the libc and stdcxx are shared libraries, they cannot
> be used on the seL4 version of Genode as of now. Shared libraries don't
> work on seL4 (at least on x86_32) because the system-call bindings
> cannot be compiled with -fPIC.
>
> [1] http://genode.org/documentation/genode-foundations-15-05.pdf
>
> Best regards
> 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
>
> _______________________________________________
> Devel mailing list
> Devel@sel4.systems
> https://sel4.systems/lists/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sel4.systems/pipermail/devel/attachments/20150619/5b4ce704/attachment-0001.html>

------------------------------

Subject: Digest Footer

_______________________________________________
Devel mailing list
Devel@sel4.systems
https://sel4.systems/lists/listinfo/devel


------------------------------

End of Devel Digest, Vol 13, Issue 10
*************************************