aboutsummaryrefslogtreecommitdiff
path: root/contrib/gcc/gcc.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gcc/gcc.c')
-rw-r--r--contrib/gcc/gcc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/gcc/gcc.c b/contrib/gcc/gcc.c
index 7622771d8ff1..fe7de5bbb402 100644
--- a/contrib/gcc/gcc.c
+++ b/contrib/gcc/gcc.c
@@ -4275,6 +4275,16 @@ main (argc, argv)
if (specs_file != 0 && strcmp (specs_file, "specs"))
read_specs (specs_file);
+ /* We need to check standard_exec_prefix/just_machine_suffix/specs
+ for any override of as, ld and libraries. */
+ specs_file =(char *) alloca (strlen (standard_exec_prefix) +
+ strlen (just_machine_suffix) + sizeof ("specs"));
+ strcpy (specs_file, standard_exec_prefix);
+ strcat (specs_file, just_machine_suffix);
+ strcat (specs_file, "specs");
+ if (access (specs_file, R_OK) == 0)
+ read_specs (specs_file, TRUE);
+
/* If not cross-compiling, look for startfiles in the standard places. */
/* The fact that these are done here, after reading the specs file,
means that it cannot be found in these directories.