Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d4899b2

Browse filesBrowse files
dmabupttargos
authored andcommitted
build,test: add proper support for IBM i
Python 3.9 on IBM i now properly returns "os400" for sys.platform instead of claiming to be AIX as it did previously. While the IBM i PASE environment is compatible with AIX, it is a subset and has numerous differences which makes it beneficial to distinguish, however this means that it now needs explicit support here. PR-URL: #46739 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com>
1 parent 83b529f commit d4899b2
Copy full SHA for d4899b2

File tree

Expand file treeCollapse file tree

17 files changed

+59
-36
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

17 files changed

+59
-36
lines changed
Open diff view settings
Collapse file

‎Makefile‎

Copy file name to clipboardExpand all lines: Makefile
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,9 @@ DOCBUILDSTAMP_PREREQS = tools/doc/addon-verify.mjs doc/api/addons.md
368368
ifeq ($(OSTYPE),aix)
369369
DOCBUILDSTAMP_PREREQS := $(DOCBUILDSTAMP_PREREQS) out/$(BUILDTYPE)/node.exp
370370
endif
371+
ifeq ($(OSTYPE),os400)
372+
DOCBUILDSTAMP_PREREQS := $(DOCBUILDSTAMP_PREREQS) out/$(BUILDTYPE)/node.exp
373+
endif
371374

372375
node_use_openssl = $(call available-node,"-p" \
373376
"process.versions.openssl != undefined")
Collapse file

‎common.gypi‎

Copy file name to clipboardExpand all lines: common.gypi
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
'defines': [ 'DEBUG', '_DEBUG', 'V8_ENABLE_CHECKS' ],
138138
'cflags': [ '-g', '-O0' ],
139139
'conditions': [
140-
['OS=="aix"', {
140+
['OS in "aix os400"', {
141141
'cflags': [ '-gxcoff' ],
142142
'ldflags': [ '-Wl,-bbigtoc' ],
143143
}],
@@ -393,11 +393,11 @@
393393
'BUILDING_UV_SHARED=1',
394394
],
395395
}],
396-
[ 'OS in "linux freebsd openbsd solaris aix"', {
396+
[ 'OS in "linux freebsd openbsd solaris aix os400"', {
397397
'cflags': [ '-pthread' ],
398398
'ldflags': [ '-pthread' ],
399399
}],
400-
[ 'OS in "linux freebsd openbsd solaris android aix cloudabi"', {
400+
[ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi"', {
401401
'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
402402
'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++17' ],
403403
'defines': [ '__STDC_FORMAT_MACROS' ],
@@ -421,11 +421,11 @@
421421
'cflags': [ '-m64' ],
422422
'ldflags': [ '-m64' ],
423423
}],
424-
[ 'target_arch=="ppc" and OS!="aix"', {
424+
[ 'target_arch=="ppc" and OS not in "aix os400"', {
425425
'cflags': [ '-m32' ],
426426
'ldflags': [ '-m32' ],
427427
}],
428-
[ 'target_arch=="ppc64" and OS!="aix"', {
428+
[ 'target_arch=="ppc64" and OS not in "aix os400"', {
429429
'cflags': [ '-m64', '-mminimal-toc' ],
430430
'ldflags': [ '-m64' ],
431431
}],
@@ -444,7 +444,7 @@
444444
}],
445445
],
446446
}],
447-
[ 'OS=="aix"', {
447+
[ 'OS in "aix os400"', {
448448
'variables': {
449449
# Used to differentiate `AIX` and `OS400`(IBM i).
450450
'aix_variant_name': '<!(uname -s)',
Collapse file

‎configure.py‎

Copy file name to clipboardExpand all lines: configure.py
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
parser = argparse.ArgumentParser()
4646

4747
valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux',
48-
'android', 'aix', 'cloudabi', 'ios')
48+
'android', 'aix', 'cloudabi', 'os400', 'ios')
4949
valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64el', 'ppc',
5050
'ppc64', 'x64', 'x86', 'x86_64', 's390x', 'riscv64', 'loong64')
5151
valid_arm_float_abi = ('soft', 'softfp', 'hard')
@@ -1302,7 +1302,7 @@ def configure_node(o):
13021302
elif sys.platform == 'zos':
13031303
configure_zos(o)
13041304

1305-
if flavor == 'aix':
1305+
if flavor in ('aix', 'os400'):
13061306
o['variables']['node_target_type'] = 'static_library'
13071307

13081308
if target_arch in ('x86', 'x64', 'ia32', 'x32'):
@@ -1403,6 +1403,8 @@ def configure_node(o):
14031403
shlib_suffix = '%s.dylib'
14041404
elif sys.platform.startswith('aix'):
14051405
shlib_suffix = '%s.a'
1406+
elif sys.platform == 'os400':
1407+
shlib_suffix = '%s.a'
14061408
elif sys.platform.startswith('zos'):
14071409
shlib_suffix = '%s.x'
14081410
else:
@@ -1916,6 +1918,9 @@ def icu_download(path):
19161918
elif flavor == 'mac':
19171919
icu_config['variables']['icu_asm_ext'] = 'S'
19181920
icu_config['variables']['icu_asm_opts'] = [ '-a', 'gcc-darwin' ]
1921+
elif sys.platform == 'os400':
1922+
icu_config['variables']['icu_asm_ext'] = 'S'
1923+
icu_config['variables']['icu_asm_opts'] = [ '-a', 'xlc' ]
19191924
elif sys.platform.startswith('aix'):
19201925
icu_config['variables']['icu_asm_ext'] = 'S'
19211926
icu_config['variables']['icu_asm_opts'] = [ '-a', 'xlc' ]
Collapse file

‎deps/cares/cares.gyp‎

Copy file name to clipboardExpand all lines: deps/cares/cares.gyp
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
'_GNU_SOURCE'
1010
]
1111
}],
12-
[ 'OS=="aix"', {
12+
[ 'OS in "aix os400"', {
1313
'include_dirs': [ 'config/aix' ],
1414
'sources': [ 'config/aix/ares_config.h' ],
1515
'defines': [
Collapse file

‎deps/uv/common.gypi‎

Copy file name to clipboardExpand all lines: deps/uv/common.gypi
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
}]
136136
]
137137
}],
138-
['OS in "freebsd dragonflybsd linux openbsd solaris android aix"', {
138+
['OS in "freebsd dragonflybsd linux openbsd solaris android aix os400"', {
139139
'cflags': [ '-Wall' ],
140140
'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
141141
'target_conditions': [
Collapse file

‎deps/uv/uv.gyp‎

Copy file name to clipboardExpand all lines: deps/uv/uv.gyp
+15Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,21 @@
326326
}],
327327
]
328328
}],
329+
[ 'OS=="os400"', {
330+
'sources': [
331+
'src/unix/aix-common.c',
332+
'src/unix/ibmi.c',
333+
'src/unix/posix-poll.c',
334+
'src/unix/no-fsevents.c',
335+
'src/unix/no-proctitle.c',
336+
],
337+
'defines': [
338+
'_ALL_SOURCE',
339+
'_XOPEN_SOURCE=500',
340+
'_LINUX_SOURCE_COMPAT',
341+
'_THREAD_SAFE',
342+
],
343+
}],
329344
[ 'OS=="freebsd" or OS=="dragonflybsd"', {
330345
'sources': [ 'src/unix/freebsd.c' ],
331346
}],
Collapse file

‎node.gyp‎

Copy file name to clipboardExpand all lines: node.gyp
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
[ 'node_shared=="true"', {
6262
'node_target_type%': 'shared_library',
6363
'conditions': [
64-
['OS=="aix"', {
64+
['OS in "aix os400"', {
6565
# For AIX, always generate static library first,
6666
# It needs an extra step to generate exp and
6767
# then use both static lib and exp to create
@@ -110,7 +110,7 @@
110110
},
111111

112112
'conditions': [
113-
['OS=="aix"', {
113+
['OS in "aix os400"', {
114114
'ldflags': [
115115
'-Wl,-bnoerrmsg',
116116
],
@@ -192,7 +192,7 @@
192192
},
193193
}],
194194
[ 'node_intermediate_lib_type=="static_library" and '
195-
'node_shared=="true" and OS=="aix"', {
195+
'node_shared=="true" and OS in "aix os400"', {
196196
# For AIX, shared lib is linked by static lib and .exp. In the
197197
# case here, the executable needs to link to shared lib.
198198
# Therefore, use 'node_aix_shared' target to generate the
@@ -227,7 +227,7 @@
227227
},
228228
},
229229
'conditions': [
230-
['OS != "aix" and OS != "mac" and OS != "ios"', {
230+
['OS != "aix" and OS != "os400" and OS != "mac" and OS != "ios"', {
231231
'ldflags': [
232232
'-Wl,--whole-archive',
233233
'<(obj_dir)/<(STATIC_LIB_PREFIX)<(node_core_target_name)<(STATIC_LIB_SUFFIX)',
@@ -741,7 +741,7 @@
741741
'NODE_USE_NODE_CODE_CACHE=1',
742742
],
743743
}],
744-
['node_shared=="true" and OS=="aix"', {
744+
['node_shared=="true" and OS in "aix os400"', {
745745
'product_name': 'node_base',
746746
}],
747747
[ 'v8_enable_inspector==1', {
@@ -1170,7 +1170,7 @@
11701170
], # end targets
11711171

11721172
'conditions': [
1173-
['OS=="aix" and node_shared=="true"', {
1173+
['OS in "aix os400" and node_shared=="true"', {
11741174
'targets': [
11751175
{
11761176
'target_name': 'node_aix_shared',
Collapse file

‎node.gypi‎

Copy file name to clipboardExpand all lines: node.gypi
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
},
157157
},
158158
'conditions': [
159-
['OS!="aix" and OS!="ios" and node_shared=="false"', {
159+
['OS!="aix" and OS!="os400" and OS!="ios" and node_shared=="false"', {
160160
'ldflags': [
161161
'-Wl,--whole-archive',
162162
'<(obj_dir)/deps/zlib/<(STATIC_LIB_PREFIX)zlib<(STATIC_LIB_SUFFIX)',
@@ -195,7 +195,7 @@
195195
},
196196
},
197197
'conditions': [
198-
['OS!="aix" and OS!="ios" and node_shared=="false"', {
198+
['OS!="aix" and OS!="os400" and OS!="ios" and node_shared=="false"', {
199199
'ldflags': [
200200
'-Wl,--whole-archive',
201201
'<(obj_dir)/deps/uv/<(STATIC_LIB_PREFIX)uv<(STATIC_LIB_SUFFIX)',
@@ -233,7 +233,7 @@
233233
'-lkvm',
234234
],
235235
}],
236-
[ 'OS=="aix"', {
236+
[ 'OS in "aix os400"', {
237237
'defines': [
238238
'_LINUX_SOURCE_COMPAT',
239239
'__STDC_FORMAT_MACROS',
Collapse file

‎test/addons/common.gypi‎

Copy file name to clipboardExpand all lines: test/addons/common.gypi
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
'defines': [ 'V8_DEPRECATION_WARNINGS=1' ],
33
'conditions': [
4-
[ 'OS in "linux freebsd openbsd solaris android aix cloudabi"', {
4+
[ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi"', {
55
'cflags': ['-Wno-cast-function-type'],
66
}],
77
],
Collapse file

‎test/addons/dlopen-ping-pong/binding.gyp‎

Copy file name to clipboardExpand all lines: test/addons/dlopen-ping-pong/binding.gyp
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
'OTHER_LDFLAGS': [ '-Wl,-undefined', '-Wl,dynamic_lookup' ]
1212
}}],
1313
# Enable the shared object to be linked by runtime linker
14-
['OS=="aix"', {
14+
['OS in "aix os400"', {
1515
'ldflags': [ '-Wl,-G' ]
1616
}]],
1717
},

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.