mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-29 23:52:55 +00:00
cmake: fix risc-v build failure
riscv64 is failing due to missing atomic ops in gcc 12. This commit works around the problem by linking against libatomic. It can be reverted when we switch to gcc 13 (#268097)
This commit is contained in:
parent
48dc37ae96
commit
3832b75e4e
@ -138,6 +138,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"CFLAGS=-D_FILE_OFFSET_BITS=64"
|
||||
"CXXFLAGS=-D_FILE_OFFSET_BITS=64"
|
||||
]
|
||||
# Workaround missing atomic ops with gcc <13
|
||||
++ lib.optional stdenv.hostPlatform.isRiscV "LDFLAGS=-latomic"
|
||||
++ [
|
||||
"--"
|
||||
# We should set the proper `CMAKE_SYSTEM_NAME`.
|
||||
|
Loading…
Reference in New Issue
Block a user