From 02067e74512f3598da1e0f2f98ff957cb410bdd2 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 13 Sep 2017 11:09:49 +0800 Subject: [PATCH] crc32: label assembler functions without leading underscore clang onder osx adds leading undescore to the function names to be ABI compatible. but the assembly code does not do so. so we need to control the name using gcc/clang extension. see https://gcc.gnu.org/onlinedocs/gcc-4.4.0/gcc/Asm-Labels.html#Asm-Labels Signed-off-by: Kefu Chai --- src/common/crc32c_intel_fast.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/crc32c_intel_fast.c b/src/common/crc32c_intel_fast.c index adaf3d7779e..4a3bfc930e5 100644 --- a/src/common/crc32c_intel_fast.c +++ b/src/common/crc32c_intel_fast.c @@ -1,8 +1,8 @@ #include "acconfig.h" #include "common/crc32c_intel_baseline.h" -extern unsigned int crc32_iscsi_00(unsigned char const *buffer, int len, unsigned int crc); -extern unsigned int crc32_iscsi_zero_00(unsigned char const *buffer, int len, unsigned int crc); +extern unsigned int crc32_iscsi_00(unsigned char const *buffer, int len, unsigned int crc) asm("crc32_iscsi_00"); +extern unsigned int crc32_iscsi_zero_00(unsigned char const *buffer, int len, unsigned int crc) asm("crc32_iscsi_zero_00"); #ifdef HAVE_GOOD_YASM_ELF64 -- 2.39.5