diff --git a/llvm/lib/Support/BLAKE3/blake3_avx2_x86-64_unix.S b/llvm/lib/Support/BLAKE3/blake3_avx2_x86-64_unix.S index 69fc0936d73c5..e98893c7ef8b8 100644 --- a/llvm/lib/Support/BLAKE3/blake3_avx2_x86-64_unix.S +++ b/llvm/lib/Support/BLAKE3/blake3_avx2_x86-64_unix.S @@ -2,7 +2,7 @@ #include "llvm_blake3_prefix.h" -#if defined(__ELF__) && defined(__linux__) +#if defined(__ELF__) && !(defined(__sun__) && defined(__svr4__)) .section .note.GNU-stack,"",%progbits #endif diff --git a/llvm/lib/Support/BLAKE3/blake3_avx512_x86-64_unix.S b/llvm/lib/Support/BLAKE3/blake3_avx512_x86-64_unix.S index f04a135dd1bc4..224605147c3d7 100644 --- a/llvm/lib/Support/BLAKE3/blake3_avx512_x86-64_unix.S +++ b/llvm/lib/Support/BLAKE3/blake3_avx512_x86-64_unix.S @@ -2,7 +2,7 @@ #include "llvm_blake3_prefix.h" -#if defined(__ELF__) && defined(__linux__) +#if defined(__ELF__) && !(defined(__sun__) && defined(__svr4__)) .section .note.GNU-stack,"",%progbits #endif diff --git a/llvm/lib/Support/BLAKE3/blake3_sse2_x86-64_unix.S b/llvm/lib/Support/BLAKE3/blake3_sse2_x86-64_unix.S index 9a4f5eb7318bf..d69a1706fefe7 100644 --- a/llvm/lib/Support/BLAKE3/blake3_sse2_x86-64_unix.S +++ b/llvm/lib/Support/BLAKE3/blake3_sse2_x86-64_unix.S @@ -2,7 +2,7 @@ #include "llvm_blake3_prefix.h" -#if defined(__ELF__) && defined(__linux__) +#if defined(__ELF__) && !(defined(__sun__) && defined(__svr4__)) .section .note.GNU-stack,"",%progbits #endif diff --git a/llvm/lib/Support/BLAKE3/blake3_sse41_x86-64_unix.S b/llvm/lib/Support/BLAKE3/blake3_sse41_x86-64_unix.S index 1be4ed744426b..c5b103af61c4f 100644 --- a/llvm/lib/Support/BLAKE3/blake3_sse41_x86-64_unix.S +++ b/llvm/lib/Support/BLAKE3/blake3_sse41_x86-64_unix.S @@ -2,7 +2,7 @@ #include "llvm_blake3_prefix.h" -#if defined(__ELF__) && defined(__linux__) +#if defined(__ELF__) && !(defined(__sun__) && defined(__svr4__)) .section .note.GNU-stack,"",%progbits #endif