From 3447909caaca06c65cb17f9d16e4471478f67376 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sun, 28 Sep 2025 19:58:03 -0400 Subject: build: Use clang during early state Use clang during early state until we configure our own cross compiler for L5 Signed-off-by: Ian Moffett --- src/Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index 15a65e2..9a2409c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -10,9 +10,10 @@ ISO = lunos.iso # Build tools BINUTILS_DIR := $(shell pwd)/cc/toolchain/build-binutils -CC := $(shell pwd)/cc/gcc/bin/x86_64-pc-ethos-gcc -LD := $(BINUTILS_DIR)/bin/x86_64-pc-ethos-ld -AS := $(BINUTILS_DIR)/bin/x86_64-pc-ethos-as +CC := clang +LD := ld +AS := as +SYS_LD_FLAGS := -Tsys/arch/$(TARGET)/conf/sys.ld # QEMU emulator flags QEMU_FLAGS = --enable-kvm -serial stdio -cdrom $(ISO) \ @@ -24,7 +25,6 @@ all: root lib user sys image .PHONY: sys sys: cd sys/; make CC=$(CC) AS=$(AS) LD=$(LD) TARGET=$(TARGET) TOOLS=$(shell pwd)/tools - cp $(KBIN) root/boot/ .PHONY: user user: @@ -46,6 +46,9 @@ root: .PHONY: sysroot image: + $(LD) $(shell find sys/ -name "*.o") \ + -o $(KBIN) $(SYS_LD_FLAGS) + cp $(KBIN) root/boot/ mkdir -p iso_root/boot/ cp data/boot/limine.conf $(SHIMDIR)/limine/limine-bios.sys \ $(SHIMDIR)/limine/limine-bios-cd.bin $(SHIMDIR)/limine/limine-uefi-cd.bin iso_root/ -- cgit v1.2.3