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..3cd65281 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)) @@ -44,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)) @@ -132,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