0003-Use-a-python-variable-instead-of-hardcoding-Python.patch 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. From 4a48c65921b0f05b621aef5b902b6aa54811ad7a Mon Sep 17 00:00:00 2001
  2. From: Martin Bark <martin@barkynet.com>
  3. Date: Tue, 30 Jun 2015 09:44:33 +0100
  4. Subject: [PATCH 3/4] Use a python variable instead of hardcoding Python
  5. The nodejs build system uses python in a number of locations. However,
  6. there are some locations where it hardcodes 'python' as the Python
  7. interpreter. However, this causes problems when we need to use python2
  8. instead of just python.
  9. This patch fixes that by using the python variable already in place in
  10. the nodejs build system.
  11. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  12. [Martin: adapt to 0.12.5]
  13. Signed-off-by: Martin Bark <martin@barkynet.com>
  14. [yann.morin.1998@free.fr: adapt to 4.1.2]
  15. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
  16. [Martin: adapt to 5.5.0]
  17. Signed-off-by: Martin Bark <martin@barkynet.com>
  18. ---
  19. deps/v8/tools/gyp/v8.gyp | 8 ++++----
  20. 1 file changed, 4 insertions(+), 4 deletions(-)
  21. diff --git a/deps/v8/tools/gyp/v8.gyp b/deps/v8/tools/gyp/v8.gyp
  22. index 1e5705d..e2e5dfe 100644
  23. --- a/deps/v8/tools/gyp/v8.gyp
  24. +++ b/deps/v8/tools/gyp/v8.gyp
  25. @@ -1723,14 +1723,14 @@
  26. '<(PRODUCT_DIR)/natives_blob_host.bin',
  27. ],
  28. 'action': [
  29. - 'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob_host.bin'
  30. + '<(python)', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob_host.bin'
  31. ],
  32. }, {
  33. 'outputs': [
  34. '<(PRODUCT_DIR)/natives_blob.bin',
  35. ],
  36. 'action': [
  37. - 'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
  38. + '<(python)', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
  39. ],
  40. }],
  41. ],
  42. @@ -1739,7 +1739,7 @@
  43. '<(PRODUCT_DIR)/natives_blob.bin',
  44. ],
  45. 'action': [
  46. - 'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
  47. + '<(python)', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
  48. ],
  49. }],
  50. ],
  51. @@ -1847,7 +1847,7 @@
  52. '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
  53. ],
  54. 'action': [
  55. - 'python',
  56. + '<(python)',
  57. '../../tools/js2c.py',
  58. '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
  59. 'CORE',
  60. @@ -1873,7 +1873,7 @@
  61. '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
  62. ],
  63. 'action': [
  64. - 'python',
  65. + '<(python)',
  66. '../../tools/js2c.py',
  67. '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
  68. 'EXPERIMENTAL',
  69. @@ -1898,7 +1898,7 @@
  70. '<(SHARED_INTERMEDIATE_DIR)/code-stub-libraries.cc',
  71. ],
  72. 'action': [
  73. - 'python',
  74. + '<(python)',
  75. '../../tools/js2c.py',
  76. '<(SHARED_INTERMEDIATE_DIR)/code-stub-libraries.cc',
  77. 'CODE_STUB',
  78. @@ -1923,7 +1923,7 @@
  79. '<(SHARED_INTERMEDIATE_DIR)/extras-libraries.cc',
  80. ],
  81. 'action': [
  82. - 'python',
  83. + '<(python)',
  84. '../../tools/js2c.py',
  85. '<(SHARED_INTERMEDIATE_DIR)/extras-libraries.cc',
  86. 'EXTRAS',
  87. @@ -1960,7 +1960,7 @@
  88. '<(SHARED_INTERMEDIATE_DIR)/debug-support.cc',
  89. ],
  90. 'action': [
  91. - 'python',
  92. + '<(python)',
  93. '../../tools/gen-postmortem-metadata.py',
  94. '<@(_outputs)',
  95. '<@(heapobject_files)'
  96. diff --git a/deps/v8/build/toolchain.gypi b/deps/v8/build/toolchain.gypi
  97. index c703155..06c0b2b 100644
  98. --- a/deps/v8/build/toolchain.gypi
  99. +++ b/deps/v8/build/toolchain.gypi
  100. @@ -38,7 +38,7 @@
  101. 'ubsan%': 0,
  102. 'ubsan_vptr%': 0,
  103. 'v8_target_arch%': '<(target_arch)',
  104. - 'v8_host_byteorder%': '<!(python -c "import sys; print sys.byteorder")',
  105. + 'v8_host_byteorder%': '<!(<(python) -c "import sys; print sys.byteorder")',
  106. # Native Client builds currently use the V8 ARM JIT and
  107. # arm/simulator-arm.cc to defer the significant effort required
  108. # for NaCl JIT support. The nacl_target_arch variable provides