summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-09-09 19:04:03 +0200
committerMichal Idziorek <m.i@gmx.at>2014-09-09 19:04:03 +0200
commit4c0606ad1a6f60aed00b7a7866babfd011b60ef9 (patch)
tree818e076e3dea7e367c7bfeab3e76d05a1ab7e40e
parent037df91d94a0abf5f5da8d629610cb219943dd6f (diff)
changed Makefile to make use of our new cross-gcc
-rw-r--r--Makefile9
1 files 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 ############