Add support for ppc64le and s390x & enable related CI builds (#45)

* ci: Upgrade travis worker image to bionic.

Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>

* ci: Use arch element to get 64bit build, make 32bit the exception.

Getting the 64bit build done through the env element is unnecessary. The
exceptional case is the 32bit build and so we use the matrix element to
get 32bit builds for clang and gcc. By having the environment clear by
default we make doing builds for other architectures possible.

This commit also reorders the elements in the compiler array to
consistently get clang builds above gcc builds in the matrix.

Finally we update the before_install element to only enable the i386
architecture and install required 32bit libs when building 32bit on the
amd64 arch. Other architectures don't support this without cross
compilation (multiarch).

Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>

* ci: Build on the arm64 architecture.

This causes the CI to build with both GCC and clang on arm64.

Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>

* Add support for the ppc64le architecture.

Use the __PPC64__ compiler macro to determine the appropriate value for
RADIX_BITS. Additionally we add the ppc64le arch to .travis-ci.yml build
matrix.

Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>

* Add support for the s390x architecture.

Use the __s390x__ compiler macro to determine the appropriate value for
RADIX_BITS. Additionally we add the s390x arch to .travis-ci.yml build
matrix.

Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
diff --git a/.travis.yml b/.travis.yml
index 700e15d..4af1ff6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,28 +1,39 @@
 language: c
-dist: xenial
+dist: bionic
 compiler:
-  - gcc
   - clang
+  - gcc
 
 addons:
   apt:
     packages:
     - autoconf-archive
-    - gcc-multilib
 
-env:
-  - HOST="i686-pc-linux-gnu" CFLAGS="-m32" LDFLAGS="-m32"
-  - HOST="x86_64-pc-linux-gnu"
+arch:
+  - amd64
+  - arm64
+  - ppc64le
+  - s390x
+
+matrix:
+  include:
+    - compiler: clang
+      env: CONF_OPT="--host=i686-pc-linux-gnu" CFLAGS="-m32" LDFLAGS="-m32"
+    - compiler: gcc
+      env: CONF_OPT="--host=i686-pc-linux-gnu" CFLAGS="-m32" LDFLAGS="-m32"
 
 before_install:
-  - sudo dpkg --add-architecture i386
-  - sudo apt-get update
-  - sudo apt-get install libssl-dev:i386
+  - |
+    if [ $LDFLAGS = "-m32" ]; then
+        sudo dpkg --add-architecture i386
+        sudo apt-get update
+        sudo apt-get install gcc-multilib libssl-dev:i386
+    fi
 
 before_script:
   - cd TPMCmd
 
 script:
   - ./bootstrap
-  - ./configure --host=${HOST}
+  - ./configure ${CONF_OPT}
   - make --jobs=$(($(nproc)*3/2)) distcheck