This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PING**2] [PATCH, libstdc++] Add missing free-standing headers to install rule


On 22.03.2016 15:36, Jonathan Wakely wrote:
> 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.

Yes. Maybe changing concept_check.h would be better, because
I see 3 different instances of bits/c++config.h:

$prefix/arm-eabi/include/c++/6.0.0/arm-eabi/fpu/bits/c++config.h
$prefix/arm-eabi/include/c++/6.0.0/arm-eabi/bits/c++config.h
$prefix/arm-eabi/include/c++/6.0.0/arm-eabi/thumb/bits/c++config.h

while I only see one use of _GLIBCXX_CONCEPT_CHECKS:
$prefix/arm-eabi/include/c++/6.0.0/bits/concept_check.h


Thanks
Bernd.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]