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]
Other format: [Raw text]

unwind.h installation causes rebuilds


I've noticed that libitm is always rebuild with a non-bootstrap tree even 
with merely a sequence of two makes.  The reason turns out to be that 
installation of unwind.h from libgcc, which is always done with a simple 

# make
# make -d
dest=../.././gcc/include/tmp$$-unwind.h; \
        cp unwind.h $dest; \
        chmod a+r $dest; \
        sh ../../../gcc/libgcc/../move-if-change $dest ../.././gcc/include/unwind.h

(this is still fine, because it uses move-if-change)


make install-leaf DESTDIR=../.././gcc \
          slibdir= libsubdir= MULTIOSDIR=.
/bin/sh ../../../gcc/libgcc/../mkinstalldirs ../.././gcc/include
/usr/bin/install -c -m 644 unwind.h ../.././gcc/include

This one updates the mtime of gcc/include/unwind.h, and is the problematic 
one, ultimately resulting in:

     Prerequisite `/matz/gcc/svn/real-trunk/dev/gcc/include/unwind.h' is 
     newer than target `aatree.lo'.

And all of libitm (our only c++ library) is rebuilt as all objects therein 
have a dependency on unwind.h.

There are multiple variants to fix:
a) use install -p (or -C) generally for all INSTALLs in all makefiles
b) use a) for only libgcc Makefile
c) don't repeatedly install the same files on a remake even though nothing 
   was compiled newly (perhaps some stamp files could be used to make 
   leaf-install a no-op if nothing new was built?)

I've checked that hardcoding -p for INSTALL in the top-level Makefile 
solves this problem (see patch), but perhaps you prefer one of the others 
(or can think of something else entirely).

---	(revision 187708)
+++	(working copy)
@@ -93,8 +93,8 @@ srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
 # We pass INSTALL explicitly to sub-makes.  Make sure that it is not
 # a relative path.
-if test "$INSTALL" = "${srcdir}/install-sh -c"; then
-  INSTALL="${srcpwd}/install-sh -c"
+if test "$INSTALL" = "${srcdir}/install-sh -c -p"; then
+  INSTALL="${srcpwd}/install-sh -c -p"
 # Set srcdir to "." if that's what it is.
Index: config/proginstall.m4
--- config/proginstall.m4	(revision 187708)
+++ config/proginstall.m4	(working copy)
@@ -54,12 +54,12 @@ case $as_dir/ in
 	    echo one >
 	    echo two > conftest.two
 	    mkdir conftest.dir
-	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.two "`pwd`/conftest.dir" &&
+	    if "$as_dir/$ac_prog$ac_exec_ext" -c -p conftest.two "`pwd`/conftest.dir" &&
 	      test -s && test -s conftest.two &&
 	      test -s conftest.dir/ &&
 	      test -s conftest.dir/conftest.two
-	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c -p"
 	      break 3

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