[llvm-commits] [llvm-gcc-4.2] r105535 - /llvm-gcc-4.2/trunk/driverdriver.c

Bob Wilson bob.wilson at apple.com
Mon Jun 7 10:09:02 PDT 2010


Author: bwilson
Date: Mon Jun  7 12:09:02 2010
New Revision: 105535

URL: http://llvm.org/viewvc/llvm-project?rev=105535&view=rev
Log:
Follow multiple levels of symbolic links for the driver-driver.  Otherwise,
the driver-driver fails to find the right compiler when it is linked via
multiple levels of symlinks, e.g., cc -> llvm-gcc-4.2 ->
$DEVELOPER_DIR/usr/bin/llvm-gcc-4.2.  Radar 8022536.

Modified:
    llvm-gcc-4.2/trunk/driverdriver.c

Modified: llvm-gcc-4.2/trunk/driverdriver.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/driverdriver.c?rev=105535&r1=105534&r2=105535&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/driverdriver.c (original)
+++ llvm-gcc-4.2/trunk/driverdriver.c Mon Jun  7 12:09:02 2010
@@ -1306,8 +1306,8 @@
 
   /* If argv[0] is a symbolic link, use the directory of the pointed-to file
      to find compiler components. */
-
-  if ((linklen = readlink (argv[0], path_buffer, PATH_MAX)) != -1)
+  /* LLVM LOCAL: loop to follow multiple levels of links */
+  while ((linklen = readlink (argv[0], path_buffer, PATH_MAX)) != -1)
     {
       /* readlink succeeds if argv[0] is a symlink.  path_buffer now contains
 	 the file referenced. */





More information about the llvm-commits mailing list