This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] make check-abi


In article <20020822165025.A9430@us.ibm.com> Janis writes:

Hi Janis,

I am only answering where and as I understand things.  I also have
some early results not easily attainable without `make check-abi'.  In
one case, I was inspired to check based on your questions.

> Will you have a provision for baseline data that depends on how the
> library is configured, e.g., thread support?

At the moment, no.  In fact, I noticed last night that the "binary
ABI" of the C++ library changes as the optimization flag changes (105
new symbols with -O0 verses -O2 on i386-unknown-freebsd4.6!).  This is
probably not good; either those symbols should always be exported or
always hidden.

To answer your exact question about thread support, there is currently
one (unintended, I believe) ABI change based on configuration of
threading support:

Appears --disable-thread (all platforms):
        std::__basic_file<char>::__basic_file[in-charge](int*)
        std::__basic_file<char>::__basic_file[not-in-charge](int*)

Appears --enable-thread=posix (on FreeBSD4)
        std::__basic_file<char>::__basic_file[in-charge](pthread_mutex**)
        std::__basic_file<char>::__basic_file[not-in-charge](pthread_mutex**)

Appears --enable-thread=posix (on GNU/linux)
        std::__basic_file<char>::__basic_file[in-charge](pthread_mutex_t*)
        std::__basic_file<char>::__basic_file[not-in-charge](pthread_mutex_t*)

It is unclear that code which references this ever goes into an app
binary (i.e. it's use might really be contained within the library and
it was just accidentally exported, I haven't checked any real cases yet).

To answer your question in general: Humm, the whole point of the check
is that as GCC 3.2 is installed as the system compiler on particular
ports, there will be a canonical configuration with an ABI.  We want
to ensure that GCC 3.[3456789+] is released with a compatible ABI
whenever possible.  At this time, this "binary ABI" check has nothing
to do with the multivendor C++ ABI.

> Should these tests be run as part of the normal libstdc++ testing if the
> appropriate baseline files exist?  Or, there could be a top-level
> check-consistency target that would run compiler tests as well as
> library tests.

As soon as `make check-abi' is completely portable across environments
and all common ports have baseline files, this makes great sense IMHO.
Until then, no.

Regards,
Loren


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]