Skip to content

Commit

Permalink
gcc: fix missing atomic ops errors on risc-v
Browse files Browse the repository at this point in the history
Fixes errors like:

    ld: [...]: undefined reference to `__atomic_exchange_1'

* Backport patch from gcc 13 that uses libatomic for missing ops:
  https://gcc.gnu.org/git?p=gcc.git;a=commit;h=f797260adaf52bee0ec0e16190bbefbe1bfc3692
  A few conflicts were resolved, so the patch is included as a file.
* Remove workarounds from
  * aws-sdk-cpp
  * libjxl
  * numactl
  * mariadb
  * zstd
  • Loading branch information
fgaz committed Nov 17, 2023
1 parent b2ebe62 commit 32db619
Show file tree
Hide file tree
Showing 7 changed files with 2,041 additions and 8 deletions.
9 changes: 9 additions & 0 deletions pkgs/development/compilers/gcc/patches/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,15 @@ in
}.${majorVersion} or [])


### RISC-V


# https://gcc.gnu.org/git?p=gcc.git;a=commit;h=f797260adaf52bee0ec0e16190bbefbe1bfc3692
# Fixes errors like:
# ld: [...]: undefined reference to `__atomic_exchange_1'
++ optional (targetPlatform.isRiscV && is12) ./riscv-inline-subword-atomic-ops.patch


## Windows

# Obtain latest patch with ../update-mcfgthread-patches.sh
Expand Down
Loading

0 comments on commit 32db619

Please sign in to comment.