From owner-svn-ports-all@freebsd.org Thu Nov 22 00:07:23 2018 Return-Path: Delivered-To: svn-ports-all@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 2FA6611041C4; Thu, 22 Nov 2018 00:07:23 +0000 (UTC) (envelope-from jbeich@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 CBADC7D658; Thu, 22 Nov 2018 00:07:22 +0000 (UTC) (envelope-from jbeich@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 A99E1279A2; Thu, 22 Nov 2018 00:07:22 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAM07MEH069549; Thu, 22 Nov 2018 00:07:22 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAM07MxF069548; Thu, 22 Nov 2018 00:07:22 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201811220007.wAM07MxF069548@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Thu, 22 Nov 2018 00:07:22 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r485566 - head/multimedia/cmrt/files X-SVN-Group: ports-head X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: head/multimedia/cmrt/files X-SVN-Commit-Revision: 485566 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CBADC7D658 X-Spamd-Result: default: False [1.57 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_SHORT(0.68)[0.681,0]; NEURAL_SPAM_MEDIUM(0.49)[0.489,0]; NEURAL_SPAM_LONG(0.40)[0.400,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Nov 2018 00:07:23 -0000 Author: jbeich Date: Thu Nov 22 00:07:22 2018 New Revision: 485566 URL: https://svnweb.freebsd.org/changeset/ports/485566 Log: multimedia/cmrt: improve i386 fix to not break x32 Modified: head/multimedia/cmrt/files/patch-i386 (contents, props changed) Modified: head/multimedia/cmrt/files/patch-i386 ============================================================================== --- head/multimedia/cmrt/files/patch-i386 Wed Nov 21 22:37:49 2018 (r485565) +++ head/multimedia/cmrt/files/patch-i386 Thu Nov 22 00:07:22 2018 (r485566) @@ -1,27 +1,40 @@ +Don't use compile-time constant to detect 32-bit registers: +* GCC defines __ILP32__ only in -mx32 but Clang also in -m32 +* -mx32 uses 64-bit registers but doesn't define __LP64__ + In file included from cm_device.cpp:31: In file included from ./cm_device.h:37: In file included from ./cm_array.h:31: ./cm_mem.h:200:17: error: invalid output size for constraint '=a' :"=a"(local_rax), "=r"(local_rbx), ^ +https://github.com/intel/cmrt/issues/18 --- src/cm_mem.h.orig 2016-09-07 23:51:38 UTC +++ src/cm_mem.h -@@ -194,7 +194,9 @@ inline void GetCPUID(int CPUInfo[4], int InfoType) +@@ -183,7 +182,7 @@ inline void GetCPUID(int CPUInfo[4], int InfoType) + __try { + #endif + +- if (sizeof(void *) == 4) { ++#ifdef __i386__ + unsigned int local_eax, local_ebx, local_ecx, local_edx; + __asm__ __volatile__("pushl %%ebx \n\t" "cpuid \n\t" "movl %%ebx, %1 \n\t" "popl %%ebx \n\t" /* restore the old %ebx */ + :"=a"(local_eax), "=r"(local_ebx), +@@ -194,7 +193,7 @@ inline void GetCPUID(int CPUInfo[4], int InfoType) CPUInfo[1] = local_ebx; CPUInfo[2] = local_ecx; CPUInfo[3] = local_edx; - } else { -+ } -+#ifdef __LP64__ -+ else { ++#else uint64_t local_rax, local_rbx, local_rcx, local_rdx; __asm__ __volatile__("push %%rbx \n\t" "cpuid \n\t" "mov %%rbx, %1 \n\t" "pop %%rbx \n\t" /* restore the old %ebx */ :"=a"(local_rax), "=r"(local_rbx), -@@ -206,6 +208,7 @@ inline void GetCPUID(int CPUInfo[4], int InfoType) +@@ -205,7 +204,7 @@ inline void GetCPUID(int CPUInfo[4], int InfoType) + CPUInfo[1] = local_rbx; CPUInfo[2] = local_rcx; CPUInfo[3] = local_rdx; - } +- } +#endif #ifndef NO_EXCEPTION_HANDLING