This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] [BZ #20314] Make copies of cstdlib/cmath and use them
- From: Carlos O'Donell <carlos at redhat dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>, GNU C Library <libc-alpha at sourceware dot org>, Florian Weimer <fweimer at redhat dot com>
- Date: Mon, 4 Jul 2016 16:36:31 -0400
- Subject: Re: [PATCH] [BZ #20314] Make copies of cstdlib/cmath and use them
- Authentication-results: sourceware.org; auth=none
- References: <20160630165739.GA2465@intel.com>
On 06/30/2016 12:57 PM, H.J. Lu wrote:
> If C++ headers <cstdlib> or <cmath> are used, GCC 6 will include
> /usr/include/stdlib.h or /usr/include/math.h from "#include_next"
> (instead of stdlib/stdlib.h or math/math.h in the glibc source
> directory), and this turns up as a make dependency. An implicit
> rule will kick in and make will try to install stdlib/stdlib.h or
> math/math.h as /usr/include/stdlib.h or /usr/include/math.h because
> the target is out of date. We make a copy of <cstdlib> and <cmath>
> in the glibc build directory so that stdlib/stdlib.h and math/math.h
> will be used instead of /usr/include/stdlib.h and /usr/include/math.h.
>
> OK for master?
>
> H.J.
> ---
> [BZ #20314]
> * Makeconfig (CXXFLAGS): Prepend -I$(common-objpfx).
> * Makerules (before-compile): Add $(common-objpfx)cstdlib and
> $(common-objpfx)cmath.
> ($(common-objpfx)cstdlib): New target.
> ($(common-objpfx)cmath): Likewise.
This looks good to me.
However, I'd like Florian to sign off on this solution since he's looked
at it more directly when fixing the C++ failure he saw.
--
Cheers,
Carlos.