Skip to content

Commit

Permalink
cmake: fix risc-v build due to missing atomic ops
Browse files Browse the repository at this point in the history
This can be reverted when we switch to gcc 13 (NixOS#268097)
  • Loading branch information
fgaz committed Nov 20, 2023
1 parent b2ebe62 commit 613e5db
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkgs/by-name/cm/cmake/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down

0 comments on commit 613e5db

Please sign in to comment.