Loading lib/systems/default.nix +1 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,7 @@ let else if final.isAndroid then "bionic" else if final.isLinux /* default */ then "glibc" else if final.isFreeBSD then "fblibc" else if final.isOpenBSD then "oblibc" else if final.isNetBSD then "nblibc" else if final.isAvr then "avrlibc" else if final.isGhcjs then null Loading lib/systems/examples.nix +5 −0 Original line number Diff line number Diff line Loading @@ -342,6 +342,11 @@ rec { useLLVM = true; }; x86_64-openbsd = { config = "x86_64-unknown-openbsd"; useLLVM = true; }; # # WASM # Loading lib/systems/parse.nix +1 −0 Original line number Diff line number Diff line Loading @@ -469,6 +469,7 @@ rec { elem (elemAt l 2) [ "wasi" "redox" "mmixware" "ghcjs" "mingw32" ] || hasPrefix "freebsd" (elemAt l 2) || hasPrefix "netbsd" (elemAt l 2) || hasPrefix "openbsd" (elemAt l 2) || hasPrefix "genode" (elemAt l 2) then { cpu = elemAt l 0; Loading pkgs/development/compilers/llvm/18/default.nix +12 −2 Original line number Diff line number Diff line { lowPrio, newScope, pkgs, lib, stdenv, cmake, ninja , preLibcCrossHeaders , libxml2, python3, fetchFromGitHub, substituteAll, overrideCC, wrapCCWith, wrapBintoolsWith , libxml2, python3, fetchFromGitHub, fetchpatch, substituteAll, overrideCC, wrapCCWith, wrapBintoolsWith , buildLlvmTools # tools, but from the previous stage, for cross , targetLlvmLibraries # libraries, but from the next stage, for cross , targetLlvm Loading Loading @@ -146,6 +146,11 @@ in let # https://reviews.llvm.org/D51899 ./clang/gnu-install-dirs.patch ../common/clang/add-nostdlibinc-flag.patch (fetchpatch { url = "https://github.com/llvm/llvm-project/commit/48c1364200b5649dda2f9ccbe382b0bd908b99de.patch"; sha256 = "sha256-beSydky0P/06YDLk0GJDtcREpMcU2FspxuYU6EnQGfA="; stripLen = 1; }) (substituteAll { src = ../common/clang/clang-at-least-16-LLVMgold-path.patch; libllvmLibdir = "${tools.libllvm.lib}/lib"; Loading Loading @@ -391,7 +396,12 @@ in let # so: we use the clang from this LLVM package set instead of the regular # stdenv's compiler. libcxx = callPackage ../common/libcxx { patches = lib.optionals (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13") [ patches = [ (fetchpatch { url = "https://github.com/llvm/llvm-project/commit/1118c2e05e67a36ed8ca250524525cdb66a55256.patch"; sha256 = "sha256-2lDO9UsglvYAxDG3/iTXqGVHn1Hq3O7wtkCUb9I/Buc="; }) ] ++ lib.optionals (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13") [ # https://github.com/llvm/llvm-project/issues/64226 ./libcxx/0001-darwin-10.12-mbstate_t-fix.patch ]; Loading pkgs/development/compilers/llvm/common/compiler-rt/default.nix +14 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,18 @@ , libllvm , linuxHeaders , libxcrypt # Some platforms have switched to using compiler-rt, but still want a # libgcc.a for ABI compat purposes. The use case would be old code that # expects to link `-lgcc` but doesn't care exactly what its contents # are, so long as it provides some builtins. , doFakeLibgcc ? stdenv.hostPlatform.isFreeBSD # In recent releases, the compiler-rt build seems to produce # many `libclang_rt*` libraries, but not a single unified # `libcompiler_rt` library, at least under certain configurations. Some # platforms stil expect this, however, so we symlink one into place. , forceLinkCompilerRt ? stdenv.hostPlatform.isOpenBSD }: let Loading Loading @@ -149,7 +160,9 @@ stdenv.mkDerivation ({ ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.o ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/crtendS.o '' + lib.optionalString doFakeLibgcc '' ln -s $out/lib/freebsd/libclang_rt.builtins-*.a $out/lib/libgcc.a ln -s $out/lib/*/libclang_rt.builtins-*.a $out/lib/libgcc.a '' + lib.optionalString forceLinkCompilerRt '' ln -s $out/lib/*/libclang_rt.builtins-*.a $out/lib/libcompiler_rt.a ''; meta = llvm_meta // { Loading Loading
lib/systems/default.nix +1 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,7 @@ let else if final.isAndroid then "bionic" else if final.isLinux /* default */ then "glibc" else if final.isFreeBSD then "fblibc" else if final.isOpenBSD then "oblibc" else if final.isNetBSD then "nblibc" else if final.isAvr then "avrlibc" else if final.isGhcjs then null Loading
lib/systems/examples.nix +5 −0 Original line number Diff line number Diff line Loading @@ -342,6 +342,11 @@ rec { useLLVM = true; }; x86_64-openbsd = { config = "x86_64-unknown-openbsd"; useLLVM = true; }; # # WASM # Loading
lib/systems/parse.nix +1 −0 Original line number Diff line number Diff line Loading @@ -469,6 +469,7 @@ rec { elem (elemAt l 2) [ "wasi" "redox" "mmixware" "ghcjs" "mingw32" ] || hasPrefix "freebsd" (elemAt l 2) || hasPrefix "netbsd" (elemAt l 2) || hasPrefix "openbsd" (elemAt l 2) || hasPrefix "genode" (elemAt l 2) then { cpu = elemAt l 0; Loading
pkgs/development/compilers/llvm/18/default.nix +12 −2 Original line number Diff line number Diff line { lowPrio, newScope, pkgs, lib, stdenv, cmake, ninja , preLibcCrossHeaders , libxml2, python3, fetchFromGitHub, substituteAll, overrideCC, wrapCCWith, wrapBintoolsWith , libxml2, python3, fetchFromGitHub, fetchpatch, substituteAll, overrideCC, wrapCCWith, wrapBintoolsWith , buildLlvmTools # tools, but from the previous stage, for cross , targetLlvmLibraries # libraries, but from the next stage, for cross , targetLlvm Loading Loading @@ -146,6 +146,11 @@ in let # https://reviews.llvm.org/D51899 ./clang/gnu-install-dirs.patch ../common/clang/add-nostdlibinc-flag.patch (fetchpatch { url = "https://github.com/llvm/llvm-project/commit/48c1364200b5649dda2f9ccbe382b0bd908b99de.patch"; sha256 = "sha256-beSydky0P/06YDLk0GJDtcREpMcU2FspxuYU6EnQGfA="; stripLen = 1; }) (substituteAll { src = ../common/clang/clang-at-least-16-LLVMgold-path.patch; libllvmLibdir = "${tools.libllvm.lib}/lib"; Loading Loading @@ -391,7 +396,12 @@ in let # so: we use the clang from this LLVM package set instead of the regular # stdenv's compiler. libcxx = callPackage ../common/libcxx { patches = lib.optionals (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13") [ patches = [ (fetchpatch { url = "https://github.com/llvm/llvm-project/commit/1118c2e05e67a36ed8ca250524525cdb66a55256.patch"; sha256 = "sha256-2lDO9UsglvYAxDG3/iTXqGVHn1Hq3O7wtkCUb9I/Buc="; }) ] ++ lib.optionals (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13") [ # https://github.com/llvm/llvm-project/issues/64226 ./libcxx/0001-darwin-10.12-mbstate_t-fix.patch ]; Loading
pkgs/development/compilers/llvm/common/compiler-rt/default.nix +14 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,18 @@ , libllvm , linuxHeaders , libxcrypt # Some platforms have switched to using compiler-rt, but still want a # libgcc.a for ABI compat purposes. The use case would be old code that # expects to link `-lgcc` but doesn't care exactly what its contents # are, so long as it provides some builtins. , doFakeLibgcc ? stdenv.hostPlatform.isFreeBSD # In recent releases, the compiler-rt build seems to produce # many `libclang_rt*` libraries, but not a single unified # `libcompiler_rt` library, at least under certain configurations. Some # platforms stil expect this, however, so we symlink one into place. , forceLinkCompilerRt ? stdenv.hostPlatform.isOpenBSD }: let Loading Loading @@ -149,7 +160,9 @@ stdenv.mkDerivation ({ ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.o ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/crtendS.o '' + lib.optionalString doFakeLibgcc '' ln -s $out/lib/freebsd/libclang_rt.builtins-*.a $out/lib/libgcc.a ln -s $out/lib/*/libclang_rt.builtins-*.a $out/lib/libgcc.a '' + lib.optionalString forceLinkCompilerRt '' ln -s $out/lib/*/libclang_rt.builtins-*.a $out/lib/libcompiler_rt.a ''; meta = llvm_meta // { Loading