From 599942ff721f16e65e4440a3dd92493e1272ef1c Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 11 Nov 2019 18:26:35 +0000 Subject: [PATCH] Enable build on OpenPOWER systems (ppc64le) Fix overly simplistic architecture check. We have been using Zimbra on POWER in production for around one year with this modification. Zimbra has been fast and reliable on these platforms. --- build.pl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/build.pl b/build.pl index 88170227c3..bd266a2ef7 100755 --- a/build.pl +++ b/build.pl @@ -772,6 +772,12 @@ () return "x86_64" if ( $b_os =~ /RHEL[0-9]+_64/ || $b_os =~ /CENTOS[0-9]+_64/ ); + return "ppc64el" + if ( ( (POSIX::uname)[4] eq "ppc64le" ) and ( $b_os =~ /UBUNTU[0-9]+/) ); + + return "ppc64le" + if ( ( (POSIX::uname)[4] eq "ppc64le" ) and ( $b_os =~ /RHEL[0-9]+_64/ || $b_os =~ /CENTOS[0-9]+_64/ ) ); + Die("Could not determine BUILD_ARCH"); } @@ -785,6 +791,13 @@ () return "r$1" if ( $b_os =~ /RHEL([0-9]+)_/ || $b_os =~ /CENTOS([0-9]+)_/ ); + # Fallback for non-x86 architectures + return "u$1" + if ( $b_os =~ /UBUNTU([0-9]+)/ ); + + return "r$1" + if ( $b_os =~ /RHEL([0-9]+)/ || $b_os =~ /CENTOS([0-9]+)/ ); + Die("Could not determine PKG_OS_TAG"); }