diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2014-08-01 18:01:14 +0200 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2014-08-01 18:01:14 +0200 |
commit | e77f2ceddee83e0a9aac24aa3d41f144619257ed (patch) | |
tree | 9b09169809770467153014a9ef622e3ed2050452 | |
parent | 6a8cb061bd78dcec86ab203d4c0e81401be425a8 (diff) |
gcc is getting too buggy lately. Let's switch to clang...
-rw-r--r-- | common.mk | 40 |
1 files changed, 4 insertions, 36 deletions
@@ -6,10 +6,10 @@ TRUESYSTEM := $(shell uname) MACHINE := $(shell uname -m) DISTRIB := $(shell cat /etc/issue | cut -f 1 -d\ | head -1) -CC = gcc -CXX = g++ -LD = g++ -AS = gcc -c +CC = clang +CXX = clang++ +LD = clang++ +AS = clang -c AR = ar rcs BINEXT = bin @@ -17,12 +17,9 @@ BINEXT = bin CPPFLAGS += -fno-strict-aliasing ifeq ($(SYSTEM),Darwin) - CC = clang - CXX = clang++ CPPFLAGS += -fPIC LDFLAGS += -fPIC ARCH_FLAGS = - LD = clang++ STRIP = strip -x endif @@ -32,35 +29,6 @@ ifeq ($(SYSTEM),Linux) ARCH_FLAGS = ASFLAGS = STRIP = strip --strip-unneeded - - GCC_VERSION := $(shell g++ --version | head -1 | sed "s/.*\([0-9]\.[0-9]\.[0-9]\).*/\1/") - GCC_VERSION_4 := $(shell expr `echo $(GCC_VERSION) | cut -f1 -d.` \>= 4) - GCC_VERSION_x_7 := $(shell expr `echo $(GCC_VERSION) | cut -f2 -d.` \>= 7) - GCC_VERSION_x_8 := $(shell expr `echo $(GCC_VERSION) | cut -f2 -d.` \>= 8) - GCC_VERSION_x_x_2 := $(shell expr `echo $(GCC_VERSION) | cut -f3 -d.` \>= 2) - CLANG_VERSION := $(shell clang --version | head -1 | sed "s/.*\([0-9]\.[0-9]\).*/\1/") - CLANG_VERSION_3 := $(shell expr `echo $(CLANG_VERSION) | cut -f1 -d.` \>= 3) - CLANG_VERSION_x_1 := $(shell expr `echo $(CLANG_VERSION) | cut -f2 -d.` \>= 1) - - ifneq ($(GCC_VERSION_4),1) - USE_CLANG = true - else - ifneq ($(GCC_VERSION_x_7),1) - USE_CLANG = true - else - ifneq ($(GCC_VERSION_x_8),1) - ifneq ($(GCC_VERSION_x_x_2),1) - USE_CLANG = true - endif - endif - endif - endif - - ifeq ($(USE_CLANG),true) - CC = clang - CXX = clang++ - LD = clang++ - endif endif CXXFLAGS += -Wno-deprecated -std=c++11 |