File tree 13 files changed +322
-324
lines changed
13 files changed +322
-324
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
306
306
$(libk_asm_objects ) : $(libk_objs_dir ) /% .o: % .asm
307
307
$(progress ) " CC" $<
308
308
$(MKDIR ) -p $(dir $@ )
309
- $(ASM ) $(KERNEL_ASM_FLAGS ) $< -o $@
309
+ $(CC ) $(KERNEL_ASM_FLAGS ) $< -o $@
310
310
311
311
$(libk_c_objects ) : $(libk_objs_dir ) /% .o: % .c
312
312
$(progress ) " CC" $<
@@ -321,7 +321,7 @@ $(libc_c_objects): $(lib_objs_dir)/%.o: %.c
321
321
$(libc_asm_objects ) : $(lib_objs_dir ) /% .o: % .asm
322
322
$(progress ) " CC" $<
323
323
$(MKDIR ) -p $(dir $@ )
324
- $(ASM ) $(LIBC_ASM_FLAGS ) $< -o $@
324
+ $(CC ) $(LIBC_ASM_FLAGS ) $< -o $@
325
325
326
326
$(libc ) : $(libc_asm_objects ) $(libc_c_objects ) | $(dist_dir )
327
327
$(progress ) " AR" $@
@@ -409,7 +409,6 @@ fmt: ## automatically format the code with clang-format
409
409
410
410
version : # # print tool versions
411
411
$(CC ) --version
412
- $(ASM ) --version
413
412
$(LD ) --version
414
413
$(AR ) --version
415
414
$(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:
65
65
If you want to work on the ` x86_64 ` architecture, you'll need the following
66
66
extra dependencies:
67
67
68
- - ` nasm `
69
68
- ` grub-mkrescue `
70
69
- ` xorriso `
71
70
@@ -134,7 +133,7 @@ depending on the architecture and board configured.
134
133
Install [ Homebrew] ( https://brew.sh/ ) , then run the following commands:
135
134
136
135
```
137
- $ brew install nasm xorriso qemu llvm u-boot-tools
136
+ $ brew install xorriso qemu llvm u-boot-tools
138
137
```
139
138
140
139
#### Linux
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ log_file = $(log_dir)/$(ARCH)-$(BOARD)-$(BUILD_MODE).log
14
14
15
15
QEMU = qemu-system-arm
16
16
ARM_GCC = arm-none-eabi-gcc
17
- ASM = $(CC)
18
17
19
18
###############################################################################
20
19
# 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
13
13
###############################################################################
14
14
15
15
QEMU = qemu-system-aarch64
16
- ASM = $(CC)
17
16
18
17
###############################################################################
19
18
# Options for the different tools
Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ vbe_bpp = 32
20
20
# Tools
21
21
###############################################################################
22
22
23
- ASM = nasm
24
23
QEMU = qemu-system-x86_64
25
24
26
25
###############################################################################
@@ -60,14 +59,15 @@ libk_extra_objects += $(kernel_console_font)
60
59
# Flags
61
60
###############################################################################
62
61
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
66
65
LIBC_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)
68
67
KERNEL_ASM_FLAGS += -dVBE_WIDTH=$(vbe_width) -dVBE_HEIGHT=$(vbe_height) -dVBE_BPP=$(vbe_bpp)
69
68
KERNEL_CFLAGS += -mno-red-zone
70
69
KERNEL_INCLUDES += -I$(external_dir)/scalable-font2/
70
+ LD_TARGET = elf_x86_64
71
71
72
72
###############################################################################
73
73
# Arch-specific targets
You can’t perform that action at this time.
0 commit comments