Index: head/contrib/xz/src/liblzma/check/crc32_x86.S =================================================================== --- head/contrib/xz/src/liblzma/check/crc32_x86.S +++ head/contrib/xz/src/liblzma/check/crc32_x86.S @@ -299,6 +299,6 @@ * 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 Index: head/contrib/xz/src/liblzma/check/crc64_x86.S =================================================================== --- head/contrib/xz/src/liblzma/check/crc64_x86.S +++ head/contrib/xz/src/liblzma/check/crc64_x86.S @@ -282,6 +282,6 @@ * 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