Skip to content

Commit

Permalink
Enable build on OpenPOWER systems (ppc64le)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
madscientist159 committed Nov 15, 2019
1 parent de78c90 commit 599942f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions build.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand All @@ -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");
}

Expand Down

0 comments on commit 599942f

Please sign in to comment.