:: commit 9ab0beea5490c9a473f13da3c53e7b054c49520d

mintsuki <mintsuki@protonmail.com> — 2021-04-11 08:00

parents: d288550b2a

build: Pass -Werror to nasm

diff --git a/Makefile b/Makefile
index 54f60630..f91d403a 100644
--- a/Makefile
+++ b/Makefile
@@ -52,9 +52,9 @@ install: all
 
 build/stage1: $(STAGE1_FILES) build/decompressor/decompressor.bin build/stage23-bios/stage2.bin.gz
 	mkdir -p bin
-	cd stage1/hdd && nasm bootsect.asm -fbin -o ../../bin/limine-hdd.bin
-	cd stage1/cd  && nasm bootsect.asm -fbin -o ../../bin/limine-cd.bin
-	cd stage1/pxe && nasm bootsect.asm -fbin -o ../../bin/limine-pxe.bin
+	cd stage1/hdd && nasm bootsect.asm -Werror -fbin -o ../../bin/limine-hdd.bin
+	cd stage1/cd  && nasm bootsect.asm -Werror -fbin -o ../../bin/limine-cd.bin
+	cd stage1/pxe && nasm bootsect.asm -Werror -fbin -o ../../bin/limine-pxe.bin
 	cp build/stage23-bios/limine.sys ./bin/
 	touch build/stage1
 
diff --git a/stage23/Makefile b/stage23/Makefile
index cf02b43f..9b066264 100644
--- a/stage23/Makefile
+++ b/stage23/Makefile
@@ -239,10 +239,10 @@ $(BUILDDIR)/%.32.o: %.32.c
 endif
 
 $(BUILDDIR)/%.o: %.asm
-	nasm $< -F dwarf -g -f elf32 -o $@
+	nasm $< -F dwarf -g -Werror -f elf32 -o $@
 
 $(BUILDDIR)/%.o: %.asm64
-	nasm $< -F dwarf -g -f elf64 -o $@
+	nasm $< -F dwarf -g -Werror -f elf64 -o $@
 
 clean:
 	rm -rf $(BUILDDIR)
diff --git a/stage23/protos/stivale2_rt.asm b/stage23/protos/stivale2_rt.asm
index 8c867044..e14255ae 100644
--- a/stage23/protos/stivale2_rt.asm
+++ b/stage23/protos/stivale2_rt.asm
@@ -26,7 +26,7 @@ stivale2_term_write_entry:
     push rsi
     mov rcx, rsi
     mov rsi, rdi
-    mov rdi, term_buf
+    mov edi, term_buf
     rep movsb
     pop rsi
 
tab: 248 wrap: offon