Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Aug 2018 10:39:48 +0000 (UTC)
From:      Alex Richardson <arichardson@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r338097 - head/lib/libmd
Message-ID:  <201808201039.w7KAdm86079504@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: arichardson
Date: Mon Aug 20 10:39:48 2018
New Revision: 338097
URL: https://svnweb.freebsd.org/changeset/base/338097

Log:
  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

Modified:
  head/lib/libmd/Makefile

Modified: head/lib/libmd/Makefile
==============================================================================
--- head/lib/libmd/Makefile	Mon Aug 20 10:39:42 2018	(r338096)
+++ head/lib/libmd/Makefile	Mon Aug 20 10:39:48 2018	(r338097)
@@ -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 bl
 .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'; \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808201039.w7KAdm86079504>