GCC switches

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Unspoken_Magi

GCC switches

Post by Unspoken_Magi »

What switches should I use with GCC for compiling the C code of my Kernel?
What switches should I use for LD, and what should I have in my linker script?

I already have these, but things have been going wrong and I think I have the compiler/linker doing something wrong...
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:GCC switches

Post by Pype.Clicker »

ld -T $(linker-script) -o $(targetfile) -s -n $(every-.o-file) -Map kernel.map


cflags=-I ($include directory) -fno-builtin -O2 -g

%.o: %.c
gcc -c -o $@ $< $(cflags)


[attachment deleted by admin]
Post Reply