tech-pkg archive

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

Re: gcc dual abi



maya%netbsd.org@localhost writes:

> On Sat, Oct 27, 2018 at 08:31:41PM -0400, Greg Troxel wrote:
>> So if on an old system -- let's say NetBSD 5 or 6 -- I build gcc5, and
>> then use that to build everything, should that work?  Absent
>> intentionally setting _GLIBCXX_USE_CXX11_ABI, would I be getting the new
>> C++11-compliant ABI or the old, compatible but not compliant ABI?
>
> I'm not sure if you can expect that to work at all, even not going into
> the question of dual ABI. Some possible problems I can think of:

I did wonder myself.  Thanks for replying and sorry if the questions
sound pointed - it's obvious that you understand these compiler/stdlib
issues better than I do.

> - I don't know if the libstdc++ patch will work on netbsd-5

Sorry, I am not following.  "The libstdc++ patch" means what exactly?
Is that something we have applied in base, but not in pkgsrc?

Do you mean about building libstdc++ from gcc 5 on netbsd-5?  gcc5
builds fine and seems to work in general.

When linking (this was archivers/par2 as a random example), it is clear
from atime updates and -Wl,--verbose that the gcc5 libstdc++ was used,
and the /usr/lib/libstdc++ was not read.

So as far as I can tell confusion over namespace mangling for the cxx11
abi is the only problem I am having.  (Of course, fixing one problem
exposes the next.)

gperf builds ok and even passes its tests.
gmp builds and packages, but the tests fail with the same linking issue.

> - libstdc++ will disable parts of its functionality when it detects some
>   missing functions, and I think the result for netbsd-6 wasn't
>   functional, but perhaps newer versions of GCC have the fix I was
>   looking at the time.

Is the gcc5/gcc5-libs built from pkgsrc going to be dual ABI, or forced
to be the new/C++11 ABI only?  Either way, what's the rationale for that
choice in pkgsrc, or is it just that nobody has made it different, or ?


Home | Main Index | Thread Index | Old Index