* [PATCH for-4.8] stubdom: make GMP aware that it's being cross-compiled
@ 2016-10-29 17:22 Wei Liu
2016-10-31 8:57 ` Jan Beulich
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Wei Liu @ 2016-10-29 17:22 UTC (permalink / raw)
To: Xen-devel; +Cc: jgross, xuquan8, Wei Liu, Ian Jackson, samuel.thibault, dgdegra
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 <wei.liu2@citrix.com>
---
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: dgdegra@tycho.nsa.gov
Cc: xuquan8@huawei.com
Cc: samuel.thibault@ens-lyon.org
Cc: jgross@suse.com
---
stubdom/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/stubdom/Makefile b/stubdom/Makefile
index d7a47f0..94ef540 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 $@
--
2.9.3
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH for-4.8] stubdom: make GMP aware that it's being cross-compiled 2016-10-29 17:22 [PATCH for-4.8] stubdom: make GMP aware that it's being cross-compiled Wei Liu @ 2016-10-31 8:57 ` Jan Beulich 2016-10-31 10:14 ` Wei Liu 2016-10-31 9:05 ` Juergen Gross 2016-10-31 10:21 ` Ian Jackson 2 siblings, 1 reply; 9+ messages in thread From: Jan Beulich @ 2016-10-31 8:57 UTC (permalink / raw) To: Wei Liu Cc: Juergen Gross, xuquan8, Ian Jackson, Xen-devel, samuel.thibault, dgdegra >>> On 29.10.16 at 19:22, <wei.liu2@citrix.com> 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 Xen-devel@lists.xen.org https://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH for-4.8] stubdom: make GMP aware that it's being cross-compiled 2016-10-31 8:57 ` Jan Beulich @ 2016-10-31 10:14 ` Wei Liu 2016-10-31 10:50 ` Jan Beulich 2016-10-31 11:45 ` Ian Jackson 0 siblings, 2 replies; 9+ messages in thread From: Wei Liu @ 2016-10-31 10:14 UTC (permalink / raw) To: Jan Beulich Cc: Juergen Gross, xuquan8, Wei Liu, Ian Jackson, Xen-devel, samuel.thibault, dgdegra On Mon, Oct 31, 2016 at 02:57:54AM -0600, Jan Beulich wrote: > >>> On 29.10.16 at 19:22, <wei.liu2@citrix.com> 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. > > 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. > 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 Xen-devel@lists.xen.org https://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH for-4.8] stubdom: make GMP aware that it's being cross-compiled 2016-10-31 10:14 ` Wei Liu @ 2016-10-31 10:50 ` Jan Beulich 2016-10-31 11:45 ` Ian Jackson 1 sibling, 0 replies; 9+ messages in thread From: Jan Beulich @ 2016-10-31 10:50 UTC (permalink / raw) To: Wei Liu Cc: Juergen Gross, xuquan8, Ian Jackson, Xen-devel, samuel.thibault, dgdegra >>> On 31.10.16 at 11:14, <wei.liu2@citrix.com> wrote: > On Mon, Oct 31, 2016 at 02:57:54AM -0600, Jan Beulich wrote: >> >>> On 29.10.16 at 19:22, <wei.liu2@citrix.com> 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/Specifyi > ng-Target-Triplets.html > > Since 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 Xen-devel@lists.xen.org https://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH for-4.8] stubdom: make GMP aware that it's being cross-compiled 2016-10-31 10:14 ` Wei Liu 2016-10-31 10:50 ` Jan Beulich @ 2016-10-31 11:45 ` Ian Jackson 1 sibling, 0 replies; 9+ messages in thread From: Ian Jackson @ 2016-10-31 11:45 UTC (permalink / raw) To: Wei Liu Cc: Juergen Gross, xuquan8, Jan Beulich, Xen-devel, samuel.thibault, dgdegra Wei Liu writes ("Re: [Xen-devel] [PATCH for-4.8] stubdom: make GMP aware that it's being cross-compiled"): > On Mon, Oct 31, 2016 at 02:57:54AM -0600, Jan Beulich wrote: > > >>> On 29.10.16 at 19:22, <wei.liu2@citrix.com> 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. 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 Xen-devel@lists.xen.org https://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH for-4.8] stubdom: make GMP aware that it's being cross-compiled 2016-10-29 17:22 [PATCH for-4.8] stubdom: make GMP aware that it's being cross-compiled Wei Liu 2016-10-31 8:57 ` Jan Beulich @ 2016-10-31 9:05 ` Juergen Gross 2016-10-31 10:21 ` Ian Jackson 2 siblings, 0 replies; 9+ messages in thread From: Juergen Gross @ 2016-10-31 9:05 UTC (permalink / raw) To: Wei Liu, Xen-devel; +Cc: samuel.thibault, dgdegra, Ian Jackson, xuquan8 On 29/10/16 19:22, Wei Liu wrote: > 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 <wei.liu2@citrix.com> Reviewed-by: Juergen Gross <jgross@suse.com> Juergen _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH for-4.8] stubdom: make GMP aware that it's being cross-compiled 2016-10-29 17:22 [PATCH for-4.8] stubdom: make GMP aware that it's being cross-compiled Wei Liu 2016-10-31 8:57 ` Jan Beulich 2016-10-31 9:05 ` Juergen Gross @ 2016-10-31 10:21 ` Ian Jackson 2016-10-31 10:22 ` Samuel Thibault 2 siblings, 1 reply; 9+ messages in thread From: Ian Jackson @ 2016-10-31 10:21 UTC (permalink / raw) To: Wei Liu; +Cc: jgross, Xen-devel, dgdegra, xuquan8, samuel.thibault Wei Liu writes ("[PATCH for-4.8] 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. Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH for-4.8] stubdom: make GMP aware that it's being cross-compiled 2016-10-31 10:21 ` Ian Jackson @ 2016-10-31 10:22 ` Samuel Thibault 2016-10-31 10:55 ` Wei Liu 0 siblings, 1 reply; 9+ messages in thread From: Samuel Thibault @ 2016-10-31 10:22 UTC (permalink / raw) To: Ian Jackson; +Cc: jgross, Xen-devel, dgdegra, Wei Liu, xuquan8 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"): > > 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 <ian.jackson@eu.citrix.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH for-4.8] stubdom: make GMP aware that it's being cross-compiled 2016-10-31 10:22 ` Samuel Thibault @ 2016-10-31 10:55 ` Wei Liu 0 siblings, 0 replies; 9+ messages in thread From: Wei Liu @ 2016-10-31 10:55 UTC (permalink / raw) To: Samuel Thibault, Ian Jackson, Wei Liu, Xen-devel, dgdegra, xuquan8, jgross On Mon, Oct 31, 2016 at 11:22:02AM +0100, Samuel Thibault wrote: > 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"): > > > 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 <ian.jackson@eu.citrix.com> > > Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Applied. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-10-31 11:45 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-10-29 17:22 [PATCH for-4.8] stubdom: make GMP aware that it's being cross-compiled Wei Liu 2016-10-31 8:57 ` Jan Beulich 2016-10-31 10:14 ` Wei Liu 2016-10-31 10:50 ` Jan Beulich 2016-10-31 11:45 ` Ian Jackson 2016-10-31 9:05 ` Juergen Gross 2016-10-31 10:21 ` Ian Jackson 2016-10-31 10:22 ` Samuel Thibault 2016-10-31 10:55 ` Wei Liu
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.