Hi,
On Wed, 18 Dec 2013 09:58:39, 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
>
> --
> Alan Modra
> Australia Development Lab, IBM
Yes. It works. Thanks!
g++ -c -DIN_GCC -DGENERATOR_FILE -I. -Ibuild -I../../gcc-4.9-20131215/gcc
-I../../gcc-4.9-20131215/gcc/build -I../../gcc-4.9-20131215/gcc/../include
-I../../gcc-4.9-20131215/gcc/../libcpp/include
-I/home/ed/gnu/x/gcc-build-arm-linux-gnueabihf-cross/./gmp
-I/home/ed/gnu/x/gcc-4.9-20131215/gmp
-I/home/ed/gnu/x/gcc-build-arm-linux-gnueabihf-cross/./mpfr
-I/home/ed/gnu/x/gcc-4.9-20131215/mpfr
-I/home/ed/gnu/x/gcc-4.9-20131215/mpc/src
-I../../gcc-4.9-20131215/gcc/../libdecnumber
-I../../gcc-4.9-20131215/gcc/../libdecnumber/dpd -I../libdecnumber
-I../../gcc-4.9-20131215/gcc/../libbacktrace \
-o build/gengtype.o ../../gcc-4.9-20131215/gcc/gengtype.c
I wonder if the GMPINC="" is still necessary, as the actual host g++ invocation
also has GMP-directories
but does not use them because of the -DGENERATOR_FILE.
Bernd.