-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: don't pass DESTCPU to configure unless set #13160
Closed
Closed
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,18 @@ ifdef DISABLE_V8_I18N | |
V8_BUILD_OPTIONS += i18nsupport=off | ||
endif | ||
|
||
# Use Node arch names rather than V8 ones. | ||
ifeq ($(DESTCPU),ia32) | ||
override DESTCPU=x86 | ||
endif | ||
ifeq ($(DESTCPU),aarch64) | ||
override DESTCPU=arm64 | ||
endif | ||
|
||
ifdef DESTCPU | ||
CONFIG_FLAGS += --dest-cpu=$(DESTCPU) | ||
endif | ||
|
||
BUILDTYPE_LOWER := $(shell echo $(BUILDTYPE) | tr '[A-Z]' '[a-z]') | ||
|
||
# Determine EXEEXT | ||
|
@@ -564,86 +576,53 @@ RELEASE=$(shell sed -ne 's/\#define NODE_VERSION_IS_RELEASE \([01]\)/\1/p' src/n | |
PLATFORM=$(shell uname | tr '[:upper:]' '[:lower:]') | ||
NPMVERSION=v$(shell cat deps/npm/package.json | grep '"version"' | sed 's/^[^:]*: "\([^"]*\)",.*/\1/') | ||
|
||
UNAME_M=$(shell uname -m) | ||
ifeq ($(findstring x86_64,$(UNAME_M)),x86_64) | ||
DESTCPU ?= x64 | ||
else | ||
ifeq ($(findstring ppc64,$(UNAME_M)),ppc64) | ||
DESTCPU ?= ppc64 | ||
else | ||
ifeq ($(findstring ppc,$(UNAME_M)),ppc) | ||
DESTCPU ?= ppc | ||
else | ||
ifeq ($(findstring s390x,$(UNAME_M)),s390x) | ||
DESTCPU ?= s390x | ||
else | ||
ifeq ($(findstring s390,$(UNAME_M)),s390) | ||
DESTCPU ?= s390 | ||
ifdef DESTCPU | ||
ARCH = $(DESTCPU) | ||
else | ||
ifeq ($(findstring arm,$(UNAME_M)),arm) | ||
DESTCPU ?= arm | ||
else | ||
ifeq ($(findstring aarch64,$(UNAME_M)),aarch64) | ||
DESTCPU ?= aarch64 | ||
else | ||
ifeq ($(findstring powerpc,$(shell uname -p)),powerpc) | ||
DESTCPU ?= ppc64 | ||
else | ||
DESTCPU ?= x86 | ||
endif | ||
endif | ||
endif | ||
endif | ||
endif | ||
endif | ||
endif | ||
endif | ||
ifeq ($(DESTCPU),x64) | ||
ARCH=x64 | ||
else | ||
ifeq ($(DESTCPU),arm) | ||
ARCH=arm | ||
else | ||
ifeq ($(DESTCPU),aarch64) | ||
ARCH=arm64 | ||
else | ||
ifeq ($(DESTCPU),ppc64) | ||
ARCH=ppc64 | ||
else | ||
ifeq ($(DESTCPU),ppc) | ||
ARCH=ppc | ||
else | ||
ifeq ($(DESTCPU),s390) | ||
ARCH=s390 | ||
else | ||
ifeq ($(DESTCPU),s390x) | ||
ARCH=s390x | ||
else | ||
ARCH=x86 | ||
endif | ||
endif | ||
endif | ||
endif | ||
endif | ||
endif | ||
endif | ||
|
||
# node and v8 use different arch names (e.g. node 'x86' vs v8 'ia32'). | ||
# pass the proper v8 arch name to $V8_ARCH based on user-specified $DESTCPU. | ||
ifeq ($(DESTCPU),x86) | ||
UNAME_M=$(shell uname -m) | ||
ifeq ($(findstring x86_64,$(UNAME_M)),x86_64) | ||
ARCH ?= x64 | ||
else | ||
ifeq ($(findstring ppc64,$(UNAME_M)),ppc64) | ||
ARCH ?= ppc64 | ||
else | ||
ifeq ($(findstring ppc,$(UNAME_M)),ppc) | ||
ARCH ?= ppc | ||
else | ||
ifeq ($(findstring s390x,$(UNAME_M)),s390x) | ||
ARCH ?= s390x | ||
else | ||
ifeq ($(findstring s390,$(UNAME_M)),s390) | ||
ARCH ?= s390 | ||
else | ||
ifeq ($(findstring arm,$(UNAME_M)),arm) | ||
ARCH ?= arm | ||
else | ||
ifeq ($(findstring aarch64,$(UNAME_M)),aarch64) | ||
ARCH ?= aarch64 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. arm64 |
||
else | ||
ifeq ($(findstring powerpc,$(shell uname -p)),powerpc) | ||
ARCH ?= ppc64 | ||
else | ||
ARCH ?= x86 | ||
endif | ||
endif | ||
endif | ||
endif | ||
endif | ||
endif | ||
endif | ||
endif | ||
endif | ||
|
||
# Handle Node and V8 arch name differences for x86 and arm64. | ||
ifeq ($(ARCH),x86) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can be: V8_ARCH = $(ARCH) # Maybe get rid of this in favor of DESTCPU
ifeq ($(ARCH),ia32)
ARCH = x86
endif Assuming I read it right. |
||
V8_ARCH=ia32 | ||
else | ||
V8_ARCH ?= $(DESTCPU) | ||
|
||
endif | ||
|
||
# enforce "x86" over "ia32" as the generally accepted way of referring to 32-bit intel | ||
ifeq ($(ARCH),ia32) | ||
override ARCH=x86 | ||
endif | ||
ifeq ($(DESTCPU),ia32) | ||
override DESTCPU=x86 | ||
ifeq ($(ARCH),arm64) | ||
V8_ARCH ?= aarch64 | ||
endif | ||
V8_ARCH ?= $(ARCH) | ||
|
||
TARNAME=node-$(FULLVERSION) | ||
TARBALL=$(TARNAME).tar | ||
|
@@ -762,7 +741,6 @@ doc-upload: doc | |
$(TARBALL)-headers: release-only | ||
$(PYTHON) ./configure \ | ||
--prefix=/ \ | ||
--dest-cpu=$(DESTCPU) \ | ||
--tag=$(TAG) \ | ||
--release-urlbase=$(RELEASE_URLBASE) \ | ||
$(CONFIG_FLAGS) $(BUILD_RELEASE_FLAGS) | ||
|
@@ -794,7 +772,6 @@ $(BINARYTAR): release-only | |
$(RM) -r out/deps out/Release | ||
$(PYTHON) ./configure \ | ||
--prefix=/ \ | ||
--dest-cpu=$(DESTCPU) \ | ||
--tag=$(TAG) \ | ||
--release-urlbase=$(RELEASE_URLBASE) \ | ||
$(CONFIG_FLAGS) $(BUILD_RELEASE_FLAGS) | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
ia32 is the node/v8 arch name; either the comment is wrong or the logic is.