This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [debug/profile-mode] broken c++config.h


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 :)
2012-03-16  PaweÅ Sikora  <pawel.sikora@agmk.net>

	PR libstdc++/52540
	* include/Makefile.am (c++config.h): Fix sed rule to not break
	the _GLIBCXX_EXTERN_TEMPLATE redefinition.
	* include/Makefile.in: Regenerated.

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