[llvm-dev] GCC prerequisites for building LLVM head?
Martin J. O'Riordan via llvm-dev
llvm-dev at lists.llvm.org
Wed Jul 6 03:04:34 PDT 2016
I just checked with '-E' and I am picking up '<string>' from:
all other C++ headers are coming from the same place. The 'std::to_string' functions are not present in '<string>', but they are located in '<bits/basic_string.h>' - which is included. Perhaps it is a broken Cygwin v4.9.3 package, but this is odd since the source should be identical for the Cygwin versus Linux distros? I can't try this on Linux until tomorrow as I am working from home and don't have a Linux setup that uses v4.9.3.
The 'std::to_string' functions are provided in a block that is conditionally included as follows (line #2847 in my copy):
#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99)
namespace std _GLIBCXX_VISIBILITY(default)
The test '__cplusplus >= 201103L' evaluates true in all previous cases, so it would appear that '_GLIBCXX_USE_C99' is not being defined - I can add this explicitly when I am configuring LLVM with CMake, but it seems a bit strange that I need to.
From: Renato Golin [mailto:renato.golin at linaro.org]
Sent: 06 July 2016 10:12
To: Martin.ORiordan at movidius.com
Cc: LLVM Developers <llvm-dev at lists.llvm.org>
Subject: Re: [llvm-dev] GCC prerequisites for building LLVM head?
On 6 July 2016 at 08:46, Martin J. O'Riordan via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> Is there is minimum required version for GCC to build LLVM from the
> head revision?
Last I checked it was 4.7. The CMake files also tell me that's correct:
# Check if the host compiler is new enough. LLVM requires at least GCC 4.7,
> I have GCC v4.9.3, but ‘Tools/sancov/sancov.cc’ won’t build because
> ‘std::to_string’ does not exist. When running CMake it did not flag
> v4.9.3 as too old, and it is passing the ‘-std=gnu++11’ option, but
> apparently this version of GCC is not fully C++ 11 compliant, or at
> least its C++ library isn’t.
This sounds odd. I have buildbots with 4.8.2 and 4.9.2 working perfectly.
Could this be a problem in your setup?
More information about the llvm-dev