From e9369073d949979e51cee03a61f82c5c4f604e10 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Fri, 11 Jan 2019 16:36:33 +0000 Subject: [PATCH] build: set `-blibpath:` for AIX https://github.com/nodejs/node/pull/17604 refactored the gyp files so that `-blibpath:` on AIX was only set if `node_shared=="true"`. Restore the setting for non-shared builds. Fixes: https://github.com/nodejs/node/issues/25444 Backport-PR-URL: https://github.com/nodejs/node/pull/25521 PR-URL: https://github.com/nodejs/node/pull/25447 Reviewed-By: Gireesh Punathil Reviewed-By: Michael Dawson --- common.gypi | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/common.gypi b/common.gypi index fd42f27d351282..b423c9a61a099e 100644 --- a/common.gypi +++ b/common.gypi @@ -88,6 +88,19 @@ ['OS=="aix"', { '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' + ], + }], + ], }], ['OS == "android"', { 'cflags': [ '-fPIE' ], @@ -337,11 +350,18 @@ [ 'OS=="aix"', { 'conditions': [ [ 'target_arch=="ppc"', { - 'ldflags': [ '-Wl,-bmaxdata:0x60000000/dsa' ], + 'ldflags': [ + '-Wl,-bmaxdata:0x60000000/dsa', + '-Wl,-blibpath:/usr/lib:/lib:/opt/freeware/lib/pthread', + ], }], [ 'target_arch=="ppc64"', { 'cflags': [ '-maix64' ], - 'ldflags': [ '-maix64' ], + 'ldflags': [ + '-maix64', + '-Wl,-blibpath:/usr/lib:/lib:' + '/opt/freeware/lib/pthread/ppc64', + ], }], ], 'ldflags': [ '-Wl,-bbigtoc' ],