Skip to content

Commit 5fab92c

Browse files
refacktargos
authored andcommitted
build: remove AIX/ppc (32bit) dead code
* also dedup OS400 detection PR-URL: #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 4031b5c commit 5fab92c

File tree

2 files changed

+27
-71
lines changed

2 files changed

+27
-71
lines changed

common.gypi

+27-50
Original file line numberDiff line numberDiff line change
@@ -116,28 +116,8 @@
116116
'msvs_configuration_platform': 'x64',
117117
}],
118118
['OS=="aix"', {
119-
'variables': {'real_os_name': '<!(uname -s)',},
120119
'cflags': [ '-gxcoff' ],
121120
'ldflags': [ '-Wl,-bbigtoc' ],
122-
'conditions': [
123-
['target_arch=="ppc64"', {
124-
'ldflags': [
125-
'-Wl,-blibpath:/usr/lib:/lib:'
126-
'/opt/freeware/lib/pthread/ppc64'
127-
],
128-
}],
129-
['target_arch=="ppc"', {
130-
'ldflags': [
131-
'-Wl,-blibpath:/usr/lib:/lib:/opt/freeware/lib/pthread'
132-
],
133-
}],
134-
['"<(real_os_name)"=="OS400"', {
135-
'ldflags': [
136-
'-Wl,-blibpath:/QOpenSys/pkgs/lib:/QOpenSys/usr/lib',
137-
'-Wl,-brtl',
138-
],
139-
}],
140-
],
141121
}],
142122
['OS == "android"', {
143123
'cflags': [ '-fPIE' ],
@@ -414,9 +394,9 @@
414394
'ldflags': [ '-m32' ],
415395
}],
416396
[ 'target_arch=="ppc64" and OS!="aix"', {
417-
'cflags': [ '-m64', '-mminimal-toc' ],
418-
'ldflags': [ '-m64' ],
419-
}],
397+
'cflags': [ '-m64', '-mminimal-toc' ],
398+
'ldflags': [ '-m64' ],
399+
}],
420400
[ 'target_arch=="s390"', {
421401
'cflags': [ '-m31', '-march=z196' ],
422402
'ldflags': [ '-m31', '-march=z196' ],
@@ -431,38 +411,35 @@
431411
'cflags!': [ '-pthread' ],
432412
'ldflags!': [ '-pthread' ],
433413
}],
434-
[ 'OS=="aix"', {
435-
'variables': {'real_os_name': '<!(uname -s)',},
436-
'conditions': [
437-
[ 'target_arch=="ppc"', {
438-
'ldflags': [
439-
'-Wl,-bmaxdata:0x60000000/dsa',
440-
'-Wl,-blibpath:/usr/lib:/lib:/opt/freeware/lib/pthread',
441-
],
442-
}],
443-
[ 'target_arch=="ppc64"', {
444-
'cflags': [ '-maix64' ],
445-
'ldflags': [
446-
'-maix64',
447-
'-Wl,-blibpath:/usr/lib:/lib:'
448-
'/opt/freeware/lib/pthread/ppc64',
449-
],
450-
}],
451-
['"<(real_os_name)"=="OS400"', {
452-
'ldflags': [
453-
'-Wl,-blibpath:/QOpenSys/pkgs/lib:/QOpenSys/usr/lib',
454-
'-Wl,-brtl',
455-
],
456-
}],
457-
],
458-
'ldflags': [ '-Wl,-bbigtoc' ],
459-
'ldflags!': [ '-rdynamic' ],
460-
}],
461414
[ 'node_shared=="true"', {
462415
'cflags': [ '-fPIC' ],
463416
}],
464417
],
465418
}],
419+
[ 'OS=="aix"', {
420+
'variables': {
421+
# Used to differentiate `AIX` and `OS400`(IBM i).
422+
'aix_variant_name': '<!(uname -s)',
423+
},
424+
'cflags': [ '-maix64', ],
425+
'ldflags!': [ '-rdynamic', ],
426+
'ldflags': [
427+
'-Wl,-bbigtoc',
428+
'-maix64',
429+
],
430+
'conditions': [
431+
[ '"<(aix_variant_name)"=="OS400"', { # a.k.a. `IBM i`
432+
'ldflags': [
433+
'-Wl,-blibpath:/QOpenSys/pkgs/lib:/QOpenSys/usr/lib',
434+
'-Wl,-brtl',
435+
],
436+
}, { # else it's `AIX`
437+
'ldflags': [
438+
'-Wl,-blibpath:/usr/lib:/lib:/opt/freeware/lib/pthread/ppc64',
439+
],
440+
}],
441+
],
442+
}],
466443
['OS=="android"', {
467444
'target_conditions': [
468445
['_toolset=="target"', {

node.gyp

-21
Original file line numberDiff line numberDiff line change
@@ -1044,34 +1044,13 @@
10441044

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

0 commit comments

Comments
 (0)