Skip to content
This repository has been archived by the owner on Oct 16, 2021. It is now read-only.

Add s390/s390x Linux support to Node v6.x #58

Closed
wants to merge 48 commits into from
Closed

Conversation

gibfahn
Copy link

@gibfahn gibfahn commented Mar 29, 2016

Add support for Linux on s390/s390x to Node v6.

At the moment Node v6 doesn't support s390/s390x, so we add an equivalent to deps/v8z and use that when building. If some of the commits in this PR make it into the nodejs/node for Node v6 (in some form), then this PR will be refactored to work on top of those changes.

Now that Node master supports s390, all that is required is to add a deps/v8z directory, and change the build files so that they use it instead of deps/v8 when building on s390.

@mhdawson
Copy link

The changes so far look good to me. You might want to update though to have 2 commits. One which is: nodejs/node#5941 and then the remaining changes. That would make it easier when the change from 5941 lands (hopefully this might be tomorrow as I already have 1 lgtm)

@richardlau
Copy link

@gibm When I merged v4.4.0 I had to patch the tick processor changes to use deps/v8z instead of deps/v8 on s390/s390x. We should carry forward for v6.

@gibfahn gibfahn force-pushed the master-port branch 2 times, most recently from ff6b0ff to 22c109d Compare March 31, 2016 13:39
mscdex and others added 2 commits April 15, 2016 00:40
This commit switches from the eslint command-line tool to a custom
tool that uses eslint programmatically in order to perform linting
in parallel and to display linting results incrementally instead of
buffering them until the end.

Fixes: nodejs/node#5596
PR-URL: nodejs/node#5638
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Remove realpath() and realpathSync() cache.
Use the native uv_fs_realpath() which is faster
then the JS implementation by a few orders of magnitude.

PR-URL: nodejs/node#3594
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
jasnell and others added 21 commits April 15, 2016 10:36
Aligns the functionality of SlowBuffer with the new Buffer
constructor API. Next step is to docs-only deprecate
SlowBuffer.

Replace the internal uses of SlowBuffer with
`Buffer.allocUnsafeSlow(size)`

PR-URL: nodejs/node#5833
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
With the addition of `Buffer.allocUnsafeSlow(size)`
`SlowBuffer` can be deprecated... but docs-only for now.

PR-URL: nodejs/node#5833
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: nodejs/node#5833
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: nodejs/node#6224
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
PR-URL: nodejs/node#6225
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
PR-URL: nodejs/node#6226
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: nodejs/node#6227
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Do to various reasons, outlined in the committed document, domains were
only in core for 2 years before being deprecated. This outline explains
why they received criticism from the community and never gained traction
with module authors.

Also included is an example script that accompanies the postmortem
analysis.

PR-URL: nodejs/node#6159
Reviewed-By: Robert Lindstädt <robert.lindstaedt@gmail.com>
Reviewed-By: Kelvin Knighton <keltheceo@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Run tests in parallel if the environment variable JOBS
(which should contain a number of parallel jobs) is set.

PR-URL: nodejs/node#6208
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Up to now, `Z_FINISH` was always the flushing flag that was used
for the last chunk of input data. This patch makes this choice
configurable so that advanced users can perform e.g. decompression of
partial data using `Z_SYNC_FLUSH`, if that suits their needs.

Add tests to make sure that an error is thrown upon encountering
invalid `flush` or `finishFlush` flags.

Fixes: nodejs/node#5761
PR-URL: nodejs/node#6069
Reviewed-By: James M Snell <jasnell@gmail.com>
Some vm tests are not in strict mode because they need to create and use
global variables. By using `global.foo` instead of just `foo`, we can
still enable strict mode.

PR-URL: nodejs/node#6209
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
V8 is going to disallow non-primitive values on v8::FunctionTemplate
and v8::ObjectTemplate because those can't be shared across contexts.

Fixes: nodejs/node#6216
PR-URL: nodejs/node#6228
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Run the debugger with `--port=common.PORT` to avoid the use of the same
port.

PR-URL: nodejs/node#6246
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
On Linux and OS X systems, `fs.watch()` resolves the watched path to an
inode. This clarifies that `fs.watch()` watches the inode and not the
path. If the inode of the path subsequently changes, `fs.watch()` will
continue watching the original inode and events for the path will no
longer be emitted. This is expected behavior.

Fixes: nodejs/node#5039
PR-URL: nodejs/node#6099
Reviewed-By: James M Snell <jasnell@gmail.com>
Also add `EvalError`, `RangeError`, `ReferenceError`, `SyntaxError`,
`TypeError`, `URIError` to list of global types. Fix errors.markdown
copy accordingly.

Fixes: nodejs/node#5325.
PR-URL: nodejs/node#5329
Reviewed-By: James M Snell <jasnell@gmail.com>
The message argument for `assert.fail()` is the third argument, not the
first. Correct minor misuse in internal module.

PR-URL: nodejs/node#6211
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Original commit message:

     Improved diagnostic message for JS heap out of memory

     This patch replaces the unused 'take_snapshot' parameter on
     FatalProcessOutOfMemory() with a 'is_heap_oom' parameter.
     The parameter is set to true on error paths where the
     JS heap is out of memory, as distinct from a malloc()
     failure i.e. process out of memory.  The message output to
     stderr or passed to embedding applications via FatalErrorCallback
     is 'Javascript heap out of memory' rather than
     'process out of memory'.

     BUG=

     R=jochen@chromium.org, verwaest@chromium.org, michael_dawson@ca.ibm.com

     Review URL: https://codereview.chromium.org/1873443002

     Cr-Commit-Position: refs/heads/master@{#35431}

We'd like this in 6.x to help with diagnosing customer problems.
It provides a better message on OOM so that it is easier to
be able to tell whether the OOM was due to heap exhaustion
or running out of native memory.

PR-URL: nodejs/node#6218
Reviewed-By: Ben Noordhuis <ben@strongloop.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Moving the `message` event listener from the cluster object to each
worker object allows easier backporting of the recent jslint
changes since v5.x and older do not have v6.x's `worker` parameter
in the cluster object's `message` event.

PR-URL: nodejs/node#6212
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Clarify in docs for require.cache that reloading native modules
isn't supported.

Related: nodejs#6160
PR-URL: nodejs/node#6168
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs/node#6196
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Make the builtin libraries available for the `--eval` and
`--print` CLI options, using the same mechanism that the
REPL uses.

This renders workarounds like `node -e 'require("fs").doStuff()'`
unnecessary.

As part of this, the list of builtin modules and the code for
adding the corresponding properties to the target context is moved
to `internal/module.js`, and the previously missing `repl` entry
is added.

PR-URL: nodejs/node#6207
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
addaleax and others added 25 commits April 18, 2016 15:31
Make sure that the built-in modules in the repl stay non-enumerable.
Previously, they would pop up as enumerable properties of the global
object after having been accessed for the first time.

PR-URL: nodejs/node#6207
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Provide an example for implementing browser like behavior for console.assert.

This "fixes" nodejs/node#5340 by providing an
alternative to changing Node.js' implemented behavior. Instead, we
document the differences and show how to work around them if
browser like semantics are desired.

Fixes: nodejs/node#5340
PR-URL: nodejs/node#6169
Reviewed-By: Robert Jefe Lindstädt <robert.lindstaedt@gmail.com>
Reviewed-By: Jeff Harris <@techjeffharris>
PR-URL: nodejs/node#6100
Reviewed-By: James M Snell <jasnell@gmail.com>
These files are created by VS 2015 and should be ignored by git.

PR-URL: nodejs/node#6070
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This is created by vs 2015 for user & machine-specific files and should
be ignored by git.

PR-URL: nodejs/node#6070
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
* Modify tools/license-builder.sh to support ICU 57.1's plain text
license. (Separate issue to add ICU 57.1 in nodejs#6058)
* Update/regenerate LICENSE to include ICU 57.1's license
* Note that because the tool was rerun, the change in nodejs#6065 is already
included here.

PR-URL: nodejs/node#6068
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: James M Snell <jasnell@gmail.com>
calling digest or update on a hash object after digest has been called
now gives a topical error message instead of an error message saying that the
hash failed to initialize.

PR-URL: nodejs/node#6042
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs/node#6020
Reviewed-By: James M Snell <jasnell@gmail.com>
Removes the options block from the http 'response' event and attaches
it to Agent#getName where it belongs. Removes socketPath and documents
localAddress option.

PR-URL: nodejs/node#5993
Reviewed-By: James M Snell <jasnell@gmail.com>
https://github.com/nodejs/node/blob/master/lib/path.js#L187
https://github.com/nodejs/node/blob/master/lib/path.js#L1189

PR-URL: nodejs/node#5928
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Robert Jefe Lindstädt <robert.lindstaedt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs/node#6257
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs/node#6203
Reviewed-By: James M Snell <jasnell@gmail.com>
Special handling to detect when user has supplied a custom message.
Added a test for user message.
When testing if `actual` value is an error use
`util.isError` instead of `instanceof`.

Fixes: nodejs/node#2385
PR-URL: nodejs/node#2407
Reviewed-By: James M Snell <jasnell@gmail.com>
Correct alignment on variable assignments that span multiple lines in
preparation for lint rule to enforce such alignment.

PR-URL: nodejs/node#6242
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
Enforce alignment/indentation on variable assignments that span multiple
lines.

PR-URL: nodejs/node#6242
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit safely allows querystring keys that are named the same as
properties that are ordinarily inherited from Object.prototype such
as __proto__. Additionally, this commit provides a bit of a speed
improvement (~25% in the querystring-parse 'manypairs' benchmark)
when there are many unique keys.

Fixes: nodejs/node#5642
PR-URL: nodejs/node#6055
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit safely allows event names that are named the same as
properties that are ordinarily inherited from Object.prototype such
as __proto__.

Fixes: nodejs/node#728
PR-URL: nodejs/node#6092
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
An internal zlib error may cause _handle to be set to null.
Close now will check if there is a _handle prior to calling .close on
it.

PR-URL: nodejs/node#5982
Fixes: nodejs/node#6034
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Wait for the data to be received by the socket before creating the
clean-up timer. This way, a possible (though unlikely) `ECONNRESET`
error can be avoided.

PR-URL: nodejs/node#6166
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Make the servers listen on a free port number picked by the OS to avoid
rare `EADDRINUSE` errors on `SmartOS`.

Fixes: nodejs/node#6197
PR-URL: nodejs/node#6248
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Adds `2` as a return value of `on_headers_complete`, this mode will be
used to fix handling responses to `CONNECT` requests.

See: nodejs/node#6198
PR-URL: nodejs/node#6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
When handling a response to `CONNECT` request - skip message body
and do not attempt to parse the next message. `CONNECT` requests are
used in similar sense to HTTP Upgrade.

Fix: nodejs/node#6198
PR-URL: nodejs/node#6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
See: nodejs/node#6198
PR-URL: nodejs/node#6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
This patch fixes the warning introduced by the changes in e38bade.

Ref: nodejs/node#6092
PR-URL: nodejs/node#6276
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Since deps/v8 doesn't currently support s390/s390x, pick up
deps/v8z instead.

Based on afe84b8
	modified:   common.gypi
	modified:   configure
	modified:   lib/internal/v8_prof_processor.js
	modified:   node.gyp
@gibfahn gibfahn closed this Apr 26, 2016
@gibfahn gibfahn deleted the master-port branch April 26, 2016 08:44
@gibfahn
Copy link
Author

gibfahn commented Apr 26, 2016

Continued in #60

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.