tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Mixing clang and gcc



On Sat, Aug 31, 2019 at 12:23:19PM -0400, Greg Troxel wrote:
> Kamil Rytarowski <n54%gmx.com@localhost> writes:
> 
> > On 31.08.2019 15:25, Robert Swindells wrote:
> >> 
> >> Is linking code compiled with pkgsrc clang against system libpthread
> >> built by gcc supposed to work ?
> >> 
> >> I'm getting a core dump that seems to be caused by an incorrect value
> >> returned by pthread_self().
> >> 
> >> This is on aarch64.
> >
> > They have to use a compatible ABI. If this is not the case, speak up.
> 
> My impression, worth not much except as a data point about expectations,
> is the programs written in C should have a compatible ABI and mixing
> compilers should be ok, but that C++ does not really have a defined ABI
> and one needs to use the same compiler for all C++ portions and the
> final link.

C++ has had a well defined ABI for over a decade now. The main issue is
that there are different implementations of the standard library and
those are typically not ABI compatible.

Joerg


Home | Main Index | Thread Index | Old Index