From e77f2ceddee83e0a9aac24aa3d41f144619257ed Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 1 Aug 2014 18:01:14 +0200 Subject: gcc is getting too buggy lately. Let's switch to clang... --- common.mk | 40 ++++------------------------------------ 1 file changed, 4 insertions(+), 36 deletions(-) diff --git a/common.mk b/common.mk index d43a010..3539526 100644 --- a/common.mk +++ b/common.mk @@ -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 -- cgit v1.2.3