diff options
author | Francesco Gazzetta <fgaz@fgaz.me> | 2023-11-20 17:41:08 +0100 |
---|---|---|
committer | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-11-22 16:10:35 -0300 |
commit | 3832b75e4e37be74c0311b4f03191c6e221966f0 (patch) | |
tree | 1f15f88123367e8933c78138537865d5c76c2b93 /pkgs/by-name/cm | |
parent | 48dc37ae96adf8bb4a952712aadb7c236d39ca02 (diff) |
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)
Diffstat (limited to 'pkgs/by-name/cm')
-rw-r--r-- | pkgs/by-name/cm/cmake/package.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkgs/by-name/cm/cmake/package.nix b/pkgs/by-name/cm/cmake/package.nix index a573147915012..1b8aefd1b9111 100644 --- a/pkgs/by-name/cm/cmake/package.nix +++ b/pkgs/by-name/cm/cmake/package.nix @@ -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`. |