DIR := arch/x86/
CXXFLAGS += -fno-omit-frame-pointer -march=i686
-$(BUILDDIR)/kernel: $(OBJS) $(DIR)linker-script
+$(BUILDDIR)/kernel: $(OBJS) $(LIBS) $(DIR)linker-script
@echo $(COMP): Linking kernel: $@
@$(MKDIR) $(dir $@)
- @$(CXX) $(OBJS) -lgcc -lsupc++ -nostdlib -o "$@" -Wl,-T$(DIR)linker-script
+ @$(CXX) $(OBJS) $(LIBS) -lgcc -lsupc++ -nostdlib -o "$@" -Wl,-T$(DIR)linker-script
# GRUB refuses to use the addresses in the multiboot header if it
# finds a valid ELF header, so the dd hacks a zero into the high byte