diff --git a/mingw-w64-nodejs/0001-Fix-python-invocation-to-python2.patch b/mingw-w64-nodejs/0001-Fix-python-invocation-to-python2.patch index 34062aff8b..a4e6374d99 100644 --- a/mingw-w64-nodejs/0001-Fix-python-invocation-to-python2.patch +++ b/mingw-w64-nodejs/0001-Fix-python-invocation-to-python2.patch @@ -1,96 +1,91 @@ -From 1ae864e84c7687fbe76bebbaf419a440d992a73b Mon Sep 17 00:00:00 2001 +From 2b030720acb6b4f573feec6c4466224eb7e28cc0 Mon Sep 17 00:00:00 2001 From: Alethea Rose Date: Tue, 14 Feb 2017 20:56:17 -0500 -Subject: [PATCH 01/11] Fix python invocation to python2 +Subject: [PATCH 01/23] Fix python invocation to python2 --- - common.gypi | 2 +- - configure | 2 +- - deps/cares/build/gcc_version.py | 2 +- - deps/cares/common.gypi | 2 +- - deps/cares/gyp_cares | 2 +- - deps/uv/gyp_uv.py | 2 +- - deps/v8/DEPS | 16 +++++++-------- - deps/v8/Makefile | 2 +- - deps/v8/Makefile.android | 2 +- - deps/v8/Makefile.nacl | 2 +- - deps/v8/build/coverage_wrapper.py | 2 +- - deps/v8/build/detect_v8_host_arch.py | 2 +- - deps/v8/build/download_gold_plugin.py | 4 ++-- - deps/v8/build/get_landmines.py | 2 +- - deps/v8/build/gyp_v8 | 2 +- - deps/v8/build/has_valgrind.py | 2 +- - deps/v8/build/isolate.gypi | 2 +- - deps/v8/build/landmines.py | 2 +- - deps/v8/build/shim_headers.gypi | 2 +- - deps/v8/build/standalone.gypi | 4 ++-- - deps/v8/build/toolchain.gypi | 2 +- - deps/v8/build/vs_toolchain.py | 2 +- - deps/v8/src/d8.gyp | 2 +- - deps/v8/tools/android-run.py | 2 +- - deps/v8/tools/concatenate-files.py | 2 +- - deps/v8/tools/disasm.py | 2 +- - deps/v8/tools/eval_gc_nvp.py | 2 +- - deps/v8/tools/external-reference-check.py | 2 +- - deps/v8/tools/find-commit-for-patch.py | 2 +- - deps/v8/tools/fuzz-harness.sh | 2 +- - deps/v8/tools/gc-nvp-to-csv.py | 2 +- - deps/v8/tools/gc-nvp-trace-processor.py | 2 +- - deps/v8/tools/gcmole/download_gcmole_tools.py | 2 +- - deps/v8/tools/gcmole/gcmole.lua | 2 +- - deps/v8/tools/gcmole/parallel.py | 2 +- - deps/v8/tools/gcmole/run-gcmole.py | 2 +- - deps/v8/tools/gen-postmortem-metadata.py | 2 +- - deps/v8/tools/generate-builtins-tests.py | 2 +- - .../generate_shim_headers/generate_shim_headers.py | 2 +- - deps/v8/tools/grokdump.py | 2 +- - deps/v8/tools/gyp/v8.gyp | 24 +++++++++++----------- - deps/v8/tools/isolate_driver.py | 2 +- - deps/v8/tools/js2c.py | 2 +- - deps/v8/tools/jsfunfuzz/download_jsfunfuzz.py | 2 +- - deps/v8/tools/jsfunfuzz/fuzz-harness.sh | 2 +- - deps/v8/tools/jsmin.py | 2 +- - deps/v8/tools/ll_prof.py | 2 +- - deps/v8/tools/mingw-generate-makefiles.sh | 2 +- - deps/v8/tools/nacl-run.py | 2 +- - deps/v8/tools/perf-to-html.py | 2 +- - deps/v8/tools/presubmit.py | 2 +- - deps/v8/tools/process-heap-prof.py | 2 +- - deps/v8/tools/release/auto_push.py | 2 +- - deps/v8/tools/release/auto_roll.py | 2 +- - deps/v8/tools/release/auto_tag.py | 2 +- - deps/v8/tools/release/check_clusterfuzz.py | 2 +- - deps/v8/tools/release/common_includes.py | 2 +- - deps/v8/tools/release/create_release.py | 2 +- - deps/v8/tools/release/git_recipes.py | 2 +- - deps/v8/tools/release/merge_to_branch.py | 2 +- - deps/v8/tools/release/mergeinfo.py | 2 +- - deps/v8/tools/release/push_to_candidates.py | 2 +- - deps/v8/tools/release/releases.py | 2 +- - deps/v8/tools/release/script_test.py | 2 +- - deps/v8/tools/release/search_related_commits.py | 2 +- - deps/v8/tools/release/test_scripts.py | 2 +- - .../tools/release/test_search_related_commits.py | 2 +- - deps/v8/tools/run-deopt-fuzzer.py | 2 +- - deps/v8/tools/run-valgrind.py | 2 +- - deps/v8/tools/run.py | 2 +- - deps/v8/tools/run_perf.py | 2 +- - deps/v8/tools/sanitizers/sancov_formatter.py | 2 +- - deps/v8/tools/sanitizers/sancov_merger.py | 2 +- - deps/v8/tools/sanitizers/sanitize_pcs.py | 2 +- - deps/v8/tools/stats-viewer.py | 2 +- - deps/v8/tools/test-server.py | 2 +- - deps/v8/tools/testrunner/local/pool.py | 2 +- - deps/v8/tools/testrunner/local/pool_unittest.py | 2 +- - deps/v8/tools/testrunner/server/daemon.py | 2 +- - deps/v8/tools/trace-maps-processor.py | 2 +- - deps/v8/tools/try_perf.py | 2 +- - deps/v8/tools/unittests/run_perf_test.py | 2 +- - deps/v8/tools/verify_source_deps.py | 2 +- - 83 files changed, 103 insertions(+), 103 deletions(-) + common.gypi | 2 +- + deps/cares/build/gcc_version.py | 2 +- + deps/cares/common.gypi | 2 +- + deps/cares/gyp_cares | 2 +- + deps/uv/gyp_uv.py | 2 +- + deps/v8/DEPS | 14 ++++++------ + deps/v8/Makefile | 2 +- + deps/v8/Makefile.android | 2 +- + deps/v8/gypfiles/coverage_wrapper.py | 2 +- + deps/v8/gypfiles/detect_v8_host_arch.py | 2 +- + deps/v8/gypfiles/get_landmines.py | 2 +- + deps/v8/gypfiles/gyp_v8 | 2 +- + deps/v8/gypfiles/isolate.gypi | 2 +- + deps/v8/gypfiles/landmines.py | 2 +- + deps/v8/gypfiles/run-tests-legacy.py | 2 +- + deps/v8/gypfiles/shim_headers.gypi | 2 +- + deps/v8/gypfiles/standalone.gypi | 4 ++-- + deps/v8/gypfiles/toolchain.gypi | 2 +- + deps/v8/gypfiles/vs_toolchain.py | 2 +- + deps/v8/src/d8.gyp | 2 +- + deps/v8/src/v8.gyp | 22 +++++++++---------- + deps/v8/tools/android-run.py | 2 +- + deps/v8/tools/concatenate-files.py | 2 +- + deps/v8/tools/disasm.py | 2 +- + deps/v8/tools/eval_gc_nvp.py | 2 +- + deps/v8/tools/find-commit-for-patch.py | 2 +- + deps/v8/tools/fuzz-harness.sh | 2 +- + deps/v8/tools/gc-nvp-to-csv.py | 2 +- + deps/v8/tools/gc-nvp-trace-processor.py | 2 +- + deps/v8/tools/gcmole/download_gcmole_tools.py | 2 +- + deps/v8/tools/gcmole/gcmole.lua | 2 +- + deps/v8/tools/gcmole/parallel.py | 2 +- + deps/v8/tools/gcmole/run-gcmole.py | 2 +- + deps/v8/tools/gen-postmortem-metadata.py | 2 +- + deps/v8/tools/generate-builtins-tests.py | 2 +- + .../generate_shim_headers.py | 2 +- + deps/v8/tools/grokdump.py | 2 +- + deps/v8/tools/isolate_driver.py | 2 +- + deps/v8/tools/js2c.py | 2 +- + deps/v8/tools/jsfunfuzz/download_jsfunfuzz.py | 2 +- + deps/v8/tools/jsfunfuzz/fuzz-harness.sh | 2 +- + deps/v8/tools/jsmin.py | 2 +- + deps/v8/tools/ll_prof.py | 2 +- + deps/v8/tools/mingw-generate-makefiles.sh | 2 +- + deps/v8/tools/perf-to-html.py | 2 +- + deps/v8/tools/presubmit.py | 2 +- + deps/v8/tools/process-heap-prof.py | 2 +- + deps/v8/tools/release/auto_push.py | 2 +- + deps/v8/tools/release/auto_roll.py | 2 +- + deps/v8/tools/release/auto_tag.py | 2 +- + deps/v8/tools/release/check_clusterfuzz.py | 2 +- + deps/v8/tools/release/common_includes.py | 2 +- + deps/v8/tools/release/create_release.py | 2 +- + deps/v8/tools/release/git_recipes.py | 2 +- + deps/v8/tools/release/merge_to_branch.py | 2 +- + deps/v8/tools/release/mergeinfo.py | 2 +- + deps/v8/tools/release/push_to_candidates.py | 2 +- + deps/v8/tools/release/releases.py | 2 +- + deps/v8/tools/release/script_test.py | 2 +- + .../tools/release/search_related_commits.py | 2 +- + deps/v8/tools/release/test_scripts.py | 2 +- + .../release/test_search_related_commits.py | 2 +- + deps/v8/tools/run-deopt-fuzzer.py | 2 +- + deps/v8/tools/run-valgrind.py | 2 +- + deps/v8/tools/run.py | 2 +- + deps/v8/tools/run_perf.py | 2 +- + deps/v8/tools/sanitizers/sancov_formatter.py | 2 +- + deps/v8/tools/sanitizers/sancov_merger.py | 2 +- + deps/v8/tools/sanitizers/sanitize_pcs.py | 2 +- + deps/v8/tools/stats-viewer.py | 2 +- + deps/v8/tools/test-server.py | 2 +- + deps/v8/tools/testrunner/local/pool.py | 2 +- + .../tools/testrunner/local/pool_unittest.py | 2 +- + deps/v8/tools/testrunner/server/daemon.py | 2 +- + deps/v8/tools/trace-maps-processor.py | 2 +- + deps/v8/tools/try_perf.py | 2 +- + deps/v8/tools/unittests/run_perf_test.py | 2 +- + deps/v8/tools/verify_source_deps.py | 2 +- + 78 files changed, 95 insertions(+), 95 deletions(-) diff --git a/common.gypi b/common.gypi -index af9c6ba..728ee67 100644 +index 99351610..8721d76f 100644 --- a/common.gypi +++ b/common.gypi @@ -9,7 +9,7 @@ @@ -102,18 +97,8 @@ index af9c6ba..728ee67 100644 'node_shared%': 'false', 'force_dynamic_crt%': 0, -diff --git a/configure b/configure -index 97b41ae..09f095e 100644 ---- a/configure -+++ b/configure -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - - import sys - if sys.version_info[0] != 2 or sys.version_info[1] not in (6, 7): diff --git a/deps/cares/build/gcc_version.py b/deps/cares/build/gcc_version.py -index da019e8..b4223af 100644 +index da019e86..b4223af7 100644 --- a/deps/cares/build/gcc_version.py +++ b/deps/cares/build/gcc_version.py @@ -1,4 +1,4 @@ @@ -123,7 +108,7 @@ index da019e8..b4223af 100644 import os import re diff --git a/deps/cares/common.gypi b/deps/cares/common.gypi -index 609ad62..c187196 100644 +index 609ad62a..c1871966 100644 --- a/deps/cares/common.gypi +++ b/deps/cares/common.gypi @@ -139,7 +139,7 @@ @@ -136,7 +121,7 @@ index 609ad62..c187196 100644 'cflags': [ '-Wall' ], 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ], diff --git a/deps/cares/gyp_cares b/deps/cares/gyp_cares -index d1f1640..ecd3f0a 100644 +index d1f1640e..ecd3f0ae 100755 --- a/deps/cares/gyp_cares +++ b/deps/cares/gyp_cares @@ -1,4 +1,4 @@ @@ -146,7 +131,7 @@ index d1f1640..ecd3f0a 100644 import glob import platform diff --git a/deps/uv/gyp_uv.py b/deps/uv/gyp_uv.py -index bd37d95..297059b 100644 +index bd37d95c..297059b5 100755 --- a/deps/uv/gyp_uv.py +++ b/deps/uv/gyp_uv.py @@ -1,4 +1,4 @@ @@ -156,19 +141,19 @@ index bd37d95..297059b 100644 import os import platform diff --git a/deps/v8/DEPS b/deps/v8/DEPS -index 0559523..15cb213 100644 +index 4b64895c..271892e9 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS -@@ -64,7 +64,7 @@ hooks = [ +@@ -79,7 +79,7 @@ hooks = [ 'name': 'landmines', 'pattern': '.', 'action': [ - 'python', + 'python2', - 'v8/build/landmines.py', + 'v8/gypfiles/landmines.py', ], }, -@@ -106,7 +106,7 @@ hooks = [ +@@ -121,7 +121,7 @@ hooks = [ 'name': 'gcmole', 'pattern': '.', 'action': [ @@ -177,7 +162,7 @@ index 0559523..15cb213 100644 'v8/tools/gcmole/download_gcmole_tools.py', ], }, -@@ -114,7 +114,7 @@ hooks = [ +@@ -129,7 +129,7 @@ hooks = [ 'name': 'jsfunfuzz', 'pattern': '.', 'action': [ @@ -186,7 +171,7 @@ index 0559523..15cb213 100644 'v8/tools/jsfunfuzz/download_jsfunfuzz.py', ], }, -@@ -190,7 +190,7 @@ hooks = [ +@@ -249,7 +249,7 @@ hooks = [ # Update the Windows toolchain if necessary. 'name': 'win_toolchain', 'pattern': '.', @@ -195,7 +180,7 @@ index 0559523..15cb213 100644 }, # Pull binutils for linux, enabled debug fission for faster linking / # debugging when used with clang on Ubuntu Precise. -@@ -199,7 +199,7 @@ hooks = [ +@@ -258,7 +258,7 @@ hooks = [ 'name': 'binutils', 'pattern': 'v8/third_party/binutils', 'action': [ @@ -204,15 +189,7 @@ index 0559523..15cb213 100644 'v8/third_party/binutils/download.py', ], }, -@@ -208,18 +208,18 @@ hooks = [ - # Note: This must run before the clang update. - 'name': 'gold_plugin', - 'pattern': '.', -- 'action': ['python', 'v8/build/download_gold_plugin.py'], -+ 'action': ['python2', 'v8/build/download_gold_plugin.py'], - }, - { - # Pull clang if needed or requested via GYP_DEFINES. +@@ -267,11 +267,11 @@ hooks = [ # Note: On Win, this should run after win_toolchain, as it may use it. 'name': 'clang', 'pattern': '.', @@ -222,15 +199,15 @@ index 0559523..15cb213 100644 { # A change to a .gyp, .gypi, or to GYP itself should run the generator. "pattern": ".", -- "action": ["python", "v8/build/gyp_v8"], -+ "action": ["python2", "v8/build/gyp_v8"], +- "action": ["python", "v8/gypfiles/gyp_v8", "--running-as-hook"], ++ "action": ["python2", "v8/gypfiles/gyp_v8", "--running-as-hook"], }, ] diff --git a/deps/v8/Makefile b/deps/v8/Makefile -index a0c08a6..66af786 100644 +index 167ebf8c..5f031c34 100644 --- a/deps/v8/Makefile +++ b/deps/v8/Makefile -@@ -311,7 +311,7 @@ $(ARCHES): $(addprefix $$@.,$(DEFAULT_MODES)) +@@ -318,7 +318,7 @@ $(ARCHES): $(addprefix $$@.,$(DEFAULT_MODES)) $(BUILDS): $(OUTDIR)/Makefile.$$@ @$(MAKE) -C "$(OUTDIR)" -f Makefile.$@ \ BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \ @@ -240,7 +217,7 @@ index a0c08a6..66af786 100644 builddir="$(shell pwd)/$(OUTDIR)/$@" diff --git a/deps/v8/Makefile.android b/deps/v8/Makefile.android -index c49cb85..d1c9699 100644 +index 41715217..1f84adb7 100644 --- a/deps/v8/Makefile.android +++ b/deps/v8/Makefile.android @@ -58,7 +58,7 @@ DEFINES += OS=android @@ -252,92 +229,50 @@ index c49cb85..d1c9699 100644 builddir="$(shell pwd)/$(OUTDIR)/$@" # Android GYP file generation targets. -diff --git a/deps/v8/Makefile.nacl b/deps/v8/Makefile.nacl -index 3459c42..bb7fc31 100644 ---- a/deps/v8/Makefile.nacl -+++ b/deps/v8/Makefile.nacl -@@ -80,7 +80,7 @@ $(NACL_BUILDS): $(NACL_MAKEFILES) - LD="$(NACL_TOOLCHAIN)/bin/pnacl-ld" \ - LINK=${NACL_LINK} \ - BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \ -- python -c "print raw_input().capitalize()") \ -+ python2 -c "print raw_input().capitalize()") \ - builddir="$(shell pwd)/$(OUTDIR)/$@" - - # NACL GYP file generation targets. -diff --git a/deps/v8/build/coverage_wrapper.py b/deps/v8/build/coverage_wrapper.py -index 5b365d8..3fd6cfa 100644 ---- a/deps/v8/build/coverage_wrapper.py -+++ b/deps/v8/build/coverage_wrapper.py +diff --git a/deps/v8/gypfiles/coverage_wrapper.py b/deps/v8/gypfiles/coverage_wrapper.py +index d5fdee43..ee26b8e6 100755 +--- a/deps/v8/gypfiles/coverage_wrapper.py ++++ b/deps/v8/gypfiles/coverage_wrapper.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright 2016 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -diff --git a/deps/v8/build/detect_v8_host_arch.py b/deps/v8/build/detect_v8_host_arch.py -index 89e8286..87ad379 100644 ---- a/deps/v8/build/detect_v8_host_arch.py -+++ b/deps/v8/build/detect_v8_host_arch.py +diff --git a/deps/v8/gypfiles/detect_v8_host_arch.py b/deps/v8/gypfiles/detect_v8_host_arch.py +index 89e8286e..87ad3792 100644 +--- a/deps/v8/gypfiles/detect_v8_host_arch.py ++++ b/deps/v8/gypfiles/detect_v8_host_arch.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright 2014 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are -diff --git a/deps/v8/build/download_gold_plugin.py b/deps/v8/build/download_gold_plugin.py -index b8131fd..81e04e1 100644 ---- a/deps/v8/build/download_gold_plugin.py -+++ b/deps/v8/build/download_gold_plugin.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - # Copyright 2015 the V8 project authors. All rights reserved. - # Copyright 2015 The Chromium Authors. All rights reserved. - # Use of this source code is governed by a BSD-style license that can be -@@ -70,7 +70,7 @@ def main(): - # (currently aborts with exit code 1, - # https://github.com/GoogleCloudPlatform/gsutil/issues/289) or change the - # stdin->stderr redirect in update.py to do something else (crbug.com/494442). -- subprocess.check_call(['python', GSUTIL_PATH, -+ subprocess.check_call(['python2', GSUTIL_PATH, - 'cp', remote_path, targz_name], - stderr=open('/dev/null', 'w')) - subprocess.check_call(['tar', 'xzf', targz_name]) -diff --git a/deps/v8/build/get_landmines.py b/deps/v8/build/get_landmines.py -index 2bbf7a6..f1b7e9d 100644 ---- a/deps/v8/build/get_landmines.py -+++ b/deps/v8/build/get_landmines.py +diff --git a/deps/v8/gypfiles/get_landmines.py b/deps/v8/gypfiles/get_landmines.py +index 6137648e..69f29815 100755 +--- a/deps/v8/gypfiles/get_landmines.py ++++ b/deps/v8/gypfiles/get_landmines.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright 2014 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -diff --git a/deps/v8/build/gyp_v8 b/deps/v8/build/gyp_v8 -index 8813f2c..e8ea57c 100644 ---- a/deps/v8/build/gyp_v8 -+++ b/deps/v8/build/gyp_v8 +diff --git a/deps/v8/gypfiles/gyp_v8 b/deps/v8/gypfiles/gyp_v8 +index b8b5f742..a8715368 100755 +--- a/deps/v8/gypfiles/gyp_v8 ++++ b/deps/v8/gypfiles/gyp_v8 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Copyright 2012 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without -diff --git a/deps/v8/build/has_valgrind.py b/deps/v8/build/has_valgrind.py -index 83a848d..cfb8605 100644 ---- a/deps/v8/build/has_valgrind.py -+++ b/deps/v8/build/has_valgrind.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - # Copyright 2016 the V8 project authors. All rights reserved. - # Use of this source code is governed by a BSD-style license that can be - # found in the LICENSE file. -diff --git a/deps/v8/build/isolate.gypi b/deps/v8/build/isolate.gypi -index 4cfbbfd..5698bde 100644 ---- a/deps/v8/build/isolate.gypi -+++ b/deps/v8/build/isolate.gypi +diff --git a/deps/v8/gypfiles/isolate.gypi b/deps/v8/gypfiles/isolate.gypi +index 149818c8..ba25cdc5 100644 +--- a/deps/v8/gypfiles/isolate.gypi ++++ b/deps/v8/gypfiles/isolate.gypi @@ -52,7 +52,7 @@ '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated', ], @@ -347,20 +282,30 @@ index 4cfbbfd..5698bde 100644 '<(DEPTH)/tools/isolate_driver.py', '<(test_isolation_mode)', '--isolated', '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated', -diff --git a/deps/v8/build/landmines.py b/deps/v8/build/landmines.py -index 97c6390..215d8c0 100644 ---- a/deps/v8/build/landmines.py -+++ b/deps/v8/build/landmines.py +diff --git a/deps/v8/gypfiles/landmines.py b/deps/v8/gypfiles/landmines.py +index 2a81c66d..49901b10 100755 +--- a/deps/v8/gypfiles/landmines.py ++++ b/deps/v8/gypfiles/landmines.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright 2014 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -diff --git a/deps/v8/build/shim_headers.gypi b/deps/v8/build/shim_headers.gypi -index 940211c..7e21773 100644 ---- a/deps/v8/build/shim_headers.gypi -+++ b/deps/v8/build/shim_headers.gypi +diff --git a/deps/v8/gypfiles/run-tests-legacy.py b/deps/v8/gypfiles/run-tests-legacy.py +index f1ea478c..4391c375 100755 +--- a/deps/v8/gypfiles/run-tests-legacy.py ++++ b/deps/v8/gypfiles/run-tests-legacy.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python2 + # Copyright 2017 the V8 project authors. All rights reserved. + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. +diff --git a/deps/v8/gypfiles/shim_headers.gypi b/deps/v8/gypfiles/shim_headers.gypi +index 940211c2..7e21773c 100644 +--- a/deps/v8/gypfiles/shim_headers.gypi ++++ b/deps/v8/gypfiles/shim_headers.gypi @@ -62,7 +62,7 @@ 'outputs': [ ' build/gyp/gyp.mingw << EOF + cat > tools/gyp/gyp.mingw << EOF -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be -diff --git a/deps/v8/tools/nacl-run.py b/deps/v8/tools/nacl-run.py -index 32055fe..edcc08f 100644 ---- a/deps/v8/tools/nacl-run.py -+++ b/deps/v8/tools/nacl-run.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - # - # Copyright 2013 the V8 project authors. All rights reserved. - # Redistribution and use in source and binary forms, with or without diff --git a/deps/v8/tools/perf-to-html.py b/deps/v8/tools/perf-to-html.py -index 63faeb1..3a68c60 100644 +index 7ec9c50f..6c14287d 100755 --- a/deps/v8/tools/perf-to-html.py +++ b/deps/v8/tools/perf-to-html.py @@ -1,4 +1,4 @@ @@ -812,7 +728,7 @@ index 63faeb1..3a68c60 100644 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/deps/v8/tools/presubmit.py b/deps/v8/tools/presubmit.py -index dd3533b..5fbc677 100644 +index 99486cce..01973e47 100755 --- a/deps/v8/tools/presubmit.py +++ b/deps/v8/tools/presubmit.py @@ -1,4 +1,4 @@ @@ -822,7 +738,7 @@ index dd3533b..5fbc677 100644 # Copyright 2012 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without diff --git a/deps/v8/tools/process-heap-prof.py b/deps/v8/tools/process-heap-prof.py -index a26cbf1..c7a4e6e 100644 +index a26cbf15..c7a4e6e5 100755 --- a/deps/v8/tools/process-heap-prof.py +++ b/deps/v8/tools/process-heap-prof.py @@ -1,4 +1,4 @@ @@ -832,7 +748,7 @@ index a26cbf1..c7a4e6e 100644 # Copyright 2009 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without diff --git a/deps/v8/tools/release/auto_push.py b/deps/v8/tools/release/auto_push.py -index ca9e5e8..5b91dec 100644 +index ca9e5e87..5b91dec6 100755 --- a/deps/v8/tools/release/auto_push.py +++ b/deps/v8/tools/release/auto_push.py @@ -1,4 +1,4 @@ @@ -842,7 +758,7 @@ index ca9e5e8..5b91dec 100644 # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are diff --git a/deps/v8/tools/release/auto_roll.py b/deps/v8/tools/release/auto_roll.py -index b71cac5..891b34a 100644 +index da4cc7ef..7b02e06f 100755 --- a/deps/v8/tools/release/auto_roll.py +++ b/deps/v8/tools/release/auto_roll.py @@ -1,4 +1,4 @@ @@ -852,7 +768,7 @@ index b71cac5..891b34a 100644 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/deps/v8/tools/release/auto_tag.py b/deps/v8/tools/release/auto_tag.py -index a52a028..b71c19c 100644 +index a52a0286..b71c19cd 100755 --- a/deps/v8/tools/release/auto_tag.py +++ b/deps/v8/tools/release/auto_tag.py @@ -1,4 +1,4 @@ @@ -862,7 +778,7 @@ index a52a028..b71c19c 100644 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/deps/v8/tools/release/check_clusterfuzz.py b/deps/v8/tools/release/check_clusterfuzz.py -index cd73051..ad4297d 100644 +index 0fdffd93..213a2fc1 100755 --- a/deps/v8/tools/release/check_clusterfuzz.py +++ b/deps/v8/tools/release/check_clusterfuzz.py @@ -1,4 +1,4 @@ @@ -872,7 +788,7 @@ index cd73051..ad4297d 100644 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/deps/v8/tools/release/common_includes.py b/deps/v8/tools/release/common_includes.py -index 5c03236..59c390e 100644 +index d295e37d..6af45662 100644 --- a/deps/v8/tools/release/common_includes.py +++ b/deps/v8/tools/release/common_includes.py @@ -1,4 +1,4 @@ @@ -882,7 +798,7 @@ index 5c03236..59c390e 100644 # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are diff --git a/deps/v8/tools/release/create_release.py b/deps/v8/tools/release/create_release.py -index 7477ea1..8915f7f 100644 +index e5c2114b..48d713a3 100755 --- a/deps/v8/tools/release/create_release.py +++ b/deps/v8/tools/release/create_release.py @@ -1,4 +1,4 @@ @@ -892,7 +808,7 @@ index 7477ea1..8915f7f 100644 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/deps/v8/tools/release/git_recipes.py b/deps/v8/tools/release/git_recipes.py -index 89fd7c9..03bb62e 100644 +index d831aa3a..de8d032d 100644 --- a/deps/v8/tools/release/git_recipes.py +++ b/deps/v8/tools/release/git_recipes.py @@ -1,4 +1,4 @@ @@ -902,7 +818,7 @@ index 89fd7c9..03bb62e 100644 # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are diff --git a/deps/v8/tools/release/merge_to_branch.py b/deps/v8/tools/release/merge_to_branch.py -index 699fe1b..ea72b4a 100644 +index 877d121b..5fa337b7 100755 --- a/deps/v8/tools/release/merge_to_branch.py +++ b/deps/v8/tools/release/merge_to_branch.py @@ -1,4 +1,4 @@ @@ -912,7 +828,7 @@ index 699fe1b..ea72b4a 100644 # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are diff --git a/deps/v8/tools/release/mergeinfo.py b/deps/v8/tools/release/mergeinfo.py -index 7f8b9cb..0035a83 100644 +index 1e29ece9..b28f5e1a 100755 --- a/deps/v8/tools/release/mergeinfo.py +++ b/deps/v8/tools/release/mergeinfo.py @@ -1,4 +1,4 @@ @@ -922,7 +838,7 @@ index 7f8b9cb..0035a83 100644 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/deps/v8/tools/release/push_to_candidates.py b/deps/v8/tools/release/push_to_candidates.py -index 750794e..299771a 100644 +index 538b9887..cf02a884 100755 --- a/deps/v8/tools/release/push_to_candidates.py +++ b/deps/v8/tools/release/push_to_candidates.py @@ -1,4 +1,4 @@ @@ -932,7 +848,7 @@ index 750794e..299771a 100644 # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are diff --git a/deps/v8/tools/release/releases.py b/deps/v8/tools/release/releases.py -index 7b659cc..61b2eec 100644 +index 7b659ccb..61b2eecb 100755 --- a/deps/v8/tools/release/releases.py +++ b/deps/v8/tools/release/releases.py @@ -1,4 +1,4 @@ @@ -942,7 +858,7 @@ index 7b659cc..61b2eec 100644 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/deps/v8/tools/release/script_test.py b/deps/v8/tools/release/script_test.py -index cbb2134..3d2adcf 100644 +index b9a17e97..3e16eb6c 100755 --- a/deps/v8/tools/release/script_test.py +++ b/deps/v8/tools/release/script_test.py @@ -1,4 +1,4 @@ @@ -952,7 +868,7 @@ index cbb2134..3d2adcf 100644 # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are diff --git a/deps/v8/tools/release/search_related_commits.py b/deps/v8/tools/release/search_related_commits.py -index d27aa56..bf016d1 100644 +index d27aa56f..bf016d17 100755 --- a/deps/v8/tools/release/search_related_commits.py +++ b/deps/v8/tools/release/search_related_commits.py @@ -1,4 +1,4 @@ @@ -962,7 +878,7 @@ index d27aa56..bf016d1 100644 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/deps/v8/tools/release/test_scripts.py b/deps/v8/tools/release/test_scripts.py -index 05457c9..9844530 100644 +index 42bbd5a0..10fd6083 100755 --- a/deps/v8/tools/release/test_scripts.py +++ b/deps/v8/tools/release/test_scripts.py @@ -1,4 +1,4 @@ @@ -972,7 +888,7 @@ index 05457c9..9844530 100644 # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are diff --git a/deps/v8/tools/release/test_search_related_commits.py b/deps/v8/tools/release/test_search_related_commits.py -index cf61236..3eca10e 100644 +index cf612361..3eca10e8 100755 --- a/deps/v8/tools/release/test_search_related_commits.py +++ b/deps/v8/tools/release/test_search_related_commits.py @@ -1,4 +1,4 @@ @@ -982,7 +898,7 @@ index cf61236..3eca10e 100644 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/deps/v8/tools/run-deopt-fuzzer.py b/deps/v8/tools/run-deopt-fuzzer.py -index 970aa8e..e93e73d 100644 +index 1f50e026..befa7b3b 100755 --- a/deps/v8/tools/run-deopt-fuzzer.py +++ b/deps/v8/tools/run-deopt-fuzzer.py @@ -1,4 +1,4 @@ @@ -992,7 +908,7 @@ index 970aa8e..e93e73d 100644 # Copyright 2012 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without diff --git a/deps/v8/tools/run-valgrind.py b/deps/v8/tools/run-valgrind.py -index e3f84f5..de78300 100644 +index e3f84f58..de783004 100755 --- a/deps/v8/tools/run-valgrind.py +++ b/deps/v8/tools/run-valgrind.py @@ -1,4 +1,4 @@ @@ -1002,7 +918,7 @@ index e3f84f5..de78300 100644 # Copyright 2009 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without diff --git a/deps/v8/tools/run.py b/deps/v8/tools/run.py -index 5a656e1..c6fc589 100644 +index 5a656e19..c6fc5894 100755 --- a/deps/v8/tools/run.py +++ b/deps/v8/tools/run.py @@ -1,4 +1,4 @@ @@ -1012,7 +928,7 @@ index 5a656e1..c6fc589 100644 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/deps/v8/tools/run_perf.py b/deps/v8/tools/run_perf.py -index db4245f..aa48704 100644 +index b22a4f11..76ee8c5b 100755 --- a/deps/v8/tools/run_perf.py +++ b/deps/v8/tools/run_perf.py @@ -1,4 +1,4 @@ @@ -1022,7 +938,7 @@ index db4245f..aa48704 100644 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/deps/v8/tools/sanitizers/sancov_formatter.py b/deps/v8/tools/sanitizers/sancov_formatter.py -index 4f3ea9e..5845fa1 100644 +index 2e168fb0..71fe8e67 100755 --- a/deps/v8/tools/sanitizers/sancov_formatter.py +++ b/deps/v8/tools/sanitizers/sancov_formatter.py @@ -1,4 +1,4 @@ @@ -1032,7 +948,7 @@ index 4f3ea9e..5845fa1 100644 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/deps/v8/tools/sanitizers/sancov_merger.py b/deps/v8/tools/sanitizers/sancov_merger.py -index a4cfec1..347401e 100644 +index 867f8b42..7e256437 100755 --- a/deps/v8/tools/sanitizers/sancov_merger.py +++ b/deps/v8/tools/sanitizers/sancov_merger.py @@ -1,4 +1,4 @@ @@ -1042,7 +958,7 @@ index a4cfec1..347401e 100644 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/deps/v8/tools/sanitizers/sanitize_pcs.py b/deps/v8/tools/sanitizers/sanitize_pcs.py -index 47f2715..df58ff6 100644 +index 47f27150..df58ff6b 100755 --- a/deps/v8/tools/sanitizers/sanitize_pcs.py +++ b/deps/v8/tools/sanitizers/sanitize_pcs.py @@ -1,4 +1,4 @@ @@ -1052,7 +968,7 @@ index 47f2715..df58ff6 100644 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/deps/v8/tools/stats-viewer.py b/deps/v8/tools/stats-viewer.py -index ab8e287..702151d 100644 +index e8fc69e3..89b0da62 100755 --- a/deps/v8/tools/stats-viewer.py +++ b/deps/v8/tools/stats-viewer.py @@ -1,4 +1,4 @@ @@ -1062,7 +978,7 @@ index ab8e287..702151d 100644 # Copyright 2008 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without diff --git a/deps/v8/tools/test-server.py b/deps/v8/tools/test-server.py -index ab927de..a94b61a 100644 +index ab927de7..a94b61ad 100755 --- a/deps/v8/tools/test-server.py +++ b/deps/v8/tools/test-server.py @@ -1,4 +1,4 @@ @@ -1072,7 +988,7 @@ index ab927de..a94b61a 100644 # Copyright 2012 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without diff --git a/deps/v8/tools/testrunner/local/pool.py b/deps/v8/tools/testrunner/local/pool.py -index 99996ee..4682378 100644 +index 99996ee3..4682378e 100644 --- a/deps/v8/tools/testrunner/local/pool.py +++ b/deps/v8/tools/testrunner/local/pool.py @@ -1,4 +1,4 @@ @@ -1082,7 +998,7 @@ index 99996ee..4682378 100644 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/deps/v8/tools/testrunner/local/pool_unittest.py b/deps/v8/tools/testrunner/local/pool_unittest.py -index 335d20a..7e89d8b 100644 +index 235eca63..3b584157 100644 --- a/deps/v8/tools/testrunner/local/pool_unittest.py +++ b/deps/v8/tools/testrunner/local/pool_unittest.py @@ -1,4 +1,4 @@ @@ -1092,7 +1008,7 @@ index 335d20a..7e89d8b 100644 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/deps/v8/tools/testrunner/server/daemon.py b/deps/v8/tools/testrunner/server/daemon.py -index baa66fb..26a58c8 100644 +index baa66fbe..26a58c8c 100644 --- a/deps/v8/tools/testrunner/server/daemon.py +++ b/deps/v8/tools/testrunner/server/daemon.py @@ -1,4 +1,4 @@ @@ -1102,7 +1018,7 @@ index baa66fb..26a58c8 100644 # This code has been written by Sander Marechal and published at: # http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ diff --git a/deps/v8/tools/trace-maps-processor.py b/deps/v8/tools/trace-maps-processor.py -index bf8c8a8..3397998 100644 +index bf8c8a8c..33979984 100755 --- a/deps/v8/tools/trace-maps-processor.py +++ b/deps/v8/tools/trace-maps-processor.py @@ -1,4 +1,4 @@ @@ -1112,7 +1028,7 @@ index bf8c8a8..3397998 100644 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/deps/v8/tools/try_perf.py b/deps/v8/tools/try_perf.py -index fbd4036..0948dcf 100644 +index 17eb0706..10e8da42 100755 --- a/deps/v8/tools/try_perf.py +++ b/deps/v8/tools/try_perf.py @@ -1,4 +1,4 @@ @@ -1122,7 +1038,7 @@ index fbd4036..0948dcf 100644 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/deps/v8/tools/unittests/run_perf_test.py b/deps/v8/tools/unittests/run_perf_test.py -index 1a4d738..b0a576d 100644 +index e7342e6a..c43f2b0d 100644 --- a/deps/v8/tools/unittests/run_perf_test.py +++ b/deps/v8/tools/unittests/run_perf_test.py @@ -1,4 +1,4 @@ @@ -1132,7 +1048,7 @@ index 1a4d738..b0a576d 100644 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/deps/v8/tools/verify_source_deps.py b/deps/v8/tools/verify_source_deps.py -index 50caace..7120d64 100644 +index c49d51ab..7ddfe702 100755 --- a/deps/v8/tools/verify_source_deps.py +++ b/deps/v8/tools/verify_source_deps.py @@ -1,4 +1,4 @@ @@ -1142,5 +1058,5 @@ index 50caace..7120d64 100644 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -- -2.13.0 +2.17.0.windows.1 diff --git a/mingw-w64-nodejs/0002-Fix-system-icu-build.patch b/mingw-w64-nodejs/0002-Fix-system-icu-build.patch index 9d8a3c7c3c..e5bcde809d 100644 --- a/mingw-w64-nodejs/0002-Fix-system-icu-build.patch +++ b/mingw-w64-nodejs/0002-Fix-system-icu-build.patch @@ -1,18 +1,18 @@ -From 10a45283de5a9e5e1f41a9d261648e783eab075a Mon Sep 17 00:00:00 2001 +From 7bc5feded40409da3a615cacd8593e6d3fedaa0f Mon Sep 17 00:00:00 2001 From: Alethea Rose Date: Tue, 14 Feb 2017 21:43:31 -0500 -Subject: [PATCH 02/11] Fix system-icu build +Subject: [PATCH 02/23] Fix system-icu build --- - deps/v8/tools/gyp/v8.gyp | 5 ----- + deps/v8/src/v8.gyp | 5 ----- 1 file changed, 5 deletions(-) -diff --git a/deps/v8/tools/gyp/v8.gyp b/deps/v8/tools/gyp/v8.gyp -index e1ba0b1..8323075 100644 ---- a/deps/v8/tools/gyp/v8.gyp -+++ b/deps/v8/tools/gyp/v8.gyp -@@ -1637,11 +1637,6 @@ - '../../src/i18n.h', +diff --git a/deps/v8/src/v8.gyp b/deps/v8/src/v8.gyp +index e1d4aea0..05204ef2 100644 +--- a/deps/v8/src/v8.gyp ++++ b/deps/v8/src/v8.gyp +@@ -1818,11 +1818,6 @@ + 'runtime/runtime-intl.cc', ], }], - ['OS=="win" and v8_enable_i18n_support==1', { @@ -20,9 +20,9 @@ index e1ba0b1..8323075 100644 - '<(icu_gyp_path):icudata', - ], - }], - ['icu_use_data_file_flag==1', { - 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE'], - }, { # else icu_use_data_file_flag !=1 + ], + }, + { -- -2.13.0 +2.17.0.windows.1 diff --git a/mingw-w64-nodejs/0003-Include-win32-headers.h-in-v8-atomicops.h.patch b/mingw-w64-nodejs/0003-Include-win32-headers.h-in-v8-atomicops.h.patch index 5899d88534..aca4beba56 100644 --- a/mingw-w64-nodejs/0003-Include-win32-headers.h-in-v8-atomicops.h.patch +++ b/mingw-w64-nodejs/0003-Include-win32-headers.h-in-v8-atomicops.h.patch @@ -1,27 +1,29 @@ -From e05442d383e30a2387f659d579d7d19fe923a621 Mon Sep 17 00:00:00 2001 +From 71b0c4625ab94d7632a061dccaf665fce80dd22c Mon Sep 17 00:00:00 2001 From: Alethea Rose Date: Tue, 14 Feb 2017 22:26:28 -0500 -Subject: [PATCH 03/11] Include win32-headers.h in v8/atomicops.h +Subject: [PATCH 03/23] Include win32-headers.h in v8/atomicops.h +[jes: this may not be needed anymore... another instance where a good +commit message would save a ton of time!] --- deps/v8/src/base/atomicops.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deps/v8/src/base/atomicops.h b/deps/v8/src/base/atomicops.h -index ea33e48..ac759ad 100644 +index c4c28f70..30384303 100644 --- a/deps/v8/src/base/atomicops.h +++ b/deps/v8/src/base/atomicops.h -@@ -28,6 +28,10 @@ - #include +@@ -36,6 +36,10 @@ + #include "src/base/base-export.h" #include "src/base/build_config.h" +#if defined(_WIN32) +#include "win32-headers.h" +#endif + - #if defined(_WIN32) && defined(V8_HOST_ARCH_64_BIT) - // windows.h #defines this (only on x64). This causes problems because the - // public API also uses MemoryBarrier at the public name for this fence. So, on + namespace v8 { + namespace base { + -- -2.13.0 +2.17.0.windows.1 diff --git a/mingw-w64-nodejs/0004-Define-localtime_s-for-MinGW.patch b/mingw-w64-nodejs/0004-Define-localtime_s-for-MinGW.patch index 819866bcb3..3994b25030 100644 --- a/mingw-w64-nodejs/0004-Define-localtime_s-for-MinGW.patch +++ b/mingw-w64-nodejs/0004-Define-localtime_s-for-MinGW.patch @@ -1,17 +1,17 @@ -From 5d265a18a1f28651f942b554613c636ab1ebcb4c Mon Sep 17 00:00:00 2001 +From fa7be56b0c792732aaa07b1f778987c51f38b810 Mon Sep 17 00:00:00 2001 From: Alethea Rose Date: Tue, 14 Feb 2017 23:07:39 -0500 -Subject: [PATCH 04/11] Define localtime_s for MinGW +Subject: [PATCH 04/23] Define localtime_s for MinGW --- deps/v8/src/base/platform/platform-win32.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/deps/v8/src/base/platform/platform-win32.cc b/deps/v8/src/base/platform/platform-win32.cc -index 0076a35..85c115e 100644 +index 7ce0a0d5..9453a673 100644 --- a/deps/v8/src/base/platform/platform-win32.cc +++ b/deps/v8/src/base/platform/platform-win32.cc -@@ -42,8 +42,6 @@ inline void MemoryBarrier() { +@@ -42,8 +42,6 @@ inline void MemoryFence() { __asm__ __volatile__("xchgl %%eax,%0 ":"=r" (barrier)); } @@ -19,8 +19,8 @@ index 0076a35..85c115e 100644 - int localtime_s(tm* out_tm, const time_t* time) { - tm* posix_local_time_struct = localtime(time); // NOLINT -@@ -52,6 +50,7 @@ int localtime_s(tm* out_tm, const time_t* time) { + tm* posix_local_time_struct = localtime_r(time, out_tm); +@@ -51,6 +49,7 @@ int localtime_s(tm* out_tm, const time_t* time) { return 0; } @@ -29,5 +29,5 @@ index 0076a35..85c115e 100644 int fopen_s(FILE** pFile, const char* filename, const char* mode) { *pFile = fopen(filename, mode); -- -2.13.0 +2.17.0.windows.1 diff --git a/mingw-w64-nodejs/0005-Remove-.lib-suffix-on-linked-libraries.patch b/mingw-w64-nodejs/0005-Remove-.lib-suffix-on-linked-libraries.patch index f93346b36b..15c8e43731 100644 --- a/mingw-w64-nodejs/0005-Remove-.lib-suffix-on-linked-libraries.patch +++ b/mingw-w64-nodejs/0005-Remove-.lib-suffix-on-linked-libraries.patch @@ -1,47 +1,57 @@ -From 4be19f7e5913b34813fbc241738ebe8b31661e10 Mon Sep 17 00:00:00 2001 +From 5f390ae5e8857ad8c4d0a8b00818eadd8d8f4daa Mon Sep 17 00:00:00 2001 From: Alethea Rose Date: Tue, 14 Feb 2017 23:11:03 -0500 -Subject: [PATCH 05/11] Remove .lib suffix on linked libraries +Subject: [PATCH 05/23] Remove .lib suffix on linked libraries --- - deps/v8/BUILD.gn | 4 ++-- - deps/v8/tools/gyp/v8.gyp | 2 +- - node.gyp | 2 +- - 3 files changed, 4 insertions(+), 4 deletions(-) + deps/v8/BUILD.gn | 8 ++++---- + deps/v8/src/v8.gyp | 8 ++++---- + node.gyp | 2 +- + 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn -index 28aca24..c8d3537 100644 +index 9d95036a..9a8c48db 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn -@@ -1902,8 +1902,8 @@ source_set("v8_libbase") { +@@ -2537,10 +2537,10 @@ v8_component("v8_libbase") { defines += [ "_CRT_RAND_S" ] # for rand_s() libs = [ +- "dbghelp.lib", +- "shlwapi.lib", - "winmm.lib", - "ws2_32.lib", ++ "dbghelp", ++ "shlwapi", + "winmm", + "ws2_32", ] } -diff --git a/deps/v8/tools/gyp/v8.gyp b/deps/v8/tools/gyp/v8.gyp -index 8323075..79de18f 100644 ---- a/deps/v8/tools/gyp/v8.gyp -+++ b/deps/v8/tools/gyp/v8.gyp -@@ -1910,7 +1910,7 @@ - ], +diff --git a/deps/v8/src/v8.gyp b/deps/v8/src/v8.gyp +index 05204ef2..1baa7ab3 100644 +--- a/deps/v8/src/v8.gyp ++++ b/deps/v8/src/v8.gyp +@@ -2139,10 +2139,10 @@ 'msvs_disabled_warnings': [4351, 4355, 4800], 'link_settings': { -- 'libraries': [ '-lwinmm.lib', '-lws2_32.lib' ], -+ 'libraries': [ '-lwinmm', '-lws2_32' ], + 'libraries': [ +- '-ldbghelp.lib', +- '-lshlwapi.lib', +- '-lwinmm.lib', +- '-lws2_32.lib' ++ '-ldbghelp', ++ '-lshlwapi', ++ '-lwinmm', ++ '-lws2_32' + ], }, }], - ], diff --git a/node.gyp b/node.gyp -index 73054dc..a76a4a1 100644 +index 38dcdac0..dba17e28 100644 --- a/node.gyp +++ b/node.gyp -@@ -505,7 +505,7 @@ +@@ -348,7 +348,7 @@ 'NODE_PLATFORM="win32"', '_UNICODE=1', ], @@ -51,5 +61,5 @@ index 73054dc..a76a4a1 100644 'defines': [ '__POSIX__' ], 'sources': [ 'src/backtrace_posix.cc' ], -- -2.13.0 +2.17.0.windows.1 diff --git a/mingw-w64-nodejs/0006-Define-_WIN32_WINNT-in-node.gyp.patch b/mingw-w64-nodejs/0006-Define-_WIN32_WINNT-in-node.gyp.patch index 36e15e487d..d4737ac151 100644 --- a/mingw-w64-nodejs/0006-Define-_WIN32_WINNT-in-node.gyp.patch +++ b/mingw-w64-nodejs/0006-Define-_WIN32_WINNT-in-node.gyp.patch @@ -1,26 +1,25 @@ -From 80de4d7779efff56b71f8a1bea502a9dd9a5499e Mon Sep 17 00:00:00 2001 +From b2a82cd1865cbf1dc21db290b1be33439646dd04 Mon Sep 17 00:00:00 2001 From: Alethea Rose Date: Wed, 15 Feb 2017 02:03:24 -0500 -Subject: [PATCH 06/11] Define _WIN32_WINNT in node.gyp +Subject: [PATCH 06/23] Define _WIN32_WINNT in node.gyp --- - node.gyp | 3 +++ + node.gypi | 3 +++ 1 file changed, 3 insertions(+) -diff --git a/node.gyp b/node.gyp -index a76a4a1..f3f449a 100644 ---- a/node.gyp -+++ b/node.gyp -@@ -236,6 +236,9 @@ - - - 'conditions': [ -+ [ 'OS=="win"', { -+ 'defines': [ '_WIN32_WINNT=0x0600' ], -+ }], - [ 'node_shared=="false"', { - 'msvs_settings': { - 'VCManifestTool': { +diff --git a/node.gypi b/node.gypi +index 3990c59e..2705cefe 100644 +--- a/node.gypi ++++ b/node.gypi +@@ -1,5 +1,8 @@ + { + 'conditions': [ ++ [ 'OS=="win"', { ++ 'defines': [ '_WIN32_WINNT=0x0600' ], ++ }], + [ 'node_shared=="false"', { + 'msvs_settings': { + 'VCManifestTool': { -- -2.13.0 +2.17.0.windows.1 diff --git a/mingw-w64-nodejs/0007-Skip-sys-resource-and-unneeded-includes-in-node.cc.patch b/mingw-w64-nodejs/0007-Skip-sys-resource-and-unneeded-includes-in-node.cc.patch index a75693e08f..0238c565f6 100644 --- a/mingw-w64-nodejs/0007-Skip-sys-resource-and-unneeded-includes-in-node.cc.patch +++ b/mingw-w64-nodejs/0007-Skip-sys-resource-and-unneeded-includes-in-node.cc.patch @@ -1,18 +1,18 @@ -From 2cc95d6fcf4ced5a1cd2ce8d3ec6420aa8e00bc4 Mon Sep 17 00:00:00 2001 +From 245132eb35e4f9829737e56fe56a1ccbfd42690a Mon Sep 17 00:00:00 2001 From: Alethea Rose Date: Wed, 15 Feb 2017 02:45:09 -0500 -Subject: [PATCH 07/11] Skip sys/resource and unneeded includes in node.cc +Subject: [PATCH 07/23] Skip sys/resource and unneeded includes in node.cc --- src/node.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node.cc b/src/node.cc -index 6579565..c515756 100644 +index d17752bb..0008d755 100644 --- a/src/node.cc +++ b/src/node.cc -@@ -78,7 +78,7 @@ - #define getpid GetCurrentProcessId +@@ -102,7 +102,7 @@ + #include #define umask _umask typedef int mode_t; -#else @@ -21,5 +21,5 @@ index 6579565..c515756 100644 #include // getrlimit, setrlimit #include // setuid, getuid -- -2.13.0 +2.17.0.windows.1 diff --git a/mingw-w64-nodejs/0008-Link-with-municode-and-extern-wmain-for-Unicode.patch b/mingw-w64-nodejs/0008-Link-with-municode-and-extern-wmain-for-Unicode.patch index 23fbba3a20..13dc860c8d 100644 --- a/mingw-w64-nodejs/0008-Link-with-municode-and-extern-wmain-for-Unicode.patch +++ b/mingw-w64-nodejs/0008-Link-with-municode-and-extern-wmain-for-Unicode.patch @@ -1,35 +1,45 @@ -From 5468af22c0582dbcfb40bbc7fbdbc7627d9ef26e Mon Sep 17 00:00:00 2001 +From 3b353a4dbc0e96a35d18dde94a787945f1c5c58a Mon Sep 17 00:00:00 2001 From: Alethea Rose Date: Wed, 15 Feb 2017 19:11:53 -0500 -Subject: [PATCH 08/11] Link with -municode and extern wmain for Unicode +Subject: [PATCH 08/23] Link with -municode and extern wmain for Unicode --- - node.gyp | 3 ++- + node.gyp | 6 ++++-- src/node_main.cc | 9 +++++++++ - 2 files changed, 11 insertions(+), 1 deletion(-) + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/node.gyp b/node.gyp -index f3f449a..f6b99b4 100644 +index dba17e28..aa6e0588 100644 --- a/node.gyp +++ b/node.gyp -@@ -507,8 +507,9 @@ +@@ -347,8 +347,9 @@ # we need to use node's preferred "win32" rather than gyp's preferred "win" 'NODE_PLATFORM="win32"', '_UNICODE=1', -+ 'UNICODE', ++ 'UNICODE', ], - 'libraries': [ '-lpsapi' ] + 'libraries': [ '-municode', '-lpsapi' ] }, { # POSIX 'defines': [ '__POSIX__' ], 'sources': [ 'src/backtrace_posix.cc' ], +@@ -808,7 +809,8 @@ + '<(SHARED_INTERMEDIATE_DIR)', # for node_natives.h + ], + +- 'defines': [ 'NODE_WANT_INTERNALS=1' ], ++ 'defines': [ 'NODE_WANT_INTERNALS=1', '_UNICODE=1', 'UNICODE' ], ++ 'libraries': [ '-municode' ], + + 'sources': [ + 'test/cctest/node_module_reg.cc', diff --git a/src/node_main.cc b/src/node_main.cc -index bde3975..85c5c48 100644 +index 2a511b92..d592a1f8 100644 --- a/src/node_main.cc +++ b/src/node_main.cc -@@ -3,6 +3,10 @@ - #ifdef _WIN32 +@@ -27,6 +27,10 @@ #include + #include +#if defined(__MINGW_VERSION_MAJOR) +#extern "C" { @@ -38,7 +48,7 @@ index bde3975..85c5c48 100644 int wmain(int argc, wchar_t *wargv[]) { if (!IsWindows7OrGreater()) { fprintf(stderr, "This application is only supported on Windows 7, " -@@ -47,6 +51,11 @@ int wmain(int argc, wchar_t *wargv[]) { +@@ -71,6 +75,11 @@ int wmain(int argc, wchar_t *wargv[]) { // Now that conversion is done, we can finally start. return node::Start(argc, argv); } @@ -49,7 +59,7 @@ index bde3975..85c5c48 100644 + #else // UNIX - int main(int argc, char *argv[]) { + #ifdef __linux__ -- -2.13.0 +2.17.0.windows.1 diff --git a/mingw-w64-nodejs/0009-Remove-no_rand_screen-from-s_client-invocation.patch b/mingw-w64-nodejs/0009-Remove-no_rand_screen-from-s_client-invocation.patch index 5ba41f982b..1ff07486b5 100644 --- a/mingw-w64-nodejs/0009-Remove-no_rand_screen-from-s_client-invocation.patch +++ b/mingw-w64-nodejs/0009-Remove-no_rand_screen-from-s_client-invocation.patch @@ -1,7 +1,7 @@ -From f77af2f052c870403cfedfce66bb8923f66e80ce Mon Sep 17 00:00:00 2001 +From a277001292d39b8519227470e43357f9c580f583 Mon Sep 17 00:00:00 2001 From: Alethea Rose Date: Wed, 15 Feb 2017 21:34:13 -0500 -Subject: [PATCH 09/11] Remove -no_rand_screen from s_client invocation +Subject: [PATCH 09/23] Remove -no_rand_screen from s_client invocation --- test/parallel/test-https-foafssl.js | 4 ---- @@ -17,12 +17,12 @@ Subject: [PATCH 09/11] Remove -no_rand_screen from s_client invocation 10 files changed, 40 deletions(-) diff --git a/test/parallel/test-https-foafssl.js b/test/parallel/test-https-foafssl.js -index 5a9b8eb..ba07a3c 100644 +index 2a22bda6..4e1a8fbc 100644 --- a/test/parallel/test-https-foafssl.js +++ b/test/parallel/test-https-foafssl.js -@@ -57,10 +57,6 @@ server.listen(0, function() { - '-cert', join(common.fixturesDir, 'foafssl.crt'), - '-key', join(common.fixturesDir, 'foafssl.key')]; +@@ -72,10 +72,6 @@ server.listen(0, function() { + '-cert', fixtures.path('foafssl.crt'), + '-key', fixtures.path('foafssl.key')]; - // for the performance and stability issue in s_client on Windows - if (common.isWindows) @@ -32,10 +32,10 @@ index 5a9b8eb..ba07a3c 100644 client.stdout.on('data', function(data) { diff --git a/test/parallel/test-tls-alert.js b/test/parallel/test-tls-alert.js -index a8c6016..22d54cc 100644 +index 8e78e748..5847f9ce 100644 --- a/test/parallel/test-tls-alert.js +++ b/test/parallel/test-tls-alert.js -@@ -34,10 +34,6 @@ const server = tls.Server({ +@@ -46,10 +46,6 @@ const server = tls.Server({ const args = ['s_client', '-quiet', '-tls1_1', '-connect', `127.0.0.1:${this.address().port}`]; @@ -47,10 +47,10 @@ index a8c6016..22d54cc 100644 let out = ''; client.stderr.setEncoding('utf8'); diff --git a/test/parallel/test-tls-dhe.js b/test/parallel/test-tls-dhe.js -index 80a2d78..e154285 100644 +index 177f6f2e..86868633 100644 --- a/test/parallel/test-tls-dhe.js +++ b/test/parallel/test-tls-dhe.js -@@ -50,10 +50,6 @@ function test(keylen, expectedCipher, cb) { +@@ -71,10 +71,6 @@ function test(keylen, expectedCipher, cb) { const args = ['s_client', '-connect', `127.0.0.1:${this.address().port}`, '-cipher', ciphers]; @@ -62,12 +62,12 @@ index 80a2d78..e154285 100644 let out = ''; client.stdout.setEncoding('utf8'); diff --git a/test/parallel/test-tls-ecdh-disable.js b/test/parallel/test-tls-ecdh-disable.js -index eec22c3..d3464f7 100644 +index 72b51771..ef761147 100644 --- a/test/parallel/test-tls-ecdh-disable.js +++ b/test/parallel/test-tls-ecdh-disable.js -@@ -30,10 +30,6 @@ server.listen(0, '127.0.0.1', common.mustCall(function() { - let cmd = '"' + common.opensslCli + '" s_client -cipher ' + options.ciphers + - ` -connect 127.0.0.1:${this.address().port}`; +@@ -48,10 +48,6 @@ server.listen(0, '127.0.0.1', common.mustCall(function() { + let cmd = `"${common.opensslCli}" s_client -cipher ${ + options.ciphers} -connect 127.0.0.1:${this.address().port}`; - // for the performance and stability issue in s_client on Windows - if (common.isWindows) @@ -77,25 +77,25 @@ index eec22c3..d3464f7 100644 // Old versions of openssl will still exit with 0 so we // can't just check if err is not null. diff --git a/test/parallel/test-tls-ecdh.js b/test/parallel/test-tls-ecdh.js -index 56348d5..012c041 100644 +index 170031b2..9cd58006 100644 --- a/test/parallel/test-tls-ecdh.js +++ b/test/parallel/test-tls-ecdh.js -@@ -34,10 +34,6 @@ server.listen(0, '127.0.0.1', common.mustCall(function() { - let cmd = '"' + common.opensslCli + '" s_client -cipher ' + options.ciphers + - ` -connect 127.0.0.1:${this.address().port}`; +@@ -51,10 +51,6 @@ server.listen(0, '127.0.0.1', common.mustCall(function() { + let cmd = `"${common.opensslCli}" s_client -cipher ${ + options.ciphers} -connect 127.0.0.1:${this.address().port}`; - // for the performance and stability issue in s_client on Windows - if (common.isWindows) - cmd += ' -no_rand_screen'; - exec(cmd, common.mustCall(function(err, stdout, stderr) { - if (err) throw err; + assert.ifError(err); assert(stdout.includes(reply)); diff --git a/test/parallel/test-tls-no-sslv3.js b/test/parallel/test-tls-no-sslv3.js -index e7ee788..9865961 100644 +index 92f85128..4cbb62e3 100644 --- a/test/parallel/test-tls-no-sslv3.js +++ b/test/parallel/test-tls-no-sslv3.js -@@ -28,10 +28,6 @@ server.listen(0, '127.0.0.1', function() { +@@ -23,10 +23,6 @@ server.listen(0, '127.0.0.1', function() { '-ssl3', '-connect', address]; @@ -107,10 +107,10 @@ index e7ee788..9865961 100644 client.stdout.pipe(process.stdout); client.stderr.pipe(process.stderr); diff --git a/test/parallel/test-tls-securepair-server.js b/test/parallel/test-tls-securepair-server.js -index 76d2f88..e0a4cb5 100644 +index 056eebda..994e037c 100644 --- a/test/parallel/test-tls-securepair-server.js +++ b/test/parallel/test-tls-securepair-server.js -@@ -99,10 +99,6 @@ server.listen(0, common.mustCall(function() { +@@ -113,10 +113,6 @@ server.listen(0, common.mustCall(function() { const args = ['s_client', '-connect', `127.0.0.1:${this.address().port}`]; @@ -122,25 +122,25 @@ index 76d2f88..e0a4cb5 100644 diff --git a/test/parallel/test-tls-server-verify.js b/test/parallel/test-tls-server-verify.js -index 61330e2..3eef879 100644 +index 92c4752a..f2edfd36 100644 --- a/test/parallel/test-tls-server-verify.js +++ b/test/parallel/test-tls-server-verify.js -@@ -135,10 +135,6 @@ function runClient(prefix, port, options, cb) { +@@ -149,10 +149,6 @@ function runClient(prefix, port, options, cb) { - const args = ['s_client', '-connect', '127.0.0.1:' + port]; + const args = ['s_client', '-connect', `127.0.0.1:${port}`]; - // for the performance issue in s_client on Windows - if (common.isWindows) - args.push('-no_rand_screen'); - - console.log(prefix + ' connecting with', options.name); + console.log(`${prefix} connecting with`, options.name); switch (options.name) { diff --git a/test/parallel/test-tls-session-cache.js b/test/parallel/test-tls-session-cache.js -index 0b29422..f0cf6be 100644 +index 2bbf3b64..6bd57bb2 100644 --- a/test/parallel/test-tls-session-cache.js +++ b/test/parallel/test-tls-session-cache.js -@@ -82,10 +82,6 @@ function doTest(testOptions, callback) { +@@ -105,10 +105,6 @@ function doTest(testOptions, callback) { '-reconnect' ].concat(testOptions.tickets ? [] : '-no_ticket'); @@ -152,20 +152,20 @@ index 0b29422..f0cf6be 100644 const client = spawn(common.opensslCli, args, { stdio: [ 0, 1, 'pipe' ] diff --git a/test/parallel/test-tls-set-ciphers.js b/test/parallel/test-tls-set-ciphers.js -index 83dcc1f..17ad2b7 100644 +index abb5f219..04bfb832 100644 --- a/test/parallel/test-tls-set-ciphers.js +++ b/test/parallel/test-tls-set-ciphers.js -@@ -37,10 +37,6 @@ server.listen(0, '127.0.0.1', function() { - let cmd = '"' + common.opensslCli + '" s_client -cipher ' + options.ciphers + - ` -connect 127.0.0.1:${this.address().port}`; +@@ -54,10 +54,6 @@ server.listen(0, '127.0.0.1', function() { + let cmd = `"${common.opensslCli}" s_client -cipher ${ + options.ciphers} -connect 127.0.0.1:${this.address().port}`; - // for the performance and stability issue in s_client on Windows - if (common.isWindows) - cmd += ' -no_rand_screen'; - exec(cmd, function(err, stdout, stderr) { - if (err) throw err; + assert.ifError(err); response = stdout; -- -2.13.0 +2.17.0.windows.1 diff --git a/mingw-w64-nodejs/0010-Fix-incorrect-test-assumptions-for-MinGW.patch b/mingw-w64-nodejs/0010-Fix-incorrect-test-assumptions-for-MinGW.patch index d6c3bfa89a..33eda740ef 100644 --- a/mingw-w64-nodejs/0010-Fix-incorrect-test-assumptions-for-MinGW.patch +++ b/mingw-w64-nodejs/0010-Fix-incorrect-test-assumptions-for-MinGW.patch @@ -1,65 +1,51 @@ -From cf3cff9ef513a11fe67c4de540aabb02c78ffa11 Mon Sep 17 00:00:00 2001 +From 0216a3a3d9920be1c65aa1ed90b0548b04a99d05 Mon Sep 17 00:00:00 2001 From: Alethea Rose Date: Wed, 15 Feb 2017 22:21:51 -0500 -Subject: [PATCH 10/11] Fix incorrect test assumptions for MinGW +Subject: [PATCH 10/23] Fix incorrect test assumptions for MinGW --- - test/parallel/test-child-process-stdin.js | 2 +- - test/parallel/test-debugger-pid.js | 3 ++- - test/parallel/test-fs-symlink.js | 5 +++++ - test/parallel/test-https-foafssl.js | 6 +++++- - test/parallel/test-npm-install.js | 5 +++++ - 5 files changed, 18 insertions(+), 3 deletions(-) + test/parallel/test-debugger-pid.js | 3 ++- + test/parallel/test-fs-symlink.js | 5 ++++- + test/parallel/test-https-foafssl.js | 6 +++++- + test/parallel/test-npm-install.js | 5 +++++ + 4 files changed, 16 insertions(+), 3 deletions(-) -diff --git a/test/parallel/test-child-process-stdin.js b/test/parallel/test-child-process-stdin.js -index 8782e46..d144c35 100644 ---- a/test/parallel/test-child-process-stdin.js -+++ b/test/parallel/test-child-process-stdin.js -@@ -33,7 +33,7 @@ cat.on('exit', common.mustCall(function(status) { - })); - - cat.on('close', common.mustCall(function() { -- if (common.isWindows) { -+ if (common.isWindows && !common.isMinGW) { - assert.strictEqual('hello world\r\n', response); - } else { - assert.strictEqual('hello world', response); diff --git a/test/parallel/test-debugger-pid.js b/test/parallel/test-debugger-pid.js -index 7617e84..b49d89f 100644 +index e11d2315..857e6be7 100644 --- a/test/parallel/test-debugger-pid.js +++ b/test/parallel/test-debugger-pid.js @@ -11,8 +11,9 @@ const interfacer = spawn(process.execPath, ['debug', '-p', '655555']); - console.error(process.execPath, 'debug', '-p', '655555'); + interfacer.stdout.setEncoding('utf-8'); interfacer.stderr.setEncoding('utf-8'); +const newline = common.isMinGW ? '\r\n' : '\n'; - const onData = function(data) { + const onData = (data) => { - data = (buffer + data).split('\n'); + data = (buffer + data).split(newline); buffer = data.pop(); data.forEach(function(line) { interfacer.emit('line', line); diff --git a/test/parallel/test-fs-symlink.js b/test/parallel/test-fs-symlink.js -index 8200254..38b284d 100644 +index 1de75320..26577365 100644 --- a/test/parallel/test-fs-symlink.js +++ b/test/parallel/test-fs-symlink.js -@@ -8,6 +8,11 @@ const exec = require('child_process').exec; +@@ -32,7 +32,10 @@ const fs = require('fs'); let linkTime; let fileTime; +-common.refreshTmpDir(); +if (common.isMinGW) { + common.skip('MinGW does not support symlinks'); + return; +} -+ - if (common.isWindows) { - // On Windows, creating symlinks requires admin privileges. - // We'll only try to run symlink test if we have enough privileges. + + // test creating and reading symbolic link + const linkData = fixtures.path('/cycles/root.js'); diff --git a/test/parallel/test-https-foafssl.js b/test/parallel/test-https-foafssl.js -index ba07a3c..2b35f5d 100644 +index 4e1a8fbc..6cf6deca 100644 --- a/test/parallel/test-https-foafssl.js +++ b/test/parallel/test-https-foafssl.js -@@ -66,7 +66,11 @@ server.listen(0, function() { +@@ -81,7 +81,11 @@ server.listen(0, function() { server.close(); }); @@ -73,12 +59,12 @@ index ba07a3c..2b35f5d 100644 client.on('error', function(error) { throw error; diff --git a/test/parallel/test-npm-install.js b/test/parallel/test-npm-install.js -index 3952088..04feef4 100644 +index d826eb09..be4084f2 100644 --- a/test/parallel/test-npm-install.js +++ b/test/parallel/test-npm-install.js -@@ -6,6 +6,11 @@ const spawn = require('child_process').spawn; - const assert = require('assert'); +@@ -9,6 +9,11 @@ const assert = require('assert'); const fs = require('fs'); + const fixtures = require('../common/fixtures'); +if(common.isMinGW) { + common.skip('npm is split into its own package'); @@ -89,5 +75,5 @@ index 3952088..04feef4 100644 const npmSandbox = path.join(common.tmpDir, 'npm-sandbox'); fs.mkdirSync(npmSandbox); -- -2.13.0 +2.17.0.windows.1 diff --git a/mingw-w64-nodejs/0011-detect-architecture.patch b/mingw-w64-nodejs/0011-detect-architecture.patch index bb4654f1b0..fd69d2af61 100644 --- a/mingw-w64-nodejs/0011-detect-architecture.patch +++ b/mingw-w64-nodejs/0011-detect-architecture.patch @@ -1,11 +1,25 @@ ---- i686/configure.orig 2017-02-26 13:18:36.290757400 +0300 -+++ i686/configure 2017-02-26 13:21:54.876115900 +0300 -@@ -755,7 +755,7 @@ +From 5ed8bd0689649f985ff1b89a63f064c078adc6a6 Mon Sep 17 00:00:00 2001 +From: Alexey Pavlov +Date: Thu, 12 Apr 2018 10:18:48 +0200 +Subject: [PATCH 11/23] detect architecture + +--- + configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure b/configure +index 5a242a1a..9950626e 100755 +--- a/configure ++++ b/configure +@@ -855,7 +855,7 @@ def configure_node(o): o['variables']['node_install_npm'] = b(not options.without_npm) o['default_configuration'] = 'Debug' if options.debug else 'Release' - + - host_arch = host_arch_win() if os.name == 'nt' else host_arch_cc() + host_arch = host_arch_win() if (os.name == 'nt' and not ('GCC' in sys.version)) else host_arch_cc() target_arch = options.dest_cpu or host_arch # ia32 is preferred by the build tools (GYP) over x86 even if we prefer the latter -# the Makefile resets this to x86 afterward + # the Makefile resets this to x86 afterward +-- +2.17.0.windows.1 + diff --git a/mingw-w64-nodejs/0012-Use-shell-wrapper-script-for-npm-on-MSYS2-MinGW-w64.patch b/mingw-w64-nodejs/0012-Use-shell-wrapper-script-for-npm-on-MSYS2-MinGW-w64.patch deleted file mode 100644 index a53f18fdf8..0000000000 --- a/mingw-w64-nodejs/0012-Use-shell-wrapper-script-for-npm-on-MSYS2-MinGW-w64.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- x86_64/tools/install.py.orig 2017-06-06 21:25:03.000000000 +0200 -+++ x86_64/tools/install.py 2017-06-23 18:32:47.134657400 +0200 -@@ -94,7 +94,17 @@ - if action == uninstall: - action([link_path], 'bin/npm') - elif action == install: -- try_symlink('../lib/node_modules/npm/bin/npm-cli.js', link_path) -+ # Use MSYS2 shell script wrapper. -+ if ((os.name == 'nt' and 'GCC' in sys.version) or -+ (os.name == 'posix' and 'NT' in platform.system())): -+ # Copy the wrapper shell script -+ try_copy('deps/npm/bin/npm', link_path) -+ # deps/npm/bin/npm is a shell script so the shebang must run sh, not node -+ s = open(link_path, 'r').read() -+ s = re.sub(r'#!.*\n', '#!' + '/usr/bin/env sh' + '\n', s) -+ open(link_path, 'w').write(s) -+ else: -+ try_symlink('../lib/node_modules/npm/bin/npm-cli.js', link_path) - else: - assert(0) # unhandled action type - diff --git a/mingw-w64-nodejs/0012-Use-shell-wrapper-script-for-npm-on-MSYS2-mingw-w64.patch b/mingw-w64-nodejs/0012-Use-shell-wrapper-script-for-npm-on-MSYS2-mingw-w64.patch new file mode 100644 index 0000000000..fcc5797df8 --- /dev/null +++ b/mingw-w64-nodejs/0012-Use-shell-wrapper-script-for-npm-on-MSYS2-mingw-w64.patch @@ -0,0 +1,54 @@ +From 94d3d4f85a245f474091a5e241e249ecbc2c12a1 Mon Sep 17 00:00:00 2001 +From: Alexey Pavlov +Date: Thu, 12 Apr 2018 10:20:30 +0200 +Subject: [PATCH 12/23] Use shell wrapper script for npm on MSYS2 mingw-w64 + +--- + tools/install.py | 24 ++++++++++++++++++++++-- + 1 file changed, 22 insertions(+), 2 deletions(-) + +diff --git a/tools/install.py b/tools/install.py +index be2bab54..20dfee30 100755 +--- a/tools/install.py ++++ b/tools/install.py +@@ -95,7 +95,17 @@ def npm_files(action): + if action == uninstall: + action([link_path], 'bin/npm') + elif action == install: +- try_symlink('../lib/node_modules/npm/bin/npm-cli.js', link_path) ++ # Use MSYS2 shell script wrapper. ++ if ((os.name == 'nt' and 'GCC' in sys.version) or ++ (os.name == 'posix' and 'NT' in platform.system())): ++ # Copy the wrapper shell script ++ try_copy('deps/npm/bin/npm', link_path) ++ # deps/npm/bin/npm is a shell script so the shebang must run sh, not node ++ s = open(link_path, 'r').read() ++ s = re.sub(r'#!.*\n', '#!' + '/usr/bin/env sh' + '\n', s) ++ open(link_path, 'w').write(s) ++ else: ++ try_symlink('../lib/node_modules/npm/bin/npm-cli.js', link_path) + else: + assert(0) # unhandled action type + +@@ -104,7 +114,17 @@ def npm_files(action): + if action == uninstall: + action([link_path], 'bin/npx') + elif action == install: +- try_symlink('../lib/node_modules/npm/bin/npx-cli.js', link_path) ++ # Use MSYS2 shell script wrapper. ++ if ((os.name == 'nt' and 'GCC' in sys.version) or ++ (os.name == 'posix' and 'NT' in platform.system())): ++ # Copy the wrapper shell script ++ try_copy('deps/npm/bin/npx', link_path) ++ # deps/npm/bin/npm is a shell script so the shebang must run sh, not node ++ s = open(link_path, 'r').read() ++ s = re.sub(r'#!.*\n', '#!' + '/usr/bin/env sh' + '\n', s) ++ open(link_path, 'w').write(s) ++ else: ++ try_symlink('../lib/node_modules/npm/bin/npx-cli.js', link_path) + else: + assert(0) # unhandled action type + +-- +2.17.0.windows.1 + diff --git a/mingw-w64-nodejs/0013-Revert-to-FHS-installation-paths-on-Windows-tests-no.patch b/mingw-w64-nodejs/0013-Revert-to-FHS-installation-paths-on-Windows-tests-no.patch index 7fa459153b..9261f2496d 100644 --- a/mingw-w64-nodejs/0013-Revert-to-FHS-installation-paths-on-Windows-tests-no.patch +++ b/mingw-w64-nodejs/0013-Revert-to-FHS-installation-paths-on-Windows-tests-no.patch @@ -1,20 +1,21 @@ -From c9200c96bd986aacee9f04ae9095e36847fd5b43 Mon Sep 17 00:00:00 2001 +From bcee3d1a11b3cfdb3e2cf970674b10829b9cf293 Mon Sep 17 00:00:00 2001 From: Mateusz Mikula Date: Sat, 24 Jun 2017 13:59:32 +0200 -Subject: [PATCH] Revert to FHS installation paths on Windows (tests not fixed) +Subject: [PATCH 13/23] Revert to FHS installation paths on Windows (tests not + fixed) Author: Mateusz Mikula --- - deps/npm/bin/npm | 4 ++-- - deps/npm/bin/npm.cmd | 4 ++-- - deps/npm/lib/build.js | 2 +- - deps/npm/lib/config/defaults.js | 7 ++----- - deps/npm/lib/npm.js | 6 ++---- - deps/npm/lib/unbuild.js | 1 - + deps/npm/bin/npm | 4 ++-- + deps/npm/bin/npm.cmd | 4 ++-- + deps/npm/lib/config/defaults.js | 7 ++----- + deps/npm/lib/npm.js | 6 ++---- + deps/npm/lib/unbuild.js | 1 - + deps/npm/node_modules/bin-links/index.js | 2 +- 6 files changed, 9 insertions(+), 15 deletions(-) diff --git a/deps/npm/bin/npm b/deps/npm/bin/npm -index 5acd6fb..dc01687 100644 +index 5acd6fb6..dc01687e 100755 --- a/deps/npm/bin/npm +++ b/deps/npm/bin/npm @@ -12,12 +12,12 @@ if ! [ -x "$NODE_EXE" ]; then @@ -33,7 +34,7 @@ index 5acd6fb..dc01687 100644 NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" fi diff --git a/deps/npm/bin/npm.cmd b/deps/npm/bin/npm.cmd -index 880554d..12507ba 100644 +index 880554dc..12507ba1 100644 --- a/deps/npm/bin/npm.cmd +++ b/deps/npm/bin/npm.cmd @@ -8,9 +8,9 @@ IF NOT EXIST "%NODE_EXE%" ( @@ -48,21 +49,8 @@ index 880554d..12507ba 100644 ) IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" ( SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%" -diff --git a/deps/npm/lib/build.js b/deps/npm/lib/build.js -index fbe78c7..202da86 100644 ---- a/deps/npm/lib/build.js -+++ b/deps/npm/lib/build.js -@@ -229,7 +229,7 @@ function linkBin (from, to, gently, cb) { - } - - function linkMans (pkg, folder, parent, gtop, cb) { -- if (!pkg.man || !gtop || process.platform === 'win32') return cb() -+ if (!pkg.man || !gtop) return cb() - - var manRoot = path.resolve(npm.config.get('prefix'), 'share', 'man') - log.verbose('linkMans', 'man files are', pkg.man, 'in', manRoot) diff --git a/deps/npm/lib/config/defaults.js b/deps/npm/lib/config/defaults.js -index e93c1e5..b1a16d0 100644 +index c049f213..d1654b7c 100644 --- a/deps/npm/lib/config/defaults.js +++ b/deps/npm/lib/config/defaults.js @@ -81,8 +81,8 @@ var uidOrPid = process.getuid ? process.getuid() : process.pid @@ -87,10 +75,10 @@ index e93c1e5..b1a16d0 100644 // /usr/local/bin/node --> prefix=/usr/local globalPrefix = path.dirname(path.dirname(process.execPath)) diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js -index 4f81015..b84e818 100644 +index e5871260..ad9ed251 100644 --- a/deps/npm/lib/npm.js +++ b/deps/npm/lib/npm.js -@@ -332,7 +332,7 @@ +@@ -393,7 +393,7 @@ { get: function () { var b = npm.globalPrefix @@ -99,7 +87,7 @@ index 4f81015..b84e818 100644 return b } }) -@@ -349,9 +349,7 @@ +@@ -410,9 +410,7 @@ Object.defineProperty(npm, 'globalDir', { get: function () { @@ -111,10 +99,10 @@ index 4f81015..b84e818 100644 enumerable: true }) diff --git a/deps/npm/lib/unbuild.js b/deps/npm/lib/unbuild.js -index 9ba5972..1915a5f 100644 +index 78293c9c..0360b8c6 100644 --- a/deps/npm/lib/unbuild.js +++ b/deps/npm/lib/unbuild.js -@@ -90,7 +90,6 @@ function rmBins (pkg, folder, parent, top, cb) { +@@ -92,7 +92,6 @@ function rmBins (pkg, folder, parent, top, cb) { function rmMans (pkg, folder, parent, top, cb) { if (!pkg.man || !top || @@ -122,6 +110,19 @@ index 9ba5972..1915a5f 100644 !npm.config.get('global')) { return cb() } +diff --git a/deps/npm/node_modules/bin-links/index.js b/deps/npm/node_modules/bin-links/index.js +index e6370aca..759daee6 100644 +--- a/deps/npm/node_modules/bin-links/index.js ++++ b/deps/npm/node_modules/bin-links/index.js +@@ -149,7 +149,7 @@ function linkBin (from, to, opts, cb) { + } + + function linkMans (pkg, folder, parent, gtop, opts, cb) { +- if (!pkg.man || !gtop || process.platform === 'win32') return cb() ++ if (!pkg.man || !gtop) return cb() + + var manRoot = path.resolve(opts.prefix, 'share', 'man') + opts.log.verbose('linkMans', 'man files are', pkg.man, 'in', manRoot) -- -2.13.0 +2.17.0.windows.1 diff --git a/mingw-w64-nodejs/0014-Fix-linking-of-cctest-in-mingw-w64.patch b/mingw-w64-nodejs/0014-Fix-linking-of-cctest-in-mingw-w64.patch new file mode 100644 index 0000000000..bfc6162d9f --- /dev/null +++ b/mingw-w64-nodejs/0014-Fix-linking-of-cctest-in-mingw-w64.patch @@ -0,0 +1,44 @@ +From a0b8c2ab3e6cb4d9a45690e7209b9656437c7a79 Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Fri, 13 Apr 2018 23:29:07 +0200 +Subject: [PATCH 14/23] Fix linking of `cctest` in mingw-w64 + +We do not have .obj files. Really. Also, it seems that we somehow got +the wrong path for the object files of the node target, let's fix them +at the same time. + +Signed-off-by: Johannes Schindelin +--- + node.gyp | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +diff --git a/node.gyp b/node.gyp +index aa6e0588..39d47a24 100644 +--- a/node.gyp ++++ b/node.gyp +@@ -771,9 +771,6 @@ + 'OBJ_SUFFIX': 'o', + 'OBJ_SEPARATOR': '/', + 'conditions': [ +- ['OS=="win"', { +- 'OBJ_SUFFIX': 'obj', +- }], + ['GENERATOR=="ninja"', { + 'OBJ_PATH': '<(OBJ_DIR)/src', + 'OBJ_GEN_PATH': '<(OBJ_DIR)/gen', +@@ -782,9 +779,9 @@ + }, { + 'conditions': [ + ['OS=="win"', { +- 'OBJ_PATH': '<(OBJ_DIR)/node', +- 'OBJ_GEN_PATH': '<(OBJ_DIR)/node', +- 'OBJ_TRACING_PATH': '<(OBJ_DIR)/node', ++ 'OBJ_PATH': '<(OBJ_DIR).target/node/src', ++ 'OBJ_GEN_PATH': '<(OBJ_DIR).target/node/gen', ++ 'OBJ_TRACING_PATH': '<(OBJ_DIR).target/node/src/tracing', + }], + ['OS=="aix"', { + 'OBJ_PATH': '<(OBJ_DIR)/node_base/src', +-- +2.17.0.windows.1 + diff --git a/mingw-w64-nodejs/0014-fix-building-with-gcc7.patch b/mingw-w64-nodejs/0014-fix-building-with-gcc7.patch deleted file mode 100644 index 9e41ef8951..0000000000 --- a/mingw-w64-nodejs/0014-fix-building-with-gcc7.patch +++ /dev/null @@ -1,73 +0,0 @@ -diff -urN node-v6.11.0.a/deps/v8/src/objects.h node-v6.11.0.b/deps/v8/src/objects.h ---- node-v6.11.0.a/deps/v8/src/objects.h 2017-06-06 21:24:33.000000000 +0200 -+++ node-v6.11.0.b/deps/v8/src/objects.h 2018-04-01 11:00:08.648082800 +0200 -@@ -3261,22 +3261,10 @@ - template - class HashTable : public HashTableBase { - public: -- // Wrapper methods -- inline uint32_t Hash(Key key) { -- if (Shape::UsesSeed) { -- return Shape::SeededHash(key, GetHeap()->HashSeed()); -- } else { -- return Shape::Hash(key); -- } -- } -- -- inline uint32_t HashForObject(Key key, Object* object) { -- if (Shape::UsesSeed) { -- return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); -- } else { -- return Shape::HashForObject(key, object); -- } -- } -+ // Wrapper methods. Defined in src/objects-inl.h -+ // to break a cycle with src/heap/heap.h. -+ inline uint32_t Hash(Key key); -+ inline uint32_t HashForObject(Key key, Object* object); - - // Returns a new HashTable object. - MUST_USE_RESULT static Handle New( -diff -urN node-v6.11.0.a/deps/v8/src/objects-body-descriptors.h node-v6.11.0.b/deps/v8/src/objects-body-descriptors.h ---- node-v6.11.0.a/deps/v8/src/objects-body-descriptors.h 2017-06-06 21:24:33.000000000 +0200 -+++ node-v6.11.0.b/deps/v8/src/objects-body-descriptors.h 2018-04-01 11:00:08.645082600 +0200 -@@ -99,7 +99,7 @@ - - template - static inline void IterateBody(HeapObject* obj, int object_size) { -- IterateBody(obj); -+ IterateBody(obj); - } - }; - -diff -urN node-v6.11.0.a/deps/v8/src/objects-inl.h node-v6.11.0.b/deps/v8/src/objects-inl.h ---- node-v6.11.0.a/deps/v8/src/objects-inl.h 2017-06-06 21:24:33.000000000 +0200 -+++ node-v6.11.0.b/deps/v8/src/objects-inl.h 2018-04-01 11:00:08.647082700 +0200 -@@ -36,6 +36,27 @@ - namespace v8 { - namespace internal { - -+template -+uint32_t HashTable::Hash(Key key) { -+ if (Shape::UsesSeed) { -+ return Shape::SeededHash(key, GetHeap()->HashSeed()); -+ } else { -+ return Shape::Hash(key); -+ } -+} -+ -+ -+template -+uint32_t HashTable::HashForObject(Key key, -+ Object* object) { -+ if (Shape::UsesSeed) { -+ return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); -+ } else { -+ return Shape::HashForObject(key, object); -+ } -+} -+ -+ - PropertyDetails::PropertyDetails(Smi* smi) { - value_ = smi->value(); - } diff --git a/mingw-w64-nodejs/0015-cctest-allow-building-with-municode.patch b/mingw-w64-nodejs/0015-cctest-allow-building-with-municode.patch new file mode 100644 index 0000000000..e33028f05c --- /dev/null +++ b/mingw-w64-nodejs/0015-cctest-allow-building-with-municode.patch @@ -0,0 +1,89 @@ +From 1979214e69399d503b0f5a5b302101c80d8f437a Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Sat, 14 Apr 2018 00:23:10 +0200 +Subject: [PATCH 15/23] cctest: allow building with -municode + +The rest of the code is built with -municode, we cannot start building +cctest (which relies on the already-built parts) without this option. + +Signed-off-by: Johannes Schindelin +--- + deps/gtest/src/gtest_main.cc | 61 ++++++++++++++++++++++++++++++++++++ + 1 file changed, 61 insertions(+) + +diff --git a/deps/gtest/src/gtest_main.cc b/deps/gtest/src/gtest_main.cc +index 4cf03e59..e71ff613 100644 +--- a/deps/gtest/src/gtest_main.cc ++++ b/deps/gtest/src/gtest_main.cc +@@ -31,7 +31,68 @@ + + #include "gtest/gtest.h" + ++#ifdef _WIN32 ++#include ++#include ++ ++#if defined(__MINGW_VERSION_MAJOR) ++#extern "C" { ++#endif ++ ++int wmain(int argc, wchar_t *wargv[]) { ++ if (!IsWindows7OrGreater()) { ++ fprintf(stderr, "This application is only supported on Windows 7, " ++ "Windows Server 2008 R2, or higher."); ++ exit(1); ++ } ++ ++ // Convert argv to to UTF8 ++ char** argv = new char*[argc + 1]; ++ for (int i = 0; i < argc; i++) { ++ // Compute the size of the required buffer ++ DWORD size = WideCharToMultiByte(CP_UTF8, ++ 0, ++ wargv[i], ++ -1, ++ nullptr, ++ 0, ++ nullptr, ++ nullptr); ++ if (size == 0) { ++ // This should never happen. ++ fprintf(stderr, "Could not convert arguments to utf8."); ++ exit(1); ++ } ++ // Do the actual conversion ++ argv[i] = new char[size]; ++ DWORD result = WideCharToMultiByte(CP_UTF8, ++ 0, ++ wargv[i], ++ -1, ++ argv[i], ++ size, ++ nullptr, ++ nullptr); ++ if (result == 0) { ++ // This should never happen. ++ fprintf(stderr, "Could not convert arguments to utf8."); ++ exit(1); ++ } ++ } ++ argv[argc] = nullptr; ++ testing::InitGoogleTest(&argc, argv); ++ return RUN_ALL_TESTS(); ++} ++ ++#if defined(__MINGW_VERSION_MAJOR) ++} ++#endif ++ ++#else ++ + GTEST_API_ int main(int argc, char **argv) { + testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); + } ++ ++#endif +-- +2.17.0.windows.1 + diff --git a/mingw-w64-nodejs/0016-format-macros.h-do-not-rely-on-__STDC_FORMAT_MACROS.patch b/mingw-w64-nodejs/0016-format-macros.h-do-not-rely-on-__STDC_FORMAT_MACROS.patch new file mode 100644 index 0000000000..6f3db84e1b --- /dev/null +++ b/mingw-w64-nodejs/0016-format-macros.h-do-not-rely-on-__STDC_FORMAT_MACROS.patch @@ -0,0 +1,37 @@ +From d17f9f527f2cdae7564602525b7e851ce4902115 Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Sat, 14 Apr 2018 20:10:12 +0200 +Subject: [PATCH 16/23] format-macros.h: do not rely on __STDC_FORMAT_MACROS + +The PRId64 macro and friends are not universally defined in inttypes.h. +Let's just go ahead and define them when needed. + +Signed-off-by: Johannes Schindelin +--- + deps/v8/src/base/format-macros.h | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/deps/v8/src/base/format-macros.h b/deps/v8/src/base/format-macros.h +index 5f5fe5df..13f240a2 100644 +--- a/deps/v8/src/base/format-macros.h ++++ b/deps/v8/src/base/format-macros.h +@@ -80,6 +80,16 @@ + + #else // V8_OS_WIN + ++#ifndef PRId64 ++#define PRId64 "I64d" ++#endif ++#ifndef PRIu64 ++#define PRIu64 "I64u" ++#endif ++#ifndef PRIx64 ++#define PRIx64 "I64x" ++#endif ++ + #if !defined(PRId64) || !defined(PRIu64) || !defined(PRIx64) + #error "inttypes.h provided by win toolchain should define these." + #endif +-- +2.17.0.windows.1 + diff --git a/mingw-w64-nodejs/0017-Do-not-get-confused-by-the-presence-of-winpthread.patch b/mingw-w64-nodejs/0017-Do-not-get-confused-by-the-presence-of-winpthread.patch new file mode 100644 index 0000000000..ab08b356e8 --- /dev/null +++ b/mingw-w64-nodejs/0017-Do-not-get-confused-by-the-presence-of-winpthread.patch @@ -0,0 +1,35 @@ +From 79be156837e69e90daf9937c81b5b714bab8492c Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Sat, 14 Apr 2018 15:34:05 +0200 +Subject: [PATCH 17/23] Do not get confused by the presence of winpthread + +We still have no ClockNow() defined on Windows... + +Signed-off-by: Johannes Schindelin +--- + deps/v8/src/base/platform/time.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/deps/v8/src/base/platform/time.cc b/deps/v8/src/base/platform/time.cc +index 09e3fd02..dcc13087 100644 +--- a/deps/v8/src/base/platform/time.cc ++++ b/deps/v8/src/base/platform/time.cc +@@ -650,13 +650,13 @@ bool ThreadTicks::IsSupported() { + ThreadTicks ThreadTicks::Now() { + #if V8_OS_MACOSX + return ThreadTicks(ComputeThreadTicks()); ++#elif V8_OS_WIN ++ return ThreadTicks::GetForThread(::GetCurrentThread()); + #elif(defined(_POSIX_THREAD_CPUTIME) && (_POSIX_THREAD_CPUTIME >= 0)) || \ + defined(V8_OS_ANDROID) + return ThreadTicks(ClockNow(CLOCK_THREAD_CPUTIME_ID)); + #elif V8_OS_SOLARIS + return ThreadTicks(gethrvtime() / Time::kNanosecondsPerMicrosecond); +-#elif V8_OS_WIN +- return ThreadTicks::GetForThread(::GetCurrentThread()); + #else + UNREACHABLE(); + #endif +-- +2.17.0.windows.1 + diff --git a/mingw-w64-nodejs/0018-Add-missing-include-to-build-condition-variable.cc-s.patch b/mingw-w64-nodejs/0018-Add-missing-include-to-build-condition-variable.cc-s.patch new file mode 100644 index 0000000000..707649de0f --- /dev/null +++ b/mingw-w64-nodejs/0018-Add-missing-include-to-build-condition-variable.cc-s.patch @@ -0,0 +1,26 @@ +From aab5602c55871c9c8ab63e802f0583c2a594b4c3 Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Sat, 14 Apr 2018 15:34:56 +0200 +Subject: [PATCH 18/23] Add missing #include to build condition-variable.cc + successfully + +Signed-off-by: Johannes Schindelin +--- + deps/v8/src/base/platform/condition-variable.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/deps/v8/src/base/platform/condition-variable.cc b/deps/v8/src/base/platform/condition-variable.cc +index 6df8599d..307263c6 100644 +--- a/deps/v8/src/base/platform/condition-variable.cc ++++ b/deps/v8/src/base/platform/condition-variable.cc +@@ -8,6 +8,7 @@ + #include + + #include "src/base/platform/time.h" ++#include + + namespace v8 { + namespace base { +-- +2.17.0.windows.1 + diff --git a/mingw-w64-nodejs/0019-Do-not-let-nghttp2-pretend-that-ssize_t-is-int.patch b/mingw-w64-nodejs/0019-Do-not-let-nghttp2-pretend-that-ssize_t-is-int.patch new file mode 100644 index 0000000000..81562c1daf --- /dev/null +++ b/mingw-w64-nodejs/0019-Do-not-let-nghttp2-pretend-that-ssize_t-is-int.patch @@ -0,0 +1,28 @@ +From ebf35f227fac73e4f8a6f0632985314d3ff19050 Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Sat, 14 Apr 2018 15:35:35 +0200 +Subject: [PATCH 19/23] Do not let nghttp2 pretend that ssize_t is int + +It is not... At least not on 64-bit systems. + +Signed-off-by: Johannes Schindelin +--- + deps/nghttp2/lib/includes/config.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/deps/nghttp2/lib/includes/config.h b/deps/nghttp2/lib/includes/config.h +index 0346e061..ae10943a 100644 +--- a/deps/nghttp2/lib/includes/config.h ++++ b/deps/nghttp2/lib/includes/config.h +@@ -2,7 +2,7 @@ + #define NGHTTP2_NORETURN + + /* Define to `int' if does not define. */ +-#define ssize_t int ++/* #define ssize_t int */ + + /* Define to 1 if you have the `std::map::emplace`. */ + #define HAVE_STD_MAP_EMPLACE 1 +-- +2.17.0.windows.1 + diff --git a/mingw-w64-nodejs/0020-inspector-use-namespaced-icu-symbols.patch b/mingw-w64-nodejs/0020-inspector-use-namespaced-icu-symbols.patch new file mode 100644 index 0000000000..8d56e83de8 --- /dev/null +++ b/mingw-w64-nodejs/0020-inspector-use-namespaced-icu-symbols.patch @@ -0,0 +1,43 @@ +From 291385eae1987bfc26c21de8e883f8af94881360 Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Sat, 14 Apr 2018 15:37:06 +0200 +Subject: [PATCH 20/23] inspector: use namespaced icu symbols + +Needed to fix the build. + +Signed-off-by: Johannes Schindelin +--- + src/inspector_io.cc | 3 +++ + src/node_i18n.cc | 2 ++ + 2 files changed, 5 insertions(+) + +diff --git a/src/inspector_io.cc b/src/inspector_io.cc +index 538cbab3..e6a780a2 100644 +--- a/src/inspector_io.cc ++++ b/src/inspector_io.cc +@@ -22,6 +22,9 @@ namespace { + using AsyncAndAgent = std::pair; + using v8_inspector::StringBuffer; + using v8_inspector::StringView; ++using icu::UnicodeString; ++using icu::CheckedArrayByteSink; ++using icu::StringPiece; + + template + using TransportAndIo = std::pair; +diff --git a/src/node_i18n.cc b/src/node_i18n.cc +index cc02092d..572d4446 100644 +--- a/src/node_i18n.cc ++++ b/src/node_i18n.cc +@@ -94,6 +94,8 @@ using v8::ObjectTemplate; + using v8::String; + using v8::Value; + ++using icu::TimeZone; ++ + namespace i18n { + namespace { + +-- +2.17.0.windows.1 + diff --git a/mingw-w64-nodejs/0021-Use-wide-character-Win32-API-functions-to-handle-wch.patch b/mingw-w64-nodejs/0021-Use-wide-character-Win32-API-functions-to-handle-wch.patch new file mode 100644 index 0000000000..ee62439967 --- /dev/null +++ b/mingw-w64-nodejs/0021-Use-wide-character-Win32-API-functions-to-handle-wch.patch @@ -0,0 +1,30 @@ +From 1bcebd98fee4e97be94be19ade983c142d3f2892 Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Sat, 14 Apr 2018 20:40:00 +0200 +Subject: [PATCH 21/23] Use wide-character Win32 API functions to handle + `wchar_t *` + +Signed-off-by: Johannes Schindelin +--- + deps/v8/src/base/debug/stack_trace_win.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/deps/v8/src/base/debug/stack_trace_win.cc b/deps/v8/src/base/debug/stack_trace_win.cc +index 64e63091..8110ef29 100644 +--- a/deps/v8/src/base/debug/stack_trace_win.cc ++++ b/deps/v8/src/base/debug/stack_trace_win.cc +@@ -43,9 +43,9 @@ long WINAPI StackDumpExceptionFilter(EXCEPTION_POINTERS* info) { // NOLINT + } + + void GetExePath(wchar_t* path_out) { +- GetModuleFileName(NULL, path_out, MAX_PATH); ++ GetModuleFileNameW(NULL, path_out, MAX_PATH); + path_out[MAX_PATH - 1] = L'\0'; +- PathRemoveFileSpec(path_out); ++ PathRemoveFileSpecW(path_out); + } + + bool InitializeSymbols() { +-- +2.17.0.windows.1 + diff --git a/mingw-w64-nodejs/0022-Disable-MSVC_HACK.patch b/mingw-w64-nodejs/0022-Disable-MSVC_HACK.patch new file mode 100644 index 0000000000..3c5827bfea --- /dev/null +++ b/mingw-w64-nodejs/0022-Disable-MSVC_HACK.patch @@ -0,0 +1,27 @@ +From a818f5d1cc8146c0880efad675ddd48efe4174b6 Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Sat, 14 Apr 2018 20:42:47 +0200 +Subject: [PATCH 22/23] Disable MSVC_HACK + +It only produces compile errors with GCC... + +Signed-off-by: Johannes Schindelin +--- + deps/v8/src/base/export-template.h | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/deps/v8/src/base/export-template.h b/deps/v8/src/base/export-template.h +index 861cfe40..0211fd52 100644 +--- a/deps/v8/src/base/export-template.h ++++ b/deps/v8/src/base/export-template.h +@@ -153,7 +153,6 @@ + + EXPORT_TEMPLATE_TEST(DEFAULT, ); + EXPORT_TEMPLATE_TEST(DEFAULT, __attribute__((visibility("default")))); +-EXPORT_TEMPLATE_TEST(MSVC_HACK, __declspec(dllexport)); + EXPORT_TEMPLATE_TEST(DEFAULT, __declspec(dllimport)); + + #undef EXPORT_TEMPLATE_TEST +-- +2.17.0.windows.1 + diff --git a/mingw-w64-nodejs/0023-Make-sure-that-__rdtsc-is-declared.patch b/mingw-w64-nodejs/0023-Make-sure-that-__rdtsc-is-declared.patch new file mode 100644 index 0000000000..1bd8b4a0ca --- /dev/null +++ b/mingw-w64-nodejs/0023-Make-sure-that-__rdtsc-is-declared.patch @@ -0,0 +1,32 @@ +From c66e0118a3b270a96f71ce2f072ef5598436d7d1 Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Sun, 15 Apr 2018 13:33:29 +0200 +Subject: [PATCH 23/23] Make sure that __rdtsc() is declared + +Otherwise, the 32-bit mingw-w64 build fails. + +Signed-off-by: Johannes Schindelin +--- + deps/v8/src/base/platform/time.cc | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/deps/v8/src/base/platform/time.cc b/deps/v8/src/base/platform/time.cc +index dcc13087..2055039c 100644 +--- a/deps/v8/src/base/platform/time.cc ++++ b/deps/v8/src/base/platform/time.cc +@@ -695,6 +695,12 @@ void ThreadTicks::WaitUntilInitializedWin() { + ::Sleep(10); + } + ++#ifdef __MINGW64_VERSION_MAJOR ++extern "C" { ++ extern unsigned __int64 __rdtsc(void); ++} ++#endif ++ + double ThreadTicks::TSCTicksPerSecond() { + DCHECK(IsSupported()); + +-- +2.17.0.windows.1 + diff --git a/mingw-w64-nodejs/PKGBUILD b/mingw-w64-nodejs/PKGBUILD index 0832f96988..1a653cb97d 100644 --- a/mingw-w64-nodejs/PKGBUILD +++ b/mingw-w64-nodejs/PKGBUILD @@ -7,8 +7,8 @@ _realname=nodejs pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=6.11.0 -pkgrel=2 +pkgver=8.11.1 +pkgrel=1 pkgdesc="Evented I/O for V8 javascript (mingw-w64)" arch=('any') url="https://nodejs.org/" @@ -38,7 +38,16 @@ source=("https://nodejs.org/dist/v${pkgver}/node-v${pkgver}.tar.xz" '0011-detect-architecture.patch' '0012-Use-shell-wrapper-script-for-npm-on-MSYS2-MinGW-w64.patch' '0013-Revert-to-FHS-installation-paths-on-Windows-tests-no.patch' - '0014-fix-building-with-gcc7.patch' + '0014-Fix-linking-of-cctest-in-mingw-w64.patch' + '0015-cctest-allow-building-with-municode.patch' + '0016-format-macros.h-do-not-rely-on-__STDC_FORMAT_MACROS.patch' + '0017-Do-not-get-confused-by-the-presence-of-winpthread.patch' + '0018-Add-missing-include-to-build-condition-variable.cc-s.patch' + '0019-Do-not-let-nghttp2-pretend-that-ssize_t-is-int.patch' + '0020-inspector-use-namespaced-icu-symbols.patch' + '0021-Use-wide-character-Win32-API-functions-to-handle-wch.patch' + '0022-Disable-MSVC_HACK.patch' + '0023-Make-sure-that-__rdtsc-is-declared.patch' 'node') prepare() { @@ -57,7 +66,16 @@ prepare() { patch -Np1 -i "${srcdir}/0011-detect-architecture.patch" patch -Np1 -i "${srcdir}/0012-Use-shell-wrapper-script-for-npm-on-MSYS2-MinGW-w64.patch" patch -Np1 -i "${srcdir}/0013-Revert-to-FHS-installation-paths-on-Windows-tests-no.patch" - patch -Np1 -i "${srcdir}/0014-fix-building-with-gcc7.patch" + patch -Np1 -i "${srcdir}/0014-Fix-linking-of-cctest-in-mingw-w64.patch" + patch -Np1 -i "${srcdir}/0015-cctest-allow-building-with-municode.patch" + patch -Np1 -i "${srcdir}/0016-format-macros.h-do-not-rely-on-__STDC_FORMAT_MACROS.patch" + patch -Np1 -i "${srcdir}/0017-Do-not-get-confused-by-the-presence-of-winpthread.patch" + patch -Np1 -i "${srcdir}/0018-Add-missing-include-to-build-condition-variable.cc-s.patch" + patch -Np1 -i "${srcdir}/0019-Do-not-let-nghttp2-pretend-that-ssize_t-is-int.patch" + patch -Np1 -i "${srcdir}/0020-inspector-use-namespaced-icu-symbols.patch" + patch -Np1 -i "${srcdir}/0021-Use-wide-character-Win32-API-functions-to-handle-wch.patch" + patch -Np1 -i "${srcdir}/0022-Disable-MSVC_HACK.patch" + patch -Np1 -i "${srcdir}/0023-Make-sure-that-__rdtsc-is-declared.patch" } build() { @@ -86,7 +104,6 @@ build() { --dest-cpu=${opt_cpu} \ --shared-openssl \ --shared-zlib \ - --shared-libuv \ --shared-cares \ --with-intl=system-icu \ --shared-http-parser \ @@ -96,7 +113,18 @@ build() { ${MINGW_PREFIX}/bin/python2 tools/gyp_node.py -f make touch config.gypi - make + # Work around the problem where the protocol files would be generated into a + # subdirectory relative to deps/v8/src/inspector instead of relative to the + # top-level directory. + CXXFLAGS=-D_WIN32_WINNT=0x0600 make out/Release/obj/gen/src/inspector/protocol/Forward.h + CXXFLAGS=-D_WIN32_WINNT=0x0600 make + + # flatten the nested node_modules/ hierarchy + test -z "$(find deps/npm/node_modules | grep '^.\{140,\}$')" || + (cd deps/npm && + cp -R . ../npm.bup && + rm -rf node_modules && + ../../out/Release/node.exe ../npm.bup/bin/npm-cli.js install --production) } check() { @@ -124,19 +152,28 @@ package() { mv -v "${pkgdir}$MINGW_PREFIX/bin/node"{_exe,.exe} } -sha256sums=('02ba35391edea2b294c736489af01954ce6e6c39d318f4423ae6617c69ef0a51' - '4d152a51fb46fe46882516de0cdd695d3e007cf6df1f7797686c7d7c1b6f865b' - '4b87b4dec00eb8aabb600fa89348a575efc84738c571cbebfb0f723da6df8565' - '5f1c899191ca438b0244764718e0ca400a1ffa71a91d5e96388df095ff624f9d' - 'd471133db9061ca2a624de1a5465f7f9423f1a1afc54d65d43401a453eeabbc4' - '5046e30e513adf7024f515804b1bdbeafc980f2d7712c2737c68c042b15fab69' - 'da0fe9cba05d3f39f9521910b2a8c34f4762c5f2426c0086917c7768d686d52b' - '0032722b39795cb9e243afd1fe2f3d44bc517ec0e324f18fa47a100a68cf45a8' - '15032f4f7eb9c54e9e5d1b7792578e540a48794c88b56c297c19be10e5439161' - 'a72b581fd7ac676e31729e32d4789af186b4809ebc9947d2778655a54032f93f' - '816c25397e5b54dbccb12995c22f09716a3b00ebb236df51bcefcb59240aa922' - '998a1b688644d58ce8060ec84d00bd06b0b2bd2d088662ebd0fbfded3151e510' - 'b50f94667125a5bf1c3647252a737c34453750b5d4e0a31c42334f4460531795' - 'de0acd78eed5d1ff86387866b0d65ffd43ff201cbcb15499ff30380cbbc8eace' - '37baaa86f0a8486c2ee0335a0086e4c425b3f692f1e19118d22cd39a1e496b1f' +sha256sums=('40a6eb51ea37fafcf0cfb58786b15b99152bec672cccf861c14d1cca0ad4758a' + '50ae0cebb123b4617fb79961ae6f95fb2bb0da17d0dcf5daa89f54f3b8c8261d' + 'fb3aaa1d81b0330d6771c0127aea12f19dcdef8ff21bc7c6037e87f320228ce0' + '7a0f96ba5b8639807a22c592d25e87bceae623d382c41bfc7f994367aa9b8ffb' + '8c21a199822d3e106eacbc8e4ef923508293026edc8c55ad838c316cea5bda45' + '891eaf02a89b3e632d71f8331a80ae26f3abb78b6e0c14e811ae6f3148459bdc' + 'ca3d3829d5e7f2778854f1a14ab0c46e18398a979805093b419e66cc01b3d940' + 'd4165599af3ac6008bd1d99c51c35ca13c848a2631da937e4c45e63a0d3c598f' + 'a70ee9d8122c5a4178028fe9c337746f2cbe1427ce24e502a1c1301e57401815' + 'a383724fd58925bda9fd9a149da79b8afdde4fd55a1298c7cdda297a2d3f5bab' + '7966b11c2e413f74d00d5078ca065e3f14957750ae7741a0520f17f203097a2b' + '0bf9e2d240b5d53435e278066e8cb0bd695b8fd4e6cce4b48a67bfa22f1b68c9' + 'b37fba2c8bb254905993b41d0ed319fa02bc37c88446ef0b2341ee92cc42faae' + '89fde4ba2d92f007f3f27896f9253f6a3b7668595b7f68cae2756e6256a861ac' + 'd84636872a1f8d3692cf8748c8d9fb21d0314b23a0ec89b30065ddbd058176bb' + '2005eb72281e1c727411015ced471b37999ccd062d60856cabd68032ed303601' + '4fd604e2889e1741f8a7ed5b3e945d401eed2b13086daa4544384da4c04698d1' + '3e5da564180238aeaf6e79b3273838465bed962fc65bbe8f0657e09ab0cabee3' + '3a83695ebb617341b687133cd5319e0762c2f8af880800ac36de232311ccb903' + '2d91635773140d50b2e2065898b89550fecf76ca984954e8bc53dc2ef2650714' + 'f7144d6fe1efee3d9134d92d3757c9bcc3f570dbca5a4fbadf3efd6492ba345f' + 'b68ecff38ab7e1a22274a48f0487cebe2769e9222d75da96f8eab2732d79efb9' + '44a8d757584cb725760c9d9bd661fb23ee0a2b555ffca8a449573e4d03db7dcc' + '8cc3ef3ce149e5f0869d434538a9bd0a934afc52f0f571f6436694ce11587d12' '284251ff443506cd61530a026afb421d0084e4ad25c037bcfe3a045246d729a2')