mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
protobuf_{21,25,27,29,30,31}: fix 32-bit build
(cherry picked from commit 412579fa0c)
This commit is contained in:
committed by
github-actions[bot]
parent
c5e4db0e30
commit
df5bbfcf4e
@@ -89,6 +89,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
substituteInPlace src/google/protobuf/testing/googletest.cc \
|
||||
--replace-fail 'tmpnam(b)' '"'$TMPDIR'/foo"'
|
||||
''
|
||||
# Adapt https://github.com/protocolbuffers/protobuf/pull/22412 for various
|
||||
# older versions. sed -z spans newlines, so this can capture and replace
|
||||
# the full multiline #if macro.
|
||||
+ lib.optionalString (lib.versionOlder version "32") ''
|
||||
sed -zi 's/\(#if \w*(clang::musttail)\)[^\n]*\(\\\n[^\n]*\)*/'\
|
||||
'\1 \&\& (defined(__aarch64__) || defined(__x86_64__) || defined(_M_X64))/' \
|
||||
src/google/protobuf/port_def.inc
|
||||
''
|
||||
# Keep the sentinel macro non-retained for GCC 15+ to match generated
|
||||
# extension objects in linker arrays and avoid section type conflicts.
|
||||
+ lib.optionalString (lib.versionAtLeast version "34") ''
|
||||
|
||||
Reference in New Issue
Block a user