Hi,
The reason Combuster replied in that way is that you should
really know you toolchain quite well before attempting to program an OS. I though I knew my toolchain quite well until I started OS dev, but OS devving seems to stretch that knowlege to the limit (as you will see from some of my (recent) posts on General Programming).
If you do not know the basics enough to create a "Hello World" C++ program (gcc != g++), OS dev is going to be a lot trickier, so try playing around with application development first.
As for the switches, I use the following in my Makefile for my second stage boot loader:
Code: Select all
CXXFLAGS:= -b$(TARGET) -V$(CXXVER) -MD \
-Wall -Wextra -pedantic -Wshadow -Wpointer-arith -Wcast-align \
-Wwrite-strings -Wredundant-decls -Winline -Wno-long-long \
-Werror -O0 -fstrength-reduce -nostartfiles \
-DDEBUG -fno-exceptions -fno-rtti \
-I../include/ -I../../OSLib/include/
You can pretty much see Solar's
Makefile tutorial on the wiki and adapt the flags that don't work with C++. Really, though, you need to read up on G++ and see which switches suit your needs best. Do not copy and paste my switches above because they may not be what you require.
Cheers,
Adam