From 5952698e53b489a2e92e5b87b765a1577678ed90 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 13 Apr 2022 18:45:37 -0700 Subject: [PATCH] boost: fix taxonomy mistake, account taxonomy change in v1.78 This commit makes two changes: 1. Boost changed its taxonomy for architecture names between the 1.77 and 1.78 releases, in this commit: https://github.com/boostorg/context/commit/6edc8184a7136de4603a6f903d9b9b864ca9cf57 2. During the review of #161162 I [was asked about][1] the source of the [mips64-context.patch][2] that I had included in the original version of the PR. I searched through the boost-context revision history and found [a nearly identical patch][3], which I substituted in the final, merged version of the PR. As it turns out, my [mips64-context.patch][2] was an earlier revision of what was eventually accepted to boost-context. The only difference between the two patches is the name they use: mips64 vs mips1. When switching to the accepted version of the boost patch, I should have also updated libraries/boost/generic.nix to change mips64 to mips1. This commit does that. [1]: https://github.com/NixOS/nixpkgs/pull/161162#discussion_r847903087 [2]: https://raw.githubusercontent.com/a-m-joseph/nixpkgs/1ca5025945470ce96408552b9117674b12efaf04/pkgs/development/libraries/boost/mips64-context.patch [3]: https://github.com/boostorg/context/commit/e3f744a1862164062d579d1972272d67bdaa9c39.patch --- pkgs/development/libraries/boost/generic.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 12fbf13fa9a0..1881f06aa4af 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -84,7 +84,9 @@ let # TODO: make this unconditional ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "address-model=${toString stdenv.hostPlatform.parsed.cpu.bits}" - "architecture=${if stdenv.hostPlatform.isMips64 then "mips64" else toString stdenv.hostPlatform.parsed.cpu.family}" + "architecture=${if stdenv.hostPlatform.isMips64 + then if versionOlder version "1.78" then "mips1" else "mips" + else toString stdenv.hostPlatform.parsed.cpu.family}" "binary-format=${toString stdenv.hostPlatform.parsed.kernel.execFormat.name}" "target-os=${toString stdenv.hostPlatform.parsed.kernel.name}"