File tree Expand file tree Collapse file tree 14 files changed +327
-329
lines changed
Expand file tree Collapse file tree 14 files changed +327
-329
lines changed Original file line number Diff line number Diff line change @@ -306,7 +306,7 @@ $(kernel): $(linker_ld) $(libk_asm_objects) $(libk_c_objects) $(libk_extra_objec
306306$(libk_asm_objects ) : $(libk_objs_dir ) /% .o: % .asm
307307 $(progress ) " CC" $<
308308 $(MKDIR ) -p $(dir $@ )
309- $(ASM ) $(KERNEL_ASM_FLAGS ) $< -o $@
309+ $(CC ) $(KERNEL_ASM_FLAGS ) $< -o $@
310310
311311$(libk_c_objects ) : $(libk_objs_dir ) /% .o: % .c
312312 $(progress ) " CC" $<
@@ -321,7 +321,7 @@ $(libc_c_objects): $(lib_objs_dir)/%.o: %.c
321321$(libc_asm_objects ) : $(lib_objs_dir ) /% .o: % .asm
322322 $(progress ) " CC" $<
323323 $(MKDIR ) -p $(dir $@ )
324- $(ASM ) $(LIBC_ASM_FLAGS ) $< -o $@
324+ $(CC ) $(LIBC_ASM_FLAGS ) $< -o $@
325325
326326$(libc ) : $(libc_asm_objects ) $(libc_c_objects ) | $(dist_dir )
327327 $(progress ) " AR" $@
@@ -409,7 +409,6 @@ fmt: ## automatically format the code with clang-format
409409
410410version : # # print tool versions
411411 $(CC ) --version
412- $(ASM ) --version
413412 $(LD ) --version
414413 $(AR ) --version
415414 $(QEMU ) --version
Original file line number Diff line number Diff line change @@ -65,7 +65,6 @@ The following dependencies are required to build this project:
6565If you want to work on the ` x86_64 ` architecture, you'll need the following
6666extra dependencies:
6767
68- - ` nasm `
6968- ` grub-mkrescue `
7069- ` xorriso `
7170
@@ -134,7 +133,7 @@ depending on the architecture and board configured.
134133Install [ Homebrew] ( https://brew.sh/ ) , then run the following commands:
135134
136135```
137- $ brew install nasm xorriso qemu llvm u-boot-tools
136+ $ brew install xorriso qemu llvm u-boot-tools
138137```
139138
140139#### Linux
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ log_file = $(log_dir)/$(ARCH)-$(BOARD)-$(BUILD_MODE).log
1414
1515QEMU = qemu-system-arm
1616ARM_GCC = arm-none-eabi-gcc
17- ASM = $(CC)
1817
1918###############################################################################
2019# Options for the different tools
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ log_file = $(log_dir)/$(ARCH)-$(BOARD)-$(BUILD_MODE).log
1313###############################################################################
1414
1515QEMU = qemu-system-aarch64
16- ASM = $(CC)
1716
1817###############################################################################
1918# Options for the different tools
Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ vbe_bpp = 32
2020# Tools
2121###############################################################################
2222
23- ASM = nasm
2423QEMU = qemu-system-x86_64
2524
2625###############################################################################
@@ -60,14 +59,15 @@ libk_extra_objects += $(kernel_console_font)
6059# Flags
6160###############################################################################
6261
63- LD_TARGET = elf_x86_64
64- LIBC_ASM_FLAGS += -f elf64
65- LIBC_CFLAGS += --target=x86_64 -fstack-protector-strong
62+ X86_64_CFLAGS += --target=x86_64
63+ LIBC_ASM_FLAGS += -c $(X86_64_CFLAGS)
64+ LIBC_CFLAGS += $(X86_64_CFLAGS) -fstack-protector-strong
6665LIBC_CFLAGS += -mno-mmx -mno-sse -mno-sse2 -mno-avx -mno-avx2
67- KERNEL_ASM_FLAGS += -f elf64
66+ KERNEL_ASM_FLAGS += -c $(X86_64_CFLAGS)
6867KERNEL_ASM_FLAGS += -dVBE_WIDTH=$(vbe_width) -dVBE_HEIGHT=$(vbe_height) -dVBE_BPP=$(vbe_bpp)
6968KERNEL_CFLAGS += -mno-red-zone
7069KERNEL_INCLUDES += -I$(external_dir)/scalable-font2/
70+ LD_TARGET = elf_x86_64
7171
7272###############################################################################
7373# Arch-specific targets
You can’t perform that action at this time.
0 commit comments