diff --git a/lib/systems/doubles.nix b/lib/systems/doubles.nix index f60c6a8addef..a753c835c810 100644 --- a/lib/systems/doubles.nix +++ b/lib/systems/doubles.nix @@ -13,7 +13,7 @@ let "x86_64-darwin" "i686-darwin" "aarch64-darwin" "armv7a-darwin" # FreeBSD - "i686-freebsd" "x86_64-freebsd" + "i686-freebsd" "x86_64-freebsd" "aarch64-freebsd" # Genode "aarch64-genode" "i686-genode" "x86_64-genode" diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index 8433042838dc..223de50f67dd 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -335,6 +335,11 @@ rec { # BSDs + aarch64-freebsd = { + config = "aarch64-unknown-freebsd"; + useLLVM = true; + }; + x86_64-freebsd = { config = "x86_64-unknown-freebsd"; useLLVM = true; diff --git a/lib/tests/systems.nix b/lib/tests/systems.nix index 3a8054ef4bc8..1b50ea223674 100644 --- a/lib/tests/systems.nix +++ b/lib/tests/systems.nix @@ -52,7 +52,7 @@ lib.runTests ( testcygwin = mseteq cygwin [ "i686-cygwin" "x86_64-cygwin" ]; testdarwin = mseteq darwin [ "x86_64-darwin" "i686-darwin" "aarch64-darwin" "armv7a-darwin" ]; - testfreebsd = mseteq freebsd [ "i686-freebsd" "x86_64-freebsd" ]; + testfreebsd = mseteq freebsd [ "aarch64-freebsd" "i686-freebsd" "x86_64-freebsd" ]; testgenode = mseteq genode [ "aarch64-genode" "i686-genode" "x86_64-genode" ]; testredox = mseteq redox [ "x86_64-redox" ]; testgnu = mseteq gnu (linux /* ++ kfreebsd ++ ... */); diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/include/package.nix b/pkgs/os-specific/bsd/freebsd/pkgs/include/package.nix index a7ceb0cdf384..a4a364459daa 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/include/package.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/include/package.nix @@ -1,4 +1,5 @@ { + stdenv, lib, mkDerivation, buildPackages, @@ -14,6 +15,8 @@ mkDerivation { "contrib/libc-vis" "etc/mtree/BSD.include.dist" "sys" + # Used for aarch64-freebsd + "lib/msun/arm" ]; extraNativeBuildInputs = [ diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libc/package.nix b/pkgs/os-specific/bsd/freebsd/pkgs/libc/package.nix index 67e8cea64942..74e01d2be716 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/libc/package.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/libc/package.nix @@ -106,6 +106,9 @@ mkDerivation { "include/paths.h" "lib/libdl" + + # Used for aarch64-freebsd + "contrib/arm-optimized-routines" ]; postPatch = ''