This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PING**2] [PATCH, libstdc++] Add missing free-standing headers to install rule
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
- Date: Tue, 22 Mar 2016 14:36:12 +0000
- Subject: Re: [PING**2] [PATCH, libstdc++] Add missing free-standing headers to install rule
- Authentication-results: sourceware.org; auth=none
- References: <VI1PR07MB0911F2B49AE4FBDDD72EEA2EE4B20 at VI1PR07MB0911 dot eurprd07 dot prod dot outlook dot com> <AM4PR07MB1571A35FB57B155CD9C79B83E48A0 at AM4PR07MB1571 dot eurprd07 dot prod dot outlook dot com> <AM4PR07MB157179FD0C211DC8E23463F8E4800 at AM4PR07MB1571 dot eurprd07 dot prod dot outlook dot com>
On 22/03/16 07:10 +0000, Bernd Edlinger wrote:
Hi,
I am pinging for this patch, which addresses an admittedly minor regression
for free-standing libstdc++ due to changed c++11 default settings. The proposed
patch does only change the free-standing install rule, and has therefore no impact
on other configurations.
https://gcc.gnu.org/ml/libstdc++/2016-03/msg00004.html
Sorry for the delay, I'm testing the patch today.
Looks like the patch doesn't add <bits/boost_concept_check.h> to the freestanding
headers, which means using -D_GLIBCXX_CONCEPT_CHECKS will give a fatal
error.
It also means --disable-libstdccxx-hosted --enable-concept-checks
creates an unusable configuration (although it's possible that
--enable-concept-checks is already broken due to the -std=gnu++14
default).
I think it's fine for the concept checking to be unsupported for
freestanding installations, but we should degrade gracefully, via
something like:
--- a/libstdc++-v3/include/bits/concept_check.h
+++ b/libstdc++-v3/include/bits/concept_check.h
@@ -42,7 +42,7 @@
// Concept-checking code is off by default unless users turn it on via
// configure options or editing c++config.h.
-#ifndef _GLIBCXX_CONCEPT_CHECKS
+#if !defined(_GLIBCXX_CONCEPT_CHECKS) || !defined(_GLIBCXX_HOSTED)
#define __glibcxx_function_requires(...)
#define __glibcxx_class_requires(_a,_b)
Or in c++config.h doing:
#ifndef _GLIBCXX_HOSTED
# undef _GLIBCXX_CONCEPT_CHECKS
#endif
That seems better than just giving an error.