bafbbd1c17
Changelog: What's New in SeaMonkey 2.46 SeaMonkey 2.46 contains (among other changes) the following major changes relative to SeaMonkey 2.40: SeaMonkey-specific changes HTML5 fullscreen video (e.g. on YouTube) now works fine.
57 lines
1.4 KiB
C++
57 lines
1.4 KiB
C++
$NetBSD: patch-mozilla_mozglue_build_arm.cpp,v 1.2 2017/01/01 16:14:08 ryoon Exp $
|
|
|
|
--- mozilla/mozglue/build/arm.cpp.orig 2016-12-14 02:08:20.000000000 +0000
|
|
+++ mozilla/mozglue/build/arm.cpp
|
|
@@ -13,10 +13,13 @@
|
|
// we don't compile one of these detection methods. The detection code here is
|
|
// based on the CPU detection in libtheora.
|
|
|
|
-# if defined(__linux__) || defined(ANDROID)
|
|
+# if defined(__linux__) || defined(ANDROID) || defined(__NetBSD__)
|
|
# include <stdio.h>
|
|
# include <stdlib.h>
|
|
# include <string.h>
|
|
+# if defined(__NetBSD__)
|
|
+# include <sys/sysctl.h>
|
|
+# endif
|
|
|
|
enum{
|
|
MOZILLA_HAS_EDSP_FLAG=1,
|
|
@@ -25,6 +28,29 @@ enum{
|
|
MOZILLA_HAS_NEON_FLAG=8
|
|
};
|
|
|
|
+# if defined(__NetBSD__)
|
|
+static unsigned
|
|
+get_arm_cpu_flags(void)
|
|
+{
|
|
+ unsigned flags = 0;
|
|
+ size_t len;
|
|
+ int flag;
|
|
+
|
|
+ len = sizeof(flag);
|
|
+ if (sysctlbyname("machdep.simdex_present", &flag, &len, NULL, 0) == 0 && flag) {
|
|
+ flags |= MOZILLA_HAS_ARMV6_FLAG;
|
|
+ flags |= MOZILLA_HAS_EDSP_FLAG;
|
|
+ }
|
|
+
|
|
+ len = sizeof(flag);
|
|
+ if (sysctlbyname("machdep.neon_present", &flag, &len, NULL, 0) == 0 && flag) {
|
|
+ flags |= MOZILLA_HAS_ARMV7_FLAG;
|
|
+ flags |= MOZILLA_HAS_NEON_FLAG;
|
|
+ }
|
|
+
|
|
+ return flags;
|
|
+}
|
|
+# else
|
|
static unsigned
|
|
get_arm_cpu_flags(void)
|
|
{
|
|
@@ -89,6 +115,7 @@ get_arm_cpu_flags(void)
|
|
}
|
|
return flags;
|
|
}
|
|
+# endif
|
|
|
|
// Cache a local copy so we only have to read /proc/cpuinfo once.
|
|
static unsigned arm_cpu_flags = get_arm_cpu_flags();
|