Amend CFLAGS.
This commit is contained in:
parent
6ddcf19a06
commit
1d4edf4e0c
6
Makefile
6
Makefile
@ -7,6 +7,10 @@ CC=x86_64-elf-gcc
|
|||||||
GDB=x86_64-elf-gdb
|
GDB=x86_64-elf-gdb
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
CFLAGS = -fno-pic -ffreestanding -static -fno-builtin -fno-strict-aliasing \
|
||||||
|
-O2 -Wall -MD -ggdb -m32 -Werror -fno-omit-frame-pointer
|
||||||
|
CFLAGS += $(shell $(CC) -fno-stack-protector -E -x c /dev/null >/dev/null 2>&1 && echo -fno-stack-protector)
|
||||||
|
|
||||||
run: image.bin
|
run: image.bin
|
||||||
qemu-system-i386 -drive format=raw,file=$< -serial mon:stdio
|
qemu-system-i386 -drive format=raw,file=$< -serial mon:stdio
|
||||||
|
|
||||||
@ -48,7 +52,7 @@ kernel.bin: kernel.o console.o drivers/vga.o drivers/keyboard.o \
|
|||||||
$(LD) $(LDFLAGS) -o $@ -Ttext 0x1000 $^
|
$(LD) $(LDFLAGS) -o $@ -Ttext 0x1000 $^
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(CC) -m32 -ffreestanding -Wall -Werror -c -g $< -o $@
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
%.o: %.S
|
%.o: %.S
|
||||||
$(CC) -m32 -ffreestanding -c -g $^ -o $@
|
$(CC) -m32 -ffreestanding -c -g $^ -o $@
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user