pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/orc



Module Name:    pkgsrc
Committed By:   nia
Date:           Sat Aug  3 10:41:21 UTC 2024

Modified Files:
        pkgsrc/devel/orc: distinfo
Added Files:
        pkgsrc/devel/orc/patches: patch-orc_orccpu-x86.c

Log Message:
orc: Import upstream patch to fix build with GCC<9.

Helps netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 pkgsrc/devel/orc/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/orc/patches/patch-orc_orccpu-x86.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/orc/distinfo
diff -u pkgsrc/devel/orc/distinfo:1.29 pkgsrc/devel/orc/distinfo:1.30
--- pkgsrc/devel/orc/distinfo:1.29      Sat Jul 20 06:16:29 2024
+++ pkgsrc/devel/orc/distinfo   Sat Aug  3 10:41:21 2024
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.29 2024/07/20 06:16:29 adam Exp $
+$NetBSD: distinfo,v 1.30 2024/08/03 10:41:21 nia Exp $
 
 BLAKE2s (orc-0.4.39.tar.xz) = 9de3d497b625881037b7979d6d4779651711794285e540760f62813a11985c4d
 SHA512 (orc-0.4.39.tar.xz) = 5b2167c9bb5ef4fdd5b1a683e5e7fc94bafa0afe62cb5f30e6fd2de9e80b4727b533029688e2807fc64b60af45f9263a421074bf330fb2f208b48620b0f95fd6
 Size (orc-0.4.39.tar.xz) = 232168 bytes
+SHA1 (patch-orc_orccpu-x86.c) = bd04a9d5381bda80220ba96d49e03501584751c8

Added files:

Index: pkgsrc/devel/orc/patches/patch-orc_orccpu-x86.c
diff -u /dev/null pkgsrc/devel/orc/patches/patch-orc_orccpu-x86.c:1.1
--- /dev/null   Sat Aug  3 10:41:21 2024
+++ pkgsrc/devel/orc/patches/patch-orc_orccpu-x86.c     Sat Aug  3 10:41:21 2024
@@ -0,0 +1,58 @@
+$NetBSD: patch-orc_orccpu-x86.c,v 1.1 2024/08/03 10:41:21 nia Exp $
+
+From e184d18fd6e4fa18178b30871903cdaa839093fe Mon Sep 17 00:00:00 2001
+From: "L. E. Segovia" <amy%centricular.com@localhost>
+Date: Fri, 19 Jul 2024 11:40:28 -0300
+Subject: [PATCH] x86: work around old GCC versions (pre 9.0) having broken
+ xgetbv implementations
+
+See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71659
+
+Part-of: <https://gitlab.freedesktop.org/gstreamer/orc/-/merge_requests/194>
+
+--- orc/orccpu-x86.c.orig      2024-07-19 11:02:41.000000000 +0000
++++ orc/orccpu-x86.c
+@@ -34,6 +34,19 @@
+ 
+ #ifdef _MSC_VER
+ #  include <intrin.h>
++#elif defined(__GNUC__)
++#if __GNUC__ >= 8 && __GNUC__ < 9
++// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71659
++#  include <xsaveintrin.h>
++#elif __GNUC__ < 8
++#  define ORC_NEEDS_ASM_XSAVE 1
++#endif
++#endif
++
++#if !defined(_MSC_VER) || defined(__clang__)
++#define ORC_TARGET_XSAVE __attribute__((target("xsave")))
++#else
++#define ORC_TARGET_XSAVE
+ #endif
+ 
+ #include <orc/orcdebug.h>
+@@ -304,15 +317,19 @@ orc_x86_cpuid_get_branding_string (void)
+ // Checks if XMM and YMM state are enabled in XCR0.
+ // See 14.3 DETECTION OF INTEL® AVX INSTRUCTIONS on the
+ // Intel® 64 and IA-32 Architectures Software Developer’s Manual
+-#if !defined(_MSC_VER) || defined(__clang__)
+-#define ORC_TARGET_XSAVE __attribute__((target("xsave")))
++#ifdef ORC_NEEDS_ASM_XSAVE
++static orc_bool check_xcr0_ymm()
++{
++  uint32_t xcr0;
++  __asm__ ("xgetbv" : "=a" (xcr0) : "c" (0) : "%edx" );
++  return ((xcr0 & 6U) == 6U);
++}
+ #else
+-#define ORC_TARGET_XSAVE
+-#endif
+ static orc_bool ORC_TARGET_XSAVE check_xcr0_ymm()
+ {
+   return (_xgetbv(0) & 6U) != 0U;
+ }
++#endif
+ 
+ static void
+ orc_x86_cpuid_handle_standard_flags (void)



Home | Main Index | Thread Index | Old Index