alnyan/yggdrasil: force cross-compilation for clang

This commit is contained in:
Mark Poliakov 2024-11-13 16:17:30 +02:00
parent c4667caea2
commit 8840f9fe48

View File

@ -47,7 +47,7 @@ AR := $(TOOLPREFIX)ar
ifeq ($(USECLANG),1)
USEGCC ?= 0
CC = clang
CC ?= clang
CFLAGS_add += -fno-builtin -fno-strict-aliasing
endif
@ -144,6 +144,9 @@ ifeq ($(ARCH),wasm32)
CFLAGS_arch += -ffreestanding -nostdlib -nostdinc --target=wasm32-unknown-unknown
endif
LDFLAGS_arch += --sysroot=$(SYSROOT) --target=$(TRIPLE)
CFLAGS_arch += --target=$(TRIPLE) -ffreestanding
# Add our "arch"-related FLAGS in. We separate arch-related flags out so that
# we can conveniently get at them for targets that don't want the rest of
# *FLAGS_add, such as the testing Makefile targets
@ -163,7 +166,7 @@ endif
ifneq ($(filter $(ARCH),i387 amd64),)
# Determines whether `long double` is the same as `double` on this arch.
# linux x86_64, for instance, `long double` is 80 bits wide, whereas on macOS aarch64,
# `long double` is the same as `double`.
# `long double` is the same as `double`.
LONG_DOUBLE_NOT_DOUBLE := 1
else ifeq ($(ARCH), aarch64 riscv64)
ifeq ($(filter $(OS),Darwin WINNT),)