← Back to team overview

desktop-packages team mailing list archive

[Bug 1488254]

 

(In reply to comment #19)
> But as I understood it, LLVM/Clang claims to support GCC
> and its libraries with a minimum version required.

I don't think we do. Our community has always sent a strong message that
we'll be compatible with what makes sense AND allows us enough time to
implement on our own.

> No user would expect there to be an maximum version requirement.

This doesn't make sense. We're not the same team, we can't possibly keep
up with another community entirely AND develop our own software at
instant speed.

If LLVM was a plugin to GCC, that could be true, but not *necessarily*
so. Since it's not, this statement doesn't make sense.


> I see two possible ways here for the next release:
> 1. State that LLVM/Clang only works up to GCC 4.9.

LLVM "is known to work" with GCC up to "M.N". We never claimed full
compatibility, nor I think we ever will.


> 2. Add this attribute to be compatible to the most recent GCC release (5.3)
> again.

If it was that simple, it would have been added already.

>From comments in this very thread, it seems GCC's own implementation had
several bugs, and implementing a bug for bug copy would be very silly
indeed.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to llvm-toolchain-3.6 in Ubuntu.
https://bugs.launchpad.net/bugs/1488254

Title:
  clang++ no longer ABI-compatible with g++

Status in LLVM:
  Confirmed
Status in llvm-toolchain-3.6 package in Ubuntu:
  Confirmed

Bug description:
  $ cat foo.cc
  #include <string>
  std::string hello = "Hello, world!\n";
  $ cat bar.cc
  #include <string>
  #include <iostream>
  extern std::string hello;
  int main() {
      std::cout << hello;
      return 0;
  }
  $ g++ -c foo.cc && g++ foo.o bar.cc && ./a.out
  Hello, world!
  $ clang++ -c foo.cc && clang++ foo.o bar.cc && ./a.out
  Hello, world!
  $ g++ -c foo.cc && clang++ foo.o bar.cc && ./a.out
  /tmp/bar-34fb23.o: In function `main':
  bar.cc:(.text+0x14): undefined reference to `hello'
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  $ clang++ -c foo.cc && g++ foo.o bar.cc && ./a.out
  /tmp/ccqU38Mh.o: In function `main':
  bar.cc:(.text+0x5): undefined reference to `hello[abi:cxx11]'
  collect2: error: ld returned 1 exit status

  In practice, this means that many programs using C++ libraries other
  than libstdc++ fail to compile with clang++. For example, mosh fails
  with undefined references to
  google::protobuf::internal::empty_string_,
  google::protobuf::MessageLite::InitializationErrorString() const, and
  google::protobuf::MessageLite::SerializeAsString() const.

To manage notifications about this bug go to:
https://bugs.launchpad.net/llvm/+bug/1488254/+subscriptions


References