Allow bootstrapping libmd on MacOS

The assembly files use directives that only work for ELF targets so skip
them when bootstrapping on MacOS.

Reviewed By:	imp
Approved By:	jhb (mentor)
Differential Revision: https://reviews.freebsd.org/D14247
This commit is contained in:
Alex Richardson 2018-08-20 10:39:48 +00:00
parent 958dc017a7
commit 078018e0ac
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=338097

View file

@ -98,6 +98,13 @@ CFLAGS+= -DSKEIN_LOOP=995
.PATH: ${.CURDIR}/${MACHINE_ARCH} ${SRCTOP}/sys/crypto/sha2
.PATH: ${SRCTOP}/sys/crypto/skein ${SRCTOP}/sys/crypto/skein/${MACHINE_ARCH}
USE_ASM_SOURCES?=1
.if defined(BOOTSTRAPPING)
# Don't build ASM sources when bootstrapping to avoid toolchain dependencies
USE_ASM_SOURCES:=0
.endif
.if ${USE_ASM_SOURCES} != 0
.if exists(${MACHINE_ARCH}/sha.S)
SRCS+= sha.S
CFLAGS+= -DSHA1_ASM
@ -116,6 +123,7 @@ CFLAGS+= -DSKEIN_ASM -DSKEIN_USE_ASM=1792 # list of block functions to replace w
.if exists(${MACHINE_ARCH}/sha.S) || exists(${MACHINE_ARCH}/rmd160.S) || exists(${MACHINE_ARCH}/skein_block_asm.s)
ACFLAGS+= -DELF -Wa,--noexecstack
.endif
.endif # ${USE_ASM_SOURCES} != 0
md4hl.c: mdXhl.c
(echo '#define LENGTH 16'; \