stubdom: make GMP aware that it's being cross-compiled
PATCH 1/1 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 compiled for another architecture.
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.
---
Cc: Ian Jackson <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
--- stubdom/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
stubdom/Makefile +1 -1
@@ -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 $@
Signature · 7 lines
2.9.3 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 29.10.16 at 19:22, <[email protected]> wrote:
Append --build and --host flags to GMP's configure script so that it knows it is being compiled for another architecture.
Why --host and --build? Aiui,
- host is where the configure runs,
- build is where tool chain components being built are supposed to run,
- target is where the final binaries are intended to run.
We're talking about a simple cross build here afaict, not a Canadian cross, i.e. host == build, with only target being different, i.e. I'd assume you really want to specify --target (and leave host and build to be determined automatically), along the lines of e.g. a simple compiler cross build, which produces
S["target_os"]="linux-gnu"
S["target_vendor"]="pc"
S["target_cpu"]="x86_64"
S["target"]="x86_64-pc-linux-gnu"
S["host_os"]="linux-gnu"
S["host_vendor"]="pc"
S["host_cpu"]="i686"
S["host"]="i686-pc-linux-gnu"
S["build_os"]="linux-gnu"
S["build_vendor"]="pc"
S["build_cpu"]="i686"
S["build"]="i686-pc-linux-gnu"
among its awk expression to perform substitution in various other files/scripts (except that in the stubdom case it would be target_os to be different from host_os/build_os, and - on a 64-bit system - target_cpu matching host_cpu/build_cpu).
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 8 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 29.10.16 at 19:22, <[email protected]> wrote:
Append --build and --host flags to GMP's configure script so that it knows it is being compiled for another architecture.
Why --host and --build? Aiui,
- host is where the configure runs,
- build is where tool chain components being built are supposed to run,
- target is where the final binaries are intended to run.
I think you got them wrong, in particular host and build semantics.
build is where the build runs, host is where the resulting binary runs, target is where the output of the resulting binary runs (assuming the binary is compiler).
https://www.gnu.org/software/autoconf/manual/autoconf-2.65/html_node/Specifying-Target-Triplets.html
Since GMP is not a compiler, target is not relevant here.
Quoted 3 lines
We're talking about a simple cross build here afaict, not a Canadian cross,
Correct, it's a simple cross build, not a Canadian cross.
The rest is moot because it is based on wrong assumption.
Wei.
Quoted 20 lines
i.e. host == build, with only target being different, i.e. I'd assume you really want to specify --target (and leave host and build to be determined automatically), along the lines of e.g. a simple compiler cross build, which produces
S["target_os"]="linux-gnu"
S["target_vendor"]="pc"
S["target_cpu"]="x86_64"
S["target"]="x86_64-pc-linux-gnu"S["host_os"]="linux-gnu"
S["host_vendor"]="pc"
S["host_cpu"]="i686"
S["host"]="i686-pc-linux-gnu"S["build_os"]="linux-gnu"
S["build_vendor"]="pc"
S["build_cpu"]="i686"
S["build"]="i686-pc-linux-gnu"
Quoted 7 lines
among its awk expression to perform substitution in various other files/scripts (except that in the stubdom case it would be
target_osto be different from host_os/build_os, and - on a 64-bit system -target_cpumatching host_cpu/build_cpu).Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 13 lines
Quoted 1 line
Quoted 1 line · On 31.10.16 at 11:14, <[email protected]> wrote:
Quoted 8 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 29.10.16 at 19:22, <[email protected]> wrote:
Append --build and --host flags to GMP's configure script so that it knows it is being compiled for another architecture.
Why --host and --build? Aiui,
- host is where the configure runs,
- build is where tool chain components being built are supposed to run,
- target is where the final binaries are intended to run.I think you got them wrong, in particular host and build semantics.
Quoted 8 lines
build is where the build runs, host is where the resulting binary runs, target is where the output of the resulting binary runs (assuming the binary is compiler).
https://www.gnu.org/software/autoconf/manual/autoconf-2.65/html_node/Specifyi
ng-Target-Triplets.htmlSince GMP is not a compiler, target is not relevant here.
Oh, indeed, I've been confused. Sorry for the noise.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Wei Liu writes ("Re: [Xen-devel] [PATCH for-4.8] stubdom: make GMP aware that it's being cross-compiled"):
Quoted 12 lines · Jan Beulich
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 29.10.16 at 19:22, <[email protected]> wrote:
Append --build and --host flags to GMP's configure script so that it knows it is being compiled for another architecture.
Why --host and --build? Aiui,
- host is where the configure runs,
- build is where tool chain components being built are supposed to run,
- target is where the final binaries are intended to run.I think you got them wrong, in particular host and build semantics.
Quoted 7 lines
build is where the build runs, host is where the resulting binary runs, target is where the output of the resulting binary runs (assuming the binary is compiler).
https://www.gnu.org/software/autoconf/manual/autoconf-2.65/html_node/Specifying-Target-Triplets.html
Since GMP is not a compiler, target is not relevant here.
This very unfortunate terminology has, sadly, become the de facto standard. It is very confusing, but Wei has it right.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 7 lines · Wei Liu
Append --build and --host flags to GMP's configure script so that it knows it is being compiled for another architecture.
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 <[email protected]>
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Wei Liu writes ("[PATCH for-4.8] stubdom: make GMP aware that it's being cross-compiled"):
Quoted 5 lines
Append --build and --host flags to GMP's configure script so that it knows it is being compiled for another architecture.
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.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Samuel Thibault
Acked-byQuoted 8 lines · Ian Jackson, on Mon 31 Oct 2016 10:21:04 +0000, wrote:
Wei Liu writes ("[PATCH for-4.8] stubdom: make GMP aware that it's being cross-compiled"):
Quoted 5 lines
Append --build and --host flags to GMP's configure script so that it knows it is being compiled for another architecture.
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.
Acked-by Ian Jackson <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Wei Liu
AppliedQuoted 11 lines · Samuel Thibault
Quoted 8 lines · Ian Jackson, on Mon 31 Oct 2016 10:21:04 +0000, wrote:
Wei Liu writes ("[PATCH for-4.8] stubdom: make GMP aware that it's being cross-compiled"):
Quoted 5 lines
Append --build and --host flags to GMP's configure script so that it knows it is being compiled for another architecture.
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.
Acked-by Ian Jackson <[email protected]>Acked-by Samuel Thibault <[email protected]>
Applied.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel