Skip to content

Commit

Permalink
build: remove AIX/ppc (32bit) dead code
Browse files Browse the repository at this point in the history
* also dedup OS400 detection

PR-URL: #25523
Refs: https://github.com/nodejs/node/pull/25447/files/36839defcfaf7c46435e16fb1f0da006f3ebe8ac#r247378894
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
  • Loading branch information
refack authored and BethGriggs committed May 10, 2019
1 parent f71c55b commit a4da17a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 71 deletions.
77 changes: 27 additions & 50 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -113,28 +113,8 @@
'msvs_configuration_platform': 'x64',
}],
['OS=="aix"', {
'variables': {'real_os_name': '<!(uname -s)',},
'cflags': [ '-gxcoff' ],
'ldflags': [ '-Wl,-bbigtoc' ],
'conditions': [
['target_arch=="ppc64"', {
'ldflags': [
'-Wl,-blibpath:/usr/lib:/lib:'
'/opt/freeware/lib/pthread/ppc64'
],
}],
['target_arch=="ppc"', {
'ldflags': [
'-Wl,-blibpath:/usr/lib:/lib:/opt/freeware/lib/pthread'
],
}],
['"<(real_os_name)"=="OS400"', {
'ldflags': [
'-Wl,-blibpath:/QOpenSys/pkgs/lib:/QOpenSys/usr/lib',
'-Wl,-brtl',
],
}],
],
}],
['OS == "android"', {
'cflags': [ '-fPIE' ],
Expand Down Expand Up @@ -422,9 +402,9 @@
'ldflags': [ '-m32' ],
}],
[ 'target_arch=="ppc64" and OS!="aix"', {
'cflags': [ '-m64', '-mminimal-toc' ],
'ldflags': [ '-m64' ],
}],
'cflags': [ '-m64', '-mminimal-toc' ],
'ldflags': [ '-m64' ],
}],
[ 'target_arch=="s390"', {
'cflags': [ '-m31', '-march=z196' ],
'ldflags': [ '-m31', '-march=z196' ],
Expand All @@ -439,38 +419,35 @@
'cflags!': [ '-pthread' ],
'ldflags!': [ '-pthread' ],
}],
[ 'OS=="aix"', {
'variables': {'real_os_name': '<!(uname -s)',},
'conditions': [
[ 'target_arch=="ppc"', {
'ldflags': [
'-Wl,-bmaxdata:0x60000000/dsa',
'-Wl,-blibpath:/usr/lib:/lib:/opt/freeware/lib/pthread',
],
}],
[ 'target_arch=="ppc64"', {
'cflags': [ '-maix64' ],
'ldflags': [
'-maix64',
'-Wl,-blibpath:/usr/lib:/lib:'
'/opt/freeware/lib/pthread/ppc64',
],
}],
['"<(real_os_name)"=="OS400"', {
'ldflags': [
'-Wl,-blibpath:/QOpenSys/pkgs/lib:/QOpenSys/usr/lib',
'-Wl,-brtl',
],
}],
],
'ldflags': [ '-Wl,-bbigtoc' ],
'ldflags!': [ '-rdynamic' ],
}],
[ 'node_shared=="true"', {
'cflags': [ '-fPIC' ],
}],
],
}],
[ 'OS=="aix"', {
'variables': {
# Used to differentiate `AIX` and `OS400`(IBM i).
'aix_variant_name': '<!(uname -s)',
},
'cflags': [ '-maix64', ],
'ldflags!': [ '-rdynamic', ],
'ldflags': [
'-Wl,-bbigtoc',
'-maix64',
],
'conditions': [
[ '"<(aix_variant_name)"=="OS400"', { # a.k.a. `IBM i`
'ldflags': [
'-Wl,-blibpath:/QOpenSys/pkgs/lib:/QOpenSys/usr/lib',
'-Wl,-brtl',
],
}, { # else it's `AIX`
'ldflags': [
'-Wl,-blibpath:/usr/lib:/lib:/opt/freeware/lib/pthread/ppc64',
],
}],
],
}],
['OS=="android"', {
'target_conditions': [
['_toolset=="target"', {
Expand Down
21 changes: 0 additions & 21 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -981,34 +981,13 @@

'conditions': [
[ 'OS=="aix" and node_shared=="true"', {
'variables': {'real_os_name': '<!(uname -s)',},
'targets': [
{
'target_name': 'node_aix_shared',
'type': 'shared_library',
'product_name': '<(node_core_target_name)',
'ldflags': [ '--shared' ],
'product_extension': '<(shlib_suffix)',
'conditions': [
['target_arch=="ppc64"', {
'ldflags': [
'-Wl,-blibpath:/usr/lib:/lib:'
'/opt/freeware/lib/pthread/ppc64'
],
}],
['target_arch=="ppc"', {
'ldflags': [
'-Wl,-blibpath:/usr/lib:/lib:/opt/freeware/lib/pthread'
],
}],
['"<(real_os_name)"=="OS400"', {
'ldflags': [
'-Wl,-blibpath:/QOpenSys/pkgs/lib:/QOpenSys/usr/lib',
'-Wl,-bbigtoc',
'-Wl,-brtl',
],
}],
],
'includes': [
'node.gypi'
],
Expand Down

0 comments on commit a4da17a

Please sign in to comment.