From owner-svn-ports-head@FreeBSD.ORG Tue Aug 6 12:06:20 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EA77A314; Tue, 6 Aug 2013 12:06:20 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D73CC2AD9; Tue, 6 Aug 2013 12:06:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r76C6K5H082582; Tue, 6 Aug 2013 12:06:20 GMT (envelope-from rene@svn.freebsd.org) Received: (from rene@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r76C6JcN082576; Tue, 6 Aug 2013 12:06:19 GMT (envelope-from rene@svn.freebsd.org) Message-Id: <201308061206.r76C6JcN082576@svn.freebsd.org> From: Rene Ladan Date: Tue, 6 Aug 2013 12:06:19 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r324311 - in head/astro/boinc-setiathome-v7: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Aug 2013 12:06:21 -0000 Author: rene Date: Tue Aug 6 12:06:19 2013 New Revision: 324311 URL: http://svnweb.freebsd.org/changeset/ports/324311 Log: Fix build with clang, remove USE_GCC line in Makefile Submitted by: Roman Cat (modified version) Added: head/astro/boinc-setiathome-v7/files/patch-client__vector__analyzeFuncs_sse.cpp (contents, props changed) head/astro/boinc-setiathome-v7/files/patch-client__vector__analyzeFuncs_x86_64.cpp (contents, props changed) head/astro/boinc-setiathome-v7/files/patch-client__vector__x86_float4.h (contents, props changed) head/astro/boinc-setiathome-v7/files/patch-client__vector__x86_ops.h (contents, props changed) Modified: head/astro/boinc-setiathome-v7/Makefile Modified: head/astro/boinc-setiathome-v7/Makefile ============================================================================== --- head/astro/boinc-setiathome-v7/Makefile Tue Aug 6 11:59:10 2013 (r324310) +++ head/astro/boinc-setiathome-v7/Makefile Tue Aug 6 12:06:19 2013 (r324311) @@ -22,7 +22,6 @@ USES= gmake pkgconfig USE_XZ= yes USE_AUTOTOOLS= autoconf:env automake:env GNU_CONFIGURE= yes -USE_GCC= any CFLAGS+= -O2 -I${LOCALBASE}/include/boinc -I${LOCALBASE}/include \ -L${LOCALBASE}/lib Added: head/astro/boinc-setiathome-v7/files/patch-client__vector__analyzeFuncs_sse.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/astro/boinc-setiathome-v7/files/patch-client__vector__analyzeFuncs_sse.cpp Tue Aug 6 12:06:19 2013 (r324311) @@ -0,0 +1,35 @@ +--- client/vector/analyzeFuncs_sse.cpp.origin 2013-08-02 01:08:24.000000000 +0400 ++++ client/vector/analyzeFuncs_sse.cpp 2013-08-02 01:18:33.000000000 +0400 +@@ -191,7 +191,7 @@ + prefetcht0(out+3*yline); + // TODO: figure out why the intrinsic version crashes for MinGW build + // not critical, but shuffle-only _MM_TRANSPOSE4_PS is optimal on some +-#if defined(USE_INTRINSICS) && defined(_MM_TRANSPOSE4_PS) && !defined(__GNUC__) ++#if defined(USE_INTRINSICS) && (defined(_MM_TRANSPOSE4_PS) && !defined(__GNUC__) || defined(__clang__)) + register float4 row0=*(__m128 *)in; + register float4 row1=*(__m128 *)(in+xline); + register float4 row2=*(__m128 *)(in+2*xline); +@@ -273,7 +273,7 @@ + + // TODO: figure out why the intrinsic version crashes for MinGW build + // not critical, but the shuffle-only _MM_TRANSPOSE4_PS is optimal on some +-#if defined(USE_INTRINSICS) && defined(_MM_TRANSPOSE4_PS) && !defined(__GNUC__) ++#if defined(USE_INTRINSICS) && (defined(_MM_TRANSPOSE4_PS) && !defined(__GNUC__) || defined(__clang__)) + register float4 row0=*(__m128 *)in; + register float4 row1=*(__m128 *)(in+xline); + register float4 row2=*(__m128 *)(in+2*xline); +@@ -1592,8 +1592,14 @@ + return ( tMax ); + } + ++#ifdef __clang__ ++#define s_getU( aaaa, ptr ) \ ++ aaaa = _mm_loadl_pi(aaaa, (__m64 *)ptr); \ ++ aaaa = _mm_loadh_pi(aaaa, ((__m64 *)(ptr))+1 ) ++#else + #define s_getU( aaaa, ptr ) \ + aaaa = _mm_loadh_pi( _mm_loadl_pi(aaaa, (__m64 *)ptr), ((__m64 *)(ptr))+1 ) ++#endif + + #define s_putU( ptr, aaaa ) \ + _mm_storel_pi((__m64 *)ptr, aaaa), _mm_storeh_pi( ((__m64 *)ptr)+1 , aaaa) Added: head/astro/boinc-setiathome-v7/files/patch-client__vector__analyzeFuncs_x86_64.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/astro/boinc-setiathome-v7/files/patch-client__vector__analyzeFuncs_x86_64.cpp Tue Aug 6 12:06:19 2013 (r324311) @@ -0,0 +1,17 @@ +--- client/vector/analyzeFuncs_x86_64.cpp.orig 2011-04-03 07:25:53.000000000 +0200 ++++ client/vector/analyzeFuncs_x86_64.cpp 2013-07-29 17:41:37.000000000 +0200 +@@ -61,8 +61,14 @@ + static const int as [4] __attribute__((aligned(16)))= {INT_MIN, 0, INT_MIN, 0} ; // {-, +, -, +} + char *cblock = (char *)alloca(11*16); + cblock+=(16-((ssize_t)cblock % 16)); ++#ifdef __clang__ ++ __m128 *fblock=reinterpret_cast<__m128 *>(cblock); ++ __m128d *dblock=reinterpret_cast<__m128d *>(cblock); ++#else + x86_m128 *fblock=reinterpret_cast(cblock); + x86_m128d *dblock=reinterpret_cast(cblock); ++#endif ++ + #define CC dblock[0] + #define DD dblock[1] + #define cc fblock[2] Added: head/astro/boinc-setiathome-v7/files/patch-client__vector__x86_float4.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/astro/boinc-setiathome-v7/files/patch-client__vector__x86_float4.h Tue Aug 6 12:06:19 2013 (r324311) @@ -0,0 +1,25 @@ +--- client/vector/x86_float4.h.orig 2011-05-22 21:08:50.000000000 +0200 ++++ client/vector/x86_float4.h 2013-07-29 18:52:18.000000000 +0200 +@@ -58,11 +58,15 @@ + + ALIGNED(static const int sign_bits[4],16)={INT_MIN, INT_MIN, INT_MIN, INT_MIN}; + ALIGNED(static const int other_bits[4],16)={INT_MAX, INT_MAX, INT_MAX, INT_MAX}; ++ ++#ifdef __clang__ ++#ifndef __EMMINTRIN_H ++typedef long long __m128i __attribute__((__vector_size__(16))); ++#endif ++#endif + #define SIGN_BITS (*(__m128i *)sign_bits) + #define OTHER_BITS (*(__m128i *)other_bits) + +- +- + struct float4 { + float4() {}; + float4(const __m128 b) { m=b; }; +@@ -263,4 +267,3 @@ + + #endif + #endif +- Added: head/astro/boinc-setiathome-v7/files/patch-client__vector__x86_ops.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/astro/boinc-setiathome-v7/files/patch-client__vector__x86_ops.h Tue Aug 6 12:06:19 2013 (r324311) @@ -0,0 +1,43 @@ +--- client/vector/x86_ops.h.orig 2011-05-22 21:08:50.000000000 +0200 ++++ client/vector/x86_ops.h 2013-07-29 17:42:54.000000000 +0200 +@@ -135,7 +135,11 @@ + + #if defined(__SSE2__) + // SSE2 specific functions/macros here. +-#ifdef _MSC_VER ++#ifdef __clang__ ++#ifndef __EMMINTRIN_H ++#include ++#endif ++#elif defined _MSC_VER + typedef __m128d x86_m128d; + #else + typedef double x86_m128d __attribute__ ((mode(V2DF))) __attribute__((aligned(16))); +@@ -144,7 +148,11 @@ + + #if defined(__SSE__) + // SSE specific functions/macros here. +-#ifdef _MSC_VER ++#ifdef __clang__ ++#ifndef __XMMINTRIN_H ++#include ++#endif ++#elif defined _MSC_VER + typedef __m128 x86_m128; + typedef __m128i x86_m128i; + #else +@@ -186,6 +194,7 @@ + + #endif + ++#ifndef __clang__ + #ifndef __m128d + #define __m128d x86_m128d + #endif +@@ -197,5 +206,6 @@ + #ifndef __m128 + #define __m128 x86_m128 + #endif ++#endif + + #endif