Skip to content

Commit ff87512

Browse files
committed
Fix for missing log2 symbol
1 parent 8b4a9de commit ff87512

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

patches/jsc.patch

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,3 +325,24 @@ diff -aur target-org/webkit/Source/WTF/wtf/linux/MemoryFootprintLinux.cpp target
325325
template<typename Functor>
326326
static void forEachLine(FILE* file, Functor functor)
327327
{
328+
diff -aur target-org/webkit/Source/JavaScriptCore/Sources.txt target/webkit/Source/JavaScriptCore/Sources.txt
329+
--- target-org/webkit/Source/JavaScriptCore/Sources.txt 2018-11-11 23:05:40.000000000 +0800
330+
+++ target/webkit/Source/JavaScriptCore/Sources.txt 2018-11-12 00:03:26.000000000 +0800
331+
@@ -1046,3 +1046,6 @@
332+
333+
// Derived Sources
334+
yarr/YarrCanonicalizeUnicode.cpp
335+
+
336+
+// Polyfills
337+
+polyfills/log2.cpp
338+
diff -aur /dev/null target/webkit/Source/JavaScriptCore/polyfills/log2.cpp
339+
--- /dev/null 2018-11-12 01:21:57.000000000 +0800
340+
+++ target/webkit/Source/JavaScriptCore/polyfills/log2.cpp 2018-11-12 01:19:49.000000000 +0800
341+
@@ -0,0 +1,7 @@
342+
+#include <math.h>
343+
+
344+
+#if defined(__ANDROID__) && __ANDROID_API__ < 19
345+
+double log2(double x) {
346+
+ return log(x) / log(2.0);
347+
+}
348+
+#endif

scripts/compile/common.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ COMMON_LDFLAGS=" \
126126
-Wl,--icf=safe \
127127
-Wl,-z,noexecstack \
128128
-Wl,--gc-sections \
129+
-Wl,--no-undefined \
129130
"
130131

131132
COMMON_CFLAGS=" \

0 commit comments

Comments
 (0)