This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
PATCH: libstdc++/5697
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- To: libstdc++ at gcc dot gnu dot org
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 15 Feb 2002 19:53:33 -0600 (CST)
- Subject: PATCH: libstdc++/5697
- Reply-to: rittle at labs dot mot dot com
Fully rebuilt libstdc++-v3 from scratch and checked install tree (with
no change in content or structure). No 'make check' regressions on
i386-unknown-freebsd4.5. I also manually created the race condition
seen by Brad with -j8 (by inserting a sleep in the action for
stamp-${target_alias}) and confirmed it was gone with this patch.
OK, Phil? FYI, I think this broke when we started using $objdir
header staging. I don't even want to know why stamp-target was being
checked in a different directory than where it was being created... ;-)
libstdc++/5697
* include/Makefile.am (thread_builddir): Remove (map all
existing uses to target_builddir).
(thread_headers): Rename to...
(thread_target_headers): ...this.
(stamp-thread): Remove.
(stamp-target): Correctly state it position as built.
Update all dependencies to match the new reality. Remove all
dependency calculations on directories.
* include/Makefile.in: Rebuilt.
(Of special note: The whole reason to use stamp- files is to avoid
creating dependencies on directories. Thus, the comment about such
use and all actual uses are gone. Please inform me if I assume too
much.)
Index: include/Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/Makefile.am,v
retrieving revision 1.28
diff -c -r1.28 Makefile.am
*** Makefile.am 2002/02/12 04:35:55 1.28
--- Makefile.am 2002/02/16 01:03:20
***************
*** 284,303 ****
${target_builddir}/messages_members.h \
${target_builddir}/codecvt_specializations.h
! thread_builddir = ./${target_alias}/bits
! thread_headers = \
! ${thread_builddir}/gthr.h \
! ${thread_builddir}/gthr-single.h \
! ${thread_builddir}/gthr-default.h
# List of all timestamp files. By keeping only one copy of this list, both
# CLEANFILES and all-local are kept up-to-date.
allstamps = stamp-std stamp-bits stamp-c_base stamp-backward stamp-ext \
! stamp-target stamp-thread
# Here are the rules for building the headers
! all-local: ${target_builddir}/c++config.h ${allstamps}
# This rule is slightly different, in that we must change the name of the
# local file from std_foo.h to foo.
--- 284,302 ----
${target_builddir}/messages_members.h \
${target_builddir}/codecvt_specializations.h
! thread_target_headers = \
! ${target_builddir}/gthr.h \
! ${target_builddir}/gthr-single.h \
! ${target_builddir}/gthr-default.h
# List of all timestamp files. By keeping only one copy of this list, both
# CLEANFILES and all-local are kept up-to-date.
allstamps = stamp-std stamp-bits stamp-c_base stamp-backward stamp-ext \
! ${target_builddir}/stamp-target
# Here are the rules for building the headers
! all-local: ${target_builddir}/c++config.h ${thread_target_headers} ${allstamps}
# This rule is slightly different, in that we must change the name of the
# local file from std_foo.h to foo.
***************
*** 343,353 ****
(cd ${ext_builddir} && @LN_S@ $? . || true) ;\
echo `date` > stamp-ext
- # This target is special. The timestamp on a directory gets modified
- # whenever a file it contains gets modified, and that'll throw off all the
- # build dependencies that need this target. On the other hand, someone
- # could delete the directory and not the stamp file, faking out make.
- ${target_builddir}: stamp-${target_alias}
stamp-${target_alias}:
@if [ ! -d ${target_builddir} ]; then \
mkdir -p ${target_builddir} ;\
--- 342,347 ----
***************
*** 355,361 ****
fi
# Target includes static.
! stamp-target: ${target_headers} ${target_builddir}
@cd ${target_builddir} ;\
if [ ! -f stamp-target ]; then \
@LN_S@ ${target_headers} . || true ;\
--- 349,355 ----
fi
# Target includes static.
! ${target_builddir}/stamp-target: ${target_headers} stamp-${target_alias}
@cd ${target_builddir} ;\
if [ ! -f stamp-target ]; then \
@LN_S@ ${target_headers} . || true ;\
***************
*** 368,376 ****
fi
# Target includes dynamic.
! ${target_builddir}/c++config.h: ../config.h \
${glibcpp_srcdir}/include/bits/c++config \
! ${target_builddir}
@cat ${glibcpp_srcdir}/include/bits/c++config > $@ ;\
sed -e 's/HAVE_/_GLIBCPP_HAVE_/g' \
-e 's/PACKAGE/_GLIBCPP_PACKAGE/g' \
--- 362,370 ----
fi
# Target includes dynamic.
! ${target_builddir}/c++config.h: ${glibcpp_builddir}/config.h \
${glibcpp_srcdir}/include/bits/c++config \
! stamp-${target_alias}
@cat ${glibcpp_srcdir}/include/bits/c++config > $@ ;\
sed -e 's/HAVE_/_GLIBCPP_HAVE_/g' \
-e 's/PACKAGE/_GLIBCPP_PACKAGE/g' \
***************
*** 383,403 ****
glibcpp_thread_h = @glibcpp_thread_h@
uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
! stamp-thread: ${thread_headers} ${thread_builddir}
! @echo `date` > stamp-thread
!
!
! ${thread_builddir}/gthr.h:
sed -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCPP_\1/g' \
-e 's,^#include "\(.*\)",#include <bits/\1>,g' \
< ${toplevel_srcdir}/gcc/gthr.h > $@
! ${thread_builddir}/gthr-single.h:
sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
-e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
< ${toplevel_srcdir}/gcc/gthr-single.h > $@
! ${thread_builddir}/gthr-default.h:
sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
-e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
-e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \
--- 377,395 ----
glibcpp_thread_h = @glibcpp_thread_h@
uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
! ${target_builddir}/gthr.h: ${toplevel_srcdir}/gcc/gthr.h stamp-${target_alias}
sed -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCPP_\1/g' \
-e 's,^#include "\(.*\)",#include <bits/\1>,g' \
< ${toplevel_srcdir}/gcc/gthr.h > $@
! ${target_builddir}/gthr-single.h: ${toplevel_srcdir}/gcc/gthr-single.h \
! stamp-${target_alias}
sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
-e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
< ${toplevel_srcdir}/gcc/gthr-single.h > $@
! ${target_builddir}/gthr-default.h: ${toplevel_srcdir}/gcc/${glibcpp_thread_h} \
! stamp-${target_alias}
sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
-e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
-e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \
***************
*** 434,444 ****
$(INSTALL_DATA) ${std_builddir}/$${file} \
${gxx_include_dir}/${std_builddir}; done
$(INSTALL) -d ${gxx_include_dir}/${target_builddir}
! for file in ${target_headers} ${extra_target_headers}; do \
$(INSTALL_DATA) $${file} ${gxx_include_dir}/${target_builddir}; done
- $(INSTALL) -d ${gxx_include_dir}/${thread_builddir}
- for file in ${thread_headers}; do \
- $(INSTALL_DATA) $${file} ${gxx_include_dir}/${thread_builddir}; done
# By adding these files here, automake will remove them for 'make clean'
#CLEANFILES = ${allstamps}
--- 426,434 ----
$(INSTALL_DATA) ${std_builddir}/$${file} \
${gxx_include_dir}/${std_builddir}; done
$(INSTALL) -d ${gxx_include_dir}/${target_builddir}
! for file in ${target_headers} ${extra_target_headers} \
! ${thread_target_headers}; do \
$(INSTALL_DATA) $${file} ${gxx_include_dir}/${target_builddir}; done
# By adding these files here, automake will remove them for 'make clean'
#CLEANFILES = ${allstamps}