summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMCApollo <34170230+MCApollo@users.noreply.github.com>2019-05-23 01:24:57 +0000
committerMCApollo <34170230+MCApollo@users.noreply.github.com>2019-05-23 01:24:57 +0000
commit3a9bc245932c8aebd94465f07eff4cb05e6116f1 (patch)
tree091ba6611bfff18ebd1cc19c603531f0f9463e8b
parent9fe5b4edbd35485a54ec628c2584d05801f38628 (diff)
WIP 3
-rw-r--r--data/node/configure-ios.diff76
-rw-r--r--data/node/make.sh13
2 files changed, 65 insertions, 24 deletions
diff --git a/data/node/configure-ios.diff b/data/node/configure-ios.diff
index 29c134a73..e0029bd81 100644
--- a/data/node/configure-ios.diff
+++ b/data/node/configure-ios.diff
@@ -1,6 +1,6 @@
diff -ur node-v12.2.0/common.gypi node-v12.2.0+iPhone/common.gypi
--- node-v12.2.0/common.gypi 2019-05-07 14:52:12.000000000 +0000
-+++ node-v12.2.0+iPhone/common.gypi 2019-05-21 16:27:29.881915067 +0000
++++ node-v12.2.0+iPhone/common.gypi 2019-05-22 20:29:16.888798582 +0000
@@ -95,7 +95,7 @@
'os_posix': 1,
'v8_postmortem_support%': 1,
@@ -46,16 +46,23 @@ diff -ur node-v12.2.0/common.gypi node-v12.2.0+iPhone/common.gypi
'xcode_settings': {
'OTHER_CFLAGS+': [
'-fno-omit-frame-pointer',
-@@ -425,7 +425,7 @@
+@@ -425,7 +425,14 @@
}],
],
}],
- ['OS=="mac"', {
++ ['OS=="ios"', {
++ 'cflags': [
++ '-fno-exceptions',
++ '-fno-rtti',
++ '-fno-strict-aliasing'
++ ],
++ }],
+ ['OS=="mac" or OS=="ios"', {
'defines': ['_DARWIN_USE_64_BIT_INODE=1'],
'xcode_settings': {
'ALWAYS_SEARCH_USER_PATHS': 'NO',
-@@ -436,7 +436,6 @@
+@@ -436,7 +443,6 @@
'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
'PREBINDING': 'NO', # No -Wl,-prebind
@@ -63,7 +70,7 @@ diff -ur node-v12.2.0/common.gypi node-v12.2.0+iPhone/common.gypi
'USE_HEADERMAP': 'NO',
'OTHER_CFLAGS': [
'-fno-strict-aliasing',
-@@ -465,6 +464,9 @@
+@@ -465,6 +471,9 @@
['target_arch=="x64"', {
'xcode_settings': {'ARCHS': ['x86_64']},
}],
@@ -75,7 +82,7 @@ diff -ur node-v12.2.0/common.gypi node-v12.2.0+iPhone/common.gypi
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
diff -ur node-v12.2.0/configure.py node-v12.2.0+iPhone/configure.py
--- node-v12.2.0/configure.py 2019-05-07 14:52:12.000000000 +0000
-+++ node-v12.2.0+iPhone/configure.py 2019-05-21 17:16:40.220236939 +0000
++++ node-v12.2.0+iPhone/configure.py 2019-05-22 20:06:51.092344228 +0000
@@ -44,7 +44,7 @@
parser = optparse.OptionParser()
@@ -96,7 +103,7 @@ diff -ur node-v12.2.0/configure.py node-v12.2.0+iPhone/configure.py
o['variables']['node_report'] = b(not options.without_report)
diff -ur node-v12.2.0/deps/brotli/brotli.gyp node-v12.2.0+iPhone/deps/brotli/brotli.gyp
--- node-v12.2.0/deps/brotli/brotli.gyp 2019-05-07 14:52:12.000000000 +0000
-+++ node-v12.2.0+iPhone/deps/brotli/brotli.gyp 2019-05-21 16:39:13.646278959 +0000
++++ node-v12.2.0+iPhone/deps/brotli/brotli.gyp 2019-05-22 20:06:51.092344228 +0000
@@ -15,7 +15,7 @@
'OS_FREEBSD'
]
@@ -108,7 +115,7 @@ diff -ur node-v12.2.0/deps/brotli/brotli.gyp node-v12.2.0+iPhone/deps/brotli/bro
]
diff -ur node-v12.2.0/deps/cares/cares.gyp node-v12.2.0+iPhone/deps/cares/cares.gyp
--- node-v12.2.0/deps/cares/cares.gyp 2019-05-07 14:52:12.000000000 +0000
-+++ node-v12.2.0+iPhone/deps/cares/cares.gyp 2019-05-21 16:35:48.518195450 +0000
++++ node-v12.2.0+iPhone/deps/cares/cares.gyp 2019-05-22 20:06:51.092344228 +0000
@@ -145,7 +145,7 @@
'include_dirs': [ 'config/linux' ],
'sources': [ 'config/linux/ares_config.h' ]
@@ -120,7 +127,7 @@ diff -ur node-v12.2.0/deps/cares/cares.gyp node-v12.2.0+iPhone/deps/cares/cares.
}],
diff -ur node-v12.2.0/deps/npm/node_modules/node-gyp/addon.gypi node-v12.2.0+iPhone/deps/npm/node_modules/node-gyp/addon.gypi
--- node-v12.2.0/deps/npm/node_modules/node-gyp/addon.gypi 2019-05-07 14:52:13.000000000 +0000
-+++ node-v12.2.0+iPhone/deps/npm/node_modules/node-gyp/addon.gypi 2019-05-21 16:39:50.534292795 +0000
++++ node-v12.2.0+iPhone/deps/npm/node_modules/node-gyp/addon.gypi 2019-05-22 20:06:51.096344229 +0000
@@ -79,7 +79,7 @@
],
@@ -132,7 +139,7 @@ diff -ur node-v12.2.0/deps/npm/node_modules/node-gyp/addon.gypi node-v12.2.0+iPh
],
diff -ur node-v12.2.0/deps/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp node-v12.2.0+iPhone/deps/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp
--- node-v12.2.0/deps/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp 2019-05-07 14:52:13.000000000 +0000
-+++ node-v12.2.0+iPhone/deps/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp 2019-05-21 17:12:33.672092688 +0000
++++ node-v12.2.0+iPhone/deps/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp 2019-05-22 20:06:51.096344229 +0000
@@ -545,12 +545,12 @@
'base/simd/scale_yuv_to_rgb_sse2_x64.asm',
],
@@ -195,17 +202,22 @@ diff -ur node-v12.2.0/deps/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/me
'dependencies': [
diff -ur node-v12.2.0/deps/uv/common.gypi node-v12.2.0+iPhone/deps/uv/common.gypi
--- node-v12.2.0/deps/uv/common.gypi 2019-05-07 14:52:14.000000000 +0000
-+++ node-v12.2.0+iPhone/deps/uv/common.gypi 2019-05-21 16:42:57.890362407 +0000
-@@ -168,7 +168,7 @@
++++ node-v12.2.0+iPhone/deps/uv/common.gypi 2019-05-22 20:12:28.512435406 +0000
+@@ -168,6 +168,13 @@
}],
],
}],
-- ['OS=="mac"', {
-+ ['OS=="mac" or OS=="ios"', {
++ ['OS=="ios"', {
++ 'cflags': [
++ '-fno-exceptions',
++ '-fno-rtti',
++ '-fno-threadsafe-statics'
++ ],
++ }],
+ ['OS=="mac"', {
'xcode_settings': {
'ALWAYS_SEARCH_USER_PATHS': 'NO',
- 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
-@@ -195,6 +195,9 @@
+@@ -195,6 +202,9 @@
['target_arch=="x64"', {
'xcode_settings': {'ARCHS': ['x86_64']},
}],
@@ -217,7 +229,7 @@ diff -ur node-v12.2.0/deps/uv/common.gypi node-v12.2.0+iPhone/deps/uv/common.gyp
['_type!="static_library"', {
diff -ur node-v12.2.0/deps/uv/uv.gyp node-v12.2.0+iPhone/deps/uv/uv.gyp
--- node-v12.2.0/deps/uv/uv.gyp 2019-05-07 14:52:14.000000000 +0000
-+++ node-v12.2.0+iPhone/deps/uv/uv.gyp 2019-05-21 16:43:40.962449173 +0000
++++ node-v12.2.0+iPhone/deps/uv/uv.gyp 2019-05-22 20:06:51.096344229 +0000
@@ -198,7 +198,7 @@
}],
],
@@ -229,7 +241,7 @@ diff -ur node-v12.2.0/deps/uv/uv.gyp node-v12.2.0+iPhone/deps/uv/uv.gyp
# in include/uv/version.h
diff -ur node-v12.2.0/node.gyp node-v12.2.0+iPhone/node.gyp
--- node-v12.2.0/node.gyp 2019-05-07 14:52:15.000000000 +0000
-+++ node-v12.2.0+iPhone/node.gyp 2019-05-21 16:51:35.455143755 +0000
++++ node-v12.2.0+iPhone/node.gyp 2019-05-22 20:06:51.096344229 +0000
@@ -760,7 +760,7 @@
'<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
],
@@ -259,7 +271,7 @@ diff -ur node-v12.2.0/node.gyp node-v12.2.0+iPhone/node.gyp
'action_name': 'node_dtrace_ustack_constants',
diff -ur node-v12.2.0/node.gypi node-v12.2.0+iPhone/node.gypi
--- node-v12.2.0/node.gypi 2019-05-07 14:52:15.000000000 +0000
-+++ node-v12.2.0+iPhone/node.gypi 2019-05-21 16:51:57.859168216 +0000
++++ node-v12.2.0+iPhone/node.gypi 2019-05-22 20:06:51.096344229 +0000
@@ -202,7 +202,7 @@
'dependencies': [ 'deps/brotli/brotli.gyp:brotli' ],
}],
@@ -269,3 +281,31 @@ diff -ur node-v12.2.0/node.gypi node-v12.2.0+iPhone/node.gypi
# linking Corefoundation is needed since certain OSX debugging tools
# like Instruments require it for some features
'libraries': [ '-framework CoreFoundation' ],
+diff -ur node-v12.2.0/tools/v8_gypfiles/d8.gyp node-v12.2.0+iPhone/tools/v8_gypfiles/d8.gyp
+--- node-v12.2.0/tools/v8_gypfiles/d8.gyp 2019-05-07 14:52:17.000000000 +0000
++++ node-v12.2.0+iPhone/tools/v8_gypfiles/d8.gyp 2019-05-22 20:23:51.476674163 +0000
+@@ -43,7 +43,7 @@
+ 'd8_js2c#host',
+ ],
+ }],
+- ['(OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="netbsd" \
++ ['(OS=="linux" or OS=="mac" or OS=="ios" or OS=="freebsd" or OS=="netbsd" \
+ or OS=="openbsd" or OS=="solaris" or OS=="android" \
+ or OS=="qnx" or OS=="aix")', {
+ 'sources': [ '../src/d8-posix.cc', ]
+diff -ur node-v12.2.0/tools/v8_gypfiles/v8.gyp node-v12.2.0+iPhone/tools/v8_gypfiles/v8.gyp
+--- node-v12.2.0/tools/v8_gypfiles/v8.gyp 2019-05-07 14:52:17.000000000 +0000
++++ node-v12.2.0+iPhone/tools/v8_gypfiles/v8.gyp 2019-05-22 20:22:56.508653556 +0000
+@@ -128,6 +128,12 @@
+ 'OTHER_LDFLAGS': ['-dynamiclib', '-all_load']
+ },
+ }],
++ ['OS=="ios"', {
++ 'ldflags': [
++ '-dynamiclib',
++ '-all_load'
++ ],
++ }],
+ ['soname_version!=""', {
+ 'product_extension': 'so.<(soname_version)',
+ }],
diff --git a/data/node/make.sh b/data/node/make.sh
index c2d288b3f..fc096737d 100644
--- a/data/node/make.sh
+++ b/data/node/make.sh
@@ -9,17 +9,18 @@ export LINK="${CC}"
export RANLIB="${PKG_TARG}-ranlib"
export SDKROOT="${PKG_ROOT}"
-export CC_host="gcc"
-export CXX_host="g++"
-export LINK_host="g++"
-export AR_host="ar"
+export CC_host="${HOSTCC:-clang}"
+export CXX_host="${HOSTCXX:-clang++}"
+export LINK_host="${CXX_host}"
+export AR_host="${HOSTAR:-ar}"
export CC_target="${CC}"
export CXX_target="${CXX}"
export LINK_target="${CXX}" # On purpose, see out/Makefile
export AR_target="${AR}"
+export GYP_CROSSCOMPILE=1
export GYP_DEFINES="target_arch=arm64 v8_target_arch=arm64 host_os=linux target_os=ios OS=ios"
-./configure --without-snapshot --dest-os=ios --dest-cpu=arm64 --with-intl=none --shared-zlib --openssl-no-asm
-make -j2
+./configure --without-snapshot --dest-os=ios --dest-cpu=arm64 --with-intl=none --shared-zlib --shared-cares --shared-openssl # --openssl-no-asm
+make