freebsd-ports/math/mprime/files/patch-commonc.c
Steve Wills df4b2c024a math/mprime: update to 29.8b3
PR:		237844
Submitted by:	rozhuk.im@gmail.com (maintainer)
2019-05-12 02:00:14 +00:00

19 lines
705 B
C

--- commonc.c.orig 2019-04-11 17:46:50.000000000 +0300
+++ commonc.c 2019-05-12 03:52:33.503858000 +0300
@@ -386,6 +386,8 @@
CPU_L2_CACHE_INCLUSIVE = -1;
CPU_L3_CACHE_INCLUSIVE = -1;
CPU_L4_CACHE_INCLUSIVE = -1;
+
+#if HWLOC_API_VERSION >= 0x00020000
for (depth = 0; depth < hwloc_topology_get_depth (hwloc_topology); depth++) {
for (i = 0; i < (int) hwloc_get_nbobjs_by_depth (hwloc_topology, depth); i++) {
hwloc_obj_t obj;
@@ -423,6 +425,7 @@
}
}
}
+#endif
/* Overwrite the cache info calculated via CPUID as hwloc's info is more detailed and I believe more reliable. */
/* We are transitioning away from using the cache size global variables computed by the CPUID code. */