[llvm-3.8-ec3] cmake-2.8.12 and gcc-4.6: Host compiler appears to require libatomic, but cannot find it.

Hi,

when I switch to an unsupported GCC like v4.6.4 to build LLVM v3.8-rc3
with cmake I get the following:
...
-- Looking for __atomic_fetch_add_4 in atomic
-- Looking for __atomic_fetch_add_4 in atomic - not found
CMake Error at cmake/modules/CheckAtomic.cmake:36 (message):
  Host compiler appears to require libatomic, but cannot find it.
Call Stack (most recent call first):
  cmake/config-ix.cmake:296 (include)
  CMakeLists.txt:407 (include)

-- Configuring incomplete, errors occurred!
See also "/home/wearefam/src/llvm-toolchain/llvm-build/CMakeFiles/CMakeOutput.log".
See also "/home/wearefam/src/llvm-toolchain/llvm-build/CMakeFiles/CMakeError.log".

I would like to see something telling me my host-compiler is not
supported and I need a minimum version
( My host-system is Ubuntu/precise AMD64. )

See also "Host C++ Toolchain, both Compiler and Standard Library"...

"For the most popular host toolchains we check for specific minimum
versions in our build systems:

Clang 3.1
GCC 4.7
Visual Studio 2013"

...and "Getting a Modern Host C++ Toolchain" in [1].

CMakeOutput.log and CMakeError.log are attached.

Regards,
- Sedat -

[1] http://llvm.org/docs/GettingStarted.html

CMakeError.log (14.8 KB)

CMakeOutput.log (120 KB)

Hopefully r262491 improves the situation here. Now we do the GCC 4.7+ check earlier.

Hopefully r262491 improves the situation here. Now we do the GCC 4.7+ check
earlier.

Thanks a lot.

But I am here on llvm.git - do you have the commit subject-line?

Thanks.

- Sedat -

Hopefully r262491 improves the situation here. Now we do the GCC 4.7+
check
earlier.

Thanks a lot.

But I am here on llvm.git - do you have the commit subject-line?

OK, found it.

commit 06ff4ba325c279c737ff9628f88379313b620d7f
"[cmake] Check the compiler version first"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262491
91177308-0d34-0410-b5e6-96231b3b80d8

- Sedat -

[1] https://github.com/llvm-mirror/llvm/commit/06ff4ba325c279c737ff9628f88379313b620d7f