From owner-svn-src-all@freebsd.org Thu Feb 23 22:10:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8760CEBC48; Thu, 23 Feb 2017 22:10:39 +0000 (UTC) (envelope-from avg@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 mx1.freebsd.org (Postfix) with ESMTPS id A069114B4; Thu, 23 Feb 2017 22:10:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1NMAcDN090565; Thu, 23 Feb 2017 22:10:38 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NMAc6O090558; Thu, 23 Feb 2017 22:10:38 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702232210.v1NMAc6O090558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 23 Feb 2017 22:10:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r314184 - stable/10/lib/libmd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2017 22:10:39 -0000 Author: avg Date: Thu Feb 23 22:10:37 2017 New Revision: 314184 URL: https://svnweb.freebsd.org/changeset/base/314184 Log: MFC r282774: Unbreak MIPS build following r282726 (MFCed in r314144) Modified: stable/10/lib/libmd/Makefile stable/10/lib/libmd/md4c.c stable/10/lib/libmd/md5c.c stable/10/lib/libmd/mdXhl.c stable/10/lib/libmd/rmd160c.c stable/10/lib/libmd/sha1c.c stable/10/lib/libmd/sha512c.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libmd/Makefile ============================================================================== --- stable/10/lib/libmd/Makefile Thu Feb 23 22:08:35 2017 (r314183) +++ stable/10/lib/libmd/Makefile Thu Feb 23 22:10:37 2017 (r314184) @@ -42,7 +42,13 @@ CLEANFILES+= md[245]hl.c md[245].ref md[ sha0.ref sha0hl.c sha1.ref sha1hl.c shadriver \ sha256.ref sha256hl.c sha512.ref sha512hl.c -CFLAGS+= -I${.CURDIR} +# Define WEAK_REFS to provide weak aliases for libmd symbols +# +# Note that the same sources are also used internally by libcrypt, +# in which case: +# * macros are used to rename symbols to libcrypt internal names +# * no weak aliases are generated +CFLAGS+= -I${.CURDIR} -DWEAK_REFS .PATH: ${.CURDIR}/${MACHINE_ARCH} ${.CURDIR}/../../sys/crypto/sha2 .if exists(${MACHINE_ARCH}/sha.S) Modified: stable/10/lib/libmd/md4c.c ============================================================================== --- stable/10/lib/libmd/md4c.c Thu Feb 23 22:08:35 2017 (r314183) +++ stable/10/lib/libmd/md4c.c Thu Feb 23 22:10:37 2017 (r314184) @@ -291,6 +291,11 @@ unsigned int len; (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24); } +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef MD4Init __weak_reference(_libmd_MD4Init, MD4Init); #undef MD4Update @@ -299,3 +304,4 @@ __weak_reference(_libmd_MD4Update, MD4Up __weak_reference(_libmd_MD4Pad, MD4Pad); #undef MD4Final __weak_reference(_libmd_MD4Final, MD4Final); +#endif Modified: stable/10/lib/libmd/md5c.c ============================================================================== --- stable/10/lib/libmd/md5c.c Thu Feb 23 22:08:35 2017 (r314183) +++ stable/10/lib/libmd/md5c.c Thu Feb 23 22:10:37 2017 (r314184) @@ -336,6 +336,11 @@ MD5Transform (state, block) memset ((void *)x, 0, sizeof (x)); } +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef MD5Init __weak_reference(_libmd_MD5Init, MD5Init); #undef MD5Update @@ -346,3 +351,4 @@ __weak_reference(_libmd_MD5Pad, MD5Pad); __weak_reference(_libmd_MD5Final, MD5Final); #undef MD5Transform __weak_reference(_libmd_MD5Transform, MD5Transform); +#endif Modified: stable/10/lib/libmd/mdXhl.c ============================================================================== --- stable/10/lib/libmd/mdXhl.c Thu Feb 23 22:08:35 2017 (r314183) +++ stable/10/lib/libmd/mdXhl.c Thu Feb 23 22:10:37 2017 (r314184) @@ -97,6 +97,11 @@ MDXData (const void *data, unsigned int return (MDXEnd(&ctx, buf)); } +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef MDXEnd __weak_reference(_libmd_MDXEnd, MDXEnd); #undef MDXFile @@ -105,3 +110,4 @@ __weak_reference(_libmd_MDXFile, MDXFile __weak_reference(_libmd_MDXFileChunk, MDXFileChunk); #undef MDXData __weak_reference(_libmd_MDXData, MDXData); +#endif Modified: stable/10/lib/libmd/rmd160c.c ============================================================================== --- stable/10/lib/libmd/rmd160c.c Thu Feb 23 22:08:35 2017 (r314183) +++ stable/10/lib/libmd/rmd160c.c Thu Feb 23 22:10:37 2017 (r314184) @@ -546,6 +546,11 @@ unsigned long *l; } #endif +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef RIPEMD160_Init __weak_reference(_libmd_RIPEMD160_Init, RIPEMD160_Init); #undef RIPEMD160_Update @@ -558,3 +563,4 @@ __weak_reference(_libmd_RIPEMD160_Transf __weak_reference(_libmd_RMD160_version, RMD160_version); #undef ripemd160_block __weak_reference(_libmd_ripemd160_block, ripemd160_block); +#endif Modified: stable/10/lib/libmd/sha1c.c ============================================================================== --- stable/10/lib/libmd/sha1c.c Thu Feb 23 22:08:35 2017 (r314183) +++ stable/10/lib/libmd/sha1c.c Thu Feb 23 22:10:37 2017 (r314184) @@ -488,7 +488,11 @@ SHA_CTX *c; /* memset((char *)&c,0,sizeof(c));*/ } - +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef SHA_Init __weak_reference(_libmd_SHA_Init, SHA_Init); #undef SHA_Update @@ -513,3 +517,4 @@ __weak_reference(_libmd_SHA1_Transform, __weak_reference(_libmd_SHA1_version, SHA1_version); #undef sha1_block __weak_reference(_libmd_sha1_block, sha1_block); +#endif Modified: stable/10/lib/libmd/sha512c.c ============================================================================== --- stable/10/lib/libmd/sha512c.c Thu Feb 23 22:08:35 2017 (r314183) +++ stable/10/lib/libmd/sha512c.c Thu Feb 23 22:10:37 2017 (r314184) @@ -319,6 +319,11 @@ SHA512_Final(unsigned char digest[64], S memset((void *)ctx, 0, sizeof(*ctx)); } +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef SHA512_Init __weak_reference(_libmd_SHA512_Init, SHA512_Init); #undef SHA512_Update @@ -327,5 +332,4 @@ __weak_reference(_libmd_SHA512_Update, S __weak_reference(_libmd_SHA512_Final, SHA512_Final); #undef SHA512_Transform __weak_reference(_libmd_SHA512_Transform, SHA512_Transform); -#undef SHA512_version -__weak_reference(_libmd_SHA512_version, SHA512_version); +#endif