This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: [Mingw-users] gcc -save-temps foo.c fails to build foo.o
- From: "Rekha Deshmukh" <RekhaD at kpit dot com>
- To: "MinGW Users" <mingw-users at lists dot sf dot net>
- Cc: <gcc at gcc dot gnu dot org>,<mingw-users at lists dot sourceforge dot net>
- Date: Wed, 13 Nov 2002 15:45:51 +0530
- Subject: RE: [Mingw-users] gcc -save-temps foo.c fails to build foo.o
Hi Earnie,
Thanks for the reply.
>From your mail I understood that the patch should be modified, where the st_ino of two files are compared and apply some other logic so as to know the file's unique existance.
I searched through the gcc source but was unable to find the code, where two files were compared for uniqueness. I also don't know what other parameters will identify the files uniquely other than the use of pair st_dev and st_ino.
It will be very helpful for me if you can point me to the source where similar logic is implemented.
Regards,
Rekha Bhintade
KPIT Infosystems Ltd.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Free download of GNUSH and GNUH8 tool-chains for Hitachi's SH and H8 Series.
The following site also offers free support to European customers.
Read more at http://www.kpit.com.
Latest versions of GNUSH and GNUH8 are released on October 1, 2002.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----Original Message-----
From: Earnie Boyd [mailto:earnie_boyd@yahoo.com]
Sent: Friday, November 01, 2002 4:20 PM
To: Rekha Deshmukh
Cc: gcc@gcc.gnu.org; mingw-users@lists.sourceforge.net
Subject: Re: [Mingw-users] gcc -save-temps foo.c fails to build foo.o
Rekha Deshmukh wrote:
> Hi all!
>
> I have built mingw gcc for h8300 target using sources binutils-2.13,
> gcc-3.2 and newlib-1.10.0. The native mingw used for this cross compiler
> is built using gcc-3.0.3, mingw-runtime-2.1 and w32api-2.0 by specifying
> target i386-pc-mingw32msvc.
>
> On this tool chain the problem reported in
> http://gcc.gnu.org/ml/gcc-prs/2002-02/msg00170.html is observed. The
> solution provided is to remove the patch
> http://gcc.gnu.org/ml/gcc-cvs/2001-12/msg00525.html. But the patch is
> actually needed in the case of assembly input files. The same patch
> properly works for cygwin based tool chains.
>
> When debugged through the patch I observed that the st_dev's and
> st_ino's of the input file and the temp file are getting corrupted and
> that's why the patch is failing. I feel the problem is related to the
> mingw stat function.
>
> Does anybody have any solution for this?
> Please guide me.
>
Win32 doesn't know what a st_ino is. It's in the structure for standard
compliance reasons. Using st_ino from stat isn't possible. It works
for Cygwin because they emulate the inode structure using some hashing
magic.
Rework the section of the patch using methods similar to what are most
likely already found in other parts of the GCC code.
Earnie.