From f9afee0ee3d452b701cfaa5b61729a46a97c36ce Mon Sep 17 00:00:00 2001 From: q66 Date: Tue, 2 May 2023 16:04:20 +0200 Subject: [PATCH 03/29] llvm: fix some MF_EXEC related test failures on aarch64 https://bugs.llvm.org/show_bug.cgi?id=14278#c10 --- llvm/lib/Support/Unix/Memory.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Support/Unix/Memory.inc b/llvm/lib/Support/Unix/Memory.inc index bac208a7d..4cb941d39 100644 --- a/llvm/lib/Support/Unix/Memory.inc +++ b/llvm/lib/Support/Unix/Memory.inc @@ -50,7 +50,7 @@ static int getPosixProtectionFlags(unsigned Flags) { llvm::sys::Memory::MF_EXEC: return PROT_READ | PROT_WRITE | PROT_EXEC; case llvm::sys::Memory::MF_EXEC: -#if defined(__FreeBSD__) || defined(__powerpc__) +#if defined(__FreeBSD__) || defined(__powerpc__) || (defined(__linux__) && defined(__aarch64__)) // On PowerPC, having an executable page that has no read permission // can have unintended consequences. The function InvalidateInstruction- // Cache uses instructions dcbf and icbi, both of which are treated by -- 2.49.0