[PATCH][bug 48123] Install cpu_defines.h for freestanding C++ library.

Doug Kwan (關振德) dougkwan@google.com
Tue Mar 15 18:27:00 GMT 2011


Hi,

    This patch fixes the problem in bug 48123.  The problem is that
some headers include c++config.h, which in turn includes cpu_defines.h
but cpu_defines.h is not installed.  This has been broken for a long
time.  Patch was tested by bootstrapping on x86_64 and building a
cross-gcc for arm-linux-gnueabi in freestanding mode.
-Doug


2011-03-14  Doug Kwan  <dougkwan@google.com>

        * include/Makefile.am (install-freestanding-headers): Install
        cpu_defines.h
        * include/Makefile.in: Regenerate.
-------------- next part --------------
Index: gcc/libstdc++-v3/include/Makefile.in
===================================================================
--- gcc/libstdc++-v3/include/Makefile.in	(revision 170944)
+++ gcc/libstdc++-v3/include/Makefile.in	(working copy)
@@ -1584,7 +1584,8 @@ ${pch3_output}: ${pch3_source} ${pch2_output}
 install-freestanding-headers:
 	$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}
 	$(mkinstalldirs) $(DESTDIR)${host_installdir}
-	for file in ${host_srcdir}/os_defines.h ${host_builddir}/c++config.h; do \
+	for file in ${host_srcdir}/os_defines.h ${host_builddir}/c++config.h \
+	  ${glibcxx_srcdir}/$(CPU_DEFINES_SRCDIR)/cpu_defines.h; do \
 	  $(INSTALL_DATA) $${file} $(DESTDIR)${host_installdir}; done
 	$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${std_builddir}
 	$(INSTALL_DATA) ${std_builddir}/limits $(DESTDIR)${gxx_include_dir}/${std_builddir}
Index: gcc/libstdc++-v3/include/Makefile.am
===================================================================
--- gcc/libstdc++-v3/include/Makefile.am	(revision 170944)
+++ gcc/libstdc++-v3/include/Makefile.am	(working copy)
@@ -1200,7 +1200,8 @@ endif
 install-freestanding-headers:
 	$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}
 	$(mkinstalldirs) $(DESTDIR)${host_installdir}
-	for file in ${host_srcdir}/os_defines.h ${host_builddir}/c++config.h; do \
+	for file in ${host_srcdir}/os_defines.h ${host_builddir}/c++config.h \
+	  ${glibcxx_srcdir}/$(CPU_DEFINES_SRCDIR)/cpu_defines.h; do \
 	  $(INSTALL_DATA) $${file} $(DESTDIR)${host_installdir}; done
 	$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${std_builddir}
 	$(INSTALL_DATA) ${std_builddir}/limits $(DESTDIR)${gxx_include_dir}/${std_builddir}


More information about the Gcc-patches mailing list