From: Wei Liu Date: Sat, 29 Oct 2016 17:22:38 +0000 (+0100) Subject: stubdom: make GMP aware that it's being cross-compiled X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=aefa43751833feb35f8490adb31fc824190e4972;p=xen.git stubdom: make GMP aware that it's being cross-compiled Append --build and --host flags to GMP's configure script so that it knows it is being cross-compiled. This should fix the issue that GMP doesn't compile with gcc 6, because configure script won't try to test the host environment anymore. Signed-off-by: Wei Liu Reviewed-by: Juergen Gross Acked-by: Ian Jackson Acked-by: Samuel Thibault Release-acked-by: Wei Liu (cherry picked from commit 668e4edf92fcf7cb929eed221059a3eeb02722c3) --- diff --git a/stubdom/Makefile b/stubdom/Makefile index 4d52ea274d..761258718b 100644 --- a/stubdom/Makefile +++ b/stubdom/Makefile @@ -171,7 +171,7 @@ gmp-$(XEN_TARGET_ARCH): gmp-$(GMP_VERSION).tar.bz2 $(NEWLIB_STAMPFILE) rm $@ -rf || : mv gmp-$(GMP_VERSION) $@ #patch -d $@ -p0 < gmp.patch - cd $@; CPPFLAGS="-isystem $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include $(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" CC=$(CC) $(GMPEXT) ./configure --disable-shared --enable-static --disable-fft --without-readline --prefix=$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf + cd $@; CPPFLAGS="-isystem $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include $(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" CC=$(CC) $(GMPEXT) ./configure --disable-shared --enable-static --disable-fft --without-readline --prefix=$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf --build=`gcc -dumpmachine` --host=$(GNU_TARGET_ARCH)-xen-elf sed -i 's/#define HAVE_OBSTACK_VPRINTF 1/\/\/#define HAVE_OBSTACK_VPRINTF 1/' $@/config.h touch $@