Issue 133934
Summary How can I cross compile libcxx to system without libstdc++7.1
Labels
Assignees
Reporter neko-para
    I've prepared a sysroot from ubuntu 16.04, which only has libstdc++ 6.
I want to cross compile libcxx, libcxxabi and libunwind, without clang or any executable. But it shows error that libstdc++ must be at least 7.1.
I think that libcxx shouldn't rely on any libstdc++ featurue.

---

cmake command
```
cmake -S ../llvm-project/llvm -DCMAKE_TOOLCHAIN_FILE=../amd64.cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIME="libcxx;libcxxabi;libunwind"
```

output
```
-- The C compiler identification is Clang 20.1.1
-- The CXX compiler identification is Clang 20.1.1
-- The ASM compiler identification is Clang with GNU-like command-line
-- Found assembler: /usr/local/opt/llvm/bin/clang
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/local/opt/llvm/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/local/opt/llvm/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Python3: /usr/local/Frameworks/Python.framework/Versions/3.13/bin/python3.13 (found suitable version "3.13.2", minimum required is "3.6") found components: Interpreter
-- Performing Test LLVM_LIBSTDCXX_MIN
-- Performing Test LLVM_LIBSTDCXX_MIN - Failed
CMake Error at cmake/modules/CheckCompilerVersion.cmake:88 (message):
  libstdc++ version must be at least 7.1.
Call Stack (most recent call first):
 cmake/config-ix.cmake:15 (include)
  CMakeLists.txt:848 (include)


-- Configuring incomplete, errors occurred!
```

amd64.cmake
```
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR x86_64)

set(CMAKE_C_COMPILER_TARGET x86_64-linux-gnu)
set(CMAKE_C_COMPILER clang)
set(CMAKE_CXX_COMPILER_TARGET x86_64-linux-gnu)
set(CMAKE_CXX_COMPILER clang++)

set(CMAKE_SYSROOT "/Volumes/T8/sysroot-amd64")
set(CMAKE_LINKER_TYPE LLD)
```

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to