Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Feb 2019 04:32:34 +0000 (UTC)
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r494125 - in head/science/qbox: . files
Message-ID:  <201902280432.x1S4WYWH070862@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yuri
Date: Thu Feb 28 04:32:33 2019
New Revision: 494125
URL: https://svnweb.freebsd.org/changeset/ports/494125

Log:
  science/qbox: fix build on powerpc*
  
  PR:		236078
  Submitted by:	Piotr Kubaj <pkubaj@anongoth.pl>

Added:
  head/science/qbox/files/patch-readTSC.C   (contents, props changed)
Modified:
  head/science/qbox/Makefile

Modified: head/science/qbox/Makefile
==============================================================================
--- head/science/qbox/Makefile	Thu Feb 28 03:26:43 2019	(r494124)
+++ head/science/qbox/Makefile	Thu Feb 28 04:32:33 2019	(r494125)
@@ -21,7 +21,7 @@ LIB_DEPENDS=	libblas.so:math/blas \
 		libuuid.so:misc/e2fsprogs-libuuid \
 		libxerces-c.so:textproc/xerces-c3
 
-USES=		gmake iconv:wchar_t localbase:ldflags
+USES=		compiler:c++11-lang gmake iconv:wchar_t localbase:ldflags
 USE_GITHUB=	yes
 GH_ACCOUNT=	qboxcode
 GH_PROJECT=	qbox-public

Added: head/science/qbox/files/patch-readTSC.C
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/qbox/files/patch-readTSC.C	Thu Feb 28 04:32:33 2019	(r494125)
@@ -0,0 +1,25 @@
+--- readTSC.C.orig	2019-02-27 09:30:27 UTC
++++ readTSC.C
+@@ -19,10 +19,22 @@
+ long long readTSC(void)
+ {
+   union { long long complete; unsigned int part[2]; } ticks;
++#ifdef __amd64__
+   __asm__ ("rdtsc; mov %%eax,%0;mov %%edx,%1"
+             : "=mr" (ticks.part[0]),
+               "=mr" (ticks.part[1])
+             : /* no inputs */
+             : "eax", "edx");
++#elif __powerpc__
++  unsigned int tmp;
++  __asm__ ("0:"
++            "mftbu %[hi32]\n"
++            "mftb %[lo32]\n"
++            "mftbu %[tmp]\n"
++            "cmpw %[tmp],%[hi32]\n"
++            "bne 0b\n"
++            : [hi32] "=r"(ticks.part[0]), [lo32] "=r"(ticks.part[1]),
++            [tmp] "=r"(tmp));
++#endif
+   return ticks.complete;
+ }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902280432.x1S4WYWH070862>