Message ID | 20230905115000.53587-5-thuth@redhat.com |
---|---|
State | New |
Headers | show |
Series | Add support for s390x to RISU | expand |
On Tue, 5 Sept 2023 at 12:50, Thomas Huth <thuth@redhat.com> wrote: > > Auto-detect s390x hosts and add s390x information to the help text. > > Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> > Signed-off-by: Thomas Huth <thuth@redhat.com> > --- > configure | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/configure b/configure > index ca2d7db..2f7c580 100755 > --- a/configure > +++ b/configure > @@ -58,6 +58,8 @@ guess_arch() { > ARCH="m68k" > elif check_define __powerpc64__ ; then > ARCH="ppc64" > + elif check_define __s390x__ ; then > + ARCH="s390x" > else > echo "This cpu is not supported by risu. Try -h. " >&2 > exit 1 > @@ -139,7 +141,7 @@ Some influential environment variables: > prefixed with the given string. > > ARCH force target architecture instead of trying to detect it. > - Valid values=[arm|aarch64|ppc64|ppc64le|m68k] > + Valid values=[arm|aarch64|m68k|ppc64|ppc64le|s390x] > > CC C compiler command > CFLAGS C compiler flags > -- > 2.39.3 You could also add s390 to the list of archs that build-all-archs handles: diff --git a/build-all-archs b/build-all-archs index e5dcfc8..e89851b 100755 --- a/build-all-archs +++ b/build-all-archs @@ -91,7 +91,8 @@ program_exists() { for triplet in i386-linux-gnu i686-linux-gnu x86_64-linux-gnu \ aarch64-linux-gnu arm-linux-gnueabihf \ m68k-linux-gnu \ - powerpc64le-linux-gnu powerpc64-linux-gnu ; do + powerpc64le-linux-gnu powerpc64-linux-gnu \ + s390x-linux-gnu ; do if ! program_exists "${triplet}-gcc"; then echo "Skipping ${triplet}: no compiler found" (That script checks that all the architectures can at least build, and that risugen on the foo.risu file works.) thanks -- PMM
diff --git a/configure b/configure index ca2d7db..2f7c580 100755 --- a/configure +++ b/configure @@ -58,6 +58,8 @@ guess_arch() { ARCH="m68k" elif check_define __powerpc64__ ; then ARCH="ppc64" + elif check_define __s390x__ ; then + ARCH="s390x" else echo "This cpu is not supported by risu. Try -h. " >&2 exit 1 @@ -139,7 +141,7 @@ Some influential environment variables: prefixed with the given string. ARCH force target architecture instead of trying to detect it. - Valid values=[arm|aarch64|ppc64|ppc64le|m68k] + Valid values=[arm|aarch64|m68k|ppc64|ppc64le|s390x] CC C compiler command CFLAGS C compiler flags