diff --git a/contrib/xz/src/liblzma/check/crc32_x86.S b/contrib/xz/src/liblzma/check/crc32_x86.S index 67f68a4145f..1ef7f7e37ae 100644 --- a/contrib/xz/src/liblzma/check/crc32_x86.S +++ b/contrib/xz/src/liblzma/check/crc32_x86.S @@ -299,6 +299,6 @@ LZMA_CRC32: * use __linux__ here, but I don't know a way to detect when * we are using GNU assembler. */ -#if defined(__ELF__) && defined(__linux__) +#if defined(__ELF__) && (defined(__FreeBSD__) || defined(__linux__)) .section .note.GNU-stack,"",@progbits #endif diff --git a/contrib/xz/src/liblzma/check/crc64_x86.S b/contrib/xz/src/liblzma/check/crc64_x86.S index f5bb84b97e0..81e06261e0f 100644 --- a/contrib/xz/src/liblzma/check/crc64_x86.S +++ b/contrib/xz/src/liblzma/check/crc64_x86.S @@ -282,6 +282,6 @@ LZMA_CRC64: * use __linux__ here, but I don't know a way to detect when * we are using GNU assembler. */ -#if defined(__ELF__) && defined(__linux__) +#if defined(__ELF__) && (defined(__FreeBSD__) || defined(__linux__)) .section .note.GNU-stack,"",@progbits #endif