Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
patches: bump to 12.22.6, 14.17.6 and 16.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jesec committed Sep 5, 2021
1 parent 0e2cdcd commit 980c8a2
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 80 deletions.
53 changes: 25 additions & 28 deletions patches/node.v12.22.5.cpp.patch → patches/node.v12.22.6.cpp.patch
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,26 @@ index 0000000000..fb2d47f52b
'lib/internal/bootstrap/pre_execution.js',
'lib/internal/bootstrap/switches/does_own_process_state.js',
'lib/internal/bootstrap/switches/does_not_own_process_state.js',
@@ -430,6 +431,19 @@
'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
},
}],
+ [ 'enable_lto=="true"', {
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ # man ld -export_dynamic:
+ # Preserves all global symbols in main executables during LTO.
+ # Without this option, Link Time Optimization is allowed to
+ # inline and remove global functions. This option is used when
+ # a main executable may load a plug-in which requires certain
+ # symbols from the main executable.
+ '-Wl,-export_dynamic',
+ ],
+ },
+ }],
['OS=="win"', {
'libraries': [
'Dbghelp.lib',
--- node/src/inspector_agent.cc
+++ node/src/inspector_agent.cc
@@ -760,8 +760,6 @@ bool Agent::Start(const std::string& path,
Expand Down Expand Up @@ -551,10 +571,9 @@ index 0000000000..fb2d47f52b
// calls elsewhere in the program (e.g., any logging from V8.)
setvbuf(stdout, nullptr, _IONBF, 0);
setvbuf(stderr, nullptr, _IONBF, 0);
- return node::Start(argc, argv);
+ return reorder(argc, argv);
}
#endif
+}
+#endif
+
+#include <string.h>
+
Expand Down Expand Up @@ -594,8 +613,8 @@ index 0000000000..fb2d47f52b
+ argv[i] = &args[pos];
+ pos += strlen(argv[i]) + 1;
+ }
+ return node::Start(argc, argv);
+}
return node::Start(argc, argv);
}
+
+volatile char* BAKERY = (volatile char*) "\0// BAKERY // BAKERY " \
+ "// BAKERY // BAKERY // BAKERY // BAKERY // BAKERY // BAKERY " \
Expand All @@ -604,7 +623,7 @@ index 0000000000..fb2d47f52b
+
+#ifdef __clang__
+__attribute__((optnone))
+#endif
#endif
+int reorder(int argc, char** argv) {
+ int i;
+ char** nargv = new char*[argc + 64];
Expand Down Expand Up @@ -646,25 +665,3 @@ index 0000000000..fb2d47f52b
'cflags_cc!': [ '-fno-rtti' ],
}],
[ 'OS == "mac" or OS == "ios"', {
--- node/node.gyp
+++ node/node.gyp
@@ -236,6 +236,19 @@
'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
},
}],
+ [ 'enable_lto=="true"', {
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ # man ld -export_dynamic:
+ # Preserves all global symbols in main executables during LTO.
+ # Without this option, Link Time Optimization is allowed to
+ # inline and remove global functions. This option is used when
+ # a main executable may load a plug-in which requires certain
+ # symbols from the main executable.
+ '-Wl,-export_dynamic',
+ ],
+ },
+ }],
['OS=="win"', {
'libraries': [
'Dbghelp.lib',
42 changes: 20 additions & 22 deletions patches/node.v14.17.5.cpp.patch → patches/node.v14.17.6.cpp.patch
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,26 @@ index 0000000000..fb2d47f52b
'lib/internal/bootstrap/pre_execution.js',
'lib/internal/bootstrap/switches/does_own_process_state.js',
'lib/internal/bootstrap/switches/does_not_own_process_state.js',
@@ -446,6 +447,19 @@
'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
},
}],
+ [ 'enable_lto=="true"', {
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ # man ld -export_dynamic:
+ # Preserves all global symbols in main executables during LTO.
+ # Without this option, Link Time Optimization is allowed to
+ # inline and remove global functions. This option is used when
+ # a main executable may load a plug-in which requires certain
+ # symbols from the main executable.
+ '-Wl,-export_dynamic',
+ ],
+ },
+ }],
['OS=="win"', {
'libraries': [
'Dbghelp.lib',
--- node/src/inspector_agent.cc
+++ node/src/inspector_agent.cc
@@ -684,8 +684,6 @@ bool Agent::Start(const std::string& path,
Expand Down Expand Up @@ -534,25 +554,3 @@ index 0000000000..fb2d47f52b
'cflags_cc!': [ '-fno-rtti' ],
}],
[ 'OS == "mac" or OS == "ios"', {
--- node/node.gyp
+++ node/node.gyp
@@ -236,6 +236,19 @@
'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
},
}],
+ [ 'enable_lto=="true"', {
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ # man ld -export_dynamic:
+ # Preserves all global symbols in main executables during LTO.
+ # Without this option, Link Time Optimization is allowed to
+ # inline and remove global functions. This option is used when
+ # a main executable may load a plug-in which requires certain
+ # symbols from the main executable.
+ '-Wl,-export_dynamic',
+ ],
+ },
+ }],
['OS=="win"', {
'libraries': [
'Dbghelp.lib',
54 changes: 27 additions & 27 deletions patches/node.v16.7.0.cpp.patch → patches/node.v16.8.0.cpp.patch
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,28 @@ index 0000000000..fb2d47f52b
} catch (e) {
throw e; /* node-do-not-add-exception-line */
}
--- node/node.gyp
+++ node/node.gyp
@@ -236,6 +236,19 @@
'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
},
}],
+ [ 'enable_lto=="true"', {
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ # man ld -export_dynamic:
+ # Preserves all global symbols in main executables during LTO.
+ # Without this option, Link Time Optimization is allowed to
+ # inline and remove global functions. This option is used when
+ # a main executable may load a plug-in which requires certain
+ # symbols from the main executable.
+ '-Wl,-export_dynamic',
+ ],
+ },
+ }],
['OS=="win"', {
'libraries': [
'Dbghelp.lib',
--- node/src/inspector_agent.cc
+++ node/src/inspector_agent.cc
@@ -681,8 +681,6 @@ bool Agent::Start(const std::string& path,
Expand Down Expand Up @@ -310,7 +332,7 @@ index 0000000000..fb2d47f52b
using v8::Value;
using v8::WeakCallbackInfo;
using v8::WeakCallbackType;
@@ -707,11 +708,12 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
@@ -709,11 +710,12 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
Local<ArrayBufferView> cached_data_buf;
bool produce_cached_data = false;
Local<Context> parsing_context = context;
Expand All @@ -324,15 +346,15 @@ index 0000000000..fb2d47f52b
CHECK(args[2]->IsNumber());
line_offset = args[2].As<Int32>()->Value();
CHECK(args[3]->IsNumber());
@@ -730,6 +732,7 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
@@ -732,6 +734,7 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
CHECK_NOT_NULL(sandbox);
parsing_context = sandbox->context();
}
+ sourceless = args[7]->IsTrue();
}

ContextifyScript* contextify_script =
@@ -782,6 +785,10 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
@@ -784,6 +787,10 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
ShouldNotAbortOnUncaughtScope no_abort_scope(env);
Context::Scope scope(parsing_context);

Expand All @@ -343,7 +365,7 @@ index 0000000000..fb2d47f52b
MaybeLocal<UnboundScript> v8_script = ScriptCompiler::CompileUnboundScript(
isolate,
&source,
@@ -798,6 +805,13 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
@@ -800,6 +807,13 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
contextify_script);
return;
}
Expand All @@ -357,7 +379,7 @@ index 0000000000..fb2d47f52b
contextify_script->script_.Reset(isolate, v8_script.ToLocalChecked());

Local<Context> env_context = env->context();
@@ -824,6 +838,11 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
@@ -826,6 +840,11 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
env->cached_data_produced_string(),
Boolean::New(isolate, cached_data_produced)).Check();
}
Expand Down Expand Up @@ -487,25 +509,3 @@ index 0000000000..fb2d47f52b
'cflags_cc!': [ '-fno-rtti' ],
}],
[ 'OS == "mac" or OS == "ios"', {
--- node/node.gyp
+++ node/node.gyp
@@ -236,6 +236,19 @@
'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
},
}],
+ [ 'enable_lto=="true"', {
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ # man ld -export_dynamic:
+ # Preserves all global symbols in main executables during LTO.
+ # Without this option, Link Time Optimization is allowed to
+ # inline and remove global functions. This option is used when
+ # a main executable may load a plug-in which requires certain
+ # symbols from the main executable.
+ '-Wl,-export_dynamic',
+ ],
+ },
+ }],
['OS=="win"', {
'libraries': [
'Dbghelp.lib',
6 changes: 3 additions & 3 deletions patches/patches.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"v16.7.0": ["node.v16.7.0.cpp.patch"],
"v14.17.5": ["node.v14.17.5.cpp.patch"],
"v12.22.5": ["node.v12.22.5.cpp.patch"],
"v16.8.0": ["node.v16.8.0.cpp.patch"],
"v14.17.6": ["node.v14.17.6.cpp.patch"],
"v12.22.6": ["node.v12.22.6.cpp.patch"],
"v10.24.1": ["node.v10.24.1.cpp.patch"],
"v8.17.0": ["node.v8.17.0.cpp.patch"]
}

0 comments on commit 980c8a2

Please sign in to comment.