From owner-svn-src-head@freebsd.org Thu Aug 23 18:19:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A509109442C; Thu, 23 Aug 2018 18:19:34 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3CAE8808D1; Thu, 23 Aug 2018 18:19:34 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1DD2025B22; Thu, 23 Aug 2018 18:19:34 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7NIJXHV072055; Thu, 23 Aug 2018 18:19:33 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7NIJXDG072054; Thu, 23 Aug 2018 18:19:33 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201808231819.w7NIJXDG072054@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Thu, 23 Aug 2018 18:19:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338270 - head/lib/libmd X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/lib/libmd X-SVN-Commit-Revision: 338270 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Aug 2018 18:19:34 -0000 Author: arichardson Date: Thu Aug 23 18:19:33 2018 New Revision: 338270 URL: https://svnweb.freebsd.org/changeset/base/338270 Log: Don't build skein_block_asm.s if we don't have an as binary This fixes building libmd on MacOS/Linux. The real fix is probably to build it as a .S file with $CC instead. It might also be better to just compile the C file in userspace since the compiler can the use SSE/AVX. Reviewed By: emaste, brooks Approved By: jhb (mentor) Differential Revision: https://reviews.freebsd.org/D16844 Modified: head/lib/libmd/Makefile Modified: head/lib/libmd/Makefile ============================================================================== --- head/lib/libmd/Makefile Thu Aug 23 18:19:21 2018 (r338269) +++ head/lib/libmd/Makefile Thu Aug 23 18:19:33 2018 (r338270) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + PACKAGE=lib${LIB} LIB= md SHLIB_MAJOR= 6 @@ -114,11 +116,15 @@ SRCS+= rmd160.S CFLAGS+= -DRMD160_ASM .endif .if exists(${MACHINE_ARCH}/skein_block_asm.s) +.if defined(XAS) || ${MK_BINUTILS_BOOTSTRAP} != "no" AFLAGS += --strip-local-absolute # Fully unroll all loops in the assembly optimized version AFLAGS+= --defsym SKEIN_LOOP=0 SRCS+= skein_block_asm.s CFLAGS+= -DSKEIN_ASM -DSKEIN_USE_ASM=1792 # list of block functions to replace with assembly: 256+512+1024 = 1792 +.else +.warning as not available: not using optimized Skein asm +.endif .endif .if exists(${MACHINE_ARCH}/sha.S) || exists(${MACHINE_ARCH}/rmd160.S) || exists(${MACHINE_ARCH}/skein_block_asm.s) ACFLAGS+= -DELF -Wa,--noexecstack