I\'ve googled the hell out of it, and it seems like there is no way to install gcc on OS X without installing Xcode (which takes at leats 1.5GB of space). All I need is gcc
install Command Line Tool separately.
refer to
Checkout command line tools for Xcode from apple. It's official support from apple to only create the command line tools.
Install the GCC package from the Packages directory in Xcode's disk image and you'll have just GCC. Note that of course you won't have autotools or other standard build tools, for which you will have to install more packages from that folder.