This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Clean CPLUSPLUS_CPP_SPEC _GNU_SOURCE for GNU STL implementation targets.
Marcin Dalecki wrote:
> In my understanding according to the glibc documentation, the flag in
> question
> is used to select the system-personality (in linux) parlance of the glibc.
> It is a conscious decision to be made by the user. Why should linux be
> different
> from all other systems in a very subtile and not transparent way in first
> place at all?
Yes, that's why I said your change would be desirable.
However, the reason that we define _GNU_SOURCE is that, at least
historically, some of libstdc++ made use of the GLIBC extensions, not
just when building libstdc++ but when *using* it; for example, there
were inline functions that made use of GLIBC extensions. The correct
fix might be to move functions that use the GLIBC extensions
out-of-line, when _GNU_SOURCE is not defined, so that users could still
use the functions, albeit with a performance penalty.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713