Mac OS X 64-bit, libstdc++ vs. libc++

Stephan Bergmann sbergman at redhat.com
Fri Jan 17 01:02:21 PST 2014


The first appearance of LO for a new platform, like happens with 64-bit 
builds of LO 4.2 for Mac OS X now, is always a good time to revisit any 
decisions that may bite us later for backwards-compatibility.

In the case of Mac OS X 64-bit, the natural thing to revisit is whether 
to use libstdc++ or libc++.  libstdc++ is the tried-and-tested GCC 4.2 
thing that we've been using ever since, but it is a dead end (due to 
Apple not upgrading past GCC 4.2 for license reasons) that will likely 
block future progress of using C++11 in LO (and I'd not be surprised if 
Apple drops it from a future OS X version).  On the other hand, libc++ 
is clearly the way ahead on OS X, but somewhat less well tested with LO 
for now (only some individual developer builds having been configured to 
use it in the past).

Now, the good news appears to be that "Libc++ is specifically designed 
so that you can use it in the same process as libstdc++." 
[<http://clang-developers.42468.n3.nabble.com/Adopting-libc-hitting-problems-on-Mac-OS-X-td4027011.html>] 
  That means that it hopefully works to stick with libstdc++ for LO 4.2 
(and avoid any trouble switching this late in the release schedule), 
switch to libc++ for LO 4.3 say, and expect any native extensions using 
either of the two libraries to work with both flavors of LO.  (And, 
given the assumption that Apple will eventually discontinue the support 
of libstdc++, recommend that native extensions---which there are none 
yet for Mac OS X 64-bit---use libc++.)

Other thoughts?

Stephan


More information about the LibreOffice mailing list