This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]