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 #42

Merged
merged 13 commits into from
Oct 7, 2015
Merged

Add s390/s390x Linux support #42

merged 13 commits into from
Oct 7, 2015

Conversation

richardlau
Copy link

Add support for Linux on s390/s390x to Node v4. Since the base V8 doesn't yet support s390/s390x, add an equivalent to deps/v8z and use that when building.

  • Import V8 from http://github.com/andrewlow/v8z -- At 4.5.103.35
  • configure/.gyp changes to build on s390/s390x
  • openssl changes
  • npm test changes No longer required after rebase
  • tools/test.py tools/utils.py
  • changes to enable compilation of native modules No longer required after rebase
  • apply Node's V8 floating patches to deps/v8z

@mhdawson
Copy link

Added some specific comments to the PR

  1. On the openssl side the change the changes here should provide the template: build: First set of updates to enable PPC support nodejs/node#2124

In particular:

We add the platoform to

deps/openssl/config/Makefile 

Use that to generate the config file and put them in the right places in the tree (something like make linux-ppc, make linux-ppc64)

deps/openssl/config/archs/linux-ppc/opensslconf.h 
deps/openssl/config/archs/linux-ppc64/opensslconf.h 

Update deps/openssl/config/opensslconf.h to pull in the new header files

  1. We also needed changes in
    tools/test.py
    tools/utils.py

that I don't see in your PR

  1. There are also some other changes related to building native modules which are bundled into the patches for AIX so we'll need to make sure Stewart has pulled those in as well. I'm working to massage those into a form that we can contribute back to the community node and dependency repos but since naive zLinux support for V8 is not in the community repos yet we'll have to stick with an version closer to what we had for 0.12.X.

@richardlau
Copy link
Author

Updated commits based on review comments. I'd previously missed an array in configure of valid arch values (for --dest-cpu) and have corrected.

re 2) changes to tools/test.py and tools/utils.py I have made changes in line with what was changed for PowerPC.

@richardlau richardlau force-pushed the v4.x-port-s390 branch 3 times, most recently from f1945a8 to 7b3a4bf Compare September 24, 2015 19:35
@richardlau
Copy link
Author

re 3) I'm not aware of any changes related to zLinux for building native modules -- Those changes were AIX specific.

@mhdawson
Copy link

I'm pretty sure one change in particular is required. It copies the common.gypi from the runtime to the directory where the headers are expanded. This will be required because there are changes to the common.gypi (in the patches for zLinux) so without this step native modules will fail to compile. That part is not guarded for AIX. I wondered why we needed it, and we no longer need it for AIX because the changes for PPC in common.gypi are in the community but I believe we must have it for zLinux/native modules.

@richardlau
Copy link
Author

Ah okay, that makes sense. As the changes are at the moment we'd only need the change for s390 (31-bit) as that's the only change in common.gypi that is required (to pass the "-m31" compiler flag through to gcc). 64-bit gcc defaults to -m64, so natives module for s390x should compile without npm changes.

@richardlau
Copy link
Author

Added commit to add basic Linux s390/s390x support to deps/openssl 1).

As per nodejs/node#2124 (comment) the commit initially enables openssl for s390/s390x without ASM support.

@richardlau
Copy link
Author

Updated:

  • Now based on v8z 4.5.103.35.
  • Fixed missing else statement in Makefile
  • Added patch to node-gyp to copy common.gypi as per @mhdawson's comment

@richardlau richardlau force-pushed the v4.x-port-s390 branch 2 times, most recently from 98d398b to d031f2c Compare October 5, 2015 19:56
@richardlau
Copy link
Author

Rebased onto current v4.x-port branch.

@richardlau
Copy link
Author

Ported the following V8 backports/cherry-picks onto deps/v8z:

925b29f deps: backport f782159 from v8's upstream
5fbb248 deps: backport c281c15 from V8's upstream
b93ad5a deps: backport 357e6b9 from V8's upstream
8da3da4 deps: backport ff7d70b from V8's upstream
96670eb deps: backport 6d32be2 from v8's upstream
94972d5 deps: backport 0d01728 from v8's upstream
6098504 deps: cherry-pick 6da51b4 from v8's upstream
e1c9761 deps: improve ArrayBuffer performance in v8
155783d deps: backport 75e43a6 from v8 upstream (again)
714e96e deps: backport 75e43a6 from v8 upstream

sxa pushed a commit that referenced this pull request Oct 7, 2015
[WIP] Add s390/s390x Linux support
@sxa sxa merged commit 91e04d2 into v4.x-port Oct 7, 2015
@richardlau richardlau changed the title [WIP] Add s390/s390x Linux support Add s390/s390x Linux support Oct 7, 2015
@richardlau richardlau deleted the v4.x-port-s390 branch October 8, 2015 20:00
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.

3 participants