I downloaded and built gcc 4.8.1 on my desktop, running 64-bit Ubuntu 12.04. I built it out of source, like the docs recommend, and with the commands
../../g
gcc -print-search-dirs will tell you where your compiler is looking for runtime libraries, etc. You can override this with the -B option.
gcc -print-search-dirs
-B