From 6dc4cd90c2fa0007419795b6c6b9d1ecae19fad4 Mon Sep 17 00:00:00 2001 From: Manodeep Sinha Date: Mon, 14 Mar 2016 14:33:25 -0600 Subject: [PATCH 1/2] Fixed relative import --- Corrfunc/call_correlation_functions.py | 2 +- common.mk | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Corrfunc/call_correlation_functions.py b/Corrfunc/call_correlation_functions.py index f8a659d3..c1163042 100644 --- a/Corrfunc/call_correlation_functions.py +++ b/Corrfunc/call_correlation_functions.py @@ -16,7 +16,7 @@ import os.path as path import time from Corrfunc import _countpairs -from .utils import read_catalog +from Corrfunc.utils import read_catalog def main(): diff --git a/common.mk b/common.mk index 58405b2d..22f9e001 100644 --- a/common.mk +++ b/common.mk @@ -36,7 +36,6 @@ GSL_LINK := $(shell gsl-config --libs) -Xlinker -rpath -Xlinker $(GSL_LIBDIR) # Check if code is running on travis ifeq (osx, $(findstring osx, ${TRAVIS_OS_NAME})) -$(info hererehehehre) ifeq (USE_AVX, $(findstring USE_AVX,$(OPT))) $(warning $(ccmagenta) TRAVIS CI OSX workers do not seem to support AVX instructions. Removing USE_AVX from compile options. $(ccreset)) OPT:=$(filter-out -DUSE_AVX,$(OPT)) From 68a5f01d3841b8f347f4d7526eda3e70918d0c1e Mon Sep 17 00:00:00 2001 From: Manodeep Sinha Date: Wed, 16 Mar 2016 14:30:46 -0600 Subject: [PATCH 2/2] Updating common.mk to take care of the clang masquerading as gcc issue --- common.mk | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/common.mk b/common.mk index 22f9e001..3cd65281 100644 --- a/common.mk +++ b/common.mk @@ -43,6 +43,20 @@ endif endif # done with removing USE_AVX under osx on Travis +# Now check if gcc is set to be the compiler but if clang is really under the hood. +export GCC_IS_CLANG ?= -1 +ifeq ($(GCC_IS_CLANG), -1) +GCC_VERSION := $(shell gcc --version) +ifeq (clang,$(findstring clang,$(GCC_VERSION))) +export GCC_IS_CLANG := 1 +else +export GCC_IS_CLANG := 0 +endif +# $(info $$GCC_VERSION is [${GCC_VERSION}]) +# $(info $$GCC_IS_CLANG is [${GCC_IS_CLANG}]) +endif + + ifneq (USE_OMP,$(findstring USE_OMP,$(OPT))) ifneq (clang,$(findstring clang,$(CC))) $(warning $(ccmagenta) Recommended compiler for a serial build is clang $(ccreset)) @@ -131,8 +145,11 @@ ifeq ($(UNAME), Darwin) ## use the clang assembler instead of GNU assembler ## http://stackoverflow.com/questions/10327939/erroring-on-no-such-instruction-while-assembling-project-on-mac-os-x-lion ifeq (gcc,$(findstring gcc,$(CC))) +ifneq ($(GCC_IS_CLANG), 1) +## Only add -Wa,-q flag if it is true gcc. if clang is operating under gcc, no need to add this flag CFLAGS += -Wa,-q endif +endif endif