From c129738e87a41326d049aa633c58766da2a10cd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Bu=CC=88nemann?= Date: Sun, 3 Dec 2017 01:13:24 +0100 Subject: [PATCH] Fix compile of crc32-pclmul_asm on macOS * .type and .size are ELF/COFF specific so drop them * .globl + .hidden equivalent for macOS is .private_extern * symbol name are not mangled on macOS, so we need to prefix _ --- contrib/amd64/crc32-pclmul_asm.S | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/contrib/amd64/crc32-pclmul_asm.S b/contrib/amd64/crc32-pclmul_asm.S index ed23699a0..d9ba1c1bd 100644 --- a/contrib/amd64/crc32-pclmul_asm.S +++ b/contrib/amd64/crc32-pclmul_asm.S @@ -44,6 +44,13 @@ * - prepend '$' to some immediate operands to make assembler happy. */ +#ifdef __APPLE__ +#define ENTRY(name) \ +.private_extern _ ## name; \ +_ ## name: + +#define ENDPROC(name) +#else #define ENTRY(name) \ .globl name; \ .hidden name; \ @@ -52,6 +59,7 @@ name: #define ENDPROC(name) \ .size name, .-name +#endif .align 16 /*