From 4dbc7773ffc2049ca43f3022d5e5e209fd57e2b0 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 6 Aug 1993 20:45:36 +0000 Subject: [PATCH] Permit relative path for standard_startfile_prefix From-SVN: r5091 --- gcc/gcc.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/gcc/gcc.c b/gcc/gcc.c index 1c17bb98d44..2d2f5197ec0 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -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, -- 2.30.2