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...
GCC switches
- Pype.Clicker
- Member

- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:GCC switches
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]
cflags=-I ($include directory) -fno-builtin -O2 -g
%.o: %.c
gcc -c -o $@ $< $(cflags)
[attachment deleted by admin]