Re: How to support C++ in a new OS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23 June 2015 at 17:47, Yuxin Ren <ryx@xxxxxxxxxxxxxx> wrote:
> Thank you all so much!
>
> Our target OS will use the same hardware architecture (x86_32) and
> object format.
> I do not want to run gcc on the target OS.
> Our OS has thread and lock support.
> Currently we have outdated dietlibc in our system, and we maybe going
> to port musl libc.
> Are those C libraries sufficient? If not, which C library are needed?

They should be sufficient, I'm not sure though.

> I have some further questions.
> 1. What is the functionality of libstdc++ and libsupc++? What is the
> relationship between them? I see libsupc++ is a sub-directory of
> libstdc++, this confuses me a bit.

Libsupc++ is a subset of libstdc++, it provides just the basic runtime
environment (exception handling, run-time type identification, dynamic
memory allocation/deallocation).

Libstdc++ provides the complete C++ standard library, including I/O,
containers, algorithms, threading etc.


> 2. It looks like libgcc and libsupc++ are important. In order to port
> them to our OS, how much and where do I have to modify? And after

Have you read the docs?

https://gcc.gnu.org/onlinedocs/libstdc++/manual/internals.html


> porting them, can I guide gcc to link them properly just using command
> line options without recompile gcc?

They are part of gcc, it always links with the versions installed
alongside the compiler.

> 3. For somethings such as vectors, which library they depend on?

Libstdc++, but mostly just its headers not the shared library, because
std::vector is a template.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux