diff --git a/llvm/lib/Support/BLAKE3/blake3_avx2_x86-64_unix.S b/llvm/lib/Support/BLAKE3/blake3_avx2_x86-64_unix.S --- a/llvm/lib/Support/BLAKE3/blake3_avx2_x86-64_unix.S +++ b/llvm/lib/Support/BLAKE3/blake3_avx2_x86-64_unix.S @@ -1,6 +1,6 @@ #if defined(__x86_64__) -#if defined(__ELF__) && defined(__linux__) +#if defined(__ELF__) && (defined(__linux__) || defined(__FreeBSD__)) .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 --- a/llvm/lib/Support/BLAKE3/blake3_avx512_x86-64_unix.S +++ b/llvm/lib/Support/BLAKE3/blake3_avx512_x86-64_unix.S @@ -1,6 +1,6 @@ #if defined(__x86_64__) -#if defined(__ELF__) && defined(__linux__) +#if defined(__ELF__) && (defined(__linux__) || defined(__FreeBSD__)) .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 --- a/llvm/lib/Support/BLAKE3/blake3_sse2_x86-64_unix.S +++ b/llvm/lib/Support/BLAKE3/blake3_sse2_x86-64_unix.S @@ -1,6 +1,6 @@ #if defined(__x86_64__) -#if defined(__ELF__) && defined(__linux__) +#if defined(__ELF__) && (defined(__linux__) || defined(__FreeBSD__)) .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 --- a/llvm/lib/Support/BLAKE3/blake3_sse41_x86-64_unix.S +++ b/llvm/lib/Support/BLAKE3/blake3_sse41_x86-64_unix.S @@ -1,6 +1,6 @@ #if defined(__x86_64__) -#if defined(__ELF__) && defined(__linux__) +#if defined(__ELF__) && (defined(__linux__) || defined(__FreeBSD__)) .section .note.GNU-stack,"",%progbits #endif