[iortcw] 44/497: All: Add support for clang 3.4

Simon McVittie smcv at debian.org
Fri Sep 8 10:36:14 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit 97d0d96917b0678414bde0129a318a1003a64adf
Author: M4N4T4RMS at gmail.com <M4N4T4RMS at gmail.com@e65d2741-a53d-b2dc-ae96-bb75fa5e4c4a>
Date:   Tue Feb 11 08:55:44 2014 +0000

    All: Add support for clang 3.4
---
 MP/Makefile | 51 +++++++++++++++++++++++++++++++++++++--------------
 SP/Makefile | 51 +++++++++++++++++++++++++++++++++++++--------------
 2 files changed, 74 insertions(+), 28 deletions(-)

diff --git a/MP/Makefile b/MP/Makefile
index be703d7..603106b 100644
--- a/MP/Makefile
+++ b/MP/Makefile
@@ -363,15 +363,21 @@ ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu"))
 
   ifeq ($(ARCH),x86_64)
     OPTIMIZEVM = -O3 -fomit-frame-pointer -funroll-loops \
-      -falign-loops=2 -falign-jumps=2 -falign-functions=2 \
-      -fstrength-reduce
+      -falign-functions=2 -fstrength-reduce
+    # clang 3.4 doesn't support these
+    ifneq ("$(CC)", $(findstring "$(CC)", "clang" "clang++"))
+      OPTIMIZEVM += -falign-loops=2 -falign-jumps=2
+    endif
     OPTIMIZE = $(OPTIMIZEVM) -ffast-math
     HAVE_VM_COMPILED = true
   else
   ifeq ($(ARCH),x86)
     OPTIMIZEVM = -O3 -march=i586 -fomit-frame-pointer \
-      -funroll-loops -falign-loops=2 -falign-jumps=2 \
-      -falign-functions=2 -fstrength-reduce
+      -funroll-loops -falign-functions=2 -fstrength-reduce
+    # clang 3.4 doesn't support these
+    ifneq ("$(CC)", $(findstring "$(CC)", "clang" "clang++"))
+      OPTIMIZEVM += -falign-loops=2 -falign-jumps=2
+    endif
     OPTIMIZE = $(OPTIMIZEVM) -ffast-math
     HAVE_VM_COMPILED=true
   else
@@ -528,7 +534,9 @@ ifeq ($(PLATFORM),darwin)
     $(LIBSDIR)/macosx/libSDL2-2.0.0.dylib
   RENDERER_LIBS += -framework OpenGL $(LIBSDIR)/macosx/libSDL2-2.0.0.dylib
 
-  OPTIMIZEVM += -falign-loops=16
+  ifneq ("$(CC)", $(findstring "$(CC)", "clang" "clang++"))
+    OPTIMIZEVM += -falign-loops=16
+  endif
   OPTIMIZE = $(OPTIMIZEVM) -ffast-math
 
   SHLIBEXT=dylib
@@ -603,16 +611,22 @@ ifeq ($(PLATFORM),mingw32)
 
   ifeq ($(ARCH),x86_64)
     OPTIMIZEVM = -O3 -fno-omit-frame-pointer \
-      -falign-loops=2 -funroll-loops -falign-jumps=2 -falign-functions=2 \
-      -fstrength-reduce
+      -funroll-loops -falign-functions=2 -fstrength-reduce
+    # clang 3.4 doesn't support these
+    ifneq ("$(CC)", $(findstring "$(CC)", "clang" "clang++"))
+      OPTIMIZEVM += -falign-loops=2 -falign-jumps=2
+    endif
     OPTIMIZE = $(OPTIMIZEVM) --fast-math
     HAVE_VM_COMPILED = true
     FILE_ARCH=x64
   endif
   ifeq ($(ARCH),x86)
     OPTIMIZEVM = -O3 -march=i586 -fno-omit-frame-pointer \
-      -falign-loops=2 -funroll-loops -falign-jumps=2 -falign-functions=2 \
-      -fstrength-reduce
+      -funroll-loops -falign-functions=2 -fstrength-reduce
+    # clang 3.4 doesn't support these
+    ifneq ("$(CC)", $(findstring "$(CC)", "clang" "clang++"))
+      OPTIMIZEVM += -falign-loops=2 -falign-jumps=2
+    endif
     OPTIMIZE = $(OPTIMIZEVM) -ffast-math
     HAVE_VM_COMPILED = true
   endif
@@ -757,15 +771,21 @@ ifeq ($(PLATFORM),openbsd)
 
   ifeq ($(ARCH),x86_64)
     OPTIMIZEVM = -O3 -fomit-frame-pointer -funroll-loops \
-      -falign-loops=2 -falign-jumps=2 -falign-functions=2 \
-      -fstrength-reduce
+      -falign-functions=2 -fstrength-reduce
+    # clang 3.4 doesn't support these
+    ifneq ("$(CC)", $(findstring "$(CC)", "clang" "clang++"))
+      OPTIMIZEVM += -falign-loops=2 -falign-jumps=2
+    endif
     OPTIMIZE = $(OPTIMIZEVM) -ffast-math
     HAVE_VM_COMPILED = true
   else
   ifeq ($(ARCH),x86)
     OPTIMIZEVM = -O3 -march=i586 -fomit-frame-pointer \
-      -funroll-loops -falign-loops=2 -falign-jumps=2 \
-      -falign-functions=2 -fstrength-reduce
+      -funroll-loops -falign-functions=2 -fstrength-reduce
+    # clang 3.4 doesn't support these
+    ifneq ("$(CC)", $(findstring "$(CC)", "clang" "clang++"))
+      OPTIMIZEVM += -falign-loops=2 -falign-jumps=2
+    endif
     OPTIMIZE = $(OPTIMIZEVM) -ffast-math
     HAVE_VM_COMPILED=true
   else
@@ -903,8 +923,11 @@ ifeq ($(PLATFORM),sunos)
   else
   ifeq ($(ARCH),x86)
     OPTIMIZEVM += -march=i586 -fomit-frame-pointer \
-      -falign-loops=2 -falign-jumps=2 \
       -falign-functions=2 -fstrength-reduce
+    # clang 3.4 doesn't support these
+    ifneq ("$(CC)", $(findstring "$(CC)", "clang" "clang++"))
+      OPTIMIZEVM += -falign-loops=2 -falign-jumps=2
+    endif
     HAVE_VM_COMPILED=true
     BASE_CFLAGS += -m32
     CLIENT_CFLAGS += -I/usr/X11/include/NVIDIA
diff --git a/SP/Makefile b/SP/Makefile
index 3a55332..db6a54b 100644
--- a/SP/Makefile
+++ b/SP/Makefile
@@ -360,15 +360,21 @@ ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu"))
 
   ifeq ($(ARCH),x86_64)
     OPTIMIZEVM = -O3 -fomit-frame-pointer -funroll-loops \
-      -falign-loops=2 -falign-jumps=2 -falign-functions=2 \
-      -fstrength-reduce
+      -falign-functions=2 -fstrength-reduce
+    # clang 3.4 doesn't support these
+    ifneq ("$(CC)", $(findstring "$(CC)", "clang" "clang++"))
+      OPTIMIZEVM += -falign-loops=2 -falign-jumps=2
+    endif
     OPTIMIZE = $(OPTIMIZEVM) -ffast-math
     HAVE_VM_COMPILED = true
   else
   ifeq ($(ARCH),x86)
     OPTIMIZEVM = -O3 -march=i586 -fomit-frame-pointer \
-      -funroll-loops -falign-loops=2 -falign-jumps=2 \
-      -falign-functions=2 -fstrength-reduce
+      -funroll-loops -falign-functions=2 -fstrength-reduce
+    # clang 3.4 doesn't support these
+    ifneq ("$(CC)", $(findstring "$(CC)", "clang" "clang++"))
+      OPTIMIZEVM += -falign-loops=2 -falign-jumps=2
+    endif
     OPTIMIZE = $(OPTIMIZEVM) -ffast-math
     HAVE_VM_COMPILED=true
   else
@@ -525,7 +531,9 @@ ifeq ($(PLATFORM),darwin)
     $(LIBSDIR)/macosx/libSDL2-2.0.0.dylib
   RENDERER_LIBS += -framework OpenGL $(LIBSDIR)/macosx/libSDL2-2.0.0.dylib
 
-  OPTIMIZEVM += -falign-loops=16
+  ifneq ("$(CC)", $(findstring "$(CC)", "clang" "clang++"))
+    OPTIMIZEVM += -falign-loops=16
+  endif
   OPTIMIZE = $(OPTIMIZEVM) -ffast-math
 
   SHLIBEXT=dylib
@@ -612,16 +620,22 @@ ifeq ($(PLATFORM),mingw32)
 
   ifeq ($(ARCH),x86_64)
     OPTIMIZEVM = -O3 -fno-omit-frame-pointer \
-      -falign-loops=2 -funroll-loops -falign-jumps=2 -falign-functions=2 \
-      -fstrength-reduce
+      -funroll-loops -falign-functions=2 -fstrength-reduce
+    # clang 3.4 doesn't support these
+    ifneq ("$(CC)", $(findstring "$(CC)", "clang" "clang++"))
+      OPTIMIZEVM += -falign-loops=2 -falign-jumps=2
+    endif
     OPTIMIZE = $(OPTIMIZEVM) --fast-math
     HAVE_VM_COMPILED = true
     FILE_ARCH=x64
   endif
   ifeq ($(ARCH),x86)
     OPTIMIZEVM = -O3 -march=i586 -fno-omit-frame-pointer \
-      -falign-loops=2 -funroll-loops -falign-jumps=2 -falign-functions=2 \
-      -fstrength-reduce
+      -funroll-loops -falign-functions=2 -fstrength-reduce
+    # clang 3.4 doesn't support these
+    ifneq ("$(CC)", $(findstring "$(CC)", "clang" "clang++"))
+      OPTIMIZEVM += -falign-loops=2 -falign-jumps=2
+    endif
     OPTIMIZE = $(OPTIMIZEVM) -ffast-math
     HAVE_VM_COMPILED = true
   endif
@@ -766,15 +780,21 @@ ifeq ($(PLATFORM),openbsd)
 
   ifeq ($(ARCH),x86_64)
     OPTIMIZEVM = -O3 -fomit-frame-pointer -funroll-loops \
-      -falign-loops=2 -falign-jumps=2 -falign-functions=2 \
-      -fstrength-reduce
+      -falign-functions=2 -fstrength-reduce
+    # clang 3.4 doesn't support these
+    ifneq ("$(CC)", $(findstring "$(CC)", "clang" "clang++"))
+      OPTIMIZEVM += -falign-loops=2 -falign-jumps=2
+    endif
     OPTIMIZE = $(OPTIMIZEVM) -ffast-math
     HAVE_VM_COMPILED = true
   else
   ifeq ($(ARCH),x86)
     OPTIMIZEVM = -O3 -march=i586 -fomit-frame-pointer \
-      -funroll-loops -falign-loops=2 -falign-jumps=2 \
-      -falign-functions=2 -fstrength-reduce
+      -funroll-loops -falign-functions=2 -fstrength-reduce
+    # clang 3.4 doesn't support these
+    ifneq ("$(CC)", $(findstring "$(CC)", "clang" "clang++"))
+      OPTIMIZEVM += -falign-loops=2 -falign-jumps=2
+    endif
     OPTIMIZE = $(OPTIMIZEVM) -ffast-math
     HAVE_VM_COMPILED=true
   else
@@ -912,8 +932,11 @@ ifeq ($(PLATFORM),sunos)
   else
   ifeq ($(ARCH),x86)
     OPTIMIZEVM += -march=i586 -fomit-frame-pointer \
-      -falign-loops=2 -falign-jumps=2 \
       -falign-functions=2 -fstrength-reduce
+    # clang 3.4 doesn't support these
+    ifneq ("$(CC)", $(findstring "$(CC)", "clang" "clang++"))
+      OPTIMIZEVM += -falign-loops=2 -falign-jumps=2
+    endif
     HAVE_VM_COMPILED=true
     BASE_CFLAGS += -m32
     CLIENT_CFLAGS += -I/usr/X11/include/NVIDIA

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git



More information about the Pkg-games-commits mailing list