From 4c0606ad1a6f60aed00b7a7866babfd011b60ef9 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Tue, 9 Sep 2014 19:04:03 +0200 Subject: changed Makefile to make use of our new cross-gcc --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index bb61873..5a2ded7 100644 --- a/Makefile +++ b/Makefile @@ -18,14 +18,16 @@ USB_STICK=/dev/sdd #take care! #here our kernel will be loaded by the bootloader. KERNEL_START=0x18000 +#use our cross compiler +CC=i686-elf-gcc + ############ flags ############ -CFLAGS=-ffreestanding -std=gnu11 -m32 -fno-asynchronous-unwind-tables -O0 +CFLAGS=-ffreestanding -nostdlib -lgcc -std=gnu11 CFLAGS+= -I. #CFLAGS+=-fdata-sections -ffunction-sections #CFLAGS+= -Werror - ############ source and object files ############ #kernel sources (asm and c) @@ -78,7 +80,8 @@ newrun: clean run # the kernel_entry.o needs to be FIRST!! kernel.bin: $(KERNEL_ENTRY) $(ASMOBJECTS) $(OBJECTS) - ld -o $@ -Ttext $(KERNEL_START) --oformat binary -melf_i386 $^ -O0 # --gc-sections --entry=kernel_main -v + $(CC) $(CFLAGS) -o $@ -Wl,-Ttext,$(KERNEL_START),--oformat,binary $^ + #ld -o $@ -Ttext $(KERNEL_START) --oformat binary -melf_i386 $^ -O0 # --gc-sections --entry=kernel_main -v ############ fool-font ############ -- cgit v1.2.3