Add/remove forgotten patch files.

This commit is contained in:
Vanilla I. Shu 2020-04-04 11:20:39 +00:00
parent 6655744dcf
commit d38575016b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=530641
2 changed files with 2 additions and 57 deletions

View File

@ -1,55 +0,0 @@
--- third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc.orig 2020-02-04 17:37:57 UTC
+++ third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc
@@ -20,10 +20,16 @@
#include <intrin.h>
#endif
-#if defined(__powerpc__) || defined(__ppc__)
+#if (defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)
#include <sys/platform/ppc.h>
+
#endif
+#if (defined(__powerpc__) || defined(__ppc__)) && defined(__FreeBSD__)
+#include <sys/types.h>
+#include <sys/sysctl.h>
+#endif
+
#include "absl/base/internal/sysinfo.h"
namespace absl {
@@ -57,11 +62,34 @@ double UnscaledCycleClock::Frequency() {
#elif defined(__powerpc__) || defined(__ppc__)
int64_t UnscaledCycleClock::Now() {
+#ifdef __GLIBC__
return __ppc_get_timebase();
+#elif defined(__FreeBSD__)
+ union { long long complete; unsigned int part[2]; } ticks;
+ unsigned int tmp;
+ asm volatile(
+ "0:\n"
+ "mftbu %[hi32]\n"
+ "mftb %[lo32]\n"
+ "mftbu %[tmp]\n"
+ "cmpw %[tmp],%[hi32]\n"
+ "bne 0b\n"
+ : [hi32] "=r"(ticks.part[0]), [lo32] "=r"(ticks.part[1]),
+ [tmp] "=r"(tmp)
+ );
+ return ticks.complete;
+#endif
}
double UnscaledCycleClock::Frequency() {
+#ifdef __GLIBC__
return __ppc_get_timebase_freq();
+#elif defined(__FreeBSD__)
+ double timebaseFrequency = 0;
+ size_t length = sizeof(timebaseFrequency);
+ sysctlbyname("kern.timecounter.tc.timebase.frequency", &timebaseFrequency, &length, NULL, 0);
+ return timebaseFrequency;
+#endif
}
#elif defined(__aarch64__)

View File

@ -1,5 +1,5 @@
--- third_party/boringssl/include/openssl/base.h.orig 2019-12-25 21:37:18 UTC
+++ third_party/boringssl/include/openssl/base.h
--- third_party/boringssl-with-bazel/src/include/openssl/base.h.orig 2020-04-04 11:13:35 UTC
+++ third_party/boringssl-with-bazel/src/include/openssl/base.h
@@ -96,9 +96,13 @@ extern "C" {
#elif defined(__arm) || defined(__arm__) || defined(_M_ARM)
#define OPENSSL_32_BIT