From 68b63c306a6583d41d03207fb3c8b08abc56c262 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 14 Dec 2023 14:53:49 +0100 Subject: [PATCH] systemd: fix build for riscv32 --- pkgs/os-specific/linux/systemd/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 23f875d2dc46..39ec1a6eac17 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -89,7 +89,11 @@ , withAnalyze ? true , withApparmor ? true , withAudit ? true -, withBootloader ? withEfi && !stdenv.hostPlatform.isMusl # compiles systemd-boot, assumes EFI is available. + # compiles systemd-boot, assumes EFI is available. +, withBootloader ? withEfi + && !stdenv.hostPlatform.isMusl + # "Unknown 64-bit data model" + && !stdenv.hostPlatform.isRiscV32 , withCompression ? true # adds bzip2, lz4, xz and zstd , withCoredump ? true , withCryptsetup ? true @@ -108,6 +112,8 @@ && !stdenv.hostPlatform.isMips64 # see https://github.com/NixOS/nixpkgs/pull/194149#issuecomment-1266642211 # can't find gnu/stubs-32.h && (stdenv.hostPlatform.isPower64 -> stdenv.hostPlatform.isBigEndian) + # https://reviews.llvm.org/D43106#1019077 + && (stdenv.hostPlatform.isRiscV32 -> stdenv.cc.isClang) # buildPackages.targetPackages.llvmPackages is the same as llvmPackages, # but we do it this way to avoid taking llvmPackages as an input, and # risking making it too easy to ignore the above comment about llvmPackages.