1 |
On Mon, Nov 30, 2015 at 12:07 AM, Anthony G. Basile <blueness@g.o> wrote: |
2 |
> If we record enough information at build time (eg. gcc version or |
3 |
> libcxx/clang) then we can build tools that intelligently predict if |
4 |
> there's an abi incompatibility. |
5 |
|
6 |
Yes, exactly the type of thing I'm thinking of. As you go on to note, |
7 |
|
8 |
> Unfortunately gcc doesn't bump soname |
9 |
> and/or version-info when it changes c++11 abi. |
10 |
|
11 |
So, maybe kludge #1 we require is some kind of made-up section header |
12 |
injected into object files... let's say, hypothetically, a tuple from |
13 |
the cartesian cross-product of something vaguely like: |
14 |
|
15 |
< |
16 |
compiler={gcc34,gcc47,gcc49,gcc52,clang} |
17 |
arch={$(< profiles/arch.list)} or maybe {(gnu target triplets)} |
18 |
abi={c++03,c++11,gnu++11,plain-ol'-c} |
19 |
> |
20 |
|
21 |
i.e.: gcc52-amd64-gnu++11. Probably the arch is redundant -- hell, |
22 |
maybe the compiler too -- and could be dropped... but you get the |
23 |
idea. |
24 |
|
25 |
So then, some agent digs this out from executables, and, like you say, |
26 |
caches it in the vdb somewhere. |
27 |
|
28 |
Meanwhile, suppose there's a global eselect c++abi setting. Once it's |
29 |
changed, we could just zip through the vdb and, say, "maybe some of |
30 |
these are false positives, but, to be safe, here's a nag to rebuild |
31 |
these so-and-so packages, which seem to have been built against some |
32 |
c++ abi other than the current one." |
33 |
|
34 |
No depgraph required, easy to implement magically-fix-it.sh. Might |
35 |
spin its wheels a bit but how often would you change this setting? |
36 |
Almost never... |
37 |
|
38 |
Well just thinking out loud, I probably have horrible thinkos above, |
39 |
but ya gotta start somewhere... |
40 |
|
41 |
-gmt |
42 |
|
43 |
Greg Turner |
44 |
gmt@×××××××.net |