We will use this in the subsequent diff to control what basenames we search for. In machine-specific subdirectories, we should just look for the original basename, but in machine-agnostic subdirectories, we might additionally look for prefixed disambiguated names, as an alternate method of keeping targets apart. --- gcc/gcc.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/gcc/gcc.c b/gcc/gcc.c index 710cbfe9a66..f32c7a8de46 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -2766,7 +2766,7 @@ static void * for_each_path (const struct path_prefix *paths, bool do_multi, size_t extra_space, - void *(*callback) (char *, void *), + void *(*callback) (char *, bool, void *), void *callback_info) { struct prefix_list *pl; @@ -2827,7 +2827,7 @@ for_each_path (const struct path_prefix *paths, if (!skip_multi_dir) { memcpy (path + len, multi_suffix, suffix_len + 1); - ret = callback (path, callback_info); + ret = callback (path, true, callback_info); if (ret) break; } @@ -2838,7 +2838,7 @@ for_each_path (const struct path_prefix *paths, && pl->require_machine_suffix == 2) { memcpy (path + len, just_multi_suffix, just_suffix_len + 1); - ret = callback (path, callback_info); + ret = callback (path, true, callback_info); if (ret) break; } @@ -2848,7 +2848,7 @@ for_each_path (const struct path_prefix *paths, && !pl->require_machine_suffix && multiarch_dir) { memcpy (path + len, multiarch_suffix, multiarch_len + 1); - ret = callback (path, callback_info); + ret = callback (path, true, callback_info); if (ret) break; } @@ -2876,7 +2876,7 @@ for_each_path (const struct path_prefix *paths, else path[len] = '\0'; - ret = callback (path, callback_info); + ret = callback (path, false, callback_info); if (ret) break; } @@ -2931,7 +2931,7 @@ struct add_to_obstack_info { }; static void * -add_to_obstack (char *path, void *data) +add_to_obstack (char *path, bool, void *data) { struct add_to_obstack_info *info = (struct add_to_obstack_info *) data; @@ -3023,7 +3023,7 @@ struct file_at_path_info { }; static void * -file_at_path (char *path, void *data) +file_at_path (char *path, bool, void *data) { struct file_at_path_info *info = (struct file_at_path_info *) data; size_t len = strlen (path); @@ -3074,7 +3074,7 @@ find_a_file (const struct path_prefix *pprefix, const char *name, int mode, path. Like file_at_path but tries machine prefix and exe suffix too. */ static void * -program_at_path (char *path, void *data) +program_at_path (char *path, bool machine_specific, void *data) { /* try first with machine-prefixed name */ struct file_at_path_info *info = (struct file_at_path_info *) data; @@ -5945,7 +5945,7 @@ struct spec_path_info { }; static void * -spec_path (char *path, void *data) +spec_path (char *path, bool, void *data) { struct spec_path_info *info = (struct spec_path_info *) data; size_t len = 0; -- 2.31.1