From 5bb67e36f666088e7fa1719de1623329d39b0870 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Sat, 21 Jun 1997 06:29:14 -0400 Subject: [PATCH] Check for and read ${libdir}/gcc-lib/specs to override the default specs. From-SVN: r14278 --- gcc/gcc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gcc/gcc.c b/gcc/gcc.c index 8e50517f123..33b220a22c0 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) -- 2.30.2