To find gcc's installation prefix, I've been using
"gcc -print-search-dirs".  That worked up until 4.3, but now gcc
chases symlinks so it can print symlink-free paths.  What I want is
the installation path just as it was spelled in
"./configure --prefix=...".  In my case, that spelling is an absolute
path with no .. elements or superfluous slashes, but it does have
symlinks.  Is there any way to get that with gcc 4.3?  If not, this
patch seems to restore the behavior I want, but will it have any
harmful consequences?

--- gcc/gcc.c   2008-03-02 17:54:56.000000000 -0500
+++ gcc/gcc.c   2008-11-13 00:29:45.000000000 -0500
@@ -3413,7 +3413,7 @@
   /* FIXME: make_relative_prefix doesn't yet work for VMS.  */
   if (!gcc_exec_prefix)
     {
-      gcc_exec_prefix = make_relative_prefix (argv[0], standard_bindir_prefix,
+      gcc_exec_prefix = make_relative_prefix_ignore_links (argv[0], 
standard_bindir_prefix,
                                              standard_exec_prefix);
       gcc_libexec_prefix = make_relative_prefix (argv[0],
                                                 standard_bindir_prefix,

Reply via email to