Skip to content

Commit bed301a

Browse files
committed
OpenEXR: Add powerpc64 patch
1 parent f73068c commit bed301a

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

O/OpenEXR/build_tarballs.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ cd $WORKSPACE/srcdir/openexr*
1919
2020
# We are building with old kernel headers that do not define `HWCAP_SVE2`
2121
atomic_patch -p1 $WORKSPACE/srcdir/patches/sve2.patch
22+
# We are building with an old glibc that does not define `AT_HWCAP2`
23+
atomic_patch -p1 $WORKSPACE/srcdir/patches/hwcap2.patch
2224
2325
cmake -B build -G Ninja \
2426
-DBUILD_TESTING=OFF \
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
diff --git a/external/OpenJPH/src/core/others/ojph_arch.cpp b/external/OpenJPH/src/core/others/ojph_arch.cpp
2+
index 018e461c..2d0b8e0a 100644
3+
--- a/external/OpenJPH/src/core/others/ojph_arch.cpp
4+
+++ b/external/OpenJPH/src/core/others/ojph_arch.cpp
5+
@@ -240,6 +240,11 @@ namespace ojph {
6+
#include <sys/auxv.h>
7+
#include <asm/cputable.h>
8+
9+
+ // Compatibility for older glibc versions that do not define `AT_HWCAP2`
10+
+ #ifndef AT_HWCAP2
11+
+ # define AT_HWCAP2 26
12+
+ #endif
13+
+
14+
bool init_cpu_ext_level(int& level) {
15+
unsigned long hwcap = getauxval(AT_HWCAP);
16+
unsigned long hwcap2 = getauxval(AT_HWCAP2);

0 commit comments

Comments
 (0)