aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2004-01-24 07:11:58 +0000
committerMike Stump <mrs@apple.com>2004-01-24 07:11:58 +0000
commit81a9074e8005ee5749ec1b5578d1de8688d9e663 (patch)
tree28138278013c1d3496fc85d40aaeba38a7a3d65f
parent73f48101760ffe123b541c926bb05b5473cc3e05 (diff)
* gcc.c (use_server): Default to off.compile-server-branch
(main): Set use_server early from GCCSERVER. (execute): Skip "@." earlier when compile server isn't in use. (process_command): Only turn -pipe off when server is in use. * opts.c (add_input_filename): Ensure input filenames are allocated with malloc. * toplev.c (server_loop): Remove code that handled 'I', as input files are now processed normally. * c-common.h (init_cmdline_fragment): Add. (create_cmdline_fragment): Add. (end_cmdline_fragment): Add. (activate_cmdline_fragment): Add. * config/darwin-c.c (reinit_frameworks): Add void to arglist. * opts.c (reinit_opts): Likewise. * c-common.c (init_cmdline_fragment): Likewise. * opts.h (reinit_opts): Likewise. * c-incpath.c (reinit_incpath): Likewise. * c-opts.c (reinit_copts): Likewise. cp: * lex.c (lang_clear_identifier): Remove unneeded code. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/compile-server-branch@76485 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog25
-rw-r--r--gcc/c-common.c2
-rw-r--r--gcc/c-common.h4
-rw-r--r--gcc/c-incpath.c2
-rw-r--r--gcc/c-opts.c2
-rw-r--r--gcc/config/darwin-c.c2
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/lex.c5
-rw-r--r--gcc/gcc.c39
-rw-r--r--gcc/opts.c6
-rw-r--r--gcc/opts.h1
-rw-r--r--gcc/toplev.c15
12 files changed, 67 insertions, 40 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 34d1b8459a2..c2c82ae677c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,28 @@
+2004-01-23 Mike Stump <mrs@apple.com>
+
+ * gcc.c (use_server): Default to off.
+ (main): Set use_server early from GCCSERVER.
+ (execute): Skip "@." earlier when compile server isn't in use.
+ (process_command): Only turn -pipe off when server is in use.
+
+ * opts.c (add_input_filename): Ensure input filenames are
+ allocated with malloc.
+
+ * toplev.c (server_loop): Remove code that handled 'I', as input
+ files are now processed normally.
+
+ * c-common.h (init_cmdline_fragment): Add.
+ (create_cmdline_fragment): Add.
+ (end_cmdline_fragment): Add.
+ (activate_cmdline_fragment): Add.
+
+ * config/darwin-c.c (reinit_frameworks): Add void to arglist.
+ * opts.c (reinit_opts): Likewise.
+ * c-common.c (init_cmdline_fragment): Likewise.
+ * opts.h (reinit_opts): Likewise.
+ * c-incpath.c (reinit_incpath): Likewise.
+ * c-opts.c (reinit_copts): Likewise.
+
2004-01-21 Mike Stump <mrs@apple.com>
Move options processing from server command line to client command
diff --git a/gcc/c-common.c b/gcc/c-common.c
index f087b0c466f..2bb00d8b080 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -5097,7 +5097,7 @@ end_cmdline_fragment (void)
parse_in->current_fragment = NULL;
}
-void init_cmdline_fragment ()
+void init_cmdline_fragment (void)
{
cmdline_c_fragment = 0;
}
diff --git a/gcc/c-common.h b/gcc/c-common.h
index bd7bfb040f1..84d4c6a1bf5 100644
--- a/gcc/c-common.h
+++ b/gcc/c-common.h
@@ -234,6 +234,10 @@ extern void cb_exit_fragment (cpp_reader*, cpp_fragment*);
extern void synthetic_exit_fragment (cpp_reader *reader, cpp_fragment *fragment);
extern void cb_uses_fragment (cpp_reader*, cpp_fragment*);
extern bool cb_avoid_new_fragment (cpp_reader*);
+extern void init_cmdline_fragment (void);
+extern void create_cmdline_fragment (void);
+extern void end_cmdline_fragment (void);
+extern void activate_cmdline_fragment (void);
extern void init_output_fragment (void);
extern void create_output_fragment (void);
extern void end_output_fragment (void);
diff --git a/gcc/c-incpath.c b/gcc/c-incpath.c
index 77d7b913431..c668ab406df 100644
--- a/gcc/c-incpath.c
+++ b/gcc/c-incpath.c
@@ -62,7 +62,7 @@ enum { REASON_QUIET = 0, REASON_NOENT, REASON_DUP, REASON_DUP_SYS };
/* Reinitialize for next compile. */
void
-reinit_incpath ()
+reinit_incpath (void)
{
memset (heads, 0, sizeof (heads));
memset (tails, 0, sizeof (tails));
diff --git a/gcc/c-opts.c b/gcc/c-opts.c
index 989a532eb12..15c10b72c56 100644
--- a/gcc/c-opts.c
+++ b/gcc/c-opts.c
@@ -1145,7 +1145,7 @@ c_common_post_options (const char **pfilename ATTRIBUTE_UNUSED)
/* Reinitialize for next compile. */
static void
-reinit_copts ()
+reinit_copts (void)
{
verbose = false;
diff --git a/gcc/config/darwin-c.c b/gcc/config/darwin-c.c
index c24c63d0842..4c999b52495 100644
--- a/gcc/config/darwin-c.c
+++ b/gcc/config/darwin-c.c
@@ -406,7 +406,7 @@ static const char *framework_defaults [] =
};
-static void reinit_frameworks ()
+static void reinit_frameworks (void)
{
if (num_frameworks)
{
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index a6619be89b2..a322805758b 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+2004-01-23 Mike Stump <mrs@apple.com>
+
+ * lex.c (lang_clear_identifier): Remove unneeded code.
+
2004-01-21 Mike Stump <mrs@apple.com>
* lex.c (lang_clear_identifier): Don't clear symbol table as we
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index 94ef6df6612..bac017b58a2 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -460,11 +460,6 @@ int
lang_clear_identifier (cpp_reader *pfile ATTRIBUTE_UNUSED,
cpp_hashnode *node, void *v ATTRIBUTE_UNUSED)
{
- tree tnode = HT_IDENT_TO_GCC_IDENT (node);
-#if 0
- IDENTIFIER_NAMESPACE_BINDINGS (tnode) = NULL;
- IDENTIFIER_BINDING (tnode) = NULL;
-#endif
reset_hashnode (node);
return 1;
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 04267a8e310..0b7541fd9c6 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -238,7 +238,7 @@ static int save_temps_flag;
static int use_pipes;
#ifdef ENABLE_SERVER
-static int use_server = 1;
+static int use_server;
static int kill_server;
static int kill_servercp;
#endif
@@ -2796,10 +2796,16 @@ execute (void)
and record info about each one.
Also search for the programs that are to be run. */
- commands[0].prog = argbuf[0]; /* first command. */
commands[0].argv = &argbuf[0];
- string = find_a_file (&exec_prefixes, commands[0].prog, X_OK, 0);
-
+ commands[0].prog = argbuf[0]; /* first command. */
+ string = commands[0].prog;
+ if (use_server == 0 && string[0] == '@' && string[1] == '.')
+ {
+ string = string + 2;
+ string = xstrdup (string);
+ commands[0].argv[0] = string;
+ }
+ string = find_a_file (&exec_prefixes, string, X_OK, 0);
if (string)
commands[0].argv[0] = string;
@@ -2812,8 +2818,14 @@ execute (void)
argbuf[i] = 0; /* termination of command args. */
commands[n_commands].prog = argbuf[i + 1];
commands[n_commands].argv = &argbuf[i + 1];
- string = find_a_file (&exec_prefixes, commands[n_commands].prog,
- X_OK, 0);
+ string = commands[n_commands].prog;
+ if (use_server == 0 && string[0] == '@' && string[1] == '.')
+ {
+ string = string + 2;
+ string = xstrdup (string);
+ commands[n_commands].argv[0] = string;
+ }
+ string = find_a_file (&exec_prefixes, string, X_OK, 0);
if (string)
commands[n_commands].argv[0] = string;
n_commands++;
@@ -2915,12 +2927,6 @@ execute (void)
char *errmsg_fmt, *errmsg_arg;
const char *string = commands[i].argv[0];
- if (use_server == 0 && string[0] == '@' && string[1] == '.')
- {
- commands[i].argv[0] += 2;
- string = commands[i].argv[0];
- }
-
commands[i].server_socket = -1;
#ifdef ENABLE_SERVER
if (use_server && string[0] == '@' && string[1] == '.')
@@ -3733,8 +3739,10 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
use_server isn't set yet, and we can't delay unsetting
use_pipes, this increases fragment reused by allowing
more fragments to be valid, as we use ftell on the asm
- file to check to see if we can reuse fragments. */
- if (0)
+ file to check to see if we can reuse fragments.
+
+ The GCCSERVER method can set it this early. */
+ if (! use_server)
{
/* -pipe has to go into the switches array as well as
setting a flag. */
@@ -6329,6 +6337,9 @@ main (int argc, const char *const *argv)
const char *p;
struct user_specs *uptr;
+ if (getenv ("GCCSERVER") != 0)
+ use_server = 1;
+
p = argv[0] + strlen (argv[0]);
while (p != argv[0] && !IS_DIR_SEPARATOR (p[-1]))
--p;
diff --git a/gcc/opts.c b/gcc/opts.c
index daa65fede9f..13922924c4e 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -463,15 +463,15 @@ add_input_filename (const char *filename)
{
num_in_fnames++;
if (strcmp (filename, "-") == 0)
- filename = xstrdup ("");
+ filename = "";
in_fnames = xrealloc (in_fnames, num_in_fnames * sizeof (in_fnames[0]));
- in_fnames[num_in_fnames - 1] = filename;
+ in_fnames[num_in_fnames - 1] = xstrdup (filename);
}
/* Any option that can change, we have to re-initialize here. */
void
-reinit_opts ()
+reinit_opts (void)
{
pedantic = 0;
profile_flag = 0;
diff --git a/gcc/opts.h b/gcc/opts.h
index eb7c868120b..baa3d8e0011 100644
--- a/gcc/opts.h
+++ b/gcc/opts.h
@@ -23,6 +23,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
extern void decode_options (unsigned int argc, const char **argv);
extern void add_input_filename (const char *filename);
+extern void reinit_opts (void);
struct cl_option
{
diff --git a/gcc/toplev.c b/gcc/toplev.c
index f5b3c6e1261..fbed92d0bf5 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -4753,12 +4753,7 @@ server_get_command (int fd, char **bufp, int *posp, int *limp, int *blenp)
limit += count;
{
if (buf[0] == 0)
- {
- fatal_error ("kernel bug in 10.2.x, fixed in 10.3");
- /* This looks to be a kernel bug with Jaguar. */
- fprintf (stderr, "bad read, got 0, assuming I\n");
- buf[0] = 'I';
- }
+ fatal_error ("kernel bug in 10.2.x, fixed in 10.3");
}
}
ch = buf[pos++];
@@ -5265,14 +5260,6 @@ server_loop (void)
if (1 && (errorcount || sorrycount))
done = 1;
}
- else if (command == 'I') /* "input" */
- {
- const char *filename;
- command_buffer[pos-2] = 0;
- filename = xstrdup (command_buffer + 2);
- fprintf (stderr, "Source file: '%s'\n", filename);
- add_input_filename (filename);
- }
else if (command == 'F') /* flags */
{
int quote = command_buffer[1];