Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Dec 2019 05:41:38 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r520362 - head/multimedia/kodi-devel/files
Message-ID:  <201912180541.xBI5fcjp033584@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Wed Dec 18 05:41:37 2019
New Revision: 520362
URL: https://svnweb.freebsd.org/changeset/ports/520362

Log:
  multimedia/kodi-devel: Unbreak on arm
  
  xbmc/platform/freebsd/CPUInfoFreebsd.cpp:18:10: fatal error: 'asm/hwcap.h' file not found
  #include <asm/hwcap.h>
           ^~~~~~~~~~~~~
  1 error generated.
  
  PR:		242688
  Submitted by:	jbeich

Added:
  head/multimedia/kodi-devel/files/patch-neon   (contents, props changed)

Added: head/multimedia/kodi-devel/files/patch-neon
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/kodi-devel/files/patch-neon	Wed Dec 18 05:41:37 2019	(r520362)
@@ -0,0 +1,35 @@
+--- xbmc/platform/freebsd/CPUInfoFreebsd.cpp.orig
++++ xbmc/platform/freebsd/CPUInfoFreebsd.cpp
+@@ -14,11 +14,10 @@
+ #include <array>
+ #include <vector>
+ 
+-#if (defined(__arm__) && defined(HAS_NEON)) || defined(__aarch64__)
+-#include <asm/hwcap.h>
+-#include <sys/auxv.h>
+-#elif defined(__i386__) || defined(__x86_64__)
++#if defined(__i386__) || defined(__x86_64__)
+ #include <cpuid.h>
++#elif __has_include(<sys/auxv.h>)
++#include <sys/auxv.h>
+ #endif
+ 
+ #include <sys/resource.h>
+@@ -155,9 +154,15 @@ CCPUInfoFreebsd::CCPUInfoFreebsd()
+   }
+ #endif
+ 
+-#if defined(HAS_NEON) && defined(__arm__)
+-  if (getauxval(AT_HWCAP) & HWCAP_NEON)
++#if defined(HAS_NEON)
++#if defined(__ARM_NEON)
++  m_cpuFeatures |= CPU_FEATURE_NEON;
++#elif __has_include(<sys/auxv.h>)
++  unsigned long hwcap = 0;
++  elf_aux_info(AT_HWCAP, &hwcap, sizeof(hwcap));
++  if (hwcap & HWCAP_NEON)
+     m_cpuFeatures |= CPU_FEATURE_NEON;
++#endif
+ #endif
+ }
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912180541.xBI5fcjp033584>