]> xenbits.xensource.com Git - xen.git/commitdiff
stubdom: make GMP aware that it's being cross-compiled
authorWei Liu <wei.liu2@citrix.com>
Sat, 29 Oct 2016 17:22:38 +0000 (18:22 +0100)
committerWei Liu <wei.liu2@citrix.com>
Mon, 31 Oct 2016 10:33:07 +0000 (10:33 +0000)
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 <wei.liu2@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
stubdom/Makefile

index 0252bcce8077508918799e88a2dcb1fd9582e627..dd52121bf862207ce92a84fed9dda0205ad2a336 100644 (file)
@@ -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 $@