diff --git a/Makefile b/Makefile index 94e6ff455cca..4b9170cfb09e 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,19 @@ ifdef DISABLE_V8_I18N V8_BUILD_OPTIONS += i18nsupport=off endif +# Use Node arch names rather than V8 ones. +ifeq ($(DESTCPU),ia32) + override DESTCPU=x86 +endif +ifeq ($(DESTCPU),aarch64) + override DESTCPU=arm64 +endif + +ifdef DESTCPU + # TODO(gib): only add if not already there + CONFIG_FLAGS += --dest-cpu=$(DESTCPU) +endif + BUILDTYPE_LOWER := $(shell echo $(BUILDTYPE) | tr '[A-Z]' '[a-z]') # Determine EXEEXT @@ -564,86 +577,53 @@ RELEASE=$(shell sed -ne 's/\#define NODE_VERSION_IS_RELEASE \([01]\)/\1/p' src/n PLATFORM=$(shell uname | tr '[:upper:]' '[:lower:]') NPMVERSION=v$(shell cat deps/npm/package.json | grep '"version"' | sed 's/^[^:]*: "\([^"]*\)",.*/\1/') -UNAME_M=$(shell uname -m) -ifeq ($(findstring x86_64,$(UNAME_M)),x86_64) -DESTCPU ?= x64 -else -ifeq ($(findstring ppc64,$(UNAME_M)),ppc64) -DESTCPU ?= ppc64 -else -ifeq ($(findstring ppc,$(UNAME_M)),ppc) -DESTCPU ?= ppc -else -ifeq ($(findstring s390x,$(UNAME_M)),s390x) -DESTCPU ?= s390x -else -ifeq ($(findstring s390,$(UNAME_M)),s390) -DESTCPU ?= s390 -else -ifeq ($(findstring arm,$(UNAME_M)),arm) -DESTCPU ?= arm -else -ifeq ($(findstring aarch64,$(UNAME_M)),aarch64) -DESTCPU ?= aarch64 -else -ifeq ($(findstring powerpc,$(shell uname -p)),powerpc) -DESTCPU ?= ppc64 -else -DESTCPU ?= x86 -endif -endif -endif -endif -endif -endif -endif -endif -ifeq ($(DESTCPU),x64) -ARCH=x64 -else -ifeq ($(DESTCPU),arm) -ARCH=arm -else -ifeq ($(DESTCPU),aarch64) -ARCH=arm64 -else -ifeq ($(DESTCPU),ppc64) -ARCH=ppc64 -else -ifeq ($(DESTCPU),ppc) -ARCH=ppc +ifdef DESTCPU + ARCH = $(DESTCPU) else -ifeq ($(DESTCPU),s390) -ARCH=s390 -else -ifeq ($(DESTCPU),s390x) -ARCH=s390x -else -ARCH=x86 -endif -endif -endif -endif -endif -endif -endif - -# node and v8 use different arch names (e.g. node 'x86' vs v8 'ia32'). -# pass the proper v8 arch name to $V8_ARCH based on user-specified $DESTCPU. -ifeq ($(DESTCPU),x86) + UNAME_M=$(shell uname -m) + ifeq ($(findstring x86_64,$(UNAME_M)),x86_64) + ARCH ?= x64 + else + ifeq ($(findstring ppc64,$(UNAME_M)),ppc64) + ARCH ?= ppc64 + else + ifeq ($(findstring ppc,$(UNAME_M)),ppc) + ARCH ?= ppc + else + ifeq ($(findstring s390x,$(UNAME_M)),s390x) + ARCH ?= s390x + else + ifeq ($(findstring s390,$(UNAME_M)),s390) + ARCH ?= s390 + else + ifeq ($(findstring arm,$(UNAME_M)),arm) + ARCH ?= arm + else + ifeq ($(findstring aarch64,$(UNAME_M)),aarch64) + ARCH ?= aarch64 + else + ifeq ($(findstring powerpc,$(shell uname -p)),powerpc) + ARCH ?= ppc64 + else + ARCH ?= x86 + endif + endif + endif + endif + endif + endif + endif + endif +endif + +# Handle Node and V8 arch name differences for x86 and arm64. +ifeq ($(ARCH),x86) V8_ARCH=ia32 -else -V8_ARCH ?= $(DESTCPU) - endif - -# enforce "x86" over "ia32" as the generally accepted way of referring to 32-bit intel -ifeq ($(ARCH),ia32) -override ARCH=x86 -endif -ifeq ($(DESTCPU),ia32) -override DESTCPU=x86 +ifeq ($(ARCH),arm64) +V8_ARCH ?= aarch64 endif +V8_ARCH ?= $(ARCH) TARNAME=node-$(FULLVERSION) TARBALL=$(TARNAME).tar @@ -762,7 +742,6 @@ doc-upload: doc $(TARBALL)-headers: release-only $(PYTHON) ./configure \ --prefix=/ \ - --dest-cpu=$(DESTCPU) \ --tag=$(TAG) \ --release-urlbase=$(RELEASE_URLBASE) \ $(CONFIG_FLAGS) $(BUILD_RELEASE_FLAGS) @@ -789,12 +768,12 @@ ifeq ($(XZ), 0) ssh $(STAGINGSERVER) "touch nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.xz.done" endif -$(BINARYTAR): release-only +$(BINARYTAR): #release-only + echo arch=$(ARCH), destcpu=$(DESTCPU), binaryname=$(BINARYNAME), binarytar=$(BINARYTAR) #&& exit 1 $(RM) -r $(BINARYNAME) $(RM) -r out/deps out/Release $(PYTHON) ./configure \ --prefix=/ \ - --dest-cpu=$(DESTCPU) \ --tag=$(TAG) \ --release-urlbase=$(RELEASE_URLBASE) \ $(CONFIG_FLAGS) $(BUILD_RELEASE_FLAGS) @@ -813,7 +792,8 @@ endif binary: $(BINARYTAR) binary-upload: binary - ssh $(STAGINGSERVER) "mkdir -p nodejs/$(DISTTYPEDIR)/$(FULLVERSION)" + echo arch=$(ARCH), destcpu=$(DESTCPU) #&& exit 1 + #ssh $(STAGINGSERVER) "mkdir -p nodejs/$(DISTTYPEDIR)/$(FULLVERSION)" chmod 664 node-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.gz scp -p node-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.gz $(STAGINGSERVER):nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/node-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.gz ssh $(STAGINGSERVER) "touch nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/node-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.gz.done" diff --git a/doc/api/assert.md b/doc/api/assert.md index 3ad9d336460e..c9c5a9ede26c 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -18,7 +18,7 @@ An alias of [`assert.ok()`][]. @@ -736,7 +736,7 @@ console.log(arr.sort(Buffer.compare)); @@ -984,7 +984,7 @@ console.log(buffer.buffer === arrayBuffer); @@ -1257,7 +1257,7 @@ console.log(buf.includes('this', 4)); @@ -1503,7 +1503,7 @@ console.log(buf.length); ### buf.parent > Stability: 0 - Deprecated: Use [`buf.buffer`] instead. @@ -2517,7 +2517,7 @@ Note that this is a property on the `buffer` module returned by diff --git a/doc/api/child_process.md b/doc/api/child_process.md index 7bc523f64661..fff0e5876e53 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -297,7 +297,7 @@ getVersion(); @@ -737,7 +737,7 @@ execution.** Emit pending deprecation warnings. @@ -160,7 +160,7 @@ Silence all process warnings (including deprecations). ### `--napi-modules` Enable loading native modules compiled with the ABI-stable Node.js API (N-API) @@ -175,7 +175,7 @@ Print stack traces for process warnings (including deprecations). ### `--redirect-warnings=file` Write process warnings to the given file instead of printing to stderr. The @@ -399,7 +399,7 @@ When set to `1`, process warnings are silenced. ### `NODE_OPTIONS=options...` `options...` are interpreted as if they had been specified on the command line @@ -437,7 +437,7 @@ V8 options that are allowed are: ### `NODE_PENDING_DEPRECATION=1` When set to `1`, emit pending deprecation warnings. @@ -519,7 +519,7 @@ OpenSSL, it may cause them to trust the same CAs as node. ### `NODE_REDIRECT_WARNINGS=file` When set, process warnings will be emitted to the given file instead of diff --git a/doc/api/console.md b/doc/api/console.md index ca4ff637d9e1..0f1d8308221b 100644 --- a/doc/api/console.md +++ b/doc/api/console.md @@ -55,7 +55,7 @@ myConsole.warn(`Danger ${name}! Danger!`); ## Class: Console @@ -1095,7 +1095,7 @@ This can be called many times with new data as it is streamed. @@ -1277,10 +1277,10 @@ The `key` is the raw key used by the `algorithm` and `iv` is an * `warning` {string|Error} The warning to emit. diff --git a/doc/api/querystring.md b/doc/api/querystring.md index 64d557eec722..197ed179f024 100644 --- a/doc/api/querystring.md +++ b/doc/api/querystring.md @@ -31,7 +31,7 @@ necessary by assigning `querystring.escape` to an alternative function. Destroy the stream, and emit the passed error. After this call, the @@ -1081,7 +1081,7 @@ myReader.on('readable', () => { ##### readable.destroy([error]) Destroy the stream, and emit `'error'`. After this call, the @@ -1130,7 +1130,7 @@ Examples of Transform streams include: ##### transform.destroy([error]) Destroy the stream, and emit `'error'`. After this call, the @@ -1389,7 +1389,7 @@ user programs. #### writable.\_destroy(err, callback) * `err` {Error} An error. diff --git a/doc/api/string_decoder.md b/doc/api/string_decoder.md index a92f62ebcdfe..ab95bb315a9f 100644 --- a/doc/api/string_decoder.md +++ b/doc/api/string_decoder.md @@ -68,7 +68,7 @@ is performed before returning the remaining input. * `original` {Function} @@ -471,7 +471,7 @@ standard format of taking an error-first callback as the last argument. ### util.promisify.custom * {symbol} diff --git a/doc/api/v8.md b/doc/api/v8.md index 21c2627898e4..a36fcb385556 100644 --- a/doc/api/v8.md +++ b/doc/api/v8.md @@ -11,7 +11,7 @@ const v8 = require('v8'); ## v8.cachedDataVersionTag() Returns an integer representing a "version tag" derived from the V8 version, @@ -172,7 +172,7 @@ changes to the API or wire format) may occur until this warning is removed. ### v8.serialize(value) * Returns: {Buffer} @@ -181,7 +181,7 @@ Uses a [`DefaultSerializer`][] to serialize `value` into a buffer. ### v8.deserialize(buffer) * `buffer` {Buffer|Uint8Array} A buffer returned by [`serialize()`][]. @@ -191,7 +191,7 @@ from a buffer. ### class: v8.Serializer #### new Serializer() @@ -300,7 +300,7 @@ The default is not to treat those objects as host objects. ### class: v8.Deserializer #### new Deserializer(buffer) @@ -379,7 +379,7 @@ provided by subclasses. ### class: v8.DefaultSerializer A subclass of [`Serializer`][] that serializes `TypedArray` @@ -388,7 +388,7 @@ stores the part of their underlying `ArrayBuffer`s that they are referring to. ### class: v8.DefaultDeserializer A subclass of [`Deserializer`][] corresponding to the format written by diff --git a/doc/api/zlib.md b/doc/api/zlib.md index f889914bb0ba..35ec0d5825e6 100644 --- a/doc/api/zlib.md +++ b/doc/api/zlib.md @@ -277,7 +277,7 @@ Compression strategy. @@ -502,10 +502,10 @@ changes: @@ -518,10 +518,10 @@ Compress a chunk of data with [Deflate][]. @@ -529,10 +529,10 @@ changes: @@ -545,10 +545,10 @@ Compress a chunk of data with [DeflateRaw][]. @@ -556,10 +556,10 @@ changes: @@ -572,10 +572,10 @@ Decompress a chunk of data with [Gunzip][]. @@ -583,10 +583,10 @@ changes: @@ -599,10 +599,10 @@ Compress a chunk of data with [Gzip][]. @@ -610,10 +610,10 @@ changes: @@ -626,10 +626,10 @@ Decompress a chunk of data with [Inflate][]. @@ -637,10 +637,10 @@ changes: @@ -653,10 +653,10 @@ Decompress a chunk of data with [InflateRaw][]. @@ -664,10 +664,10 @@ changes: diff --git a/src/node_version.h b/src/node_version.h index ff194b21815d..056ecde0aa5a 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -26,7 +26,7 @@ #define NODE_MINOR_VERSION 0 #define NODE_PATCH_VERSION 0 -#define NODE_VERSION_IS_RELEASE 0 +#define NODE_VERSION_IS_RELEASE 1 #ifndef NODE_STRINGIFY #define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n)