Skip to content

Commit

Permalink
fix py2-llvmlite recipe for new llvm
Browse files Browse the repository at this point in the history
  • Loading branch information
mrodozov authored and cmsbuild committed Aug 9, 2019
1 parent 4860481 commit 6693a07
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pip/py2-llvmlite.file
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Requires: py2-enum34 llvm py2-wheel
%define source0 git+https://github.com/cms-externals/llvmlite?obj=cms/master/d5fadcc/432a75a3bdefee6e927196086d31a7eb0d92404d&export=llvmlite-%{realversion}&output=/source.tar.gz
%define PipPreBuild export LLVM_CONFIG=${LLVM_ROOT}/bin/llvm-config
%define doPython3 no
Requires: llvm py2-wheel py2-enum34
Patch0: py2-llvmlite-fpic-flag

%define PipPreBuild export LLVM_CONFIG=${LLVM_ROOT}/bin/llvm-config && tar -xzf llvmlite-%{realversion}.tar.gz && pushd llvmlite-%{realversion} && for pch in %{patches} ; do patch -p1 < ${pch} ; done && popd && rm -f llvmlite-%{realversion}.tar.gz && tar czf llvmlite-%{realversion}.tar.gz llvmlite-%{realversion}
13 changes: 13 additions & 0 deletions py2-llvmlite-fpic-flag.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/ffi/Makefile.linux b/ffi/Makefile.linux
index 334e9ff..9501d2c 100644
--- a/ffi/Makefile.linux
+++ b/ffi/Makefile.linux
@@ -5,7 +5,7 @@ CXX ?= g++
CXX_FLTO_FLAGS ?= -flto
LD_FLTO_FLAGS ?= -flto -Wl,--exclude-libs=ALL

-CXXFLAGS = $(LLVM_CXXFLAGS) $(CXX_FLTO_FLAGS)
+CXXFLAGS = $(LLVM_CXXFLAGS) $(CXX_FLTO_FLAGS) -fPIC
LDFLAGS := $(LDFLAGS) $(LLVM_LDFLAGS) $(LD_FLTO_FLAGS)
LIBS = $(LLVM_LIBS)
INCLUDE = core.h

0 comments on commit 6693a07

Please sign in to comment.