-
Notifications
You must be signed in to change notification settings - Fork 29k
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: use arm64 as DESTCPU for aarch64 #22548
Conversation
On a `aarch64` system I can run the complete build with tests without specifying the Makefile variable `DESTCPU`. But when running the `tar-headers` target `DESTCPU` is passed to configure: ```shell $(PYTHON) ./configure \ --prefix=/ \ --dest-cpu=$(DESTCPU) \ ... ``` The value of `DESTCPU` in this case will be 'aarch64' which will cause configure to fail: ```shell configure: error: option --dest-cpu: invalid choice: 'aarch64' (choose from 'arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64el', 'ppc', 'ppc64', 'x32', 'x64', 'x86', 'x86_64', 's390', 's390x') ``` In the configure script there is a matching of `__aarch64__` to `arm64`: ```shell $ python -c 'from configure import host_arch_cc; print host_arch_cc()' arm64 ``` In our case it would be nice to have consitent behaviour for both of these cases on `aarch64`. This commit changes `DESTCPU` to `arm64` to be consistent with the configure script. `DESTCPU` is used in `$(TARBALL)-headers` and in `$(BINARYTAR)` but I'm not sure about the implications of making the change purposed and hope others might chime in and provide some guidance.
Re-run of failing node-test-commit-freebsd was successful. |
Ref: #5175 |
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.
This is only half the change necessary. Further below (around line 750) you also need to:
-ifeq ($(DESTCPU),aarch64)
+ifeq ($(DESTCPU),arm64)
Thanks @yselkowitz! I'll take a closer look at this tomorrow. |
@nodejs/build-files PTAL |
I don't have enough background, but reading https://stackoverflow.com/a/47274698/27955 makes me think it should be the other way around... (map
|
v8 uses arm64 throughout, as does the kernel and golang for instance. While aarch64 is more canonical, I'm in no position to change any of those and doing so would be much more extensive than simply fixing DESTCPU. |
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.
I'm not going to block this change but IMO we should be using aarch64
instead of arm64
to be consistent with most other packages. AFAIK arm64
is something that Apple invented and never properly got adopted by anyone else.
Since node is highly dependant on V8, let's go with |
Landed in d7d3bf5. |
On a aarch64 system I can run the complete build with tests without specifying the Makefile variable DESTCPU. But when running the tar-headers target DESTCPU is passed to configure: $(PYTHON) ./configure \ --prefix=/ \ --dest-cpu=$(DESTCPU) \ ... The value of DESTCPU in this case will be aarch64 which will cause configure to fail: configure: error: option --dest-cpu: invalid choice: 'aarch64' (choose from 'arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64el', 'ppc', 'ppc64', 'x32', 'x64', 'x86', 'x86_64', 's390', 's390x') In the configure script there is a matching of __aarch64__ to arm64: $ python -c 'from configure import host_arch_cc; print host_arch_cc()' arm64 In our case it would be nice to have consitent behaviour for both of these cases on aarch64. This commit changes DESTCPU to arm64 to be consistent with the configure script. DESTCPU is used in $(TARBALL)-headers and in $(BINARYTAR) but I'm not sure about the implications of making the change purposed and hope others might chime in and provide some guidance. PR-URL: #22548 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
On a aarch64 system I can run the complete build with tests without specifying the Makefile variable DESTCPU. But when running the tar-headers target DESTCPU is passed to configure: $(PYTHON) ./configure \ --prefix=/ \ --dest-cpu=$(DESTCPU) \ ... The value of DESTCPU in this case will be aarch64 which will cause configure to fail: configure: error: option --dest-cpu: invalid choice: 'aarch64' (choose from 'arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64el', 'ppc', 'ppc64', 'x32', 'x64', 'x86', 'x86_64', 's390', 's390x') In the configure script there is a matching of __aarch64__ to arm64: $ python -c 'from configure import host_arch_cc; print host_arch_cc()' arm64 In our case it would be nice to have consitent behaviour for both of these cases on aarch64. This commit changes DESTCPU to arm64 to be consistent with the configure script. DESTCPU is used in $(TARBALL)-headers and in $(BINARYTAR) but I'm not sure about the implications of making the change purposed and hope others might chime in and provide some guidance. PR-URL: #22548 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
On a aarch64 system I can run the complete build with tests without specifying the Makefile variable DESTCPU. But when running the tar-headers target DESTCPU is passed to configure: $(PYTHON) ./configure \ --prefix=/ \ --dest-cpu=$(DESTCPU) \ ... The value of DESTCPU in this case will be aarch64 which will cause configure to fail: configure: error: option --dest-cpu: invalid choice: 'aarch64' (choose from 'arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64el', 'ppc', 'ppc64', 'x32', 'x64', 'x86', 'x86_64', 's390', 's390x') In the configure script there is a matching of __aarch64__ to arm64: $ python -c 'from configure import host_arch_cc; print host_arch_cc()' arm64 In our case it would be nice to have consitent behaviour for both of these cases on aarch64. This commit changes DESTCPU to arm64 to be consistent with the configure script. DESTCPU is used in $(TARBALL)-headers and in $(BINARYTAR) but I'm not sure about the implications of making the change purposed and hope others might chime in and provide some guidance. PR-URL: #22548 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
On a
aarch64
system I can run the complete build with tests withoutspecifying the Makefile variable
DESTCPU
.But when running the
tar-headers
targetDESTCPU
is passed to configure:The value of
DESTCPU
in this case will be 'aarch64' which will causeconfigure to fail:
In the configure script there is a matching of
__aarch64__
toarm64
:$ python -c 'from configure import host_arch_cc; print host_arch_cc()' arm64
In our case it would be nice to have consitent behaviour for both of
these cases on
aarch64
.This commit changes
DESTCPU
toarm64
to be consistent with theconfigure script.
DESTCPU
is used in$(TARBALL)-headers
and in$(BINARYTAR)
but I'm not sure about the implications of making thechange purposed and hope others might chime in and provide some
guidance.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes