xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: [OSSTEST PATCH 14/26] rumprun: ts-rumprun-build: Update for newer Xen
Date: Mon, 5 Sep 2016 15:02:22 +0100	[thread overview]
Message-ID: <1473084154-396-15-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1473084154-396-1-git-send-email-ian.jackson@eu.citrix.com>

Newer Xen needs more work to make it cross compile for rump.

* Pass --host=TARGET to configure.  This is needed so that configure
  knows that we are deliberately cross compiling.  (Otherwise it
  tries to run target binaries on the host, and crashes when that fails.)

* Pass CROSS_COMPILE in the environment.  This arranges for the Xen
  Makefiles to run the right compiler, ie $(CROSS_COMPILE)-gcc.

* Put the rump compiler directory on PATH, so that the Xen Makefiles
  can find it.

* Pass HOSTCC=gcc in the environment; otherwise it tries to use the
  default CC (which is $(CROSS_COMPILE)gcc), when building
  build-system-internal tools which are to be run on the host as part
  of the build.

  The need for this could be avoided by setting XEN_TARGET_ARCH to the
  rump architecture, but then we would have to provide a Xen arch
  config file for that architecture, which would be meaningless since
  we are not actually building a hypervisor, and would have to contain
  various dummy information.

NB in this commit message I use Xen terminology for cross arch names:

 Xen          GCC/GNU        Meaning                   Example for
 terminology  terminology                              rump cross build

 host         build          Native architecture of     i586-linux-gnu
                             the environment in which
			     we are running the build.

 target       host           Foreign architecture on    i486-rumprun-netbsdelf
                             which the objects etc.
			     which we are now building
			     will eventually be run.

 n/a          target         Used only when building a "Canadian"
	                     cross compiler: the 2nd foreign
			     architecture for which the compiler which
			     we are now building (on the `build(gnu)'
			     arch) will, when we run it, produce
			     binaries (when it is run on the
			     `host(gnu)' arch).

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 ts-rumprun-build | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/ts-rumprun-build b/ts-rumprun-build
index 7184f9d..98c8efc 100755
--- a/ts-rumprun-build
+++ b/ts-rumprun-build
@@ -55,10 +55,17 @@ END
 sub recordtools() {
     my $gcc = target_cmd_output($ho, "echo $rux/rumprun/bin/*-gcc");
     chomp $gcc;
-    die "$gcc ?" if $gcc =~ m/\S/;
-    my $prefix = "CC=$gcc ";
+    die "$gcc ?" unless $gcc =~ m#^(\S+)/([^/ \t]+)-g?cc$#;
+    my $bindir = $1;
+    my $gnutriplet = $2;
+    my $prefix = "PATH=$bindir:\$PATH ";
+    $prefix .= "CROSS_COMPILE=$gnutriplet- HOSTCC=gcc ";
     store_runvar('cmdprefix_configure', $prefix);
     store_runvar('cmdprefix_make',      $prefix);
+    store_runvar('cmdsuffix_configure', " --host=$gnutriplet");
+    # "host" is daft GCC/GNU terminology for the target architecture of
+    # a cross-compile, ie in our case the rump environemnt architecture
+    # for which the rump compilers are going to generate code.
 }
 
 sub install() {
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-09-05 14:02 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-05 14:02 [OSSTEST PATCH 00/26] rump kernels: Fix build Ian Jackson
2016-09-05 14:02 ` [OSSTEST PATCH 01/26] Executive: Do update flights_harness_touched for play flights Ian Jackson
2016-09-05 14:02 ` [OSSTEST PATCH 02/26] Executive: Allow out-of-order manipulations of flights intended play Ian Jackson
2016-09-05 14:02 ` [OSSTEST PATCH 03/26] TestSupport: Produce stack trace for undef tfileex Ian Jackson
2016-09-05 14:02 ` [OSSTEST PATCH 04/26] rumprun: Rename all `rumpuserxen' to `rumprun' Ian Jackson
2016-09-05 14:02 ` [OSSTEST PATCH 05/26] rumprun: Fetch source from new upstream Ian Jackson
2016-09-05 14:02 ` [OSSTEST PATCH 06/26] rumprun: Move xenbits tree to osstest subdir Ian Jackson
2016-09-05 14:02 ` [OSSTEST PATCH 07/26] rumprun: ts-rumprun-build: Remove $bodges Ian Jackson
2016-09-05 14:02 ` [OSSTEST PATCH 08/26] rumprun: ts-rumprun-build: Build new rumprun properly, ship the output Ian Jackson
2016-09-05 14:02 ` [OSSTEST PATCH 09/26] rumprun: ts-rumprun-build: Adjust command prefixes for new rumprun Ian Jackson
2016-09-05 14:02 ` [OSSTEST PATCH 10/26] ts-xen-build: Separate out kconfig from main build step Ian Jackson
2016-09-05 14:02 ` [OSSTEST PATCH 11/26] ts-xen-build: Support $r{cmdsuffix_configure} Ian Jackson
2016-09-05 14:02 ` [OSSTEST PATCH 12/26] ts-xen-build: Support --no-kconfig Ian Jackson
2016-09-05 14:02 ` [OSSTEST PATCH 13/26] rumprun: ts-rumprun-build: Update for new rumprun bin location Ian Jackson
2016-09-05 14:02 ` Ian Jackson [this message]
2016-09-05 14:02 ` [OSSTEST PATCH 15/26] rumprun: Drop old rumpuserxen demo Ian Jackson
2016-09-05 14:02 ` [OSSTEST PATCH 16/26] rumprun: Do not run xen/Kconfig Ian Jackson
2016-09-05 14:02 ` [OSSTEST PATCH 17/26] rumprun: Break out findtools Ian Jackson
2016-09-05 14:02 ` [OSSTEST PATCH 18/26] rumprun: ts-rumprun-build: set up ccache Ian Jackson
2016-09-05 14:02 ` [OSSTEST PATCH 19/26] Xen built versions: Move list of subtrees to BuildSupport Ian Jackson
2016-09-05 14:02 ` [OSSTEST PATCH 20/26] Xen built versions: ts-xen-build: check versions of Xen subtrees, only Ian Jackson
2016-09-05 14:02 ` [OSSTEST PATCH 21/26] rumprun: Do not stash whole build tree Ian Jackson
2016-09-05 14:02 ` [OSSTEST PATCH 22/26] TestSupport: guest_prepare_disk: cope with no disk Ian Jackson
2016-09-05 14:02 ` [OSSTEST PATCH 23/26] rumprun: `rumpbake' our executables and run them with `rumprun' Ian Jackson
2016-09-05 14:02 ` [OSSTEST PATCH 24/26] rumprun: xenstorels: Do not attempt to edit the config file Ian Jackson
2016-09-05 14:02 ` [OSSTEST PATCH 25/26] rumprun: xenstorels: New regexps for finding output Ian Jackson
2016-09-05 14:02 ` [OSSTEST PATCH 26/26] rumprun: xenstorels: Improve an error message slightly Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1473084154-396-15-git-send-email-ian.jackson@eu.citrix.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).