From 03ba14640fa6d103cbc39c9bbf9116cdafac3b33 Mon Sep 17 00:00:00 2001
From: Alam Ed Arias <alam@srb2.org>
Date: Fri, 29 Sep 2017 17:43:20 -0400
Subject: [PATCH 1/5] Travis: test building with clang 3.9, 4.0 and 5.0

---
 .travis.yml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index ee440503b..8ead5f1f7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -177,6 +177,51 @@ matrix:
               - clang-3.8
           compiler: clang-3.8
           #clang version 3.8.1-svn271127-1~exp1 (branches/release_38)
+        - os: linux
+          addons:
+            apt:
+              sources:
+              - llvm-toolchain-precise-3.9
+              - ubuntu-toolchain-r-test
+              packages:
+              - libsdl2-mixer-dev
+              - libpng-dev
+              - libgl1-mesa-dev
+              - libgme-dev
+              - p7zip-full
+              - clang-3.9
+          compiler: clang-3.9
+          #clang version 3.9.X
+        - os: linux
+          addons:
+            apt:
+              sources:
+              - llvm-toolchain-precise-4.0
+              - ubuntu-toolchain-r-test
+              packages:
+              - libsdl2-mixer-dev
+              - libpng-dev
+              - libgl1-mesa-dev
+              - libgme-dev
+              - p7zip-full
+              - clang-4.0
+          compiler: clang-4.0
+          #clang version 4.0.X
+        - os: linux
+          addons:
+            apt:
+              sources:
+              - llvm-toolchain-precise-5.0
+              - ubuntu-toolchain-r-test
+              packages:
+              - libsdl2-mixer-dev
+              - libpng-dev
+              - libgl1-mesa-dev
+              - libgme-dev
+              - p7zip-full
+              - clang-5.0
+          compiler: clang-5.0
+          #clang version 5.0.X
 #        - os: osx
 #          osx_image: beta-xcode6.1
 #          #Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
@@ -207,6 +252,9 @@ matrix:
       - compiler: clang-3.6
       - compiler: clang-3.7
       - compiler: clang-3.8
+      - compiler: clang-3.9
+      - compiler: clang-4.0
+      - complier: clang-5.0
 
 cache:
   apt: true

From 472c74907e09e86e420d6fb6e933b99214d5eb40 Mon Sep 17 00:00:00 2001
From: Alam Ed Arias <alam@srb2.org>
Date: Fri, 29 Sep 2017 17:52:12 -0400
Subject: [PATCH 2/5] Travis: fix misspelling

---
 .travis.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 8ead5f1f7..22fce17fe 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -113,7 +113,7 @@ matrix:
               - p7zip-full
               - gcc-7
           compiler: gcc-7
-          env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough"
+          env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough -Wimplicit-fallthrough=3"
           #gcc-7 (Ubuntu 7.2.0-1ubuntu1~14.04) 7.2.0 20170802
         - os: linux
           compiler: clang
@@ -254,7 +254,7 @@ matrix:
       - compiler: clang-3.8
       - compiler: clang-3.9
       - compiler: clang-4.0
-      - complier: clang-5.0
+      - compiler: clang-5.0
 
 cache:
   apt: true

From 075c4e09565f5adf828e9a1f28f0d8077b6923d7 Mon Sep 17 00:00:00 2001
From: Alam Ed Arias <alam@srb2.org>
Date: Fri, 29 Sep 2017 17:57:03 -0400
Subject: [PATCH 3/5] Travis: clang 4.0 and 5.0 is not up for trusy

---
 .travis.yml | 60 ++++++++++++++++++++++++++---------------------------
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 22fce17fe..4648ae567 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -192,36 +192,36 @@ matrix:
               - clang-3.9
           compiler: clang-3.9
           #clang version 3.9.X
-        - os: linux
-          addons:
-            apt:
-              sources:
-              - llvm-toolchain-precise-4.0
-              - ubuntu-toolchain-r-test
-              packages:
-              - libsdl2-mixer-dev
-              - libpng-dev
-              - libgl1-mesa-dev
-              - libgme-dev
-              - p7zip-full
-              - clang-4.0
-          compiler: clang-4.0
-          #clang version 4.0.X
-        - os: linux
-          addons:
-            apt:
-              sources:
-              - llvm-toolchain-precise-5.0
-              - ubuntu-toolchain-r-test
-              packages:
-              - libsdl2-mixer-dev
-              - libpng-dev
-              - libgl1-mesa-dev
-              - libgme-dev
-              - p7zip-full
-              - clang-5.0
-          compiler: clang-5.0
-          #clang version 5.0.X
+#        - os: linux
+#          addons:
+#            apt:
+#              sources:
+#              - llvm-toolchain-precise-4.0
+#              - ubuntu-toolchain-r-test
+#              packages:
+#              - libsdl2-mixer-dev
+#              - libpng-dev
+#              - libgl1-mesa-dev
+#              - libgme-dev
+#              - p7zip-full
+#              - clang-4.0
+#          compiler: clang-4.0
+#          #clang version 4.0.X
+#        - os: linux
+#          addons:
+#            apt:
+#              sources:
+#              - llvm-toolchain-precise-5.0
+#              - ubuntu-toolchain-r-test
+#              packages:
+#              - libsdl2-mixer-dev
+#              - libpng-dev
+#              - libgl1-mesa-dev
+#              - libgme-dev
+#              - p7zip-full
+#              - clang-5.0
+#          compiler: clang-5.0
+#          #clang version 5.0.X
 #        - os: osx
 #          osx_image: beta-xcode6.1
 #          #Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)

From 6fbdf37b18106c07612e3fcb20d50966df75a601 Mon Sep 17 00:00:00 2001
From: Alam Ed Arias <alam@srb2.org>
Date: Sat, 30 Sep 2017 08:54:17 -0400
Subject: [PATCH 4/5] Build: support building with clang 5.0

---
 src/hardware/hw_data.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/hardware/hw_data.h b/src/hardware/hw_data.h
index a6525a2f5..d76fcc1c8 100644
--- a/src/hardware/hw_data.h
+++ b/src/hardware/hw_data.h
@@ -64,7 +64,7 @@ typedef struct GLMipmap_s GLMipmap_t;
 //
 struct GLTexture_s
 {
-	GLMipmap_t mipmap;
+	GLMipmap_t  mipmap;
 	float       scaleX;             //used for scaling textures on walls
 	float       scaleY;
 };
@@ -88,7 +88,7 @@ struct GLPatch_s
 	UINT16              wadnum;      // the software patch lump num for when the hardware patch
 	UINT16              lumpnum;     // was flushed, and we need to re-create it
 	GLMipmap_t          mipmap;
-} ATTRPACK;
+};
 typedef struct GLPatch_s GLPatch_t;
 
 #endif //_HWR_DATA_

From 1b576bacf3e1ffa3bbc1ec5b5e610f5bfd456389 Mon Sep 17 00:00:00 2001
From: Alam Ed Arias <alam@srb2.org>
Date: Sat, 30 Sep 2017 23:07:47 -0400
Subject: [PATCH 5/5] Build: support GCC 8

---
 src/Makefile.cfg | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/Makefile.cfg b/src/Makefile.cfg
index 1b323ca0b..317218397 100644
--- a/src/Makefile.cfg
+++ b/src/Makefile.cfg
@@ -7,6 +7,10 @@
 # and other things
 #
 
+ifdef GCC80
+GCC72=1
+endif
+
 ifdef GCC72
 GCC71=1
 endif