From cc390e2ded3e979f6662dd24bbd5bfd9119ec19d Mon Sep 17 00:00:00 2001
From: Ryan Burns <rtburns@protonmail.com>
Date: Sun, 16 Oct 2022 00:25:31 -0700
Subject: [PATCH] boost: support s390x

s390x will return s390 as its cpu family,
but boost does not have generic s390 support, only s390x.
Add a special case to build for s390x architecture
---
 pkgs/development/libraries/boost/generic.nix | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix
index 9c2072179b26..88d9eb7662c9 100644
--- a/pkgs/development/libraries/boost/generic.nix
+++ b/pkgs/development/libraries/boost/generic.nix
@@ -85,6 +85,7 @@ let
     "address-model=${toString stdenv.hostPlatform.parsed.cpu.bits}"
     "architecture=${if stdenv.hostPlatform.isMips64
                     then if versionOlder version "1.78" then "mips1" else "mips"
+                    else if stdenv.hostPlatform.parsed.cpu.name == "s390x" then "s390x"
                     else toString stdenv.hostPlatform.parsed.cpu.family}"
     "binary-format=${toString stdenv.hostPlatform.parsed.kernel.execFormat.name}"
     "target-os=${toString stdenv.hostPlatform.parsed.kernel.name}"