mirror of git://gcc.gnu.org/git/gcc.git
toplev.c (init_asm_output): Open asm_out_file in 'w' mode.
gcc/ * toplev.c (init_asm_output): Open asm_out_file in 'w' mode. c-family/ * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define. Remove code conditional on it. From-SVN: r189482
This commit is contained in:
parent
659140c86e
commit
ee7b28eb21
|
|
@ -1,3 +1,7 @@
|
||||||
|
2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
|
||||||
|
|
||||||
|
* toplev.c (init_asm_output): Open asm_out_file in 'w' mode.
|
||||||
|
|
||||||
2012-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
|
2012-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
|
||||||
|
|
||||||
PR bootstrap/53955
|
PR bootstrap/53955
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
|
||||||
|
|
||||||
|
* c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
|
||||||
|
Remove code conditional on it.
|
||||||
|
|
||||||
2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
|
2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
|
||||||
|
|
||||||
* c-gimplify.c: Do not include basic-block.h.
|
* c-gimplify.c: Do not include basic-block.h.
|
||||||
|
|
|
||||||
|
|
@ -35,24 +35,6 @@ along with GCC; see the file COPYING3. If not see
|
||||||
#include "opts.h"
|
#include "opts.h"
|
||||||
#include "timevar.h"
|
#include "timevar.h"
|
||||||
|
|
||||||
/* PCH was introduced before unit-at-a-time became the only supported
|
|
||||||
compilation mode. To exactly replay the content parsed at PCH generate
|
|
||||||
time, anything written to asm_out_file was read back in and stored in
|
|
||||||
the PCH, and written back out to asm_out_file while reading a PCH.
|
|
||||||
|
|
||||||
Nowadays, ideally no action by a front end should never result in output
|
|
||||||
to asm_out_file, and front-end files should not include output.h. For
|
|
||||||
now assert that nothing is written to asm_out_file while a PCH is being
|
|
||||||
generated. Before GCC 4.8 is released, this code should be removed.
|
|
||||||
FIXME. */
|
|
||||||
#define CHECK_NO_ASM_OUT_DURING_PCH
|
|
||||||
#ifdef CHECK_NO_ASM_OUT_DURING_PCH
|
|
||||||
extern FILE *asm_out_file;
|
|
||||||
|
|
||||||
/* The position in the assembler output file when pch_init was called. */
|
|
||||||
static long asm_file_startpos;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* This is a list of flag variables that must match exactly, and their
|
/* This is a list of flag variables that must match exactly, and their
|
||||||
names for the error message. The possible values for *flag_var must
|
names for the error message. The possible values for *flag_var must
|
||||||
fit in a 'signed char'. */
|
fit in a 'signed char'. */
|
||||||
|
|
@ -112,9 +94,7 @@ get_ident (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Prepare to write a PCH file, if one is being written. This is
|
/* Prepare to write a PCH file, if one is being written. This is
|
||||||
called at the start of compilation.
|
called at the start of compilation. */
|
||||||
|
|
||||||
Also, print out the executable checksum if -fverbose-asm is in effect. */
|
|
||||||
|
|
||||||
void
|
void
|
||||||
pch_init (void)
|
pch_init (void)
|
||||||
|
|
@ -153,10 +133,6 @@ pch_init (void)
|
||||||
|| fwrite (target_validity, v.target_data_length, 1, f) != 1)
|
|| fwrite (target_validity, v.target_data_length, 1, f) != 1)
|
||||||
fatal_error ("can%'t write to %s: %m", pch_file);
|
fatal_error ("can%'t write to %s: %m", pch_file);
|
||||||
|
|
||||||
#ifdef CHECK_NO_ASM_OUT_DURING_PCH
|
|
||||||
asm_file_startpos = ftell (asm_out_file);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Let the debugging format deal with the PCHness. */
|
/* Let the debugging format deal with the PCHness. */
|
||||||
(*debug_hooks->handle_pch) (0);
|
(*debug_hooks->handle_pch) (0);
|
||||||
|
|
||||||
|
|
@ -177,10 +153,6 @@ c_common_write_pch (void)
|
||||||
|
|
||||||
cpp_write_pch_deps (parse_in, pch_outfile);
|
cpp_write_pch_deps (parse_in, pch_outfile);
|
||||||
|
|
||||||
#ifdef CHECK_NO_ASM_OUT_DURING_PCH
|
|
||||||
gcc_assert (ftell (asm_out_file) - asm_file_startpos == 0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
gt_pch_save (pch_outfile);
|
gt_pch_save (pch_outfile);
|
||||||
|
|
||||||
timevar_push (TV_PCH_CPP_SAVE);
|
timevar_push (TV_PCH_CPP_SAVE);
|
||||||
|
|
|
||||||
|
|
@ -908,7 +908,7 @@ init_asm_output (const char *name)
|
||||||
if (!strcmp (asm_file_name, "-"))
|
if (!strcmp (asm_file_name, "-"))
|
||||||
asm_out_file = stdout;
|
asm_out_file = stdout;
|
||||||
else
|
else
|
||||||
asm_out_file = fopen (asm_file_name, "w+b");
|
asm_out_file = fopen (asm_file_name, "w");
|
||||||
if (asm_out_file == 0)
|
if (asm_out_file == 0)
|
||||||
fatal_error ("can%'t open %s for writing: %m", asm_file_name);
|
fatal_error ("can%'t open %s for writing: %m", asm_file_name);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue