New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: add support for 64-bit AIX #1807
Conversation
Pass `-Dtarget_arch=ppc64` to `gyp_uv.py` to activate.
With regards to automatic host/target arch detection, at least one place in V8 appears to assume that if you're on AIX you want ppc64: https://github.com/nodejs/node/blob/82e475dc75751df08d80bd6e25926bd25c1794f2/deps/v8/third_party/binutils/detect_v8_host_arch.py#L63-L68 |
I assume I also need to make an equivalent change for autotools? Anyone able to point me at where I should be editing? |
Probably around here: https://github.com/libuv/libuv/blob/v1.x/Makefile.am#L330 |
The -Dtarget_arch=ppc64 must be what is allowing the 64 bit Node.js builds. If we have to choose either 32 or 64 bit it should be 64 bit as we have only every shipped 64 bit node.js community builds, however, is it possible for us to update the CI job to set the target arch for AIX ? |
@mhdawson Node.js has it's own version of common.gypi that adds the correct flags for target_arch=ppc64: https://github.com/nodejs/node/blob/94596560c2556fae614ef237ed0ff2f749b14651/common.gypi#L371-L393 There's no such equivalent (until this PR) in the libuv version of common.gypi (so you can set -Dtarget_arch=ppc64 in the CI but it won't actually change any of the compile/link flags). |
I don't see any equivalents for the equivalent -m32 flags for ia32: Lines 146 to 149 in 1e4823c
Do we want to hardcode |
@richardlau got it. |
@richardlau from other similar changes such as this it seems that for some architectures the support is only added to gyp build system. I'm sure @bnoordhuis knows better. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. If someone needs aix+autotools, they'll open an issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Pass -Dtarget_arch=ppc64 to gyp_uv.py to activate. Refs: nodejs/node#20129 Refs: #1795 PR-URL: #1807 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Landed in 4f77a23. Thanks! |
So to follow up it appears that the libuv CI is using autotools on AIX 😆 . I think I've figured out the steps you need to build 64-bit AIX binaries via autotools in nodejs/build#1245 (comment). |
Support building 64-bit binaries on AIX via gyp. At the moment there's no automatic detection as
platform.machine()
/uname -m
on AIX is a bit useless (e.g., on an AIX system I have access touname -m
outputs00F460A94C00
) so you need to pass-Dtarget_arch=ppc64
togyp_uv.py
to activate.Note however that #1795 actually fails to compile on 64-bit AIX due to incorrect assumptions about the size of
uv_sem_t
, see nodejs/node#20129 (comment).