Bug#797917: Actually this bug makes clang not so useful

Danny Edel debian at danny-edel.de
Sun Sep 6 15:02:01 UTC 2015


On 04/09/15 11:23, Gianfranco Costamagna wrote:
> 
> I guess clang is not useful for cxx11 projects until llvm folks finds
> a way to make it use the new ABI.
> 

Hi everyone,

I just want to make clear that this is *not* specific to c++11 projects.
Even if you don't use any c++11 features, clang can't link against the
library.

Try compiling my example code (which is valid c++98) with

$ g++ -std=c++98 -o options options.cpp -lboost_program_options
$ clang++ -std=c++98 -o options options.cpp -lboost_program_options

The results are the same - works on gcc, fails to link on clang on sid,
while both commands used to work on stable.

If I understand the consequences of this failure right, this will
severely impact the usefulness of clang++, since it will start failing
to link against *any* c++ library compiled by recent g++, breaking
unchanged and valid user code - be it c++11, c++03 or c++98.

I don't think this is that much of an issue on sid - after all, it's
called "unstable" for a reason - but it might be a showstopper for
stable, if clang++ is to be an alternative for g++.

- Danny



More information about the Pkg-llvm-team mailing list