[cfe-dev] Compiler-RT tests on x86_64

Renato Golin renato.golin at linaro.org
Tue Feb 4 06:39:33 PST 2014


Hi folks,

So, after a clean install of compiler-rt on my x86_64 box, I managed to
isolate the error I was getting, and it seems to be related to how Clang
adds the default include paths.

This is the error:

... while compiling "allocator_test.cc":
In file included from
/home/rengolin/devel/llvm/src/compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc:21:
In file included from
/home/rengolin/devel/llvm/src/llvm/utils/unittest/googletest/include/gtest/gtest.h:54:
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/limits:42:10:
fatal error: 'bits/c++config.h' file not found
#include <bits/c++config.h>
         ^
1 error generated.

As it turns out, Linux Mint stores the c++config.h file at:

/usr/include/x86_64-linux-gnu/c++/4.8/bits/c++config.h

But the multilib logic in Clang (Linux::addLibStdCXXIncludePaths) uses the
BiarchSuffix (which in my case it's 32), but that's not there at all.

When I added another line to that removing the BiarchSuffix, I got other
errors:

/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/limits:1410:59:
error: __int128 is not supported on this target
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/limits:131:43:
note: expanded from macro '__glibcxx_min'
  (__glibcxx_signed (T) ? -__glibcxx_max (T) - 1 : (T)0)
                                          ^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/limits:135:35:
note: expanded from macro '__glibcxx_max'
   (((((T)1 << (__glibcxx_digits (T) - 1)) - 1) << 1) + 1) : ~(T)0)
                                  ^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/limits:138:49:
note: expanded from macro '__glibcxx_digits'
  (sizeof(T) * __CHAR_BIT__ - __glibcxx_signed (T))
                                                ^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/limits:128:31:
note: expanded from macro '__glibcxx_signed'
#define __glibcxx_signed(T)     ((T)(-1) < 0)


So, I'm not really sure how to proceed. Isn't anyone seeing this? Did I
mess up my compilation environment that badly? I do have a few versions of
ARM gcc installed via the package management, but even after removing the
x86-multilib GCC packages, I still have that error.

Ideas?

cheers,
--renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140204/dbe560c8/attachment.html>


More information about the cfe-dev mailing list