From owner-svn-src-all@FreeBSD.ORG Mon May 11 09:40:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2104C841; Mon, 11 May 2015 09:40:09 +0000 (UTC) Received: from melamine.cuivre.fr.eu.org (houdart.cuivre.fr.eu.org [81.57.40.110]) (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 D03521782; Mon, 11 May 2015 09:40:08 +0000 (UTC) Received: by melamine.cuivre.fr.eu.org (Postfix, from userid 1000) id A4B0619711; Mon, 11 May 2015 11:40:05 +0200 (CEST) Date: Mon, 11 May 2015 11:40:05 +0200 From: Thomas Quinot To: sbruno@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282736 - in head: . lib/libmd Message-ID: <20150511094005.GA58845@melamine.cuivre.fr.eu.org> References: <201505102121.t4ALLr3A076661@svn.freebsd.org> <555022F2.9010801@ignoranthack.me> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <555022F2.9010801@ignoranthack.me> X-message-flag: WARNING! Using Outlook can damage your computer. User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 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: Mon, 11 May 2015 09:40:09 -0000 * Sean Bruno, 2015-05-11 : > I already pinged Thomas about this privately, but in the event anyone > is looking, MIPS is still broken after this commit. > > Probably all the GCC based targets are, if I read this correctly. > > make -s -j8 buildworld TARGET=mips TARGET_ARCH=mips > ... Sean, Can you try the attached patch? with it I was able to complete a MIPS build with the command above. Thomas. Index: lib/libmd/Makefile =================================================================== --- lib/libmd/Makefile (révision 282735) +++ lib/libmd/Makefile (copie de travail) @@ -42,7 +42,7 @@ sha0.ref sha0hl.c sha1.ref sha1hl.c shadriver \ sha256.ref sha256hl.c sha512.ref sha512hl.c -CFLAGS+= -I${.CURDIR} +CFLAGS+= -I${.CURDIR} -DWEAK_REFS .PATH: ${.CURDIR}/${MACHINE_ARCH} ${.CURDIR}/../../sys/crypto/sha2 .if exists(${MACHINE_ARCH}/sha.S) Index: lib/libmd/md4c.c =================================================================== --- lib/libmd/md4c.c (révision 282735) +++ lib/libmd/md4c.c (copie de travail) @@ -291,6 +291,11 @@ (((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_MD4Pad, MD4Pad); #undef MD4Final __weak_reference(_libmd_MD4Final, MD4Final); +#endif Index: lib/libmd/md5c.c =================================================================== --- lib/libmd/md5c.c (révision 282735) +++ lib/libmd/md5c.c (copie de travail) @@ -336,6 +336,11 @@ 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_MD5Final, MD5Final); #undef MD5Transform __weak_reference(_libmd_MD5Transform, MD5Transform); +#endif Index: lib/libmd/mdXhl.c =================================================================== --- lib/libmd/mdXhl.c (révision 282735) +++ lib/libmd/mdXhl.c (copie de travail) @@ -97,6 +97,11 @@ 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_MDXFileChunk, MDXFileChunk); #undef MDXData __weak_reference(_libmd_MDXData, MDXData); +#endif Index: lib/libmd/rmd160c.c =================================================================== --- lib/libmd/rmd160c.c (révision 282735) +++ lib/libmd/rmd160c.c (copie de travail) @@ -546,6 +546,11 @@ } #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_RMD160_version, RMD160_version); #undef ripemd160_block __weak_reference(_libmd_ripemd160_block, ripemd160_block); +#endif Index: lib/libmd/sha1c.c =================================================================== --- lib/libmd/sha1c.c (révision 282735) +++ lib/libmd/sha1c.c (copie de travail) @@ -488,7 +488,11 @@ /* 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_version, SHA1_version); #undef sha1_block __weak_reference(_libmd_sha1_block, sha1_block); +#endif Index: lib/libmd/sha256c.c =================================================================== --- lib/libmd/sha256c.c (révision 282735) +++ lib/libmd/sha256c.c (copie de travail) @@ -296,6 +296,11 @@ 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 SHA256_Init __weak_reference(_libmd_SHA256_Init, SHA256_Init); #undef SHA256_Update @@ -304,5 +309,4 @@ __weak_reference(_libmd_SHA256_Final, SHA256_Final); #undef SHA256_Transform __weak_reference(_libmd_SHA256_Transform, SHA256_Transform); -#undef SHA256_version -__weak_reference(_libmd_SHA256_version, SHA256_version); +#endif Index: lib/libmd/sha512c.c =================================================================== --- lib/libmd/sha512c.c (révision 282735) +++ lib/libmd/sha512c.c (copie de travail) @@ -319,6 +319,11 @@ 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_Final, SHA512_Final); #undef SHA512_Transform __weak_reference(_libmd_SHA512_Transform, SHA512_Transform); -#undef SHA512_version -__weak_reference(_libmd_SHA512_version, SHA512_version); +#endif