setos

拙OS
Log | Files | Refs | LICENSE

commit 54d6654e91a007764957fc55bc0720190baa6e0f
parent f273e324237c6f0366dfc40a0c3ff0fa2d3cdf7c
Author: Matsuda Kenji <info@mtkn.jp>
Date:   Sun, 31 Mar 2024 07:55:43 +0900

change compiler

Diffstat:
MMakefile | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,6 +1,9 @@ +EFI_CC = x86_64-w64-mingw32-gcc EFI_CFLAGS = -nostdlib -fpic -mno-red-zone -fno-stack-protector -static \ -fno-builtin -g -mabi=sysv \ -mno-stack-arg-probe -Wall -e EfiMain +KERN_CC = tcc +KERN_LD = ld KERN_CFLAGS = -nostdlib -fpic -mno-red-zone -ffreestanding -Wall -g KERN_LDFLAGS = -e kernel_main -static OBJCOPY = objcopy @@ -18,16 +21,16 @@ disk.img: uefi/uefi.efi kernel/setos.elf doas umount image uefi/uefi.dll: uefi/uefi.c uefi/uefi.h uefi/utils.c uefi/utils.h - x86_64-w64-mingw32-gcc $(EFI_CFLAGS) -o $@ uefi/uefi.c uefi/utils.c + $(EFI_CC) $(EFI_CFLAGS) -o $@ uefi/uefi.c uefi/utils.c uefi/uefi.efi: uefi/uefi.dll $(OBJCOPY) --target=efi-app-x86_64 $< $@ %.o: %.c - gcc $(KERN_CFLAGS) -c -o $@ $< + $(KERN_CC) $(KERN_CFLAGS) -c -o $@ $< kernel/setos.elf: kernel/main.o kernel/memmap.ld - ld $(KERN_LDFLAGS) -T kernel/memmap.ld -o $@ $< + $(KERN_LD) $(KERN_LDFLAGS) -T kernel/memmap.ld -o $@ $< run: disk.img OVMF.fd qemu-system-x86_64 \