From 87a6154de9ac1113747eab518031cc92bfaff942 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B6ppner?= Date: Fri, 23 Dec 2022 18:11:17 +0100 Subject: [PATCH] Makefile: limit build targets for non-s390x architecture MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A subset of s390 tools can be useful on non-s390x architectures such as x86 or arm. Limit the build targets for these architectures with 'pvattest' and 'libpv' as the first candidates. A cross compilation on x86 for s390x will still build the entire package provided that the HOST_ARCH variable is set properly: $ make HOST_ARCH=s390x CROSS_COMPILE=s390x-linux-gnu- Cross compilation on s390x for x86 will limit the build targets as described: $ make HOST_ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu- Co-developed-by: Jan Höppner Reviewed-by: Steffen Eiden Signed-off-by: Marc Hartmayer Signed-off-by: Steffen Eiden --- CHANGELOG.md | 1 + Makefile | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69033bc2..42f3d8a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ Release history for s390-tools (MIT version) `CC_FOR_BUILD`. This is useful for cross compiling, and this naming convention is very similar to the Meson convention (see https://mesonbuild.com/Reference-tables.html#environment-variables-per-machine). + - add support for architectures other than s390x for `pvattest` Bug Fixes: diff --git a/Makefile b/Makefile index ab42c268..02bf0c02 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ include common.mak # LIBS: Libraries that can have a dependency to base libraries # TOOLS: Tools that can have a dependency to base libraries or libraries # +ifeq ($(HOST_ARCH),s390x) BASELIB_DIRS = libutil libseckey LIB_DIRS = libvtoc libzds libdasd libccw libvmcp libekmfweb \ libkmipclient libcpumf libap libpv @@ -15,6 +16,11 @@ TOOL_DIRS = zipl zdump fdasd dasdfmt dasdview tunedasd \ ziomon iucvterm hyptop cmsfs-fuse qethqoat zfcpdump zdsfs cpumf \ systemd hmcdrvfs cpacfstats zdev dump2tar zkey netboot etc zpcictl \ genprotimg lsstp hsci hsavmcore chreipl-fcp-mpath ap_tools pvattest +else +BASELIB_DIRS = +LIB_DIRS = libpv +TOOL_DIRS = pvattest +endif SUB_DIRS = $(BASELIB_DIRS) $(LIB_DIRS) $(TOOL_DIRS)