Skip to content

Commit 5681ffe

Browse files
mhdawsonevanlucas
authored andcommitted
build: enable compilation for linuxOne
Changes to Node core in order to allow compilation for linuxOne. The ../archs/linux32-s390x/opensslconf.h and ../archs/linux64-s390x/opensslconf.h were automatically generated by running make linux-ppc linux-ppc64 in the deps/openssl/config directory as per our standard practice After these changes we still need a version of v8 which supports linuxOne but that will be coming soon in the 5.1 version of v8. Until then with these changes we'll be able to create a hybrid build which pulls in v8 from the http://github/andrewlow repo. PR-URL: #5941 Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
1 parent ee83c95 commit 5681ffe

9 files changed

Lines changed: 575 additions & 4 deletions

File tree

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,12 +332,20 @@ else
332332
ifeq ($(DESTCPU),ppc)
333333
ARCH=ppc
334334
else
335+
ifeq ($(DESTCPU),s390)
336+
ARCH=s390
337+
else
338+
ifeq ($(DESTCPU),s390x)
339+
ARCH=s390x
340+
else
335341
ARCH=x86
336342
endif
337343
endif
338344
endif
339345
endif
340346
endif
347+
endif
348+
endif
341349

342350
# node and v8 use different arch names (e.g. node 'x86' vs v8 'ia32').
343351
# pass the proper v8 arch name to $V8_ARCH based on user-specified $DESTCPU.

common.gypi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,14 @@
254254
'cflags': [ '-m64', '-mminimal-toc' ],
255255
'ldflags': [ '-m64' ],
256256
}],
257+
[ 'target_arch=="s390"', {
258+
'cflags': [ '-m31' ],
259+
'ldflags': [ '-m31' ],
260+
}],
261+
[ 'target_arch=="s390x"', {
262+
'cflags': [ '-m64' ],
263+
'ldflags': [ '-m64' ],
264+
}],
257265
[ 'OS=="solaris"', {
258266
'cflags': [ '-pthreads' ],
259267
'ldflags': [ '-pthreads' ],

configure

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ parser = optparse.OptionParser()
2828
valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux',
2929
'android', 'aix')
3030
valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'ppc', 'ppc64', 'x32',
31-
'x64', 'x86')
31+
'x64', 'x86', 's390', 's390x')
3232
valid_arm_float_abi = ('soft', 'softfp', 'hard')
3333
valid_arm_fpu = ('vfp', 'vfpv3', 'vfpv3-d16', 'neon')
3434
valid_mips_arch = ('loongson', 'r1', 'r2', 'r6', 'rx')
@@ -601,14 +601,17 @@ def host_arch_cc():
601601
'__PPC64__' : 'ppc64',
602602
'__PPC__' : 'ppc',
603603
'__x86_64__' : 'x64',
604+
'__s390__' : 's390',
605+
'__s390x__' : 's390x',
604606
}
605607

606608
rtn = 'ia32' # default
607609

608610
for i in matchup:
609611
if i in k and k[i] != '0':
610612
rtn = matchup[i]
611-
break
613+
if rtn != 's390':
614+
break
612615

613616
return rtn
614617

deps/openssl/config/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ COPT = no-shared no-symlinks
55
ARCHS = aix