aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1997-06-21 06:29:14 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1997-06-21 06:29:14 -0400
commit5bb67e36f666088e7fa1719de1623329d39b0870 (patch)
tree3d3cb292d7c1c9d52a4483944395818c978ff083 /gcc/gcc.c
parent335cd0847fe3731e9b94f2e9f56d3092904dff1d (diff)
downloadgcc-5bb67e36f666088e7fa1719de1623329d39b0870.zip
gcc-5bb67e36f666088e7fa1719de1623329d39b0870.tar.gz
gcc-5bb67e36f666088e7fa1719de1623329d39b0870.tar.bz2
Check for and read ${libdir}/gcc-lib/specs to override the default specs.
From-SVN: r14278
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 8e50517..33b220a 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -4386,6 +4386,18 @@ main (argc, argv)
else
init_spec ();
+ /* 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);
+
/* Process any user specified specs in the order given on the command
line. */
for (uptr = user_specs_head; uptr; uptr = uptr->next)