From f4e7bd31ab12c60651b329faac56447ec20adcfa Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Tue, 7 Apr 2020 13:18:29 -0400 Subject: [PATCH] deps: lzma: also use .note.GNU-stack on FreeBSD FreeBSD uses the same .note.GNU-stack section to indicate that the stack should not be executable. --- deps/lzma/liblzma/check/crc32_x86.S | 2 +- deps/lzma/liblzma/check/crc64_x86.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/lzma/liblzma/check/crc32_x86.S b/deps/lzma/liblzma/check/crc32_x86.S index 67f68a414..1ef7f7e37 100644 --- a/deps/lzma/liblzma/check/crc32_x86.S +++ b/deps/lzma/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/deps/lzma/liblzma/check/crc64_x86.S b/deps/lzma/liblzma/check/crc64_x86.S index f5bb84b97..81e06261e 100644 --- a/deps/lzma/liblzma/check/crc64_x86.S +++ b/deps/lzma/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