This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
cpu_defines.h not installed in freestanding C++ library. Bug or feature?
- From: Doug Kwan (éæå) <dougkwan at google dot com>
- To: libstdc++ at gcc dot gnu dot org
- Date: Mon, 14 Mar 2011 10:38:00 -0700
- Subject: cpu_defines.h not installed in freestanding C++ library. Bug or feature?
Hi,
I tried to build the C++ library in freestanding mode. It built
libsupc++ without any problem. When I tested the built library, I got
an error because cpu_defines.h was included by c++cofing.h but not
installed. I looked at libstdc++/include/Makefile.in and it said:
if GLIBCXX_HOSTED
install-data-local: install-headers
else
install-data-local: install-freestanding-headers
endif
# This is a subset of the full install-headers rule. We only need <cstddef>,
# <limits>, <cstdlib>, <cstdarg>, <new>, <typeinfo>, <exception>, and any
# files which they include (and which we provide). The last three headers
# are installed by libsupc++, so only the first four and the sub-includes
# are copied here.
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 \
$(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}
$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${c_base_builddir}
for file in cstddef cstdlib cstdarg; do \
$(INSTALL_DATA) ${c_base_builddir}/$${file}
$(DESTDIR)${gxx_include_dir}/${c_base_builddir}; done
I assumed this rule installed all necessary headers in a freestanding
implementation. It did not appear to install cpu_defines.h though.
And c++config needed it.
...
// First includes.
// Pick up any OS-specific definitions.
#include <bits/os_defines.h>
// Pick up any CPU-specific definitions.
#include <bits/cpu_defines.h>
..
Is that intentional?
-Doug