From nobody Sat Feb 18 22:43:19 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PK3cR2YjYz3s0TM; Sat, 18 Feb 2023 22:43:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PK3cR24Rxz3pMq; Sat, 18 Feb 2023 22:43:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676760199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rBZgchkkt3KEWKTtfSpOIUNX661nsSYwWNBCJ44Npds=; b=ZfqYpfqduBn16qGZnCZP/HFRFHPP7ODbSbRzmcRt37k7O+HH/JJteYEB3N+R66B9Yc7rxb TT4pUym0iSW2WdndJIyJUJUK242VeMzeh2Bq1aX3/BZcI9+bZ5n3c/A6G5IvK6BiAZwbxi kYOYjcLL4ASlttQqiR8094wE6UcK9VecNt5a7ATnJ1w5+KsMttC9stjC0f4RcM8L4ggu0g 5GXzWEH8RrEsJ+ey/pOeSAfrvJGG7thvVhAK8KiIe0DITWL13/96DuR2p1PDtm8UEujaLs 0Raj7rxmm8mYbRI7rS/7LkyLxk3TcRa0quBi3NXWA22wuviSBPWfKPQ7ONdboQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676760199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rBZgchkkt3KEWKTtfSpOIUNX661nsSYwWNBCJ44Npds=; b=sDJOsIPaQ0z/p9Jf4n5JYiYjcIPZHbLxlLRlv/aquYP4z6D9ZnSaKGXVnipMaRwH42bdi7 JWpjXLgVaxPpQXhreaXfW8vJo+3lnvJY/7ohd24PXatloeM0CX+HqALvq3cdAYmtsBJmtl qWCXCe6AjW5R9jTmjH6XlfDiG3Ty1dBXqEh9QRYToMo8+xc66d3xGycDmCSBW4ewyQLVQg neV8Bw4n8K03dzSDECLpHjCkEzZWg1PLRUU7M/5sGkBdSeJ0mki/dR/hNUkfTTHcn3WucB +xRvsHlW1Pv6NxQsw4GsOltgKUYDQ0unpBTrpa1s/By8HXyBQ8tZDBXtHlU9Fg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676760199; a=rsa-sha256; cv=none; b=ZZpV9GZjjRDSQdKYdLGGrpRzLv52LHEU6CM/a0WozONWXS71g4x+qAJYFsNKzBwaqlbcAH boyJ18pU3BQUXJEdspS6/oJ8629g3jT+OhTVXIRA7stvk7p38YLBe6hbsbZW4qaXBMc4IE ZRqDda3O6Cmwx1tEP+eZOCreMn6MKicwFB9VXpg9U+ZO2/jPttdLRItqnn+YgvwaBOjN5f zEJGYsxt1jQbh2oDuayCDLyd0/uTUOdjL2DIqwA/7UI6J9hwksC6LB1KZ4kUy9KgWRUGqb YMcaARzWSsz61K28Py0VLIhAQPQ1xN6yLoyncpZxBVNRGRtxYE0qtzuOL/UcuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PK3cR18qXzfQT; Sat, 18 Feb 2023 22:43:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31IMhJNs098738; Sat, 18 Feb 2023 22:43:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31IMhJms098737; Sat, 18 Feb 2023 22:43:19 GMT (envelope-from git) Date: Sat, 18 Feb 2023 22:43:19 GMT Message-Id: <202302182243.31IMhJms098737@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Steven Kreuzer Subject: git: 441e7193407d - main - devel/cpu_features: update to 0.7.0 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: skreuzer X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 441e7193407d623e9fd29e32c335c676cbda0f37 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by skreuzer: URL: https://cgit.FreeBSD.org/ports/commit/?id=441e7193407d623e9fd29e32c335c676cbda0f37 commit 441e7193407d623e9fd29e32c335c676cbda0f37 Author: Steven Kreuzer AuthorDate: 2023-02-18 22:40:30 +0000 Commit: Steven Kreuzer CommitDate: 2023-02-18 22:43:11 +0000 devel/cpu_features: update to 0.7.0 Changes: - https://github.com/google/cpu_features/releases/tag/v0.7.0 PR: 269107 Reported by: Yuri Victorovich --- devel/cpu_features/Makefile | 4 +- devel/cpu_features/distinfo | 6 +- .../files/patch-cmake_googletest.CMakeLists.txt.in | 17 ----- .../files/patch-include_cpu__features__macros.h | 13 ---- .../files/patch-include_cpuinfo__x86.h | 10 --- devel/cpu_features/files/patch-src_cpuinfo__x86.c | 76 ---------------------- 6 files changed, 5 insertions(+), 121 deletions(-) diff --git a/devel/cpu_features/Makefile b/devel/cpu_features/Makefile index ca36502cfac6..8b9fb30b5a8d 100644 --- a/devel/cpu_features/Makefile +++ b/devel/cpu_features/Makefile @@ -1,7 +1,6 @@ PORTNAME= cpu_features -DISTVERSION= 0.6.0 -PORTREVISION= 2 DISTVERSIONPREFIX= v +DISTVERSION= 0.7.0 CATEGORIES= devel MAINTAINER= skreuzer@FreeBSD.org @@ -19,6 +18,7 @@ USE_GITHUB= yes GH_ACCOUNT= google CMAKE_ON= BUILD_SHARED_LIBS +CMAKE_OFF= BUILD_TESTING CFLAGS+= -fPIC diff --git a/devel/cpu_features/distinfo b/devel/cpu_features/distinfo index e40d46a8fd60..fddb56d861a2 100644 --- a/devel/cpu_features/distinfo +++ b/devel/cpu_features/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1631796486 -SHA256 (google-cpu_features-v0.6.0_GH0.tar.gz) = 95a1cf6f24948031df114798a97eea2a71143bd38a4d07d9a758dda3924c1932 -SIZE (google-cpu_features-v0.6.0_GH0.tar.gz) = 63255 +TIMESTAMP = 1674435781 +SHA256 (google-cpu_features-v0.7.0_GH0.tar.gz) = df80d9439abf741c7d2fdcdfd2d26528b136e6c52976be8bd0cd5e45a27262c0 +SIZE (google-cpu_features-v0.7.0_GH0.tar.gz) = 85986 diff --git a/devel/cpu_features/files/patch-cmake_googletest.CMakeLists.txt.in b/devel/cpu_features/files/patch-cmake_googletest.CMakeLists.txt.in deleted file mode 100644 index 574ffd9b7c5c..000000000000 --- a/devel/cpu_features/files/patch-cmake_googletest.CMakeLists.txt.in +++ /dev/null @@ -1,17 +0,0 @@ ---- cmake/googletest.CMakeLists.txt.in.orig 2022-01-16 19:20:55 UTC -+++ cmake/googletest.CMakeLists.txt.in -@@ -5,11 +5,11 @@ project(googletest-download NONE) - include(ExternalProject) - ExternalProject_Add(googletest - GIT_REPOSITORY https://github.com/google/googletest.git -- GIT_TAG master -+ GIT_TAG main - SOURCE_DIR "${CMAKE_BINARY_DIR}/googletest-src" - BINARY_DIR "${CMAKE_BINARY_DIR}/googletest-build" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" --) -\ No newline at end of file -+) diff --git a/devel/cpu_features/files/patch-include_cpu__features__macros.h b/devel/cpu_features/files/patch-include_cpu__features__macros.h deleted file mode 100644 index afb5fb2ea3c7..000000000000 --- a/devel/cpu_features/files/patch-include_cpu__features__macros.h +++ /dev/null @@ -1,13 +0,0 @@ ---- include/cpu_features_macros.h.orig 2021-09-16 15:06:15 UTC -+++ include/cpu_features_macros.h -@@ -83,6 +83,10 @@ - #define CPU_FEATURES_OS_DARWIN - #endif - -+#if (defined(__freebsd__) || defined(__FreeBSD__)) -+#define CPU_FEATURES_OS_FREEBSD -+#endif -+ - //////////////////////////////////////////////////////////////////////////////// - // Compilers - //////////////////////////////////////////////////////////////////////////////// diff --git a/devel/cpu_features/files/patch-include_cpuinfo__x86.h b/devel/cpu_features/files/patch-include_cpuinfo__x86.h deleted file mode 100644 index e59e56aecb31..000000000000 --- a/devel/cpu_features/files/patch-include_cpuinfo__x86.h +++ /dev/null @@ -1,10 +0,0 @@ ---- include/cpuinfo_x86.h.orig 2021-09-16 15:51:24 UTC -+++ include/cpuinfo_x86.h -@@ -137,6 +137,7 @@ typedef enum { - AMD_BULLDOZER, // K15 - AMD_JAGUAR, // K16 - AMD_ZEN, // K17 -+ AMD_ZEN3, // K19 - } X86Microarchitecture; - - // Returns the underlying microarchitecture by looking at X86Info's vendor, diff --git a/devel/cpu_features/files/patch-src_cpuinfo__x86.c b/devel/cpu_features/files/patch-src_cpuinfo__x86.c deleted file mode 100644 index f88cee0a7325..000000000000 --- a/devel/cpu_features/files/patch-src_cpuinfo__x86.c +++ /dev/null @@ -1,76 +0,0 @@ ---- src/cpuinfo_x86.c.orig 2020-10-15 09:09:51 UTC -+++ src/cpuinfo_x86.c -@@ -97,7 +97,8 @@ - // microarchitectures. - #if defined(CPU_FEATURES_OS_WINDOWS) - #include // IsProcessorFeaturePresent --#elif defined(CPU_FEATURES_OS_LINUX_OR_ANDROID) -+#elif defined(CPU_FEATURES_OS_LINUX_OR_ANDROID) || \ -+ defined(CPU_FEATURES_OS_FREEBSD) - #include "internal/filesystem.h" // Needed to parse /proc/cpuinfo - #include "internal/stack_line_reader.h" // Needed to parse /proc/cpuinfo - #include "internal/string_view.h" // Needed to parse /proc/cpuinfo -@@ -1239,6 +1240,45 @@ static void DetectSseViaOs(X86Features* features) { - features->ssse3 = GetDarwinSysCtlByName("hw.optional.supplementalsse3"); - features->sse4_1 = GetDarwinSysCtlByName("hw.optional.sse4_1"); - features->sse4_2 = GetDarwinSysCtlByName("hw.optional.sse4_2"); -+#elif defined(CPU_FEATURES_OS_FREEBSD) -+ // Handling FreeBSD platform through parsing /var/run/dmesg.boot. -+ const int fd = CpuFeatures_OpenFile("/var/run/dmesg.boot"); -+ if (fd >= 0) { -+ StackLineReader reader; -+ StackLineReader_Initialize(&reader, fd); -+ for (;;) { -+ const LineResult result = StackLineReader_NextLine(&reader); -+ const StringView line = result.line; -+ const bool is_feature = -+ CpuFeatures_StringView_StartsWith(line, str(" Features=")); -+ const bool is_feature2 = -+ CpuFeatures_StringView_StartsWith(line, str(" Features2=")); -+ if (is_feature || is_feature2) { -+ // Lines of interests are of the following form: -+ // " Features=0x1783fbff" -+ // We replace '<', '>' and ',' with space so we can search by -+ // whitespace separated word. -+ // TODO: Fix CpuFeatures_StringView_HasWord to allow for different -+ // separators. -+ for (size_t i = 0; i < line.size; ++i) { -+ char* c = (char*)(&(line.ptr[i])); -+ if (*c == '<' || *c == '>' || *c == ',') *c = ' '; -+ } -+ if (is_feature) { -+ features->sse = CpuFeatures_StringView_HasWord(line, "SSE"); -+ features->sse2 = CpuFeatures_StringView_HasWord(line, "SSE2"); -+ } -+ if (is_feature2) { -+ features->sse3 = CpuFeatures_StringView_HasWord(line, "SSE3"); -+ features->ssse3 = CpuFeatures_StringView_HasWord(line, "SSSE3"); -+ features->sse4_1 = CpuFeatures_StringView_HasWord(line, "SSE4.1"); -+ features->sse4_2 = CpuFeatures_StringView_HasWord(line, "SSE4.2"); -+ } -+ } -+ if (result.eof) break; -+ } -+ CpuFeatures_CloseFile(fd); -+ } - #elif defined(CPU_FEATURES_OS_LINUX_OR_ANDROID) - // Handling Linux platform through /proc/cpuinfo. - const int fd = CpuFeatures_OpenFile("/proc/cpuinfo"); -@@ -1525,6 +1565,8 @@ X86Microarchitecture GetX86Microarchitecture(const X86 - return AMD_JAGUAR; - case 0x17: - return AMD_ZEN; -+ case 0x19: -+ return AMD_ZEN3; - default: - return X86_UNKNOWN; - } -@@ -1617,6 +1659,8 @@ const char* GetX86MicroarchitectureName(X86Microarchit - return "AMD_JAGUAR"; - case AMD_ZEN: - return "AMD_ZEN"; -+ case AMD_ZEN3: -+ return "AMD_ZEN3"; - } - return "unknown microarchitecture"; - }