Skip to content

Commit

Permalink
deps: a few ppc64 build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nolta committed Aug 29, 2012
1 parent b58f113 commit 6127109
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
5 changes: 4 additions & 1 deletion Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ CXX = g++
JCFLAGS = -std=gnu99 -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64
JCXXFLAGS = -pipe $(fPIC) -fno-rtti
DEBUGFLAGS = -ggdb3 -DDEBUG
SHIPFLAGS = -O3 -DNDEBUG -falign-functions -momit-leaf-frame-pointer
SHIPFLAGS = -O3 -DNDEBUG -falign-functions
ifneq ($(ARCH), ppc64)
SHIPFLAGS += -momit-leaf-frame-pointer
endif
endif

ifeq ($(USECLANG),1)
Expand Down
14 changes: 11 additions & 3 deletions deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,15 @@ llvm_python_workaround:
mkdir -p llvm-$(LLVM_VER)/python2_path && \
ln -s /usr/bin/python2 "llvm-$(LLVM_VER)/python2_path/python"

LLVM_CXX = $(CXX)
ifeq ($(ARCH), ppc64)
LLVM_CXX += -mminimal-toc
endif

$(LLVM_OBJ_SOURCE): llvm-$(LLVM_VER)/configure | llvm_python_workaround
cd llvm-$(LLVM_VER) && \
export PATH=$(abspath llvm-$(LLVM_VER)/python2_path):$$PATH && \
./configure --prefix=$(abspath $(USR)) --disable-threads --enable-optimized --disable-profiling --disable-assertions --enable-shared --enable-targets=host --disable-bindings --disable-docs CC="$(CC)" CXX="$(CXX)" && \
./configure --prefix=$(abspath $(USR)) --disable-threads --enable-optimized --disable-profiling --disable-assertions --enable-shared --enable-targets=host --disable-bindings --disable-docs CC="$(CC)" CXX="$(LLVM_CXX)" && \
$(MAKE)
$(LLVM_OBJ_TARGET): $(LLVM_OBJ_SOURCE) | llvm_python_workaround
export PATH=$(abspath llvm-$(LLVM_VER)/python2_path):$$PATH && \
Expand Down Expand Up @@ -553,7 +558,10 @@ install-fftw: install-fftw-single install-fftw-double
install-fftw-single: $(FFTW_SINGLE_OBJ_TARGET)
install-fftw-double: $(FFTW_DOUBLE_OBJ_TARGET)

FFTW_CONFIG = --enable-shared --disable-fortran --disable-mpi --enable-fma --enable-sse2 --enable-threads
FFTW_CONFIG = --enable-shared --disable-fortran --disable-mpi --enable-fma --enable-threads
ifneq ($(ARCH), ppc64)
FFTW_CONFIG += --enable-sse2
endif
ifeq ($(OS),WINNT)
FFTW_CONFIG += --with-our-malloc --with-combined-threads
endif
Expand All @@ -567,7 +575,7 @@ fftw-$(FFTW_VER)-single/configure: fftw-$(FFTW_VER).tar.gz
touch $@
fftw-$(FFTW_VER)-single/config.status: fftw-$(FFTW_VER)-single/configure
cd fftw-$(FFTW_VER)-single && \
./configure --prefix=$(abspath $(USR)) $(FFTW_CONFIG) --enable-sse --enable-single CC="$(CC)" CXX="$(CXX)" && \
./configure --prefix=$(abspath $(USR)) $(FFTW_CONFIG) --enable-single CC="$(CC)" CXX="$(CXX)" && \
$(MAKE) clean
touch $@
$(FFTW_SINGLE_OBJ_TARGET): fftw-$(FFTW_VER)-single/config.status
Expand Down

0 comments on commit 6127109

Please sign in to comment.