pvshim: make PV shim build selectable from configure
PATCH 1/1 pvshim: make PV shim build selectable from configure
So a user can decide whether to compile a PV shim as part of the tools build. Note that the default behavior is preserved, which is to build a PV shim when the target architecture is x86.
---
NOTE: run autogen.sh after applying.
---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
--- config/Tools.mk.in | 2 ++ tools/configure.ac | 12 ++++++++++++ tools/firmware/Makefile | 4 ---- 3 files changed, 14 insertions(+), 4 deletions(-)
config/Tools.mk.in +2 -0
@@ -75,3 +75,5 @@ TINFO_LIBS := @TINFO_LIBS@ ARGP_LDFLAGS := @argp_ldflags@ FILE_OFFSET_BITS := @FILE_OFFSET_BITS@ + +CONFIG_PV_SHIM := @pvshim@
tools/configure.ac +12 -0
@@ -492,4 +492,16 @@ AC_ARG_ENABLE([9pfs], AC_SUBST(ninepfs) +AC_ARG_ENABLE([pvshim], + AS_HELP_STRING([--disable-pvshim], + [Disable pvshim build (x86 only, enabled by default)]), + [AS_IF([test "x$enable_pvshim" = "xno"], [pvshim=n], [pvshim=y])], [ + case "$target_cpu" in + i[[3456]]86|x86_64) + pvshim="y";; + *) pvshim="n";; + esac +]) +AC_SUBST(pvshim) + AC_OUTPUT()
tools/firmware/Makefile +0 -4
@@ -1,10 +1,6 @@ XEN_ROOT = $(CURDIR)/../.. include $(XEN_ROOT)/tools/Rules.mk -ifneq ($(XEN_TARGET_ARCH),x86_32) -CONFIG_PV_SHIM := y -endif - # hvmloader is a 32-bit protected mode binary. TARGET := hvmloader/hvmloader INST_DIR := $(DESTDIR)$(XENFIRMWAREDIR)
Signature · 7 lines
2.17.2 (Apple Git-113) _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 14.05.19 at 13:17, <[email protected]> wrote:
So a user can decide whether to compile a PV shim as part of the tools build. Note that the default behavior is preserved, which is to build a PV shim when the target architecture is x86.
But the original behavior was so only when building x86_64 - see the three lines you remove from tools/firmware/Makefile.
tools/configure.ac AC_ARG_ENABLE([9pfs], · line 501
Quoted 13 lines
tools/configure.ac +7
-0@@ -492,4 +492,16 @@ AC_ARG_ENABLE([9pfs], AC_SUBST(ninepfs) +AC_ARG_ENABLE([pvshim], + AS_HELP_STRING([--disable-pvshim], + [Disable pvshim build (x86 only, enabled by default)]), + [AS_IF([test "x$enable_pvshim" = "xno"], [pvshim=n], [pvshim=y])], [ + case "$target_cpu" in + i[[3456]]86|x86_64) + pvshim="y";;
As said in the earlier discussion - at least gcc-based tool chains are unlikely to cope when on ix86. Together with the changed default behavior I guess you're actively breaking the (32-bit x86) build. At the very least you'd need to probe for a capable (cross) tool chain. (Quite possibly a 32-bit build on a 64-bit host would still work fine, but that's not enough imo.)
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel