Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Jan 2026 23:31:44 +0000
From:      Matthias Andree <mandree@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 90d4fc1621bb - main - graphics/openexr: fix build on Sandy Bridge CPUs
Message-ID:  <695c49e0.34d99.6c8eb2f9@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by mandree:

URL: https://cgit.FreeBSD.org/ports/commit/?id=90d4fc1621bb463d19be5a6459f90d644258188d

commit 90d4fc1621bb463d19be5a6459f90d644258188d
Author:     Matthias Andree <mandree@FreeBSD.org>
AuthorDate: 2026-01-05 23:24:13 +0000
Commit:     Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2026-01-05 23:31:22 +0000

    graphics/openexr: fix build on Sandy Bridge CPUs
    
    OpenEXR attempts to use F16C intrinsics when AVX available and
    at least one of these is true: F16C available, GCC used, or clang used.
    
    Intel Sandy Bridge processors do have AVX extensions,
    but no F16C instruction set extension, so compilers (clang 19, 20, gcc 14)
    complain:
    
    work/openexr-3.4.4/src/lib/OpenEXRCore/unpack.c:37:18:
      error: always_inline function '_mm256_cvtph_ps' requires target feature 'f16c',
      but would be inlined into function 'half_to_float_buffer'
      that is compiled without support for 'f16c'
       37 |             out, _mm256_cvtph_ps (_mm_loadu_si128 ((const __m128i*) in)));
          |                  ^
    
    Not bumping PORTREVISION because this is not a supported configuration.
    
    https://github.com/AcademySoftwareFoundation/openexr/issues/2231
    
    Reported by:    "UnitedMarsupials"
    MFH:            2025Q4
---
 graphics/openexr/files/patch-src_lib_OpenEXRCore_unpack.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/graphics/openexr/files/patch-src_lib_OpenEXRCore_unpack.c b/graphics/openexr/files/patch-src_lib_OpenEXRCore_unpack.c
new file mode 100644
index 000000000000..62afea351beb
--- /dev/null
+++ b/graphics/openexr/files/patch-src_lib_OpenEXRCore_unpack.c
@@ -0,0 +1,11 @@
+--- src/lib/OpenEXRCore/unpack.c.orig	2025-11-17 01:18:11 UTC
++++ src/lib/OpenEXRCore/unpack.c
+@@ -15,7 +15,7 @@
+ 
+ /* TODO: learn arm neon intrinsics for this */
+ #if (defined(__x86_64__) || defined(_M_X64))
+-#    if defined(__AVX__) && (defined(__F16C__) || defined(__GNUC__) || defined(__clang__))
++#    if defined(__AVX__) && defined(__F16C__) && (defined(__GNUC__) || defined(__clang__))
+ #        define USE_F16C_INTRINSICS
+ #    elif (defined(__GNUC__) || defined(__clang__))
+ #        define ENABLE_F16C_TEST


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?695c49e0.34d99.6c8eb2f9>