[Mesa-dev] [PATCH] build: Fix AX_PROG_{CC, CXX}_FOR_BUILD macros

Thierry Reding thierry.reding at avionic-design.de
Tue Nov 20 11:29:04 PST 2012


On Tue, Nov 20, 2012 at 11:07:03AM -0800, Matt Turner wrote:
> On Tue, Nov 20, 2012 at 7:50 AM, Thierry Reding
> <thierry.reding at avionic-design.de> wrote:
> > Override the cross_compiling and ac_tool_prefix variables by reassigning
> > to them instead of redefining the macros. Redefining them will actually
> > cause the variable names to be replaced instead of their content.
> >
> > Furthermore push the definition of CPPFLAGS before running the checks
> > for the build tools to avoid the host CPPFLAGS from leaking into the
> > build CPPFLAGS.
> >
> > While at it drop the redefinition of AC_TRY_COMPILER which hasn't been
> > used since autoconf 2.50 and make sure that all definitions are properly
> > popped when done (LDFLAGS, ac_cv_prog_CPP, ac_cv_prog_CXXCPP).
> >
> > Signed-off-by: Thierry Reding <thierry.reding at avionic-design.de>
> > ---
> >  m4/ax_prog_cc_for_build.m4  | 37 +++++++++++--------------------------
> >  m4/ax_prog_cxx_for_build.m4 | 38 ++++++++++++--------------------------
> >  2 files changed, 23 insertions(+), 52 deletions(-)
[...]
> Are these changes from upstream? I really have concerns about making
> non-trivial changes to these files.

No, they're not. I do plan to send these changes upstream, but quite
honestly I'm not sure that they'll be accepted given that I have none of
the copyright assigment forms filled with the FSF. Looking at the
autoconf-archive website doesn't actually say anything about copyright
assignment, but as the project is hosted on GNU I'm a bit sceptical.
Also note that AX_PROG_CXX_FOR_BUILD doesn't actually exist upstream. I
essentially copied it from AX_PROG_CC_FOR_BUILD.

I'm actually a bit confused as to why the original cross-compilation
patches that I sent in worked at all (and I'm sure they did because I
tested them fairly extensively at the time), but looking at configure
as generated with the macros as they are in the repository right now,
things are severely broken. Running the configure script shows a bunch
of

	checking for 2... no

messages, and cross-compiling doesn't actually succeed. With the above
patches I've verified that Mesa cross-builds from x86_64 to ARM.

Still, if you have any doubts I can try feeding those changes upstream
and see what comes of it. If that happens we can easily sync the changes
back by copying the files.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20121120/6d66df91/attachment-0001.pgp>


More information about the mesa-dev mailing list