mailing list of musl libc
 help / color / mirror / code / Atom feed
* C++ ABI compatibility and musl-gcc
@ 2013-07-24 23:21 Rich Felker
  2013-07-27  6:04 ` Rob Landley
  0 siblings, 1 reply; 2+ messages in thread
From: Rich Felker @ 2013-07-24 23:21 UTC (permalink / raw)
  To: musl

I've just committed the last of a series of changes that make it
possible to load the glibc-built libstdc++.so.6 under musl. While it
may look like a bit of ugliness, roughly half of the changes were
needed anyway to lay the ground for future locale support; the
long-term goal is to support customizable LC_TIME, LC_MONETARY,
LC_COLLATE, and LC_MESSAGES, but I don't expect any of that to happen
until after the 1.0 release.

Anyway, back to musl-gcc. My hope was that supporting the glibc
libstdc++ would make it possible to use musl-gcc to compile C++ code,
which could in turn be useful for bootstrapping compilers written in
C++ (gcc 4.8 or clang/LLVM). However, it seems the installed C++
headers are also full of glibc-header-specific assumptions, so using
musl-gcc for C++ is not as easy as I'd hoped it might be.

I''ve already spent a great deal of time and effort onthis C++ ABI
topic and would rather focus on release prep and other issues for a
while now. But perhaps someone interested in this topic could do some
research and see if the idea of using musl-gcc for C++ can be
salvaged. Here are some possible approaches:

1. Figuring out what's wrong with the headers and working around it.
   Or, in other words:

   <chris2> lets write a musl-fixincludes :P

2. Determining if the C++ headers that result from building a
   musl-targetted libstdc++ are clean and arch-agnostic, and if so,
   just packaging them up in a tarball that users could download and
   install.

Whichever approach is taken, if we get this working there should be a
doc on the wiki explaining what to do. This would include not only
dealing with the header issue, but also things like copying
libstdc++.so.6 into $(prefix)/lib or similar.

By the way, merely running existing C++ apps linked against glibc IS
possible under musl now, and it should work with either the original
glibc libstdc++.so.6 or the (new, post-ABI-fixes) musl libstdc++.so.6.

Rich


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: C++ ABI compatibility and musl-gcc
  2013-07-24 23:21 C++ ABI compatibility and musl-gcc Rich Felker
@ 2013-07-27  6:04 ` Rob Landley
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Landley @ 2013-07-27  6:04 UTC (permalink / raw)
  To: musl; +Cc: musl

On 07/24/2013 06:21:41 PM, Rich Felker wrote:
> I've just committed the last of a series of changes that make it
> possible to load the glibc-built libstdc++.so.6 under musl. While it
> may look like a bit of ugliness, roughly half of the changes were
> needed anyway to lay the ground for future locale support; the
> long-term goal is to support customizable LC_TIME, LC_MONETARY,
> LC_COLLATE, and LC_MESSAGES, but I don't expect any of that to happen
> until after the 1.0 release.
> 
> Anyway, back to musl-gcc. My hope was that supporting the glibc
> libstdc++ would make it possible to use musl-gcc to compile C++ code,
> which could in turn be useful for bootstrapping compilers written in
> C++ (gcc 4.8 or clang/LLVM). However, it seems the installed C++
> headers are also full of glibc-header-specific assumptions, so using
> musl-gcc for C++ is not as easy as I'd hoped it might be.
> 
> I''ve already spent a great deal of time and effort onthis C++ ABI
> topic and would rather focus on release prep and other issues for a
> while now. But perhaps someone interested in this topic could do some
> research and see if the idea of using musl-gcc for C++ can be
> salvaged. Here are some possible approaches:
> 
> 1. Figuring out what's wrong with the headers and working around it.
>    Or, in other words:
> 
>    <chris2> lets write a musl-fixincludes :P
> 
> 2. Determining if the C++ headers that result from building a
>    musl-targetted libstdc++ are clean and arch-agnostic, and if so,
>    just packaging them up in a tarball that users could download and
>    install.

If you're ever in Pittsburgh, I know the guy who wrote uClibc++.

The current one has a lot of gpl code copied from glibc (headers  
mostly, same as uClibc), and he stopped working on it when I dinged him  
about copying GPLv3 code into an attempted update and he didn't know  
how to proceed from there. (And was largely losing interest in hobby  
programming now that he has a programming day job; he did it while he  
was working the night shift managing a hotel.)

But if anybody knows "what's involved in implementing libstdc++", it  
would be somebody who did. :)

Rob

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-27  6:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-24 23:21 C++ ABI compatibility and musl-gcc Rich Felker
2013-07-27  6:04 ` Rob Landley

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).