Commit ffd86336 by Jim Wilson

(MULTILIB_SELECT): Delete definition.

(multilib_select): Delete static initializer.
(multilib_obstack, multilib_raw): New global variables.
(multilib.h): Include inside multilib_raw definition.
(main): Set multilib_select from multilib_raw.

From-SVN: r12239
parent 2d917903
...@@ -56,9 +56,6 @@ int __spawnvp (); ...@@ -56,9 +56,6 @@ int __spawnvp ();
#endif #endif
#include <stdio.h> #include <stdio.h>
/* Include multi-lib information. */
#include "multilib.h"
#ifndef R_OK #ifndef R_OK
#define R_OK 4 #define R_OK 4
#define W_OK 2 #define W_OK 2
...@@ -475,13 +472,6 @@ proper position among the other output files. */ ...@@ -475,13 +472,6 @@ proper position among the other output files. */
#endif #endif
#endif #endif
/* MULTILIB_SELECT comes from multilib.h. It gives a
string interpreted by set_multilib_dir to select a library
subdirectory based on the compiler options. */
#ifndef MULTILIB_SELECT
#define MULTILIB_SELECT ". ;"
#endif
static char *cpp_spec = CPP_SPEC; static char *cpp_spec = CPP_SPEC;
static char *cpp_predefines = CPP_PREDEFINES; static char *cpp_predefines = CPP_PREDEFINES;
static char *cc1_spec = CC1_SPEC; static char *cc1_spec = CC1_SPEC;
...@@ -495,7 +485,14 @@ static char *libgcc_spec = LIBGCC_SPEC; ...@@ -495,7 +485,14 @@ static char *libgcc_spec = LIBGCC_SPEC;
static char *endfile_spec = ENDFILE_SPEC; static char *endfile_spec = ENDFILE_SPEC;
static char *startfile_spec = STARTFILE_SPEC; static char *startfile_spec = STARTFILE_SPEC;
static char *switches_need_spaces = SWITCHES_NEED_SPACES; static char *switches_need_spaces = SWITCHES_NEED_SPACES;
static char *multilib_select = MULTILIB_SELECT;
/* Some compilers have limits on line lengths, and the multilib_select
string can be very long, so we build it at run time. */
static struct obstack multilib_obstack;
static char *multilib_raw[] = {
#include "multilib.h"
};
static char *multilib_select;
#ifdef EXTRA_SPECS #ifdef EXTRA_SPECS
static struct { char *name, *spec; } extra_specs[] = { EXTRA_SPECS }; static struct { char *name, *spec; } extra_specs[] = { EXTRA_SPECS };
...@@ -4201,6 +4198,19 @@ main (argc, argv) ...@@ -4201,6 +4198,19 @@ main (argc, argv)
obstack_init (&obstack); obstack_init (&obstack);
/* Build multilib_select from the separate lines that make up each multilib
selection. */
{
char **q = multilib_raw;
obstack_init (&multilib_obstack);
while ((p = *q++) != (char *)0)
obstack_grow (&multilib_obstack, p, strlen (p));
obstack_1grow (&multilib_obstack, 0);
multilib_select = obstack_finish (&multilib_obstack);
}
/* Set up to remember the pathname of gcc and any options /* Set up to remember the pathname of gcc and any options
needed for collect. We use argv[0] instead of programname because needed for collect. We use argv[0] instead of programname because
we need the complete pathname. */ we need the complete pathname. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment