[llvm-bugs] [Bug 36947] New: CompilerRTUtils.cmake issue when building on ARM host CPU

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 28 23:56:04 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=36947

            Bug ID: 36947
           Summary: CompilerRTUtils.cmake issue when building on ARM host
                    CPU
           Product: compiler-rt
           Version: 6.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: compiler-rt
          Assignee: unassignedbugs at nondot.org
          Reporter: shiftag at nanotek.info
                CC: llvm-bugs at lists.llvm.org

Created attachment 20140
  --> https://bugs.llvm.org/attachment.cgi?id=20140&action=edit
CMakeError.log output file

Hi,

I have an issue building LLVM suite with all modules. My issue come from
Compiler-RT module at "cmake" step.

I have the following error :

-- Performing Test LIBCXX_SUPPORTS_FPIC_FLAG
-- Performing Test LIBCXX_SUPPORTS_FPIC_FLAG - Success
-- Performing Test LIBCXX_SUPPORTS_STD_EQ_CXX14_FLAG
-- Performing Test LIBCXX_SUPPORTS_STD_EQ_CXX14_FLAG - Success
-- Adding Benchmark: algorithms.bench.cpp
-- Adding Benchmark: filesystem.bench.cpp
-- Adding Benchmark: string.bench.cpp
-- Adding Benchmark: stringstream.bench.cpp
-- Adding Benchmark: unordered_set_operations.bench.cpp
-- Adding Benchmark: util_smartptr.bench.cpp
-- Adding Benchmark: vector_operations.bench.cpp
-- Linker detection: GNU Gold
-- libc++ configuration differs from the abilist configuration.
check-cxx-abilist target is not supported
-- Looking for unwind.h
-- Looking for unwind.h - found
CMake Error at projects/compiler-rt/cmake/Modules/CompilerRTUtils.cmake:264
(string):
  string sub-command REPLACE requires at least four arguments.
  Call Stack (most recent call first):
    projects/compiler-rt/CMakeLists.txt:85
(construct_compiler_rt_default_triple)


So I checked CompilerRTUtils.cmake file at line 264 :

-- 

  if(DEFINED COMPILER_RT_TEST_TARGET_TRIPLE)
    # Backwards compatibility: this variable used to be called
    # COMPILER_RT_TEST_TARGET_TRIPLE.
    set(COMPILER_RT_DEFAULT_TARGET_TRIPLE ${COMPILER_RT_TEST_TARGET_TRIPLE})
  endif()

  string(REPLACE "-" ";" TARGET_TRIPLE_LIST
${COMPILER_RT_DEFAULT_TARGET_TRIPLE})     <-- Line 264
  list(GET TARGET_TRIPLE_LIST 0 COMPILER_RT_DEFAULT_TARGET_ARCH)
  list(GET TARGET_TRIPLE_LIST 1 COMPILER_RT_DEFAULT_TARGET_OS)
  list(LENGTH TARGET_TRIPLE_LIST TARGET_TRIPLE_LIST_LENGTH)

-- 

I'm using the following "cmake" command-line :

cmake -G "Unix Makefiles" ..                                            \
      -DCMAKE_BUILD_TYPE=Release                                        \
      -DCMAKE_INSTALL_PREFIX=/usr                                       \
      -DPYTHON_EXECUTABLE=/usr/bin/python2.7                            \
      -DLLVM_TARGETS_TO_BUILD="ARM;X86;AArch64;AMDGPU;Mips;PowerPC"     \
      -DLLVM_ENABLE_LIBCXX=OFF                                          \
      -DLLVM_BUILD_TESTS=ON                                             \
      -DLLVM_BUILD_LLVM_DYLIB=ON                                        \
      -DLLVM_LINK_LLVM_DYLIB=ON                                         \
      -DLLVM_ENABLE_RTTI=ON                                             \
      -DLLVM_ENABLE_FFI=ON                                              \
      -DLLVM_ENABLE_ASSERTIONS=True                                     \
      -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON                              \
      -DCOMPILER_RT_BUILD_BUILTINS=ON                                   \
      -DCOMPILER_RT_BUILD_SANITIZERS=OFF                                \
      -DCOMPILER_RT_BUILD_XRAY=OFF                                      \
      -DCOMPILER_RT_BUILD_LIBFUZZER=OFF                                 \
      -DCOMPILER_RT_BUILD_PROFILE=OFF


I'm building version 6.0.0 version of llvm and compiler-rt module. Also, I
tried with version 5.0.1 and I got the exact same issue.

I'm trying to build natively on ARM platform (ARMv7-a Cortex-a9 Soft-Float
NEON) with gcc version 5.3.1.

Please let me know if you need further details.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180329/297f0284/attachment.html>


More information about the llvm-bugs mailing list