base gcc and _GLIBCXX_USE_C99
Pedro Giffuni
pfg at FreeBSD.org
Wed Feb 13 22:38:23 UTC 2013
Hello;
On 02/03/2013 17:33, Dimitry Andric wrote:
> On 2013-02-01 15:46, Pedro Giffuni wrote:
>> On 02/01/2013 08:01, Andriy Gapon wrote:
>>> on 28/01/2013 17:11 Andriy Gapon said the following:
>>>> I wonder why the following is the case for the base gcc.
>>>> /usr/include/c++/4.2/bits/c++config.h:
>>>>
>>>> /* Define if C99 functions or macros from <wchar.h>, <math.h>,
>>>> <complex.h>,
>>>> <stdio.h>, and <stdlib.h> can be used or exposed. */
>>>> /* #undef _GLIBCXX_USE_C99 */
>>>>
>>>> Because of this undef there is no e.g. std::strtoll().
>>>> Ditto for other things in stdlib.h.
>>>>
>> I looked at this very briefly and it looks like it would fix a nasty
>> issue we have been working around in OpenOffice.
>>
>> I suggest to enable it first on a gcc port though (it's tied to a
>> configure flag, but don't remember which).
>
> I had a bit more in-depth look at our current libstdc++ configuration.
>
> I took the original gcc 4.2.1 release tarball, modified a few autoconf
> related scripts to cope with "freebsd10.0" being the current version,
> and did a full three-stage build, though only targeting C and C++.
>
> The libstdc++ configure script in 4.2.1 does detect a few new features
> that are not in our shipping config.h, but is does not detect any
> different settings regarding C99.
>
> ...
> I have attached a diff of the other changes that can be applied on our
> current libstdc++ config file, as detected by the configure script. I
> will probably commit that soonish, if there are no objections.
>
I think this patch is really important, please do commit it to current.
I think it should be in -stable too but with some caution: it appears
that people will have to build world and all C++ applications.
Pedro.
More information about the freebsd-toolchain
mailing list