Issue |
126706
|
Summary |
Cannot compile libc for rv32imc_zaamo_zalrsc
|
Labels |
libc
|
Assignees |
|
Reporter |
christian-herber-nxp
|
When compiling libc with this configuration:
TARGET_TRIPLE=riscv32-unknown-elf
C_FLAGS="--target=${TARGET_TRIPLE} -march=rv32im_zaamo_zalrsc --sysroot=${RISCV_GNU_TOOLCHAIN}/${TARGET_TRIPLE} --gcc-toolchain=${RISCV_GNU_TOOLCHAIN}"
cmake ../runtimes \
-G Ninja \
-DCMAKE_INSTALL_PREFIX=$(pwd)/install \
-DCMAKE_C_COMPILER=$C_COMPILER \
"-DCMAKE_C_FLAGS=${C_FLAGS}" \
"-DCMAKE_CXX_FLAGS=${C_FLAGS}" \
-DCMAKE_CXX_COMPILER=$CXX_COMPILER \
-DLLVM_ENABLE_RUNTIMES=libc \
-DLLVM_LIBC_FULL_BUILD=ON \
-DLIBC_TARGET_TRIPLE=$TARGET_TRIPLE \
-DCMAKE_BUILD_TYPE=Release
ninja libc libm
```
The compilation fails with this message:
```
/home/nxa23603/llvm-project/libc/src/__support/CPP/atomic.h:119:5: error: large atomic operation may incur significant performance penalty; the access size (4 bytes) exceeds the max lock-free size (0 bytes) [-Werror,-Watomic-alignment]
119 | __scoped_atomic_store(addressof(val), addressof(rhs), order(mem_ord),
| ^
```
This should really work, as the zaamo and zalrsc extensions provide the necessary atomics support. I suspect that only one of these is in fact needed.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs