On Thu, 19 Dec 2013 20:41:43, Alan Modra wrote: > > On Wed, Dec 18, 2013 at 02:32:01PM +0100, Bernd Edlinger wrote: >> 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. > > The issue isn't finding gmp.h, it's finding other host headers you > don't want. Clearly, --with-gmp and similar options are for finding > host libraries and headers. install.texi even says so! > > To give an example of what can go wrong, suppose someone specifies > --with-gmp=/sysroot_for_host for an installed gmp. Now I know that > it's unnecessary to specify --with-gmp if it's at the default install > location, but many people blindly follow recipes. What's more, > specifying --with-gmp to the default works fine when build == host. > So it doesn't seem wrong to me to specify --with-gmp (even needlessly > to the default) when build != host. > > The trouble is that GMPINC is then /sysroot_for_host/include, which is > where you find all the other host headers, not just gmp.h.. >
OK, thanks, I understand. I'm just curious... Isn't the actual invocation of the build-g++ also including /sysroot_for_host/include in that case? Why doesn't this cause problems then? Bernd. > -- > Alan Modra > Australia Development Lab, IBM