mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-20 15:41:16 +00:00
qemu: work around ld64 hardening issue
This commit is contained in:
@@ -123,6 +123,9 @@
|
||||
minimal ? toolsOnly || userOnly,
|
||||
gitUpdater,
|
||||
qemu-utils, # for tests attribute
|
||||
|
||||
# TODO: Clean up on `staging`.
|
||||
llvmPackages,
|
||||
}:
|
||||
|
||||
assert lib.assertMsg (
|
||||
@@ -180,6 +183,9 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
++ lib.optionals hexagonSupport [ glib ]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
darwin.sigtool
|
||||
|
||||
# TODO: Clean up on `staging`.
|
||||
llvmPackages.lld
|
||||
]
|
||||
++ lib.optionals (!userOnly) [ dtc ];
|
||||
|
||||
@@ -425,6 +431,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
ln -s $out/bin/qemu-system-${stdenv.hostPlatform.qemuArch} $out/bin/qemu-kvm
|
||||
'';
|
||||
|
||||
env = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
|
||||
NIX_CFLAGS_LINK = "-fuse-ld=lld";
|
||||
};
|
||||
|
||||
passthru = {
|
||||
qemu-system-i386 = "bin/qemu-system-i386";
|
||||
tests = lib.optionalAttrs (!toolsOnly) {
|
||||
|
||||
Reference in New Issue
Block a user