Skip to content

Commit 96185e1

Browse files
committed
Fix MODE=aarch64 cross-compiling
This change fixes a regression that happened some time ago when building for AARCH64 using the vendored toolchain rather than cosmocc. The errors that would show up `Relocations in generic ELF (EM: 62)` have been fixed
1 parent ca5e361 commit 96185e1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

build/definitions.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ ARCH = x86_64
9292
HOSTS ?= freebsd rhel7 xnu win10 openbsd netbsd
9393
endif
9494

95+
ZIPOBJ_FLAGS += -a$(ARCH)
96+
9597
ifeq ($(PREFIX),)
9698
ifeq ($(USE_SYSTEM_TOOLCHAIN),)
9799
ifeq ($(ARCH),x86_64)

third_party/python/BUILD.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4193,7 +4193,7 @@ $(THIRD_PARTY_PYTHON_HELLO_OBJS): private PYFLAGS += -C2 -m
41934193
# this directory entry is at the tip of the tree
41944194
# therefore building it requires special care
41954195
o/$(MODE)/third_party/python/Lib/.zip.o: third_party/python/.python
4196-
@$(COMPILE) -wAZIPOBJ $(ZIPOBJ) -C2 $(OUTPUT_OPTION) third_party/python/.python
4196+
@$(COMPILE) -wAZIPOBJ $(ZIPOBJ) -a$(ARCH) -C2 $(OUTPUT_OPTION) third_party/python/.python
41974197

41984198
# these need to be explictly defined because landlock make won't sandbox
41994199
# prerequisites with a trailing slash.

0 commit comments

Comments
 (0)