Skip to content

Commit

Permalink
only send base compiler name to cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
tkelman committed Oct 30, 2014
1 parent e5a35cc commit 6300cbe
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
35 changes: 18 additions & 17 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -224,16 +224,11 @@ endif
endif

ifeq ($(USEIFC), 1)
FC = ifort
FC_BASE = ifort
else
FC = $(CROSS_COMPILE)gfortran
endif

ifeq ($(USEIFC), 1)
FC = ifort
else
FC = $(CROSS_COMPILE)gfortran
FC_BASE = $(CROSS_COMPILE)gfortran
endif
FC = $(FC_BASE)

STDLIBCPP_FLAG =

Expand Down Expand Up @@ -266,8 +261,10 @@ endif
ifeq ($(SANITIZE),1)
$(error Address Sanitizer only supported with clang. Try setting SANITIZE=0)
endif
CC = $(CROSS_COMPILE)gcc
CXX = $(CROSS_COMPILE)g++
CC_BASE = $(CROSS_COMPILE)gcc
CXX_BASE = $(CROSS_COMPILE)g++
CC = $(CC_BASE)
CXX = $(CXX_BASE)
JCFLAGS = -std=gnu99 -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64
JCPPFLAGS =
JCXXFLAGS = -pipe $(fPIC) -fno-rtti
Expand All @@ -276,8 +273,10 @@ SHIPFLAGS = -O3 -ggdb3 -falign-functions
endif

ifeq ($(USECLANG),1)
CC = $(CROSS_COMPILE)clang
CXX = $(CROSS_COMPILE)clang++
CC_BASE = $(CROSS_COMPILE)clang
CXX_BASE = $(CROSS_COMPILE)clang++
CC = $(CC_BASE)
CXX = $(CXX_BASE)
JCFLAGS = -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64
JCPPFLAGS =
JCXXFLAGS = -pipe $(fPIC) -fno-rtti
Expand All @@ -303,8 +302,10 @@ endif
ifeq ($(SANITIZE),1)
$(error Address Sanitizer only supported with clang. Try setting SANITIZE=0)
endif
CC = icc
CXX = icpc
CC_BASE = icc
CXX_BASE = icpc
CC = $(CC_BASE)
CXX = $(CXX_BASE)
JCFLAGS = -std=gnu99 -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -fp-model precise -fp-model except -no-ftz
JCPPFLAGS =
JCXXFLAGS = -pipe $(fPIC) -fno-rtti
Expand Down Expand Up @@ -438,9 +439,9 @@ endif
# Set some ARCH-specific flags
ifneq ($(USEICC),1)
ifneq ($(ARCH), arm)
JCFLAGS += -m$(BINARY)
JCXXFLAGS += -m$(BINARY)
JFFLAGS += -m$(BINARY)
CC += -m$(BINARY)
CXX += -m$(BINARY)
FC += -m$(BINARY)
endif
endif

Expand Down
6 changes: 3 additions & 3 deletions deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,12 @@ libcxx-build:
mkdir -p libcxx-build
libcxx-build/Makefile: llvm-$(LLVM_VER)/projects/libcxx | llvm-$(LLVM_VER)/projects/libcxxabi libcxx-build
cd libcxx-build && \
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX:PATH=$(build_prefix) -DLIBCXX_CXX_ABI=libcxxabi -DLIBCXX_LIBCXXABI_INCLUDE_PATHS="../llvm-$(LLVM_VER)/projects/libcxxabi/include" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(build_prefix) ../llvm-$(LLVM_VER)/projects/libcxx -DCMAKE_C_COMPILER="$(CC)" -DCMAKE_CXX_COMPILER="$(CXX)" -DCMAKE_SHARED_LINKER_FLAGS="-L$(build_libdir) -Bstatic -lirc -Bdynamic" -DCMAKE_CXX_FLAGS="$(CXXFLAGS)"
$(CMAKE) -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX:PATH=$(build_prefix) -DLIBCXX_CXX_ABI=libcxxabi -DLIBCXX_LIBCXXABI_INCLUDE_PATHS="../llvm-$(LLVM_VER)/projects/libcxxabi/include" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(build_prefix) ../llvm-$(LLVM_VER)/projects/libcxx -DCMAKE_C_COMPILER="$(CC_BASE)" -DCMAKE_CXX_COMPILER="$(CXX_BASE)" -DCMAKE_SHARED_LINKER_FLAGS="-L$(build_libdir) -Bstatic -lirc -Bdynamic" -DCMAKE_CXX_FLAGS="$(CXXFLAGS)"
libcxxabi-build:
mkdir -p libcxxabi-build
libcxxabi-build/Makefile: llvm-$(LLVM_VER)/projects/libcxxabi | libcxxabi-build
cd libcxxabi-build && \
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX:PATH=$(build_prefix) -DLLVM_MAIN_SRC_DIR=../llvm-svn -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(build_prefix) ../llvm-$(LLVM_VER)/projects/libcxxabi -DCMAKE_C_COMPILER="$(CC)" -DCMAKE_CXX_COMPILER="$(CXX)" -DLIBCXXABI_CXX_ABI_LIBRARIES="-Bstatic -lirc -Bdynamic" -DCMAKE_CXX_FLAGS="$(CXXFLAGS) -std=c++11"
$(CMAKE) -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX:PATH=$(build_prefix) -DLLVM_MAIN_SRC_DIR=../llvm-svn -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(build_prefix) ../llvm-$(LLVM_VER)/projects/libcxxabi -DCMAKE_C_COMPILER="$(CC_BASE)" -DCMAKE_CXX_COMPILER="$(CXX_BASE)" -DLIBCXXABI_CXX_ABI_LIBRARIES="-Bstatic -lirc -Bdynamic" -DCMAKE_CXX_FLAGS="$(CXXFLAGS) -std=c++11"
llvm-$(LLVM_VER)/projects/libcxxabi/lib/libc++abi.so.1.0: llvm-$(LLVM_VER)/projects/libcxxabi | llvm-$(LLVM_VER)/projects/libcxx
libcxxabi-build/libc++abi.so.1.0: | libcxxabi-build/Makefile
cd libcxxabi-build && $(MAKE)
Expand Down Expand Up @@ -1701,7 +1701,7 @@ install-virtualenv: $(VIRTUALENV_TARGET)
LIBGIT2_OBJ_SOURCE = libgit2-$(LIBGIT2_VER)/build/libgit2.$(SHLIB_EXT)
LIBGIT2_OBJ_TARGET = $(build_shlibdir)/libgit2.$(SHLIB_EXT)

LIBGIT2_OPTS = -DTHREADSAFE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="$(CC)"
LIBGIT2_OPTS = -DTHREADSAFE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="$(CC_BASE)"
ifeq ($(OS),WINNT)
LIBGIT2_OPTS += -DBUILD_CLAR=OFF -DWIN32=ON -DMINGW=ON -DUSE_SSH=OFF -DCMAKE_SYSTEM_NAME=Windows
ifeq ($(BUILD_OS),WINNT)
Expand Down

0 comments on commit 6300cbe

Please sign in to comment.