From 0c6bb2be0fe760b1a9beda50183b69968f85143c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20B=C3=BCnemann?= Date: Sun, 27 May 2018 10:37:54 +0200 Subject: [PATCH] Fix compile of crc32-pclmul_asm on macOS (#8) * .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 /*