summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-rw-r--r--data/node/README30
-rw-r--r--data/node/install.diff.disabled (renamed from data/node/install.diff)0
-rw-r--r--data/node/jitless.diff (renamed from data/node/init-options.diff)28
-rw-r--r--data/node/make.sh7
4 files changed, 57 insertions, 8 deletions
diff --git a/data/node/README b/data/node/README
index 7d5c4c249..38aae846f 100644
--- a/data/node/README
+++ b/data/node/README
@@ -1,8 +1,32 @@
-In the case of linux, Clang 8 is required for the host.
+MCApollo's Notes.
+
+In the case of linux, Clang 8 is required due to v8.
+
TODO (if bored): fix the usage of libs for target on host toolchain.
-I've disable the need for it now.
+I've disable/fixed the other issue for now (mksnapshot/want_seperate_toolchain).
+
+TODO: Fix the Makefile/install.py for a smoother install.
TODO: Set all values uv cannot detect, like
-os.cpus, os.hwfreq
+os.cpus, os.hwfreq, the sysctl values are missing.
+
+TODO: Figure a less hacky way to get jitless working,
+It doesn't work as v8 claims it should work or I'm doing something wrong.
+Cleaner patches next time ^
+ SIGCHLD will stop node.
+
+-> Setting CS_DEBUGGED in unc0ver doesn't work as intented?
+
+Shoutouts:
+-> Coolstar/PPSSP maintainers, since I borrowed PPSSP's code to set CS_DEBUGGED.
+-> Shawn Presser's version of node for iOS
+ He didn't try for jit it seems, Xcode just sets CS_DEBUGGED
+ when running from Xcode and it works for him I guess.
+ https://github.com/shawwn/node/tree/ios-release?files=1
+-> Node chakracore/nodejs-mobile maintainers for gyp edits and
+ leading me to try v8 node.
+
+Callouts:
+-> Screw Node's build system, that's all.
Knock down one language, go to the next.
diff --git a/data/node/install.diff b/data/node/install.diff.disabled
index be725d702..be725d702 100644
--- a/data/node/install.diff
+++ b/data/node/install.diff.disabled
diff --git a/data/node/init-options.diff b/data/node/jitless.diff
index a3faf707a..f5cb3f95b 100644
--- a/data/node/init-options.diff
+++ b/data/node/jitless.diff
@@ -1,6 +1,28 @@
+diff -Naur node-v12.3.1/deps/uv/src/unix/process.c node-v12.3.1+iPhone/deps/uv/src/unix/process.c
+--- node-v12.3.1/deps/uv/src/unix/process.c 2019-05-22 12:21:52.000000000 +0000
++++ node-v12.3.1+iPhone/deps/uv/src/unix/process.c 2019-05-28 22:01:59.417155270 +0000
+@@ -267,7 +267,8 @@
+ }
+
+
+-#if !(defined(__APPLE__) && (TARGET_OS_TV || TARGET_OS_WATCH))
++#if !(defined(__APPLE__) && (TARGET_OS_TV || TARGET_OS_WATCH || TARGET_OS_IPHONE))
++// Disabled on iOS until MC fixes jitless, the syscall ruins spawning children.
+ /* execvp is marked __WATCHOS_PROHIBITED __TVOS_PROHIBITED, so must be
+ * avoided. Since this isn't called on those targets, the function
+ * doesn't even need to be defined for them.
+@@ -411,7 +412,7 @@
+ int uv_spawn(uv_loop_t* loop,
+ uv_process_t* process,
+ const uv_process_options_t* options) {
+-#if defined(__APPLE__) && (TARGET_OS_TV || TARGET_OS_WATCH)
++#if defined(__APPLE__) && (TARGET_OS_TV || TARGET_OS_WATCH || TARGET_OS_IPHONE)
+ /* fork is marked __WATCHOS_PROHIBITED __TVOS_PROHIBITED. */
+ return UV_ENOSYS;
+ #else
diff -Naur node-v12.3.1/src/codesign.h node-v12.3.1+iPhone/src/codesign.h
--- node-v12.3.1/src/codesign.h 1970-01-01 00:00:00.000000000 +0000
-+++ node-v12.3.1+iPhone/src/codesign.h 2019-05-27 17:45:00.845971558 +0000
++++ node-v12.3.1+iPhone/src/codesign.h 2019-05-28 22:00:20.085095406 +0000
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2006 Apple Computer, Inc. All rights reserved.
@@ -69,7 +91,7 @@ diff -Naur node-v12.3.1/src/codesign.h node-v12.3.1+iPhone/src/codesign.h
+#endif /* _SYS_CODESIGN_H_ */
diff -Naur node-v12.3.1/src/node.cc node-v12.3.1+iPhone/src/node.cc
--- node-v12.3.1/src/node.cc 2019-05-22 12:21:54.000000000 +0000
-+++ node-v12.3.1+iPhone/src/node.cc 2019-05-27 20:45:57.228246250 +0000
++++ node-v12.3.1+iPhone/src/node.cc 2019-05-28 22:00:20.085095406 +0000
@@ -94,6 +94,19 @@
#include <unistd.h> // STDIN_FILENO, STDERR_FILENO
#endif
@@ -129,7 +151,7 @@ diff -Naur node-v12.3.1/src/node.cc node-v12.3.1+iPhone/src/node.cc
per_process::v8_platform.Platform(),
diff -Naur node-v12.3.1/src/node_options.cc node-v12.3.1+iPhone/src/node_options.cc
--- node-v12.3.1/src/node_options.cc 2019-05-22 12:21:54.000000000 +0000
-+++ node-v12.3.1+iPhone/src/node_options.cc 2019-05-27 09:00:23.775576108 +0000
++++ node-v12.3.1+iPhone/src/node_options.cc 2019-05-28 22:00:20.085095406 +0000
@@ -499,6 +499,10 @@
kAllowedInEnvironment);
AddOption("--stack-trace-limit", "", V8Option{}, kAllowedInEnvironment);
diff --git a/data/node/make.sh b/data/node/make.sh
index a7c375eaf..df1caa5ed 100644
--- a/data/node/make.sh
+++ b/data/node/make.sh
@@ -1,7 +1,10 @@
pkg:setup
-export CC="${PKG_TARG}-gcc"
-export CXX="${PKG_TARG}-g++"
+export _DEFINES="-DTARGET_OS_WATCH"
+# Disable fork(), exec() until jitless gets working correctly.
+
+export CC="${PKG_TARG}-gcc ${_DEFINES}"
+export CXX="${PKG_TARG}-g++ ${_DEFINES}"
export LD="${PKG_TARG}-ld"
export AR="${PKG_TARG}-ar"
export RANLIB="${PKG_TARG}-ranlib"