From d4899b2b7563ed995414c8d8cf128633df23f2ff Mon Sep 17 00:00:00 2001 From: Xu Meng Date: Wed, 22 Feb 2023 12:18:56 +0800 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/46739 Reviewed-By: Colin Ihrig Reviewed-By: Richard Lau --- Makefile | 3 +++ common.gypi | 12 ++++++------ configure.py | 9 +++++++-- deps/cares/cares.gyp | 2 +- deps/uv/common.gypi | 2 +- deps/uv/uv.gyp | 15 +++++++++++++++ node.gyp | 12 ++++++------ node.gypi | 6 +++--- test/addons/common.gypi | 2 +- test/addons/dlopen-ping-pong/binding.gyp | 2 +- test/addons/openssl-binding/binding.gyp | 2 +- test/addons/openssl-providers/binding.gyp | 2 +- test/addons/zlib-binding/binding.gyp | 2 +- tools/install.py | 2 +- tools/v8_gypfiles/d8.gyp | 2 +- tools/v8_gypfiles/toolchain.gypi | 16 ++++++++-------- tools/v8_gypfiles/v8.gyp | 4 ++-- 17 files changed, 59 insertions(+), 36 deletions(-) diff --git a/Makefile b/Makefile index 830413fdba81da..85849c01df8ffd 100644 --- a/Makefile +++ b/Makefile @@ -368,6 +368,9 @@ DOCBUILDSTAMP_PREREQS = tools/doc/addon-verify.mjs doc/api/addons.md ifeq ($(OSTYPE),aix) DOCBUILDSTAMP_PREREQS := $(DOCBUILDSTAMP_PREREQS) out/$(BUILDTYPE)/node.exp endif +ifeq ($(OSTYPE),os400) +DOCBUILDSTAMP_PREREQS := $(DOCBUILDSTAMP_PREREQS) out/$(BUILDTYPE)/node.exp +endif node_use_openssl = $(call available-node,"-p" \ "process.versions.openssl != undefined") diff --git a/common.gypi b/common.gypi index 1520afd37b68fb..b1d87780db54c3 100644 --- a/common.gypi +++ b/common.gypi @@ -137,7 +137,7 @@ 'defines': [ 'DEBUG', '_DEBUG', 'V8_ENABLE_CHECKS' ], 'cflags': [ '-g', '-O0' ], 'conditions': [ - ['OS=="aix"', { + ['OS in "aix os400"', { 'cflags': [ '-gxcoff' ], 'ldflags': [ '-Wl,-bbigtoc' ], }], @@ -393,11 +393,11 @@ 'BUILDING_UV_SHARED=1', ], }], - [ 'OS in "linux freebsd openbsd solaris aix"', { + [ 'OS in "linux freebsd openbsd solaris aix os400"', { 'cflags': [ '-pthread' ], 'ldflags': [ '-pthread' ], }], - [ 'OS in "linux freebsd openbsd solaris android aix cloudabi"', { + [ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi"', { 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ], 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++17' ], 'defines': [ '__STDC_FORMAT_MACROS' ], @@ -421,11 +421,11 @@ 'cflags': [ '-m64' ], 'ldflags': [ '-m64' ], }], - [ 'target_arch=="ppc" and OS!="aix"', { + [ 'target_arch=="ppc" and OS not in "aix os400"', { 'cflags': [ '-m32' ], 'ldflags': [ '-m32' ], }], - [ 'target_arch=="ppc64" and OS!="aix"', { + [ 'target_arch=="ppc64" and OS not in "aix os400"', { 'cflags': [ '-m64', '-mminimal-toc' ], 'ldflags': [ '-m64' ], }], @@ -444,7 +444,7 @@ }], ], }], - [ 'OS=="aix"', { + [ 'OS in "aix os400"', { 'variables': { # Used to differentiate `AIX` and `OS400`(IBM i). 'aix_variant_name': '