[build2] Build system reorganization (heads-up to distribution packagers)

Matthew Krupcale mkrupcale at matthewkrupcale.com
Fri Oct 4 16:09:07 UTC 2019


On Fri, Oct 4, 2019 at 10:38 AM Boris Kolpackov <boris at codesynthesis.com> wrote:
> This change apparently might change how this struct is passed
> around in the Itanium ABI.

Weird. Did the speaker say specifically what the struct should look
like, how it should be compiled, and what affect it has on the ABI?
Changes in "how the struct is passed around" sounds vague.

I tested:
$ cat test-v0.cpp
struct s
{
    s () {}
};

s s0;

$ cat test-v1.cpp
struct s
{
    s () = default;
};

s s0;

Compiled as
$ for v in v0 v1; do g++ -g -Wall -fPIC -shared -o libtest-${v}.so
test-${v}.cpp; done

Which yielded
$ abidiff libtest-v0.so libtest-v1.so
Functions changes summary: 1 Removed, 0 Changed, 0 Added function
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

1 Removed function:

  'method s::s()'    {_ZN1sC2Ev, aliases _ZN1sC1Ev}

This might be due to the `= default` case resulting in a trivial
default constructor[1], whereas the user-defined constructor with
empty body must still exist in the former case. Why this is the case
I'm not entirely sure.

> but I wonder if it handles all the corner cases like the above.

I'm not sure, but at least it reports things like changes in types,
sizes, offsets, addition/removal of symbols/variables, and vtable
changes, so it should cover most of the significant cases.

[1] https://en.cppreference.com/w/cpp/language/default_constructor#Trivial_default_constructor



More information about the users mailing list