Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
graphics/openexr: Fix some CPUTYPE builds.
Reported by: jkim@FreeBSD.org Obtained from: AcademySoftwareFoundation/openexr#1507 MFH: 2023Q3
- Loading branch information
Showing
2 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
graphics/openexr/files/patch-lib_OpenEXRCore_internal__cpuid.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
https://github.com/AcademySoftwareFoundation/openexr/pull/1507/files | ||
|
||
--- src/lib/OpenEXRCore/internal_cpuid.h.orig 2023-07-31 18:17:50 UTC | ||
+++ src/lib/OpenEXRCore/internal_cpuid.h | ||
@@ -39,14 +39,16 @@ static inline void check_for_x86_simd (int *f16c, int | ||
*f16c = 0; | ||
# endif | ||
|
||
-#elif OPENEXR_ENABLE_X86_SIMD_CHECK | ||
+#elif defined(__AVX__) && defined(__F16C__) | ||
|
||
// shortcut if everything is turned on / compiled in | ||
-# if defined(__AVX__) && defined(__F16C__) | ||
*f16c = 1; | ||
*avx = 1; | ||
*sse2 = 1; | ||
-# elif defined(_MSC_VER) && defined(_WIN32) | ||
+ | ||
+#elif OPENEXR_ENABLE_X86_SIMD_CHECK | ||
+ | ||
+# if defined(_MSC_VER) && defined(_WIN32) | ||
int regs[4], osxsave; | ||
|
||
__cpuid (regs, 0); |