diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 1993-08-06 20:45:36 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 1993-08-06 20:45:36 +0000 |
commit | 4dbc7773ffc2049ca43f3022d5e5e209fd57e2b0 (patch) | |
tree | a98cd57da7d550820e50fb5c31555a0b70b7e2f0 | |
parent | bf0263690ed399fb2844b6c3e079828c9c31b5f2 (diff) | |
download | gcc-4dbc7773ffc2049ca43f3022d5e5e209fd57e2b0.zip gcc-4dbc7773ffc2049ca43f3022d5e5e209fd57e2b0.tar.gz gcc-4dbc7773ffc2049ca43f3022d5e5e209fd57e2b0.tar.bz2 |
Permit relative path for standard_startfile_prefix
From-SVN: r5091
-rw-r--r-- | gcc/gcc.c | 24 |
1 files changed, 22 insertions, 2 deletions
@@ -3718,8 +3718,28 @@ main (argc, argv) add_prefix (&startfile_prefix, md_startfile_prefix_1, 0, 0, NULL_PTR); #endif - add_prefix (&startfile_prefix, standard_startfile_prefix, 0, 0, - NULL_PTR); + /* If standard_startfile_prefix is relative, base it on + standard_exec_prefix. This lets us move the installed tree + as a unit. If GCC_EXEC_PREFIX is defined, base + standard_startfile_prefix on that as well. */ + if (*standard_startfile_prefix == '/') + add_prefix (&startfile_prefix, standard_startfile_prefix, 0, 0, + NULL_PTR); + else + { + if (gcc_exec_prefix) + add_prefix (&startfile_prefix, + concat (gcc_exec_prefix, + machine_suffix, + standard_startfile_prefix), + 0, 0, NULL_PTR); + add_prefix (&startfile_prefix, + concat (standard_exec_prefix, + machine_suffix, + standard_startfile_prefix), + 0, 0, NULL_PTR); + } + add_prefix (&startfile_prefix, standard_startfile_prefix_1, 0, 0, NULL_PTR); add_prefix (&startfile_prefix, standard_startfile_prefix_2, 0, 0, |