This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch for [Bug libmudflap/42279] libmudflap checks with the wrong CPP for execinfo.h
- From: Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>
- To: Lluís Batlle <viriketo at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 8 Jan 2010 09:00:34 +0100
- Subject: Re: Patch for [Bug libmudflap/42279] libmudflap checks with the wrong CPP for execinfo.h
- References: <45219fb00912041328s7ea2a8f4v28d1ca34fe5d733e@mail.gmail.com> <45219fb00912230734te11ebfen1cf987da07b2afad@mail.gmail.com>
Hello Lluís,
* Lluís Batlle wrote on Wed, Dec 23, 2009 at 04:34:23PM CET:
> 2009/12/4 Lluís Batlle <viriketo@gmail.com>:
> > as advised to send patches here, I paste for gcc 4.3.4 a fix for
> > libmudflap checking for headers with the wrong CPP when
> > crosscompiling.
> I attach a new version of the patch (to be applied instead of the older I sent),
> which fixes the headers check problem for *any* target library, not
> only libmudflap (libstdc++ was also affected by the same problem, and
> I could fix it for all the targets).
>
> This fix is for gcc-4.4.2.
>
> The report I wrote in bugzilla about it, with the patch too, you can
> find here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42279
The toplevel Makefile.in is a generated file; the change would belong in
Makefile.tpl, and Makefile.in would then be regenerated with autogen.
The patch should have a ChangeLog entry (see lots of examples on this
list for how to write them), and it should mention the PR that it fixes.
The change itself, setting and propagating $CPP from the toplevel, seems
dubious to me: in libmudflap, the Autoconf macro AC_PROG_CPP tries to
set $CPP, and the first setting that it will try is "$CC -E", which
should work, and do the right thing also in your case. So, can you
post an excerpt of a build log that shows how it fails for you, along
with the $target/libmudflap/config.log excerpt that shows what
AC_PROG_CPP is doing instead?
Is it possible that you have the variable $CPP set in your environment?
If yes, please unset it and retry your build.
Cheers,
Ralf