[debug/profile-mode] broken c++config.h

Paweł Sikora pawel.sikora@agmk.net
Fri Mar 16 15:45:00 GMT 2012


On Friday 16 of March 2012 14:29:21 Jonathan Wakely wrote:
> 2012/3/16 Paweł Sikora:
> > Hi,
> >
> > during gcc build process there's some sed magic (libstdc++-v3/include/Makefile.{am,in}) in action
> > which modifies libstdc++/include/bits/c++config.h (replaces '#define _GLIBCXX_EXTERN_TEMPLATE'
> > according to --enable-extern-template=yes/no settings). in fact, this sed rule also produces
> > a wrong '#define _GLIBCXX_EXTERN_TEMPLATE 1 -1' in line 293:
> >
> > #if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PROFILE)
> > # define _GLIBCXX_STD_C __cxx1998
> > # define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER \
> >         namespace _GLIBCXX_STD_C { _GLIBCXX_BEGIN_NAMESPACE_VERSION
> > # define _GLIBCXX_END_NAMESPACE_CONTAINER \
> >         } _GLIBCXX_END_NAMESPACE_VERSION
> > # undef _GLIBCXX_EXTERN_TEMPLATE
> > # define _GLIBCXX_EXTERN_TEMPLATE 1 -1               <==== here
> > #endif
> >
> > this broken macro causes runtime errors on mingw (see PR52540).
> > attached small patch fixes all weird runtime errors for me.
> 
> Should the addition be \$$ to escape it for the shell as well as for make?
> (I know it works, but that might not be true for all shells.)

i don't think that $, could be expaneded by any shell.

> The diff for Makefile.in is unnecessary, as it should be regenerated
> from Makefile.am
> 
> Apart from that the patch looks good, I've CC'd gcc-patches, could you
> provide a changelog entry?

attached. i hope it's correct :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ChangeLog
Type: text/x-changelog
Size: 217 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120316/a73db062/attachment.bin>


More information about the Gcc-patches mailing list