re PR libstdc++/15448 (libstdc++ does not rebuild PCH)

2006-07-10  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/15448
	* include/Makefile.am: Clean up pch rules.
	* include/Makefile.in: Regenerate.

From-SVN: r115312
This commit is contained in:
Benjamin Kosnik 2006-07-10 19:32:51 +00:00 committed by Benjamin Kosnik
parent b24f7f6b32
commit f42482f542
3 changed files with 66 additions and 49 deletions

View File

@ -1,3 +1,9 @@
2006-07-10 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/15448
* include/Makefile.am: Clean up pch rules.
* include/Makefile.in: Regenerate.
2006-07-09 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (__int_to_char<>(_CharT*,

View File

@ -763,26 +763,31 @@ thread_host_headers = \
${host_builddir}/gthr-tpf.h \
${host_builddir}/gthr-default.h
pch1_input = ${host_builddir}/stdc++.h
pch1_source = ${glibcxx_srcdir}/include/precompiled/stdc++.h
pch1_output_builddir = ${host_builddir}/stdc++.h.gch
pch1_output_installdir = ${host_installdir}/stdc++.h.gch
pch1_source = ${glibcxx_srcdir}/include/precompiled/stdc++.h
pch1a_output = ${pch1_output_builddir}/O0g.gch
pch1b_output = ${pch1_output_builddir}/O2g.gch
pch1_output = ${pch1a_output} ${pch1b_output}
pch2_input = ${host_builddir}/stdtr1c++.h
pch2_source = ${glibcxx_srcdir}/include/precompiled/stdtr1c++.h
pch2_output_builddir = ${host_builddir}/stdtr1c++.h.gch
pch2_output_installdir = ${host_installdir}/stdtr1c++.h.gch
pch2_source = ${glibcxx_srcdir}/include/precompiled/stdtr1c++.h
pch2_output = ${pch2_output_builddir}/O2g.gch
pch3_input = ${host_builddir}/extc++.h
pch3_source = ${glibcxx_srcdir}/include/precompiled/extc++.h
pch3_output_builddir = ${host_builddir}/extc++.h.gch
pch3_output_installdir = ${host_installdir}/extc++.h.gch
pch3_source = ${glibcxx_srcdir}/include/precompiled/extc++.h
pch3_output = ${pch3_output_builddir}/O2g.gch
pch_input = ${pch1_input} ${pch2_input} ${pch3_input}
pch_output = ${pch1_output_builddir} ${pch2_output_builddir} ${pch3_output_builddir}
pch_output = ${pch1_output} ${pch2_output} ${pch3_output}
pch_output_dirs = \
${pch1_output_builddir} ${pch2_output_builddir} ${pch3_output_builddir}
PCHFLAGS=-Winvalid-pch -Wno-deprecated -x c++-header $(CXXFLAGS)
if GLIBCXX_BUILD_PCH
pch_build = ${pch_input}
pch_build = ${pch_output}
pch_install = install-pch
else
pch_build =
@ -1038,32 +1043,32 @@ ${host_builddir}/gthr-default.h: ${toplevel_srcdir}/gcc/${glibcxx_thread_h} \
-e 's,^#include "\(.*\)",#include <bits/\1>,g' \
< ${toplevel_srcdir}/gcc/${glibcxx_thread_h} > $@
# Build a precompiled C++ include, stdc++.h.gch.
${pch1_input}: ${allstamped} ${host_builddir}/c++config.h ${pch1_source}
touch ${pch1_input}; \
# Build two precompiled C++ includes, stdc++.h.gch/*.gch
${pch1a_output}: ${allstamped} ${host_builddir}/c++config.h ${pch1_source}
if [ ! -d "${pch1_output_builddir}" ]; then \
mkdir -p ${pch1_output_builddir}; \
fi; \
$(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch1_source} -O0 -g -o ${pch1_output_builddir}/O0g.gch; \
$(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch1_source} -O2 -g -o ${pch1_output_builddir}/O2g.gch;
$(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O0 -g ${pch1_source} -o $@
${pch1b_output}: ${allstamped} ${host_builddir}/c++config.h ${pch1_source}
if [ ! -d "${pch1_output_builddir}" ]; then \
mkdir -p ${pch1_output_builddir}; \
fi; \
$(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g ${pch1_source} -o $@
# Build a precompiled TR1 include, stdtr1c++.h.gch.
${pch2_input}: ${allstamped} ${host_builddir}/c++config.h ${pch2_source} ${pch1_input}
touch ${pch2_input}; \
# Build a precompiled TR1 include, stdtr1c++.h.gch/O2.gch
${pch2_output}: ${pch2_source} ${pch1_output}
if [ ! -d "${pch2_output_builddir}" ]; then \
mkdir -p ${pch2_output_builddir}; \
fi; \
$(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch2_source} -O2 -g -o ${pch2_output_builddir}/O2g.gch;
$(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g ${pch2_source} -o $@
# Build a precompiled extension include, extc++.h.gch.
${pch3_input}: ${allstamped} ${host_builddir}/c++config.h ${pch3_source} ${pch2_input}
touch ${pch3_input}; \
# Build a precompiled extension include, extc++.h.gch/O2.gch
${pch3_output}: ${pch3_source} ${pch2_output}
if [ ! -d "${pch3_output_builddir}" ]; then \
mkdir -p ${pch3_output_builddir}; \
fi; \
$(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch3_source} -O2 -g -o ${pch3_output_builddir}/O2g.gch;
$(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g ${pch3_source} -o $@
# For robustness sake (in light of junk files or in-source
@ -1172,11 +1177,11 @@ install-pch:
$(INSTALL_DATA) $$file $(DESTDIR)${pch2_output_installdir}; done
# By adding these files here, automake will remove them for 'make clean'
CLEANFILES = ${pch_input}
CLEANFILES = ${pch_output}
# To remove directories.
clean-local:
rm -rf ${pch_output}
rm -rf ${pch_output_dirs}
# Stop implicit '.o' make rules from ever stomping on extensionless
# headers, in the improbable case where some foolish, crack-addled

View File

@ -978,23 +978,27 @@ thread_host_headers = \
${host_builddir}/gthr-tpf.h \
${host_builddir}/gthr-default.h
pch1_input = ${host_builddir}/stdc++.h
pch1_source = ${glibcxx_srcdir}/include/precompiled/stdc++.h
pch1_output_builddir = ${host_builddir}/stdc++.h.gch
pch1_output_installdir = ${host_installdir}/stdc++.h.gch
pch1_source = ${glibcxx_srcdir}/include/precompiled/stdc++.h
pch2_input = ${host_builddir}/stdtr1c++.h
pch1a_output = ${pch1_output_builddir}/O0g.gch
pch1b_output = ${pch1_output_builddir}/O2g.gch
pch1_output = ${pch1a_output} ${pch1b_output}
pch2_source = ${glibcxx_srcdir}/include/precompiled/stdtr1c++.h
pch2_output_builddir = ${host_builddir}/stdtr1c++.h.gch
pch2_output_installdir = ${host_installdir}/stdtr1c++.h.gch
pch2_source = ${glibcxx_srcdir}/include/precompiled/stdtr1c++.h
pch3_input = ${host_builddir}/extc++.h
pch2_output = ${pch2_output_builddir}/O2g.gch
pch3_source = ${glibcxx_srcdir}/include/precompiled/extc++.h
pch3_output_builddir = ${host_builddir}/extc++.h.gch
pch3_output_installdir = ${host_installdir}/extc++.h.gch
pch3_source = ${glibcxx_srcdir}/include/precompiled/extc++.h
pch_input = ${pch1_input} ${pch2_input} ${pch3_input}
pch_output = ${pch1_output_builddir} ${pch2_output_builddir} ${pch3_output_builddir}
pch3_output = ${pch3_output_builddir}/O2g.gch
pch_output = ${pch1_output} ${pch2_output} ${pch3_output}
pch_output_dirs = \
${pch1_output_builddir} ${pch2_output_builddir} ${pch3_output_builddir}
PCHFLAGS = -Winvalid-pch -Wno-deprecated -x c++-header $(CXXFLAGS)
@GLIBCXX_BUILD_PCH_FALSE@pch_build =
@GLIBCXX_BUILD_PCH_TRUE@pch_build = ${pch_input}
@GLIBCXX_BUILD_PCH_TRUE@pch_build = ${pch_output}
@GLIBCXX_BUILD_PCH_FALSE@pch_install =
@GLIBCXX_BUILD_PCH_TRUE@pch_install = install-pch
@ -1017,7 +1021,7 @@ allcreated = \
uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
# By adding these files here, automake will remove them for 'make clean'
CLEANFILES = ${pch_input}
CLEANFILES = ${pch_output}
all: all-am
.SUFFIXES:
@ -1411,30 +1415,32 @@ ${host_builddir}/gthr-default.h: ${toplevel_srcdir}/gcc/${glibcxx_thread_h} \
-e 's,^#include "\(.*\)",#include <bits/\1>,g' \
< ${toplevel_srcdir}/gcc/${glibcxx_thread_h} > $@
# Build a precompiled C++ include, stdc++.h.gch.
${pch1_input}: ${allstamped} ${host_builddir}/c++config.h ${pch1_source}
touch ${pch1_input}; \
# Build two precompiled C++ includes, stdc++.h.gch/*.gch
${pch1a_output}: ${allstamped} ${host_builddir}/c++config.h ${pch1_source}
if [ ! -d "${pch1_output_builddir}" ]; then \
mkdir -p ${pch1_output_builddir}; \
fi; \
$(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch1_source} -O0 -g -o ${pch1_output_builddir}/O0g.gch; \
$(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch1_source} -O2 -g -o ${pch1_output_builddir}/O2g.gch;
$(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O0 -g ${pch1_source} -o $@
# Build a precompiled TR1 include, stdtr1c++.h.gch.
${pch2_input}: ${allstamped} ${host_builddir}/c++config.h ${pch2_source} ${pch1_input}
touch ${pch2_input}; \
${pch1b_output}: ${allstamped} ${host_builddir}/c++config.h ${pch1_source}
if [ ! -d "${pch1_output_builddir}" ]; then \
mkdir -p ${pch1_output_builddir}; \
fi; \
$(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g ${pch1_source} -o $@
# Build a precompiled TR1 include, stdtr1c++.h.gch/O2.gch
${pch2_output}: ${pch2_source} ${pch1_output}
if [ ! -d "${pch2_output_builddir}" ]; then \
mkdir -p ${pch2_output_builddir}; \
fi; \
$(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch2_source} -O2 -g -o ${pch2_output_builddir}/O2g.gch;
$(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g ${pch2_source} -o $@
# Build a precompiled extension include, extc++.h.gch.
${pch3_input}: ${allstamped} ${host_builddir}/c++config.h ${pch3_source} ${pch2_input}
touch ${pch3_input}; \
# Build a precompiled extension include, extc++.h.gch/O2.gch
${pch3_output}: ${pch3_source} ${pch2_output}
if [ ! -d "${pch3_output_builddir}" ]; then \
mkdir -p ${pch3_output_builddir}; \
fi; \
$(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch3_source} -O2 -g -o ${pch3_output_builddir}/O2g.gch;
$(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g ${pch3_source} -o $@
# For robustness sake (in light of junk files or in-source
# configuration), copy from the build or source tree to the install
@ -1540,7 +1546,7 @@ install-pch:
# To remove directories.
clean-local:
rm -rf ${pch_output}
rm -rf ${pch_output_dirs}
# Stop implicit '.o' make rules from ever stomping on extensionless
# headers, in the improbable case where some foolish, crack-addled