]> gcc.gnu.org Git - gcc.git/commitdiff
Revert r238089 (PR driver/81829).
authorMartin Liska <mliska@suse.cz>
Thu, 19 Oct 2017 11:08:28 +0000 (13:08 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Thu, 19 Oct 2017 11:08:28 +0000 (11:08 +0000)
2017-10-19  Martin Liska  <mliska@suse.cz>

PR driver/81829
* file-find.c (remove_prefix): Remove.
* file-find.h (remove_prefix): Likewise.
* gcc-ar.c: Remove smartness of lookup.

From-SVN: r253886

gcc/ChangeLog
gcc/file-find.c
gcc/file-find.h
gcc/gcc-ar.c

index 189fe05afaba29d4b02fd1cc29773b118b4c04a0..f2a46b94e57087a0663730aa73f291b24a91b4a8 100644 (file)
@@ -1,3 +1,10 @@
+2017-10-19  Martin Liska  <mliska@suse.cz>
+
+       PR driver/81829
+       * file-find.c (remove_prefix): Remove.
+       * file-find.h (remove_prefix): Likewise.
+       * gcc-ar.c: Remove smartness of lookup.
+
 2017-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
 
        * config/rs6000/rs6000.md (*call_indirect_aix<mode>,
index b072a4993d76e5b6e415cebbae2b8e52e5917e27..b5a1fe8494e88b694df15c9b806c49dfaa938720 100644 (file)
@@ -208,38 +208,3 @@ prefix_from_string (const char *p, struct path_prefix *pprefix)
     }
   free (nstore);
 }
-
-void
-remove_prefix (const char *prefix, struct path_prefix *pprefix)
-{
-  struct prefix_list *remove, **prev, **remove_prev = NULL;
-  int max_len = 0;
-
-  if (pprefix->plist)
-    {
-      prev = &pprefix->plist;
-      for (struct prefix_list *pl = pprefix->plist; pl->next; pl = pl->next)
-       {
-         if (strcmp (prefix, pl->prefix) == 0)
-           {
-             remove = pl;
-             remove_prev = prev;
-             continue;
-           }
-
-         int l = strlen (pl->prefix);
-         if (l > max_len)
-           max_len = l;
-
-         prev = &pl;
-       }
-
-      if (remove_prev)
-       {
-         *remove_prev = remove->next;
-         free (remove);
-       }
-
-      pprefix->max_len = max_len;
-    }
-}
index 8f49a3af273e9760e1d1570efde0d13219aee9e8..407feba26e7450cb6bbb1fb65045d8a1f72a7bde 100644 (file)
@@ -41,7 +41,6 @@ extern void find_file_set_debug (bool);
 extern char *find_a_file (struct path_prefix *, const char *, int);
 extern void add_prefix (struct path_prefix *, const char *);
 extern void add_prefix_begin (struct path_prefix *, const char *);
-extern void remove_prefix (const char *prefix, struct path_prefix *);
 extern void prefix_from_env (const char *, struct path_prefix *);
 extern void prefix_from_string (const char *, struct path_prefix *);
 
index 78d2fc1ad306640acc142d6256f43a8836418ea2..d5d80e042e5a438b42528e16d0ed6e047bcf017b 100644 (file)
@@ -194,14 +194,6 @@ main (int ac, char **av)
 #ifdef CROSS_DIRECTORY_STRUCTURE
       real_exe_name = concat (target_machine, "-", PERSONALITY, NULL);
 #endif
-      /* Do not search original location in the same folder.  */
-      char *exe_folder = lrealpath (av[0]);
-      exe_folder[strlen (exe_folder) - strlen (lbasename (exe_folder))] = '\0';
-      char *location = concat (exe_folder, PERSONALITY, NULL);
-
-      if (access (location, X_OK) == 0)
-       remove_prefix (exe_folder, &path);
-
       exe_name = find_a_file (&path, real_exe_name, X_OK);
       if (!exe_name)
        {
This page took 0.108488 seconds and 5 git commands to generate.