This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Enable libstdc++ numeric conversions on Cygwin
- From: Christophe Lyon <christophe dot lyon at linaro dot org>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: Jennifer Yao <jenny dot hyphen dot fa at gmail dot com>, "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Andreas Tobler <andreast-list at fgznet dot ch>
- Date: Sun, 15 Nov 2015 09:58:48 +0100
- Subject: Re: [PATCH] Enable libstdc++ numeric conversions on Cygwin
- Authentication-results: sourceware.org; auth=none
- References: <CAPQfdh=Kshcq=Eg5EV9rpho=Q0USrGgODPoLzSLuvK+5D6LGeA at mail dot gmail dot com> <CAPQfdhmMGJeb-tq29jTheoo5jUaeiFzcycWFTrpShRE-kPftGw at mail dot gmail dot com> <CAPQfdh=uOjLzi60Dnd0Dd1ycJUDqMWQBCv1aRAGBP97DSUS3+Q at mail dot gmail dot com> <20151112114049 dot GY2937 at redhat dot com> <20151112133947 dot GA2937 at redhat dot com> <20151113145219 dot GQ2937 at redhat dot com> <CAKdteObx+-EmP+zeF8vp3diy7Y_52eR+=9H4=kNowJAa=ZnoCA at mail dot gmail dot com> <20151114163223 dot GE2937 at redhat dot com>
On 14 November 2015 at 17:32, Jonathan Wakely <jwakely@redhat.com> wrote:
> On 14/11/15 09:37 +0100, Christophe Lyon wrote:
>>
>> Hi, this commit makes the GCC build to fail for targets using newlib
>> (I tested arm-none-eabi and aarch64-none-elf)
>>
>> I'm seeing errors such as:
>> In file included from
>>
>> /tmp/9122162_8.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64_be-none-elf/gcc3/aarch64_be-none-elf/libstdc++-v3/include/string:52:0,
>> from
>>
>> /tmp/9122162_8.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64_be-none-elf/gcc3/aarch64_be-none-elf/libstdc++-v3/include/bits/locale_classes.h:40,
>> from
>>
>> /tmp/9122162_8.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64_be-none-elf/gcc3/aarch64_be-none-elf/libstdc++-v3/include/bits/ios_base.h:41,
>> from
>>
>> /tmp/9122162_8.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64_be-none-elf/gcc3/aarch64_be-none-elf/libstdc++-v3/include/ios:42,
>> from
>>
>> /tmp/9122162_8.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64_be-none-elf/gcc3/aarch64_be-none-elf/libstdc++-v3/include/istream:38,
>> from
>>
>> /tmp/9122162_8.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64_be-none-elf/gcc3/aarch64_be-none-elf/libstdc++-v3/include/sstream:38,
>> from
>>
>> /tmp/9122162_8.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64_be-none-elf/gcc3/aarch64_be-none-elf/libstdc++-v3/include/complex:45,
>> from
>>
>> /tmp/9122162_8.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64_be-none-elf/gcc3/aarch64_be-none-elf/libstdc++-v3/include/ccomplex:38,
>> from
>>
>> /tmp/9122162_8.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/include/precompiled/stdc++.h:52:
>>
>> /tmp/9122162_8.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64_be-none-elf/gcc3/aarch64_be-none-elf/libstdc++-v3/include/bits/basic_string.h:
>> In function 'long long int std::__cxx11::stoll(const wstring&,
>> std::size_t*, int)':
>>
>> /tmp/9122162_8.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64_be-none-elf/gcc3/aarch64_be-none-elf/libstdc++-v3/include/bits/basic_string.h:5524:31:
>> error: 'wcstoll' is not a member of 'std'
>> { return __gnu_cxx::__stoa(&std::wcstoll, "stoll", __str.c_str(),
>> ^
>
>
> This shouldn't be possible unless you're using --enable-cheaders=c
> because we have an autoconf test for wcstoll, and if it's found then
> it should get added to namespace std by <cwchar>.
I configure newlib with:
--enable-newlib-io-pos-args \
--enable-newlib-io-c99-formats \
--enable-newlib-io-long-long \
--enable-newlib-io-long-double \
--with-sysroot="${sysroot}"
Ha, and my newlib copy is not very recent, it's from Oct 30th 2013:
maybe it's too old?
>
> Could you let me know the output of:
>
> grep C_INCLUDE_DIR
> /tmp/9122162_8.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64_be-none-elf/gcc3/aarch64_be-none-elf/libstdc++-v3/include/Makefile
>
C_INCLUDE_DIR = ${glibcxx_srcdir}/include/c_global
c_base_srcdir = $(C_INCLUDE_DIR)
> Or alternatively:
>
> ls -l
> /tmp/9122162_8.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64_be-none-elf/gcc3/aarch64_be-none-elf/libstdc++-v3/include/cwchar
it's a symlink to libstdc++-v3/include/c_global/cwchar in the srcdir
>