This is the mail archive of the gcc-patches@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]

[PATCH] fix issue with dependency generation on win32


The attached patch corrects an issue with dependency generation.  With a
mingw32-hosted compiler and given the attached files in the following
layout:

./
  foo.c
  include/
    header.h

the following two commands generate different output:

$COMPILER -M -MG -Iinclude foo.c
  (generates 'foo.o: foo.c include/header.h'; correct)

$COMPILER -M -MG -Iinclude/ foo.c
  (generates 'foo.o: foo.c header.h'; incorrect)

With the attached patch, both commands generate identical output.

Tested by building a compiler for i686-mingw32 and verifying that the
above commands generate identical output + no regressions.

OK to commit?

-Nathan

2007-05-04  Nathan Froyd  <froydnj@codesourcery.com>
	    Mark Shinwell <shinwell@codesourcery.com>

	* c-incpath.c (add_path): Move path canonicalization to...
	(remove_duplicates): ...here.  Use lrealpath() to perform the
	canonicalization and strip trailing slashes so stat() doesn't
	fail.

Attachment: 626.patch
Description: Text document

Attachment: foo.c
Description: Text document

Attachment: header.h
Description: Text document


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