diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1996-06-07 19:44:31 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1996-06-07 19:44:31 -0700 |
commit | ffd8633682c0936947fc1cc8c6f18f7340eede2e (patch) | |
tree | 755c7a8b4fa03b25ab4a974fa647df421ac6b612 | |
parent | 2d917903294885f0f65accf65a231e89a4b2778f (diff) | |
download | gcc-ffd8633682c0936947fc1cc8c6f18f7340eede2e.zip gcc-ffd8633682c0936947fc1cc8c6f18f7340eede2e.tar.gz gcc-ffd8633682c0936947fc1cc8c6f18f7340eede2e.tar.bz2 |
(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
-rw-r--r-- | gcc/gcc.c | 32 |
1 files changed, 21 insertions, 11 deletions
@@ -56,9 +56,6 @@ int __spawnvp (); #endif #include <stdio.h> -/* Include multi-lib information. */ -#include "multilib.h" - #ifndef R_OK #define R_OK 4 #define W_OK 2 @@ -475,13 +472,6 @@ proper position among the other output files. */ #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_predefines = CPP_PREDEFINES; static char *cc1_spec = CC1_SPEC; @@ -495,7 +485,14 @@ static char *libgcc_spec = LIBGCC_SPEC; static char *endfile_spec = ENDFILE_SPEC; static char *startfile_spec = STARTFILE_SPEC; 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 static struct { char *name, *spec; } extra_specs[] = { EXTRA_SPECS }; @@ -4201,6 +4198,19 @@ main (argc, argv) 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 needed for collect. We use argv[0] instead of programname because we need the complete pathname. */ |