This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Two build != host fixes
- From: "Maciej W. Rozycki" <macro at codesourcery dot com>
- To: Alan Modra <amodra at gmail dot com>
- Cc: Bernd Edlinger <bernd dot edlinger at hotmail dot de>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Jakub Jelinek <jakub at redhat dot com>, DJ Delorie <dj at redhat dot com>, Eric Botcazou <ebotcazou at adacore dot com>
- Date: Wed, 26 Mar 2014 21:43:08 +0000
- Subject: Re: Two build != host fixes
- Authentication-results: sourceware.org; auth=none
- References: <DUB122-W49C1420F5ADBBBFF956A3EE4DD0 at phx dot gbl> <20131211124146 dot GA13694 at bubble dot grove dot modra dot org> <DUB122-W625D03C11B9F166A2223FE4DD0 at phx dot gbl> <20131212010230 dot GB16770 at bubble dot grove dot modra dot org> <DUB122-W155981D9FD99E5FCA83795E4DB0 at phx dot gbl> <20131217232839 dot GB1864 at bubble dot grove dot modra dot org>
Alan,
On Tue, 17 Dec 2013, Alan Modra wrote:
> On Tue, Dec 17, 2013 at 01:14:23PM +0100, Bernd Edlinger wrote:
> > the reason for this is overwriting GMPINC for the auto-build generation, because
> > many test scripts include <gmp.h> which fails now completely (it is not installed,
> > I have it in-tree).
>
> Yes, I understand the reason why your setup is failing. Please try
> this patch.
>
> Index: gcc/configure.ac
> ===================================================================
> --- gcc/configure.ac (revision 206009)
> +++ gcc/configure.ac (working copy)
> @@ -1529,8 +1529,13 @@
> /* | [A-Za-z]:[\\/]* ) realsrcdir=${srcdir};;
> *) realsrcdir=../${srcdir};;
> esac
> + # Clearing GMPINC is necessary to prevent host headers being
> + # used by the build compiler. Defining GENERATOR_FILE stops
> + # system.h from including gmp.h.
> CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
> - LDFLAGS="${LDFLAGS_FOR_BUILD}" GMPINC="" \
> + CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \
> + LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \
> + GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \
> ${realsrcdir}/configure \
> --enable-languages=${enable_languages-all} \
> --target=$target_alias --host=$build_alias --build=$build_alias
Can you please backport this change to 4.8 too, to fix the build
regression discussed here introduced by the previous change that did get
backported?
Thanks,
Maciej