diff options
author | Ivan Babrou <github@ivan.computer> | 2021-02-08 13:42:05 -0800 |
---|---|---|
committer | Ivan Babrou <github@ivan.computer> | 2021-02-08 13:45:47 -0800 |
commit | d29e8f0e5970b22bdeffbf5ac0c14f893ba8b2a9 (patch) | |
tree | 51339bcfe999e43aa86357792688835e082545ef /pkgs/applications/virtualization/qemu/default.nix | |
parent | bb475b01d290dae4f844f632603f4b0fbe276643 (diff) |
qemu: rename VERSION to QEMU_VERSION to avoid name clash
In libc++ starting with LLVM8 there's `<version>` include in `cstddef`: The following things also align: * QEMU has a file called `VERSION` in repo root * QEMU prepends repo root to include path in build * macOS has a case-insensetive filesystem All of this combined means that `VERSION` file is included as a header. Working around this be renaming `VERSION` -> `QEMU_VERSION` to resolve ambiguity. The problem really only appears on `aarch64-darwin`, since on `x86_64-darwin` there are no C++ files to compile. The workaround is harmless enough to apply.
Diffstat (limited to 'pkgs/applications/virtualization/qemu/default.nix')
-rw-r--r-- | pkgs/applications/virtualization/qemu/default.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/applications/virtualization/qemu/default.nix b/pkgs/applications/virtualization/qemu/default.nix index 933d6c293ad16..1ceb238ddf99b 100644 --- a/pkgs/applications/virtualization/qemu/default.nix +++ b/pkgs/applications/virtualization/qemu/default.nix @@ -108,6 +108,10 @@ stdenv.mkDerivation rec { # this script isn't marked as executable b/c it's indirectly used by meson. Needed to patch its shebang chmod +x ./scripts/shaderinclude.pl patchShebangs . + # avoid conflicts with libc++ include for <version> + mv VERSION QEMU_VERSION + substituteInPlace meson.build \ + --replace "'VERSION'" "'QEMU_VERSION'" '' + optionalString stdenv.hostPlatform.isMusl '' NIX_CFLAGS_COMPILE+=" -D_LINUX_SYSINFO_H" ''; |