This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, PR46650][Revisedx2] Fix --enable-build-with-cxx bootstrap failure
- From: Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>
- To: Jack Howarth <howarth at bromo dot med dot uc dot edu>
- Cc: gcc-patches at gcc dot gnu dot org, joseph at codesourcery dot com
- Date: Sun, 28 Nov 2010 18:22:31 +0100
- Subject: Re: [PATCH, PR46650][Revisedx2] Fix --enable-build-with-cxx bootstrap failure
- References: <20101128171241.GA20671@bromo.med.uc.edu>
* Jack Howarth wrote on Sun, Nov 28, 2010 at 06:12:41PM CET:
> Currently the --enable-build-with-cxx bootstrap is broken due to r167010
> which poisoned the strerror macro. The attached patch includes the cstring c++
> header when __cplusplus is defined. The previous includes for string.h and
> strings.h are left in place for symbols like strcasecmp. Bootstrap and
> regression tested on x86_64-apple-darwin10. Corrected path in ChangeLog
> entry.
>
> http://gcc.gnu.org/ml/gcc-testresults/2010-11/msg02329.html
>
> Okay for gcc trunk?
FWIW, I cannot approve this. I also don't know if there is a chance
that cstring and string.h may conflict anywhere; barring more experience
it seems worth a try though.
Cheers,
Ralf
> 2010-11-27 Jack Howarth <howarth@bromo.med.uc.edu>
> Joseph Myers <joseph@codesourcery.com>
>
> PR bootstrap/46650
> * system.h: Include cstring for cxx bootstrap.
> --- gcc/system.h (revision 167217)
> +++ gcc/system.h (working copy)
> @@ -194,6 +194,10 @@
> rely on (and therefore test) GCC's string builtins. */
> #define __NO_STRING_INLINES
>
> +#ifdef __cplusplus
> +# include <cstring>
> +#endif
> +
> #ifdef STRING_WITH_STRINGS
> # include <string.h>
> # include <strings.h>