Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 43ce6fc

Browse filesBrowse files
richardlauMyles Borins
authored andcommitted
build: fix DESTCPU detection for binary target
`make binary` attempts to auto detect DESTCPU if not set, but was assuming being on an Intel architecture. PR-URL: #6310 Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
1 parent 0f6146c commit 43ce6fc
Copy full SHA for 43ce6fc

File tree

Expand file treeCollapse file tree

1 file changed

+30
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+30
-1
lines changed
Open diff view settings
Collapse file

‎Makefile‎

Copy file name to clipboardExpand all lines: Makefile
+30-1Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,11 +264,40 @@ RELEASE=$(shell sed -ne 's/\#define NODE_VERSION_IS_RELEASE \([01]\)/\1/p' src/n
264264
PLATFORM=$(shell uname | tr '[:upper:]' '[:lower:]')
265265
NPMVERSION=v$(shell cat deps/npm/package.json | grep '"version"' | sed 's/^[^:]*: "\([^"]*\)",.*/\1/')
266266

267-
ifeq ($(findstring x86_64,$(shell uname -m)),x86_64)
267+
UNAME_M=$(shell uname -m)
268+
ifeq ($(findstring x86_64,$(UNAME_M)),x86_64)
268269
DESTCPU ?= x64
269270
else
271+
ifeq ($(findstring ppc64,$(UNAME_M)),ppc64)
272+
DESTCPU ?= ppc64
273+
else
274+
ifeq ($(findstring ppc,$(UNAME_M)),ppc)
275+
DESTCPU ?= ppc
276+
else
277+
ifeq ($(findstring s390x,$(UNAME_M)),s390x)
278+
DESTCPU ?= s390x
279+
else
280+
ifeq ($(findstring s390,$(UNAME_M)),s390)
281+
DESTCPU ?= s390
282+
else
283+
ifeq ($(findstring arm,$(UNAME_M)),arm)
284+
DESTCPU ?= arm
285+
else
286+
ifeq ($(findstring aarch64,$(UNAME_M)),aarch64)
287+
DESTCPU ?= aarch64
288+
else
289+
ifeq ($(findstring powerpc,$(shell uname -p)),powerpc)
290+
DESTCPU ?= ppc64
291+
else
270292
DESTCPU ?= x86
271293
endif
294+
endif
295+
endif
296+
endif
297+
endif
298+
endif
299+
endif
300+
endif
272301
ifeq ($(DESTCPU),x64)
273302
ARCH=x64
274303
else

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.