Skip to content

Commit

Permalink
boost: Fix compilation to 32-bit ARM with clang in downstream packages
Browse files Browse the repository at this point in the history
Change-Id: I4eafd2adc9dbd2387e298829fe635dd667ab6ce4
  • Loading branch information
yuyuyureka committed Jan 20, 2025
1 parent e46a60a commit 8f22ae6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pkgs/development/libraries/boost/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,20 @@ stdenv.mkDerivation {
EOF
'';

# Fix compilation to 32-bit ARM with clang in downstream packages
# https://github.com/ned14/outcome/pull/308
# https://github.com/boostorg/json/pull/1064
postPatch = lib.optionalString (lib.versionAtLeast version "1.87") ''
substituteInPlace \
boost/outcome/outcome_gdb.h \
boost/outcome/experimental/status-code/status_code.hpp \
boost/json/detail/gdb_printers.hpp \
boost/unordered/unordered_printers.hpp \
boost/interprocess/interprocess_printers.hpp \
libs/json/pretty_printers/generate-gdb-header.py \
--replace-fail ",@progbits,1" ",%progbits,1"
'';

env = {
NIX_CFLAGS_LINK = lib.optionalString stdenv.hostPlatform.isDarwin "-headerpad_max_install_names";
# copyPkgconfigItems will substitute these in the pkg-config file
Expand Down

0 comments on commit 8f22ae6

Please sign in to comment.