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

Patch to remove redundant (and sometimes annoying) dependency

The following patch fixes a problem that is not terribly common but
extremely annoying when it does hit.

If you are rebuilding a native gcc and reinstalling to the same prefix
and exec-prefix used by the host compiler in your path, you can end up
removing the fixed headers before a dependency which uses host compiler
is satisfied.  This causes the host compiler to fail and hence the
installation to fall.

The first dependency install-headers has is install-include-dir which
deletes and recreates the fixed include dir installed under the prefix
dir.  The next dependency is $(INSTALL_HEADERS_DIR) which is currently
hardcoded to install-headers-tar but could be install-headers-cpio or
some new target as yet unwritten.  AFAICT, $(INSTALL_HEADERS_DIR) cannot
be empty or the headers would not get copied.

Currently install-headers-tar and install-headers-cpio have dependencies
on stmp-int-hdrs and $(STMP_FIXPROTO).  $(STMP_FIXPROTO), through a couple
more dependecies, eventually depends on compiling the fix-header program
with $(HOST_CC).  After those dependencies, install-headers-{tar,cpio)
then has a dependency on install-include-dir (hence the redundancy).

Although it seems innocuous to have install-include-dir satisfied before
$(INSTALL_HEADERS_DIR), it can cause problems during installation if
the prefix and exec-prefix for the compiler you are installing is the same
as the one used for $(HOST_CC) *and* for some reason fix-header must
be rebuilt (in my case, due to NFS and time skew).  $(HOST_CC) no longer
has fixed headers and fails while building fix-header.

I think it makes the most sense to keep the install-include-dir dependency
with $(INSTALL_HEADERS_DIR) since that is what really cares about removing
and recreating a pristine include directory.

2001-04-30  Angela Marie Thomas <>

	* Remove redundant dependency.

Index: ./gcc/
RCS file: /cvs/gcc/gcc/gcc/,v
retrieving revision 1.651
diff -p -u -r1.651
--- ./gcc/	2001/05/01 01:58:30	1.651
+++ ./gcc/	2001/05/01 05:28:36
@@ -2693,7 +2693,7 @@ install-multilib: stmp-multilib installd
 	  -f install
 # Install all the header files built in the include subdirectory.
-install-headers: install-include-dir $(INSTALL_HEADERS_DIR) $(INSTALL_ASSERT_H)
 # Fix symlinks to absolute paths in the installed include directory to
 # point to the installed directory, not the build directory.
 # Don't need to use LN_S here since we really do need ln -s and no substitutes.

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