Here is the thread where the discussion starts: http://gcc.gnu.org/ml/gcc-patches/2005-12/msg00607.html Here are is the relevant commit to gcc for this patch: http://gcc.gnu.org/viewcvs?view=rev&revision=108635 Here is the actual patch that I have been using (verified that it works). It only contains the patch chunk for gcc.c: http://dev.gentoo.org/~kanaka/files/gcc-print-search-dirs.patch This patch doesn't cleanly apply to gcc-3 as I recall. But I might have seen a backport of the patch somewhere that I could dig up if it's really desired.
Oh, and here is the original bug tracking this patch: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20425
added to cvs patchset for 4.1.1-r1