From 4ca1b7908a1eea493aa1af9cba59b39a500ccabd Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Mon, 3 Mar 2003 20:01:02 +0000 Subject: [PATCH] * ldmain.c (set_scripts_dir): Look for relative to TOOLBINDIR as well. --- ld/ChangeLog | 3 +++ ld/ldmain.c | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/ld/ChangeLog b/ld/ChangeLog index fbb39f11cc3..aa8070e1837 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,8 @@ 2003-03-03 Alexandre Oliva + * ldmain.c (set_scripts_dir): Look for relative to TOOLBINDIR as + well. + * ldfile.h (struct search_dirs): Added sysrooted field. * ldlang.h (struct lang_input_statement_struct): Likewise. * ldfile.c (ldfile_add_library_path): Mark sysrooted paths. diff --git a/ld/ldmain.c b/ld/ldmain.c index e9f26e2cf7f..214847d9a05 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -669,6 +669,14 @@ set_scripts_dir () if (dir) free (dir); + dir = make_relative_prefix (program_name, TOOLBINDIR, SCRIPTDIR); + if (dir && check_for_scripts_dir (dir)) + /* Success. Don't free dir. */ + return; + + if (dir) + free (dir); + if (check_for_scripts_dir (SCRIPTDIR)) /* We've been installed normally. */ return; -- 2.30.2