mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-06 05:47:13 +02:00
testing/php7-tideways_xhprof: fix timer function for ppc64le
This commit is contained in:
parent
123c203710
commit
15a4523925
@ -8,12 +8,12 @@ _pkgver=${pkgver/_/-}
|
||||
pkgrel=0
|
||||
pkgdesc="Modern XHProf compatible Profiler for PHP 7"
|
||||
url="http://tideways.io"
|
||||
# ppc64le: fails to build
|
||||
arch="all !ppc64le"
|
||||
arch="all"
|
||||
license="Apache-2.0"
|
||||
depends="php7"
|
||||
makedepends="php7-dev autoconf"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/tideways/$_pkgreal/archive/v$_pkgver.tar.gz"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/tideways/$_pkgreal/archive/v$_pkgver.tar.gz
|
||||
timer_ppc64le.patch"
|
||||
builddir="$srcdir/$_pkgreal-$_pkgver"
|
||||
|
||||
build() {
|
||||
@ -38,4 +38,5 @@ package() {
|
||||
echo "extension=$_pkgext.so" > "$pkgdir"/etc/php7/conf.d/$_pkgext.ini
|
||||
}
|
||||
|
||||
sha512sums="1e42589b81f39272cf62a058e1ecd82532b076bebe583d13b797d448891ff615aedf1e990785fbba7302daa34a977bf748cf2deaaf4fd334af800a556849334c php7-tideways_xhprof-5.0_beta2.tar.gz"
|
||||
sha512sums="1e42589b81f39272cf62a058e1ecd82532b076bebe583d13b797d448891ff615aedf1e990785fbba7302daa34a977bf748cf2deaaf4fd334af800a556849334c php7-tideways_xhprof-5.0_beta2.tar.gz
|
||||
62f09c950a5b85efd87159e9e747298fd7c9b2bbec060745adf120c5cf5748e4cdfa4625c8b49e15f9905bf3833dab91f81a297e5a68fbb9e3778025846c12b6 timer_ppc64le.patch"
|
||||
|
15
testing/php7-tideways_xhprof/timer_ppc64le.patch
Normal file
15
testing/php7-tideways_xhprof/timer_ppc64le.patch
Normal file
@ -0,0 +1,15 @@
|
||||
--- a/timer.h
|
||||
+++ b/timer.h
|
||||
@@ -75,8 +75,12 @@
|
||||
return 0;
|
||||
#endif
|
||||
case TIDEWAYS_XHPROF_CLOCK_TSC:
|
||||
+#if !defined (__powerpc64__)
|
||||
asm volatile("rdtsc" : "=a" (a), "=d" (d));
|
||||
(val) = ((uint64)a) | (((uint64)d)<<32);
|
||||
+#else
|
||||
+ asm volatile ("mftb %0" : "=r" (val));
|
||||
+#endif
|
||||
return val / timebase_factor;
|
||||
|
||||
default:
|
Loading…
Reference in New Issue
Block a user