pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/cpu_features



Module Name:    pkgsrc
Committed By:   tnn
Date:           Fri May 13 10:39:35 UTC 2022

Modified Files:
        pkgsrc/devel/cpu_features: Makefile distinfo
        pkgsrc/devel/cpu_features/patches: patch-CMakeLists.txt
            patch-include_cpu__features__macros.h
Added Files:
        pkgsrc/devel/cpu_features/patches:
            patch-src_impl__aarch64__linux__or__android.c
            patch-src_impl__x86__linux__or__android.c
Removed Files:
        pkgsrc/devel/cpu_features/patches: patch-src_cpuinfo__x86.c

Log Message:
cpu_features: update to 0.7.0

API Change
[x86] Embed brand_string and mark FillX86BrandString as deprecated
New code layout - breaking change in cpu_features_macros.h

New features / Enhancements
[cmake] Use of CMAKE_POSITION_INDEPENDENT_CODE instead of BUILD_PIC
Add support for ZHAOXIN CPU
Fix a getauxval comment and expand the Krait idiv workaround
Update AArch64 features to Linux 5.10
Detect Zen 3 (K19) cpus
Detect AVX512 on Darwin use GetDarwinSysCtlByName("hw.optional.avx512f")
Detect Intel's Multi-Precision Add-Carry Instruction Extensions
CPU features for AMD
Update uarch detection for Intel processors
Add cache info for new AMD CPUs (0x8000001D)
[NFC] Add bazel support to cpu_features
Add support for FreeBSD on x86
[cmake] cmake: use CTest default


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 pkgsrc/devel/cpu_features/Makefile \
    pkgsrc/devel/cpu_features/distinfo
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/devel/cpu_features/patches/patch-CMakeLists.txt \
    pkgsrc/devel/cpu_features/patches/patch-include_cpu__features__macros.h
cvs rdiff -u -r1.2 -r0 \
    pkgsrc/devel/cpu_features/patches/patch-src_cpuinfo__x86.c
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/devel/cpu_features/patches/patch-src_impl__aarch64__linux__or__android.c \
    pkgsrc/devel/cpu_features/patches/patch-src_impl__x86__linux__or__android.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/cpu_features/Makefile
diff -u pkgsrc/devel/cpu_features/Makefile:1.5 pkgsrc/devel/cpu_features/Makefile:1.6
--- pkgsrc/devel/cpu_features/Makefile:1.5      Thu Dec 31 10:57:03 2020
+++ pkgsrc/devel/cpu_features/Makefile  Fri May 13 10:39:35 2022
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.5 2020/12/31 10:57:03 nia Exp $
+# $NetBSD: Makefile,v 1.6 2022/05/13 10:39:35 tnn Exp $
 
 GITHUB_TAG=    v${PKGVERSION_NOREV}
-DISTNAME=      cpu_features-0.6.0
-PKGREVISION=   1
+DISTNAME=      cpu_features-0.7.0
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=google/}
 
@@ -13,7 +12,8 @@ LICENSE=      apache-2.0
 
 USE_CMAKE=     yes
 USE_LANGUAGES= c c++
-CMAKE_ARGS+=   -DBUILD_PIC=ON
+CMAKE_ARGS+=   -DCMAKE_POSITION_INDEPENDENT_CODE=ON
+CMAKE_ARGS+=   -DBUILD_TESTING=OFF
 
 .include "../../mk/bsd.prefs.mk"
 
Index: pkgsrc/devel/cpu_features/distinfo
diff -u pkgsrc/devel/cpu_features/distinfo:1.5 pkgsrc/devel/cpu_features/distinfo:1.6
--- pkgsrc/devel/cpu_features/distinfo:1.5      Sun Jan  9 22:03:17 2022
+++ pkgsrc/devel/cpu_features/distinfo  Fri May 13 10:39:35 2022
@@ -1,8 +1,9 @@
-$NetBSD: distinfo,v 1.5 2022/01/09 22:03:17 tnn Exp $
+$NetBSD: distinfo,v 1.6 2022/05/13 10:39:35 tnn Exp $
 
-BLAKE2s (cpu_features-0.6.0.tar.gz) = 4c59c3a8b3f9b5beefa5a39fb9cd760eec0f8e95b599954efe11c955042d6296
-SHA512 (cpu_features-0.6.0.tar.gz) = 006a2e05253712cf605ecabccdda63dd9325445f8d145d5e2432c4342332e652f318810997321849be131082db435d88143020fdc85268fba204586cf37eef0d
-Size (cpu_features-0.6.0.tar.gz) = 63255 bytes
-SHA1 (patch-CMakeLists.txt) = a2eace73c45b85fac81b14d3e14b26b89cba74f2
-SHA1 (patch-include_cpu__features__macros.h) = 4d93afe4ac314895f0823b992af463bf39d67379
-SHA1 (patch-src_cpuinfo__x86.c) = 91d43472c195f1db377231136725be676419bd0c
+BLAKE2s (cpu_features-0.7.0.tar.gz) = b442c655fd0e0d8d92a8559459585c73bac39c976fbfbc475089088f155c90fc
+SHA512 (cpu_features-0.7.0.tar.gz) = e602c88c4a104d69dff0297a4c4f8e26d02d548fc35ce2616429ff8280f2a37e9eaa99451a38b7c302907352cf15bdf8c09c2e0e52b09bf4cd3b7e2b21f8ddb0
+Size (cpu_features-0.7.0.tar.gz) = 85986 bytes
+SHA1 (patch-CMakeLists.txt) = 7e8c409b6a4fcb3f98153d33be658d501c17b1c7
+SHA1 (patch-include_cpu__features__macros.h) = 5bef216cceab5442b89351f96c78aa9d1a69ae1f
+SHA1 (patch-src_impl__aarch64__linux__or__android.c) = f4ef0a8273fe403658fd79c80f615e5c3d6b4e5d
+SHA1 (patch-src_impl__x86__linux__or__android.c) = a9b7c73c1d25302c4986f8a732f3ae01ea902f1b

Index: pkgsrc/devel/cpu_features/patches/patch-CMakeLists.txt
diff -u pkgsrc/devel/cpu_features/patches/patch-CMakeLists.txt:1.1 pkgsrc/devel/cpu_features/patches/patch-CMakeLists.txt:1.2
--- pkgsrc/devel/cpu_features/patches/patch-CMakeLists.txt:1.1  Thu Dec 31 10:03:15 2020
+++ pkgsrc/devel/cpu_features/patches/patch-CMakeLists.txt      Fri May 13 10:39:35 2022
@@ -1,15 +1,15 @@
-$NetBSD: patch-CMakeLists.txt,v 1.1 2020/12/31 10:03:15 nia Exp $
+$NetBSD: patch-CMakeLists.txt,v 1.2 2022/05/13 10:39:35 tnn Exp $
 
 Recognize earm as arm.
 
---- CMakeLists.txt.orig        2020-10-15 09:09:51.000000000 +0000
+--- CMakeLists.txt.orig        2022-03-08 10:31:24.000000000 +0000
 +++ CMakeLists.txt
-@@ -57,7 +57,7 @@ set(PROCESSOR_IS_POWER FALSE)
- 
- if(CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
+@@ -54,7 +54,7 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "^mips
    set(PROCESSOR_IS_MIPS TRUE)
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64)")
+   set(PROCESSOR_IS_AARCH64 TRUE)
 -elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
 +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm|earm)")
    set(PROCESSOR_IS_ARM TRUE)
- elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
-   set(PROCESSOR_IS_AARCH64 TRUE)
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(AMD64|amd64)|(^i.86$)")
+   set(PROCESSOR_IS_X86 TRUE)
Index: pkgsrc/devel/cpu_features/patches/patch-include_cpu__features__macros.h
diff -u pkgsrc/devel/cpu_features/patches/patch-include_cpu__features__macros.h:1.1 pkgsrc/devel/cpu_features/patches/patch-include_cpu__features__macros.h:1.2
--- pkgsrc/devel/cpu_features/patches/patch-include_cpu__features__macros.h:1.1 Mon Dec 14 15:07:49 2020
+++ pkgsrc/devel/cpu_features/patches/patch-include_cpu__features__macros.h     Fri May 13 10:39:35 2022
@@ -1,11 +1,11 @@
-$NetBSD: patch-include_cpu__features__macros.h,v 1.1 2020/12/14 15:07:49 tnn Exp $
+$NetBSD: patch-include_cpu__features__macros.h,v 1.2 2022/05/13 10:39:35 tnn Exp $
 
 NetBSD support.
 
---- include/cpu_features_macros.h.orig 2020-10-15 09:09:51.000000000 +0000
+--- include/cpu_features_macros.h.orig 2022-03-08 10:31:24.000000000 +0000
 +++ include/cpu_features_macros.h
 @@ -71,6 +71,10 @@
- #define CPU_FEATURES_OS_LINUX_OR_ANDROID
+ #define CPU_FEATURES_OS_FREEBSD
  #endif
  
 +#if defined(__NetBSD__)

Added files:

Index: pkgsrc/devel/cpu_features/patches/patch-src_impl__aarch64__linux__or__android.c
diff -u /dev/null pkgsrc/devel/cpu_features/patches/patch-src_impl__aarch64__linux__or__android.c:1.1
--- /dev/null   Fri May 13 10:39:35 2022
+++ pkgsrc/devel/cpu_features/patches/patch-src_impl__aarch64__linux__or__android.c     Fri May 13 10:39:35 2022
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_impl__aarch64__linux__or__android.c,v 1.1 2022/05/13 10:39:35 tnn Exp $
+
+Use /proc/cpuinfo on NetBSD/evbarm-aarch64 for now.
+
+--- src/impl_aarch64_linux_or_android.c.orig   2022-03-08 10:31:24.000000000 +0000
++++ src/impl_aarch64_linux_or_android.c
+@@ -15,7 +15,7 @@
+ #include "cpu_features_macros.h"
+ 
+ #ifdef CPU_FEATURES_ARCH_AARCH64
+-#if defined(CPU_FEATURES_OS_LINUX) || defined(CPU_FEATURES_OS_ANDROID)
++#if defined(CPU_FEATURES_OS_LINUX) || defined(CPU_FEATURES_OS_ANDROID) || defined(CPU_FEATURES_OS_NETBSD)
+ 
+ #include "cpuinfo_aarch64.h"
+ 
Index: pkgsrc/devel/cpu_features/patches/patch-src_impl__x86__linux__or__android.c
diff -u /dev/null pkgsrc/devel/cpu_features/patches/patch-src_impl__x86__linux__or__android.c:1.1
--- /dev/null   Fri May 13 10:39:35 2022
+++ pkgsrc/devel/cpu_features/patches/patch-src_impl__x86__linux__or__android.c Fri May 13 10:39:35 2022
@@ -0,0 +1,23 @@
+$NetBSD: patch-src_impl__x86__linux__or__android.c,v 1.1 2022/05/13 10:39:35 tnn Exp $
+
+Use /proc/cpuinfo on NetBSD/x86 for now.
+Add placeholder SunOS implementation to fix the build.
+
+--- src/impl_x86_linux_or_android.c.orig       2022-03-08 10:31:24.000000000 +0000
++++ src/impl_x86_linux_or_android.c
+@@ -15,7 +15,14 @@
+ #include "cpu_features_macros.h"
+ 
+ #ifdef CPU_FEATURES_ARCH_X86
+-#if defined(CPU_FEATURES_OS_LINUX) || defined(CPU_FEATURES_OS_ANDROID)
++#if defined(__sun)
++#include "impl_x86__base_implementation.inl"
++static void OverrideOsPreserves(OsPreserves* os_preserves) {
++}
++static void DetectFeaturesFromOs(X86Info* info, X86Features* features) {
++}
++#endif
++#if defined(CPU_FEATURES_OS_LINUX) || defined(CPU_FEATURES_OS_ANDROID) || defined(CPU_FEATURES_OS_NETBSD)
+ 
+ #include "impl_x86__base_implementation.inl"
+ 



Home | Main Index | Thread Index | Old Index