Skip to content

Commit f1db816

Browse files
authored
build: add version-specific library path for AIX
Add the version-specific directory containing the C/C++ runtime libraries to `-blibpath` on AIX. This will help link `node` against the correct libraries at run-time when compiled with a different version of the GNU C/C++ compiler without having to manually set a `LIBPATH` environment variable. PR-URL: #53585 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Beth Griggs <[email protected]>
1 parent 3036066 commit f1db816

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

common.gypi

+4-1
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,9 @@
579579
'-Wl,-brtl',
580580
],
581581
}, { # else it's `AIX`
582+
'variables': {
583+
'gcc_major': '<!(<(python) -c "import os; import subprocess; CXX=os.environ.get(\'CXX\', \'g++\'); subprocess.run([CXX, \'-dumpversion\'])")'
584+
},
582585
# Disable the following compiler warning:
583586
#
584587
# warning: visibility attribute not supported in this
@@ -589,7 +592,7 @@
589592
# out more relevant warnings.
590593
'cflags': [ '-Wno-attributes' ],
591594
'ldflags': [
592-
'-Wl,-blibpath:/usr/lib:/lib:/opt/freeware/lib/pthread/ppc64',
595+
'-Wl,-blibpath:/usr/lib:/lib:/opt/freeware/lib/gcc/powerpc-ibm-aix7.3.0.0/>(gcc_major)/pthread/ppc64:/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/>(gcc_major)/pthread/ppc64:/opt/freeware/lib/pthread/ppc64',
593596
],
594597
}],
595598
],

0 commit comments

Comments
 (0)