[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [XEN PATCH for-4.13] tools/configure: Honour XEN_COMPILE_ARCH and _TARGET_ for shim


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Date: Tue, 29 Oct 2019 17:57:20 +0000
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=ian.jackson@xxxxxxxxxxxxx; spf=Pass smtp.mailfrom=Ian.Jackson@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Jürgen Groß <jgross@xxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Delivery-date: Tue, 29 Oct 2019 17:57:36 +0000
  • Ironport-sdr: WVXG0aqqeHUoCZsC3YmXBcFEG0od2JTnnc0tSOThJbO0YVX9hzWxtBzLokcianfiZFXJ/6bmXS +1FKOeMmlXju8Ve/zucArcQop1OV7unEvPf/RL5K2ZA2IbX4ANzkA2dM8sxix84zhm8n+F9SFA 5XAaqlRhiu/sZzkIMxuDufBw5KqTmYXiAI1nfgvQE19tQx5/qmVxodhy5h9NWGLo8NwsUt+hP8 VofTOZ1E8qHB/N/C6sy3hxteUm6KfHR5tmOFEJyNmmpdiQCiNxbdy/y+2/LpR2BA0y/EqylqLx bZM=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

The pvshim can only be built 64-bit because the hypervisor is only
64-bit nowadays.  The hypervisor build supports XEN_COMPILE_ARCH and
XEN_TARGET_ARCH which override the information from uname.  The pvshim
build runs out of the tools/ directory but calls the hypervisor build
system.

If one runs in a Linux 32-bit userland with a 64-bit kernel, one used
to be able to set XEN_COMPILE_ARCH.  But nowadays this does not work.
configure sees the target cpu as 64-bit and tries to build pvshim.
The build prints
  echo "*** Xen x86/32 target no longer supported!"
and doesn't build anything.  Then the subsequent Makefiles try to
install the non-built pieces.

Fix this anomaly by causing configure to honour the Xen hypervisor way
of setting the target architecture.

In principle this user behaviour is not handled quite right, because
configure will still see 64-bit and so all the autoconf-based
architecture testing will see 64-bit rather than 32-bit x86.  But the
tools are in fact generally quite portable: this particular location
in configure{.ac,} is the only place in tools/ where 64-bit x86 is
treated differently from 32-bit x86, so the fix is sufficient and
correct for this use case.

It remains the case that XEN_COMPILE_ARCH or XEN_TARGET_ARCH to a
non-x86 architecture, when configure thinks things are x86, or vice
versa, will not work right.

I have rerun autogen.sh, so this patch contains the fix to configure
as well as the source fix to configure.ac.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
CC: Jürgen Groß <jgross@xxxxxxxx>
---
 tools/configure    | 2 +-
 tools/configure.ac | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/configure b/tools/configure
index 82947ad308..d9ccce6d2b 100755
--- a/tools/configure
+++ b/tools/configure
@@ -9711,7 +9711,7 @@ fi
 else
 
     cpu=`test -z "$target_cpu" && echo "$host_cpu" || echo "$target_cpu"`
-    case "$cpu" in
+    case "${XEN_COMPILE_ARCH-${XEN_TARGET_ARCH-$cpu}}" in
         x86_64)
            pvshim="y";;
         *) pvshim="n";;
diff --git a/tools/configure.ac b/tools/configure.ac
index 674bd5809d..a8d8ce5ffe 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -479,7 +479,7 @@ AC_ARG_ENABLE([pvshim],
                    [Disable pvshim build (enabled by default on 64bit x86)]),
     [AS_IF([test "x$enable_pvshim" = "xno"], [pvshim=n], [pvshim=y])], [
     cpu=`test -z "$target_cpu" && echo "$host_cpu" || echo "$target_cpu"`
-    case "$cpu" in
+    case "${XEN_COMPILE_ARCH-${XEN_TARGET_ARCH-$cpu}}" in
         x86_64)
            pvshim="y";;
         *) pvshim="n";;
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.