Are you sure that Damn Small Linux is really the distribution to use?
If you go to
http://www.distrowatch.org and do a search, you'll probably find something else that already has what you require.
Start by installing Damn Small Linux onto a hard disk, compile the extra things you need, and then copy everything except the sources to the flash. I'm not sure what you do about bootloaders on a flash card; someone else will have to answer that.
Do you really need gcc? Damn Small Linux includes tcc (
http://www.damnsmalllinux.org/packages.html), so you'll have to install gcc instead if you want it. I'd do a build of gcc from source (not exactly a trivial task) and set the CCOPTS to -Os (optimise for size) before building.
As far as the kernel is concerned, just install it from source (“make xconfig” then “make modules modules_install install”). When you configure it, don't include anything you don't need. Again, you might want to consider -Os as a compiler option, or at least -O1, as -O2 will increase the binary size quite a bit.
You can use strip to remove unused information in executables and libraries, which can make them a lot smaller:
Another tip is to use gzexe to compress executable files.
Code:
gzexe /usr/X11R6/bin/XFree86
This will make the files smaller on disk, but take longer to start up.