From a1a36bfe71225fdc12b6a8d31cae2addcf873571 Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Tue, 14 Jul 2026 12:03:08 -0400 Subject: [PATCH] freebsd.libcompiler_rt: init --- .../bsd/freebsd/pkgs/libcompiler_rt.nix | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 pkgs/os-specific/bsd/freebsd/pkgs/libcompiler_rt.nix diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libcompiler_rt.nix b/pkgs/os-specific/bsd/freebsd/pkgs/libcompiler_rt.nix new file mode 100644 index 000000000000..1d6f44e3fd19 --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/pkgs/libcompiler_rt.nix @@ -0,0 +1,31 @@ +{ + stdenv, + lib, + mkDerivation, + include, +}: + +mkDerivation { + path = "lib/libcompiler_rt"; + extraPaths = [ + "contrib/llvm-project/compiler-rt" + ]; + + buildInputs = [ + include + ]; + + # The build system is importing source files from another directory, + # then trying to put the objects in lib/libcompiler_rt + # It does not create subdirectories in the lib/libcompiler_rt directory. + preBuild = '' + mkdir cpu_model + '' + + lib.optionalString stdenv.hostPlatform.isx86_64 '' + mkdir i386 + ''; + + noLibc = true; + + alwaysKeepStatic = true; +}