Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Aug 2023 10:53:34 GMT
From:      Robert Nagy <rnagy@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org
Subject:   git: 7aeb2b5eca97 - 2023Q3 - www/*chromium: unbreak build on arm64
Message-ID:  <202308231053.37NArYpE060280@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch 2023Q3 has been updated by rnagy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7aeb2b5eca9783c5d6e3197d841a4bd1e95b027c

commit 7aeb2b5eca9783c5d6e3197d841a4bd1e95b027c
Author:     Robert Nagy <rnagy@FreeBSD.org>
AuthorDate: 2023-08-23 10:49:53 +0000
Commit:     Robert Nagy <rnagy@FreeBSD.org>
CommitDate: 2023-08-23 10:53:20 +0000

    www/*chromium: unbreak build on arm64
    
    sysfs is not available on *BSD so trying to compile code
    to read it is futile
    
    (cherry picked from commit 06ee2c71b48b1a590d05b615d05626332d50a9f3)
---
 ...hird__party_abseil-cpp_absl_base_internal_sysinfo.cc | 17 +++++++++++++++--
 ...hird__party_abseil-cpp_absl_base_internal_sysinfo.cc | 17 +++++++++++++++--
 2 files changed, 30 insertions(+), 4 deletions(-)

diff --git a/www/chromium/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc b/www/chromium/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc
index 45b62182cf6f..77b14bd16655 100644
--- a/www/chromium/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc
+++ b/www/chromium/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc
@@ -1,4 +1,4 @@
---- third_party/abseil-cpp/absl/base/internal/sysinfo.cc.orig	2023-08-17 12:40:56 UTC
+--- third_party/abseil-cpp/absl/base/internal/sysinfo.cc.orig	2023-08-23 10:45:26 UTC
 +++ third_party/abseil-cpp/absl/base/internal/sysinfo.cc
 @@ -30,10 +30,14 @@
  #include <sys/syscall.h>
@@ -44,7 +44,20 @@
  
  #if defined(ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY)
    // On these platforms, the TSC frequency is the nominal CPU
-@@ -433,6 +441,18 @@ pid_t GetTID() {
+@@ -332,10 +340,12 @@ static double GetNominalCPUFrequency() {
+   // If CPU scaling is in effect, we want to use the *maximum*
+   // frequency, not whatever CPU speed some random processor happens
+   // to be using now.
++#if !defined(__OpenBSD__) && !defined(__FreeBSD__) // pledge violation
+   if (ReadLongFromFile("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq",
+                        &freq)) {
+     return freq * 1e3;  // Value is kHz.
+   }
++#endif
+ 
+   return 1.0;
+ #endif  // !ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY
+@@ -433,6 +443,18 @@ pid_t GetTID() {
    static_assert(sizeof(pid_t) == sizeof(thread),
                  "In NaCL int expected to be the same size as a pointer");
    return reinterpret_cast<pid_t>(thread);
diff --git a/www/ungoogled-chromium/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc b/www/ungoogled-chromium/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc
index be3f7a7c54f7..77b14bd16655 100644
--- a/www/ungoogled-chromium/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc
+++ b/www/ungoogled-chromium/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc
@@ -1,4 +1,4 @@
---- third_party/abseil-cpp/absl/base/internal/sysinfo.cc.orig	2023-08-18 10:26:52 UTC
+--- third_party/abseil-cpp/absl/base/internal/sysinfo.cc.orig	2023-08-23 10:45:26 UTC
 +++ third_party/abseil-cpp/absl/base/internal/sysinfo.cc
 @@ -30,10 +30,14 @@
  #include <sys/syscall.h>
@@ -44,7 +44,20 @@
  
  #if defined(ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY)
    // On these platforms, the TSC frequency is the nominal CPU
-@@ -433,6 +441,18 @@ pid_t GetTID() {
+@@ -332,10 +340,12 @@ static double GetNominalCPUFrequency() {
+   // If CPU scaling is in effect, we want to use the *maximum*
+   // frequency, not whatever CPU speed some random processor happens
+   // to be using now.
++#if !defined(__OpenBSD__) && !defined(__FreeBSD__) // pledge violation
+   if (ReadLongFromFile("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq",
+                        &freq)) {
+     return freq * 1e3;  // Value is kHz.
+   }
++#endif
+ 
+   return 1.0;
+ #endif  // !ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY
+@@ -433,6 +443,18 @@ pid_t GetTID() {
    static_assert(sizeof(pid_t) == sizeof(thread),
                  "In NaCL int expected to be the same size as a pointer");
    return reinterpret_cast<pid_t>(thread);



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