3.4 PATCH: Fix PCH build failure on IRIX 6 O32

Geoff Keating geoffk@geoffk.org
Sat Jun 28 00:07:00 GMT 2003


Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> writes:

> PCH generation during bootstrap on IRIX 6 O32 (mips-sgi-irix6.5o32) used to
> fail:
> 
> /vol/gnu/src/gcc/gcc-dist/libstdc++-v3/include/stdc++.h:86: fatal error: error 
>    writing to /var/tmp//cc1LwIHd.s: Bad file number
> compilation terminated.
...
> On the other hand, the question remains if this is really the right fix: if
> the assembly output is copied to the PCH file, this copy is now obviously
> incomplete.  Someone who really understands the PCH stuff needs to decide
> this (and develop an appropriate fix if necessary).
> 
> Ok for mainline?

Yes, this is normal, and the patch is OK.  The PCH file isn't supposed to
contain all the assembly output.

> Rainer Orth, Faculty of Technology, Bielefeld University
> 
> 
> 
> Mon Jun 23 19:11:05 2003  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
> 
> 	* c-pch.c (c_common_write_pch): Flush asm_out_file to allow for
> 	subsequent writes.
> 
> Index: gcc/c-pch.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/c-pch.c,v
> retrieving revision 1.11
> diff -u -p -r1.11 c-pch.c
> --- gcc/c-pch.c	22 Jun 2003 13:41:24 -0000	1.11
> +++ gcc/c-pch.c	24 Jun 2003 19:08:42 -0000
> @@ -146,6 +146,8 @@ c_common_write_pch (void)
>        written += size;
>      }
>    free (buf);
> +  /* asm_out_file can be written afterwards, so must be flushed first.  */
> +  fflush (asm_out_file);
>  
>    gt_pch_save (pch_outfile);
>    cpp_write_pch_state (parse_in, pch_outfile);
> 

-- 
- Geoffrey Keating <geoffk@geoffk.org>



More information about the Gcc-patches mailing list