boost: Fix compilation to 32-bit ARM with clang in downstream packages (#375322)

Change-Id: I4eafd2adc9dbd2387e298829fe635dd667ab6ce4
This commit is contained in:
Yureka
2025-01-21 15:21:25 +01:00
committed by GitHub
parent 3833577ea0
commit 56b1e1c1b4
@@ -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