Skip to content

Commit b1a4e41

Browse files
committed
build: remove AIX/ppc (32bit) dead code
* also dedup OS400 detection PR-URL: nodejs#25523 Refs: https://github.com/nodejs/node/pull/25447/files/36839defcfaf7c46435e16fb1f0da006f3ebe8ac#r247378894 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Beth Griggs <[email protected]>
1 parent a6286e6 commit b1a4e41

File tree

2 files changed

+27
-71
lines changed

2 files changed

+27
-71
lines changed

common.gypi

Lines changed: 27 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -145,28 +145,8 @@
145145
'msvs_configuration_platform': 'x64',
146146
}],
147147
['OS=="aix"', {
148-
'variables': {'real_os_name': '<!(uname -s)',},
149148
'cflags': [ '-gxcoff' ],
150149
'ldflags': [ '-Wl,-bbigtoc' ],
151-
'conditions': [
152-
['target_arch=="ppc64"', {
153-
'ldflags': [
154-
'-Wl,-blibpath:/usr/lib:/lib:'
155-
'/opt/freeware/lib/pthread/ppc64'
156-
],
157-
}],
158-
['target_arch=="ppc"', {
159-
'ldflags': [
160-
'-Wl,-blibpath:/usr/lib:/lib:/opt/freeware/lib/pthread'
161-
],
162-
}],
163-
['"<(real_os_name)"=="OS400"', {
164-
'ldflags': [
165-
'-Wl,-blibpath:/QOpenSys/pkgs/lib:/QOpenSys/usr/lib',
166-
'-Wl,-brtl',
167-
],
168-
}],
169-
],
170150
}],
171151
['OS == "android"', {
172152
'cflags': [ '-fPIE' ],
@@ -451,9 +431,9 @@
451431
'ldflags': [ '-m32' ],
452432
}],
453433
[ 'target_arch=="ppc64" and OS!="aix"', {
454-
'cflags': [ '-m64', '-mminimal-toc' ],
455-
'ldflags': [ '-m64' ],
456-
}],
434+
'cflags': [ '-m64', '-mminimal-toc' ],
435+
'ldflags': [ '-m64' ],
436+
}],
457437
[ 'target_arch=="s390"', {
458438
'cflags': [ '-m31', '-march=z196' ],
459439
'ldflags': [ '-m31', '-march=z196' ],
@@ -468,38 +448,35 @@
468448
'cflags!': [ '-pthread' ],
469449
'ldflags!': [ '-pthread' ],
470450
}],
471-
[ 'OS=="aix"', {
472-
'variables': {'real_os_name': '<!(uname -s)',},
473-
'conditions': [
474-
[ 'target_arch=="ppc"', {
475-
'ldflags': [
476-
'-Wl,-bmaxdata:0x60000000/dsa',
477-
'-Wl,-blibpath:/usr/lib:/lib:/opt/freeware/lib/pthread',
478-
],
479-
}],
480-
[ 'target_arch=="ppc64"', {
481-
'cflags': [ '-maix64' ],
482-
'ldflags': [
483-
'-maix64',
484-
'-Wl,-blibpath:/usr/lib:/lib:'
485-
'/opt/freeware/lib/pthread/ppc64',
486-
],
487-
}],
488-
['"<(real_os_name)"=="OS400"', {
489-
'ldflags': [
490-
'-Wl,-blibpath:/QOpenSys/pkgs/lib:/QOpenSys/usr/lib',
491-
'-Wl,-brtl',
492-
],
493-
}],
494-
],
495-
'ldflags': [ '-Wl,-bbigtoc' ],
496-
'ldflags!': [ '-rdynamic' ],
497-
}],
498451
[ 'node_shared=="true"', {
499452
'cflags': [ '-fPIC' ],
500453
}],
501454
],
502455
}],
456+
[ 'OS=="aix"', {
457+
'variables': {
458+
# Used to differentiate `AIX` and `OS400`(IBM i).
459+
'aix_variant_name': '<!(uname -s)',
460+
},
461+
'cflags': [ '-maix64', ],
462+
'ldflags!': [ '-rdynamic', ],
463+
'ldflags': [
464+
'-Wl,-bbigtoc',
465+
'-maix64',
466+
],
467+
'conditions': [
468+
[ '"<(aix_variant_name)"=="OS400"', { # a.k.a. `IBM i`
469+
'ldflags': [
470+
'-Wl,-blibpath:/QOpenSys/pkgs/lib:/QOpenSys/usr/lib',
471+
'-Wl,-brtl',
472+
],
473+
}, { # else it's `AIX`
474+
'ldflags': [
475+
'-Wl,-blibpath:/usr/lib:/lib:/opt/freeware/lib/pthread/ppc64',
476+
],
477+
}],
478+
],
479+
}],
503480
['OS=="android"', {
504481
'target_conditions': [
505482
['_toolset=="target"', {

node.gyp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,34 +1043,13 @@
10431043

10441044
'conditions': [
10451045
[ 'OS=="aix" and node_shared=="true"', {
1046-
'variables': {'real_os_name': '<!(uname -s)',},
10471046
'targets': [
10481047
{
10491048
'target_name': 'node_aix_shared',
10501049
'type': 'shared_library',
10511050
'product_name': '<(node_core_target_name)',
10521051
'ldflags': [ '--shared' ],
10531052
'product_extension': '<(shlib_suffix)',
1054-
'conditions': [
1055-
['target_arch=="ppc64"', {
1056-
'ldflags': [
1057-
'-Wl,-blibpath:/usr/lib:/lib:'
1058-
'/opt/freeware/lib/pthread/ppc64'
1059-
],
1060-
}],
1061-
['target_arch=="ppc"', {
1062-
'ldflags': [
1063-
'-Wl,-blibpath:/usr/lib:/lib:/opt/freeware/lib/pthread'
1064-
],
1065-
}],
1066-
['"<(real_os_name)"=="OS400"', {
1067-
'ldflags': [
1068-
'-Wl,-blibpath:/QOpenSys/pkgs/lib:/QOpenSys/usr/lib',
1069-
'-Wl,-bbigtoc',
1070-
'-Wl,-brtl',
1071-
],
1072-
}],
1073-
],
10741053
'includes': [
10751054
'node.gypi'
10761055
],

0 commit comments

Comments
 (0)