This is the mail archive of the gcc@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: C++ ABI testing issues, gcc-3.3 <-> gcc-3.2 compatibility


In article <20020803184148.P20867@sunsite.ms.mff.cuni.cz> Jakub
Jelinek writes:

> This begs for the question whether if libstdc++ configured with
> --enable-threads=posix and configured without this are not
> binary compatible,

As long as one is not attempting to actually produce a threaded
program, a gcc configured with --enable-threads=posix and another
configured with --disable-threads should be link-ABI and fully
run-time compatible.  If anyone finds a bug in this area within the
libstdc++-v3 implementation, then I'd consider myself a responsible
party.

> we shouldn't default to
> --enable-threads=posix --enable-__cxa_atexit
> for linux native builds, so that
> a) all linux distributions out there create binary compatible libstdc++
> b) people who build gcc themselves and forget about --enable-threads=posix
>   would be binary incompatible with vendor compilers

As a BSD user, I don't consider myself having franchise on this
matter, but I would strongly advocate that someone from the Linux
world modernize and centralize defaults for *-*-linux* in
gcc/config.gcc...

Some <cpu>-*-linux* default to threads, some don't.

Regarding your exact question (on why you should or shouldn't default
a certain way): More ports now have --enable-threads=posix (or
whatever) encoded by default in gcc/config.gcc .  For many (but not
all) platforms, it is near-zero overhead to add --enable-threads=posix
(or whatever) since weak symbol mappings control whether mutexs are
actually used or skipped at program run-time.  This is true for
all POSIX/ELF platforms thus covering all Linux platforms, no?

Regards,
Loren
-- 
Loren J. Rittle, Principal Staff Engineer, Motorola Labs (IL02/2240)
rittle@labs.mot.com, KeyID: 2048/ADCE34A5, FDC0292446937F2A240BC07D42763672


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