Makefile: limit build targets for non-s390x architecture

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 <hoeppner@linux.ibm.com>
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
Jan Höppner
2022-12-23 18:11:17 +01:00
committed by Steffen Eiden
parent ed4c68e867
commit 87a6154de9
2 changed files with 7 additions and 0 deletions

View File

@@ -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:

View File

@@ -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)