musllvm

A pure LLVM/Clang cross compiler toolchain targeting musl C
git clone git://git.daat.foo/musllvm.git
Log | Files | Refs | README | LICENSE

0003-llvm-fix-some-MF_EXEC-related-test-failures-on-aarch.patch (1135B)


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