From 632577dbc0d2ce238110d77ac9cc3e449f0964bd Mon Sep 17 00:00:00 2001 From: zrj Date: Wed, 2 May 2018 16:17:46 +0300 Subject: [PATCH] gcc80: Adjust search paths for base compiler layout. All tools are located in a common /usr/libexec/gcc80/ directory. --- contrib/gcc-8.0/gcc/gcc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/contrib/gcc-8.0/gcc/gcc.c b/contrib/gcc-8.0/gcc/gcc.c index a716f70825..2d20a17aef 100644 --- a/contrib/gcc-8.0/gcc/gcc.c +++ b/contrib/gcc-8.0/gcc/gcc.c @@ -2537,6 +2537,7 @@ for_each_path (const struct path_prefix *paths, len = strlen (pl->prefix); memcpy (path, pl->prefix, len); +#if 0 /* DragonFly base: MACHINE/VERSION isn't used anywhere */ /* Look first in MACHINE/VERSION subdirectory. */ if (!skip_multi_dir) { @@ -2545,6 +2546,7 @@ for_each_path (const struct path_prefix *paths, if (ret) break; } +#endif /* Some paths are tried with just the machine (ie. target) subdir. This is used for finding as, ld, etc. */ @@ -4245,6 +4247,7 @@ process_command (unsigned int decoded_options_count, /* FIXME: make_relative_prefix doesn't yet work for VMS. */ if (!gcc_exec_prefix) { +#if 0 /* DragonFly base: Never use relative prefix (not bootstrapped) */ gcc_exec_prefix = get_relative_prefix (decoded_options[0].arg, standard_bindir_prefix, standard_exec_prefix); @@ -4253,6 +4256,7 @@ process_command (unsigned int decoded_options_count, standard_libexec_prefix); if (gcc_exec_prefix) xputenv (concat ("GCC_EXEC_PREFIX=", gcc_exec_prefix, NULL)); +#endif } else { @@ -4297,11 +4301,13 @@ process_command (unsigned int decoded_options_count, len -= sizeof ("/lib/gcc/") - 1; } +#if 0 /* DragonFly base: Bad Paths */ set_std_prefix (gcc_exec_prefix, len); add_prefix (&exec_prefixes, gcc_libexec_prefix, "GCC", PREFIX_PRIORITY_LAST, 0, 0); add_prefix (&startfile_prefixes, gcc_exec_prefix, "GCC", PREFIX_PRIORITY_LAST, 0, 0); +#endif } /* COMPILER_PATH and LIBRARY_PATH have values @@ -4559,6 +4565,11 @@ process_command (unsigned int decoded_options_count, if (!gcc_exec_prefix) { #ifndef OS2 +#if 1 /* DragonFly base: All tools in the same common location */ + add_prefix (&exec_prefixes, standard_libexec_prefix, NULL, + PREFIX_PRIORITY_LAST, 0, 0); +#endif +#if 0 /* DragonFly base: Bad paths */ add_prefix (&exec_prefixes, standard_libexec_prefix, "GCC", PREFIX_PRIORITY_LAST, 1, 0); add_prefix (&exec_prefixes, standard_libexec_prefix, "BINUTILS", @@ -4566,8 +4577,11 @@ process_command (unsigned int decoded_options_count, add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS", PREFIX_PRIORITY_LAST, 2, 0); #endif +#endif +#if 0 /* DragonFly base: Bad paths */ add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS", PREFIX_PRIORITY_LAST, 1, 0); +#endif } gcc_assert (!IS_ABSOLUTE_PATH (tooldir_base_prefix)); @@ -4582,12 +4596,14 @@ process_command (unsigned int decoded_options_count, accel_dir_suffix, dir_separator_str, tooldir_prefix2, NULL); free (tooldir_prefix2); +#if 0 /* DragonFly base: Bad paths */ add_prefix (&exec_prefixes, concat (tooldir_prefix, "bin", dir_separator_str, NULL), "BINUTILS", PREFIX_PRIORITY_LAST, 0, 0); add_prefix (&startfile_prefixes, concat (tooldir_prefix, "lib", dir_separator_str, NULL), "BINUTILS", PREFIX_PRIORITY_LAST, 0, 1); +#endif free (tooldir_prefix); #if defined(TARGET_SYSTEM_ROOT_RELOCATABLE) && !defined(VMS) -- 2.41.0