diff --git a/GNUmakefile b/GNUmakefile index 56a5fd01..dea41a26 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -20,6 +20,12 @@ CLANG_COMPILER = $(shell $(CXX) --version 2>&1 | $(EGREP) -i -c "clang") INTEL_COMPILER = $(shell $(CXX) --version 2>&1 | $(EGREP) -i -c "\(ICC\)") SUN_COMPILER = $(shell $(CXX) -V 2>&1 | $(EGREP) -i -c "CC: Sun") +# Also see LLVM Bug 24200 (https://llvm.org/bugs/show_bug.cgi?id=24200) +# CLANG_ASSEMBLER ?= $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -i -c "^clang") +# TODO: Uncomment the line above when Clang's integrated assembler can parse inline assembly +CLANG_ASSEMBLER ?= 0 +GNU_ASSEMBLER ?= $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -i -c "^GNU assembler") + # Default prefix for make install ifeq ($(PREFIX),) PREFIX = /usr @@ -32,22 +38,16 @@ ifneq ($(CLANG_COMPILER),0) CXXFLAGS += -Wall endif -# Also see LLVM Bug 24200 (https://llvm.org/bugs/show_bug.cgi?id=24200) -# CLANG_ASSEMBLER ?= $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -i -c "^clang") -# TODO: Uncomment the line above when Clang's integrated assembler can parse inline assembly -CLANG_ASSEMBLER ?= 0 - ifeq ($(IS_X86),1) GCC42_OR_LATER = $(shell $(CXX) -v 2>&1 | $(EGREP) -i -c "^gcc version (4.[2-9]|[5-9])") ICC111_OR_LATER = $(shell $(CXX) --version 2>&1 | $(EGREP) -c "\(ICC\) ([2-9][0-9]|1[2-9]|11\.[1-9])") -ifeq ($(CLANG_ASSEMBLER),0) +ifneq ($(GNU_ASSEMBLER),0) # Using system provided assembler. It may be GNU AS (GAS). GAS210_OR_LATER ?= $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.[1-9][0-9]|[3-9])") GAS217_OR_LATER ?= $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.1[7-9]|2\.[2-9]|[3-9])") GAS219_OR_LATER ?= $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.19|2\.[2-9]|[3-9])") -else endif # Enable PIC for x86_64 targets