lib/md5-asm-x86_64.s: fix build with Apple Clang
authorCaleb Xu <calebcenter@live.com>
Sat, 20 Jun 2020 04:12:15 +0000 (00:12 -0400)
committerWayne Davison <wayne@opencoder.net>
Sat, 20 Jun 2020 06:38:15 +0000 (23:38 -0700)
The Mach-O x86-64 model doesn't seem to support ".type" and
".size" directives in assembly. Add ifdefs that should allow for
the file to build without issues in Apple Clang.

lib/md5-asm-x86_64.s

index a312615130672f8e16631675fce113688a908f35..44aa386da4044281a6c3a10eb6f5d8c946ed2e16 100644 (file)
 .text
 .align 16
 
+#ifndef __apple_build_version__
 .globl md5_process_asm
 .type md5_process_asm,@function
 md5_process_asm:
+#else
+.globl _md5_process_asm
+_md5_process_asm:
+#endif
        push    %rbp
        push    %rbx
        push    %r12
@@ -689,5 +694,9 @@ md5_process_asm:
        pop     %rbx
        pop     %rbp
        ret
+#ifndef __apple_build_version__
 .L_md5_process_asm_end:
 .size md5_process_asm,.L_md5_process_asm_end-md5_process_asm
+#else
+L_md5_process_asm_end:
+#endif