nodejs-20.6.0-paxmarking.patch 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. diff --git a/node.gyp b/node.gyp
  2. index 49e39c3ce8..767ebc4e5f 100644
  3. --- a/node.gyp
  4. +++ b/node.gyp
  5. @@ -369,6 +369,7 @@
  6. 'src/quic/transportparams.h',
  7. ],
  8. 'node_mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)node_mksnapshot<(EXECUTABLE_SUFFIX)',
  9. + 'node_mksnapshot_u_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)node_mksnapshot_u<(EXECUTABLE_SUFFIX)',
  10. 'node_js2c_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)node_js2c<(EXECUTABLE_SUFFIX)',
  11. 'conditions': [
  12. ['GENERATOR == "ninja"', {
  13. @@ -626,11 +627,25 @@
  14. 'conditions': [
  15. ['node_snapshot_main!=""', {
  16. 'actions': [
  17. + {
  18. + 'action_name': 'run_pax_mksnapshot',
  19. + 'inputs': [
  20. + '<(node_mksnapshot_exec)',
  21. + ],
  22. + 'outputs': [
  23. + '<(node_mksnapshot_u_exec)',
  24. + ],
  25. + 'action': [
  26. + 'bash',
  27. + '-c',
  28. + 'mv <(node_mksnapshot_exec) <(node_mksnapshot_u_exec) && paxmark.sh m <(node_mksnapshot_u_exec)',
  29. + ],
  30. + },
  31. {
  32. 'action_name': 'node_mksnapshot',
  33. 'process_outputs_as_sources': 1,
  34. 'inputs': [
  35. - '<(node_mksnapshot_exec)',
  36. + '<(node_mksnapshot_u_exec)',
  37. '<(node_snapshot_main)',
  38. ],
  39. 'outputs': [
  40. diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp
  41. index f822c056e5..8b2820abf7 100644
  42. --- a/tools/v8_gypfiles/v8.gyp
  43. +++ b/tools/v8_gypfiles/v8.gyp
  44. @@ -9,6 +9,7 @@
  45. 'v8_vector_stores%': 0,
  46. 'v8_embed_script%': "",
  47. 'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)',
  48. + 'mksnapshot_u_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot_u<(EXECUTABLE_SUFFIX)',
  49. 'v8_os_page_size%': 0,
  50. 'generate_bytecode_output_root': '<(SHARED_INTERMEDIATE_DIR)/generate-bytecode-output-root',
  51. 'generate_bytecode_builtins_list_output': '<(generate_bytecode_output_root)/builtins-generated/bytecodes-builtins-list.h',
  52. @@ -1520,7 +1521,7 @@
  53. ],
  54. }, # bytecode_builtins_list_generator
  55. {
  56. - 'target_name': 'mksnapshot',
  57. + 'target_name': 'mksnapshot_u',
  58. 'type': 'executable',
  59. 'dependencies': [
  60. 'v8_base_without_compiler',
  61. @@ -1545,6 +1546,27 @@
  62. 'ldflags': [ '-fno-lto' ],
  63. }],
  64. ],
  65. + }, # mksnapshot_u
  66. + {
  67. + 'target_name': 'mksnapshot',
  68. + 'type': 'none',
  69. + 'dependencies': ['mksnapshot_u'],
  70. + 'actions': [
  71. + {
  72. + 'action_name': 'paxmark_mksnapshot',
  73. + 'inputs': [
  74. + '<(mksnapshot_u_exec)',
  75. + ],
  76. + 'outputs': [
  77. + '<(mksnapshot_exec)',
  78. + ],
  79. + 'action': [
  80. + 'bash',
  81. + '-c',
  82. + 'cp <(mksnapshot_u_exec) <(mksnapshot_exec) && paxmark.sh m <(mksnapshot_exec)'
  83. + ],
  84. + },
  85. + ],
  86. }, # mksnapshot
  87. {
  88. 'target_name': 'torque',