diff options
author | Geoffrey Keating <geoffk@apple.com> | 2003-07-31 23:36:43 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2003-07-31 23:36:43 +0000 |
commit | a8ee6e2dc970ec6f4a6c09eb2b39599a4351df67 (patch) | |
tree | 63caf2b661d8c3bfb8d246a2225e369bec17c8a1 /gcc/gcc.c | |
parent | 631099c9592ff2218569df541146431b0a38d7d7 (diff) | |
download | gcc-a8ee6e2dc970ec6f4a6c09eb2b39599a4351df67.zip gcc-a8ee6e2dc970ec6f4a6c09eb2b39599a4351df67.tar.gz gcc-a8ee6e2dc970ec6f4a6c09eb2b39599a4351df67.tar.bz2 |
Makefile.tpl (libsubdir): Use gcc instead of gcc-lib.
2003-07-31 Geoffrey Keating <geoffk@apple.com>
* Makefile.tpl (libsubdir): Use gcc instead of gcc-lib.
* Makefine.in: Update.
Index: gcc/ChangeLog
2003-07-31 Geoffrey Keating <geoffk@apple.com>
* Makefile.in (libexecdir): New.
(libsubdir): Use gcc instead of gcc-lib.
(libexecsubdir): New.
(ORDINARY_FLAGS_TO_PASS): Add libexecsubdir.
(DRIVER_DEFINES): Add STANDARD_LIBEXEC_PREFIX, use gcc instead of
gcc-lib.
(installdirs): Make libexecsubdir.
(install-common): Put executables in libexecsubdir.
(itoolsdir): Use libexecsubdir.
(itoolsdatadir): New.
(install-mkheaders): Separate data files and executables.
(install-collect2): Put executables in libexecsubdir.
(uninstall): Remove libexecsubdir.
* mkheaders.in: Update for new arrangement of files.
(libexecdir): New.
(libexecsubdir): New.
(itoolsdir): Use libexecsubdir.
(itoolsdatadir): New.
* gcc.c (gcc_libexec_prefix): New.
(STANDARD_LIBEXEC_PREFIX): Use gcc instead of gcc-lib.
(standard_exec_prefix_1): Use libexec.
(standard_exec_prefix_2): New.
(standard_libexec_prefix): New.
(process_command): Update for new arrangement of files. Compute
gcc_libexec_prefix. Update for change from gcc-lib to gcc.
From-SVN: r70024
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 38 |
1 files changed, 29 insertions, 9 deletions
@@ -1379,6 +1379,10 @@ static const char *just_machine_suffix = 0; static const char *gcc_exec_prefix; +/* Adjusted value of standard_libexec_prefix. */ + +static const char *gcc_libexec_prefix; + /* Default prefixes to attach to command names. */ #ifdef CROSS_COMPILE /* Don't use these prefixes for a cross compiler. */ @@ -1401,7 +1405,7 @@ static const char *gcc_exec_prefix; /* Supply defaults for the standard prefixes. */ #ifndef STANDARD_EXEC_PREFIX -#define STANDARD_EXEC_PREFIX "/usr/local/lib/gcc-lib/" +#define STANDARD_EXEC_PREFIX "/usr/local/lib/gcc/" #endif #ifndef STANDARD_STARTFILE_PREFIX #define STANDARD_STARTFILE_PREFIX "/usr/local/lib/" @@ -1414,7 +1418,8 @@ static const char *gcc_exec_prefix; #endif static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX; -static const char *const standard_exec_prefix_1 = "/usr/lib/gcc/"; +static const char *const standard_exec_prefix_1 = "/usr/libexec/gcc/"; +static const char *const standard_exec_prefix_2 = "/usr/lib/gcc/"; static const char *md_exec_prefix = MD_EXEC_PREFIX; static const char *md_startfile_prefix = MD_STARTFILE_PREFIX; @@ -1428,6 +1433,8 @@ static const char *tooldir_prefix; static const char *const standard_bindir_prefix = STANDARD_BINDIR_PREFIX; +static const char *standard_libexec_prefix = STANDARD_LIBEXEC_PREFIX; + /* Subdirectory to use for locating libraries. Set by set_multilib_dir based on the compilation options. */ @@ -3163,34 +3170,43 @@ process_command (int argc, const char *const *argv) /* Set up the default search paths. If there is no GCC_EXEC_PREFIX, see if we can create it from the pathname specified in argv[0]. */ + gcc_libexec_prefix = standard_libexec_prefix; #ifndef VMS /* 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, standard_exec_prefix); + gcc_libexec_prefix = make_relative_prefix (argv[0], + standard_bindir_prefix, + standard_libexec_prefix); if (gcc_exec_prefix) putenv (concat ("GCC_EXEC_PREFIX=", gcc_exec_prefix, NULL)); } + else + gcc_libexec_prefix = make_relative_prefix (gcc_exec_prefix, + standard_exec_prefix, + standard_libexec_prefix); +#else #endif if (gcc_exec_prefix) { int len = strlen (gcc_exec_prefix); - if (len > (int) sizeof ("/lib/gcc-lib/") - 1 + if (len > (int) sizeof ("/lib/gcc/") - 1 && (IS_DIR_SEPARATOR (gcc_exec_prefix[len-1]))) { - temp = gcc_exec_prefix + len - sizeof ("/lib/gcc-lib/") + 1; + temp = gcc_exec_prefix + len - sizeof ("/lib/gcc/") + 1; if (IS_DIR_SEPARATOR (*temp) && strncmp (temp + 1, "lib", 3) == 0 && IS_DIR_SEPARATOR (temp[4]) - && strncmp (temp + 5, "gcc-lib", 7) == 0) - len -= sizeof ("/lib/gcc-lib/") - 1; + && strncmp (temp + 5, "gcc", 7) == 0) + len -= sizeof ("/lib/gcc/") - 1; } set_std_prefix (gcc_exec_prefix, len); - add_prefix (&exec_prefixes, gcc_exec_prefix, "GCC", + add_prefix (&exec_prefixes, gcc_libexec_prefix, "GCC", PREFIX_PRIORITY_LAST, 0, NULL, 0); add_prefix (&startfile_prefixes, gcc_exec_prefix, "GCC", PREFIX_PRIORITY_LAST, 0, NULL, 0); @@ -3729,17 +3745,21 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n" /* Use 2 as fourth arg meaning try just the machine as a suffix, as well as trying the machine and the version. */ #ifndef OS2 - add_prefix (&exec_prefixes, standard_exec_prefix, "GCC", + add_prefix (&exec_prefixes, standard_libexec_prefix, "GCC", PREFIX_PRIORITY_LAST, 1, warn_std_ptr, 0); + add_prefix (&exec_prefixes, standard_libexec_prefix, "BINUTILS", + PREFIX_PRIORITY_LAST, 2, warn_std_ptr, 0); add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS", PREFIX_PRIORITY_LAST, 2, warn_std_ptr, 0); add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS", PREFIX_PRIORITY_LAST, 2, warn_std_ptr, 0); + add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS", + PREFIX_PRIORITY_LAST, 2, warn_std_ptr, 0); #endif add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS", PREFIX_PRIORITY_LAST, 1, warn_std_ptr, 0); - add_prefix (&startfile_prefixes, standard_exec_prefix_1, "BINUTILS", + add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS", PREFIX_PRIORITY_LAST, 1, warn_std_ptr, 0); tooldir_prefix = concat (tooldir_base_prefix, spec_machine, |