Gentoo Archives: gentoo-dev

From: "C. Bergström" <cbergstrom@×××××××××.com>
To: gentoo-dev@l.g.o
Cc: "Jan Kundrát" <jkt@g.o>
Subject: Re: [gentoo-dev] How to support C++11 in libraries?
Date: Wed, 18 Dec 2013 17:50:42
Message-Id: 52B1E038.7020707@pathscale.com
In Reply to: Re: [gentoo-dev] How to support C++11 in libraries? by "Jan Kundrát"
1 On 12/19/13 12:33 AM, Jan Kundrát wrote:
2 > On Wednesday, 18 December 2013 18:05:46 CEST, "C. Bergström" wrote:
3 >> If moving to C++11 - Isn't that considered just part of the work
4 >> along the path? There's some clang tools to help with the migration,
5 >> but I don't think anyone expects it to be zero work. The flag is just
6 >> a way to a) enable building programs that can be built with c++11 b)
7 >> flush out the culprits in the cases it can't be. If (b) is a bug -
8 >> how else to find it easily?
9 >
10 > This perspective is interesting (and I admit that I tend to like it)
11 > -- considering packages which won't build with C++11 to be buggy.
12 >
13 > I'm worried by the cost of such a policy, though, because we would
14 > suddenly have to patch some unknown amount of software (and I'm pretty
15 > sure some upstreams would reject these patches anyway). If we were an
16 > enterprise distro with binary compatibility requirements, we would
17 > also have to worry about that and either assume that the ABI changes
18 > are non-issue in real world, or provide two versions of all C++
19 > libraries. I tried to check how RHEL7 will deal with it, but I wasn't
20 > able to find any information about that. It also seems that Fedora
21 > hasn't addressed this yet, either.
22 >
23 > Either way, it is reasonable to assume that some users would like to
24 > build their own software and link it with system libraries. It is not
25 > reasonable to force these users to build in the C++11 mode, IMHO.
26 I want my cake and eat it too!
27
28 /* Off the cuff crazy ideas and not meant to be taken too seriously */
29
30 In my mind this is almost similar to ABI (incompatibilities) between 32
31 and 64bit. Why not just (ab)use the multilib approach for c++11?
32
33 /usr/lib64-c11/
34
35 It would possibly (likely) require some patching to clang/g++ when the
36 --std=c++11 flag is used, but might allow the extension of a c++11
37 library universe while leaving the things which are working today
38 unbroken. The main problem I see with this is proliferation of more crap
39 in /usr/lib* (4 variations instead of just the 2 (32vs64) we have now).
40 (Personally, I'd typically build *only* 64bit versions and 32bit x86 can
41 go to hell...)
42
43 To get support from the "enterprise" distros - I'd try to move the
44 discussion of this problem upstream to the LSB level. They will at some
45 point need to solve this same problem as well. It's not like it'll be
46 gentoo specific forever. (You guys are just pioneering and ahead of the
47 curve.. this isn't the same thing as -Omgfast)
48
49 With this approach - would it make sense to create a new profile?
50
51 I don't know if a USE flag would in general get pushback, but if the
52 c++11 use flag was used - it would put those libs in /usr/lib64-c11/