Skip to content

Commit

Permalink
fftw: compile with -fPIC instead of -fPIE
Browse files Browse the repository at this point in the history
Compiling with -fPIE doesn't allow building dynamic libraries
(for instance, a dynamic library that contains blocks using fftw
or a Python module with Python bindings for these blocks).

Signed-off-by: Daniel Estévez <[email protected]>
  • Loading branch information
daniestevez authored and drslebedev committed Sep 30, 2024
1 parent 080b395 commit 4d73ac7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,11 @@ target_include_directories(vir INTERFACE ${vir-simd_SOURCE_DIR}/)
# FFTW3 is build 2 times for float and double precisions
SET(FFTW_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/fftw)
if (EMSCRIPTEN)
SET(FFTW_CFLAGS "${CFLAGS} -fPIE -w")
SET(FFTW_CFLAGS "${CFLAGS} -fPIC -w")
SET(FFTW_CONFIG cd ${FFTW_PREFIX}/src/ && emconfigure ./configure --enable-silent-rules --quiet --disable-fortran --prefix=${FFTW_PREFIX}/install)
SET(FFTW_BUILD emmake make -j CFLAGS=${FFTW_CFLAGS} --silent V=0 && emmake make install --silent V=0 && emmake make clean --silent V=0)
else ()
SET(FFTW_CFLAGS "${CFLAGS} -fPIE -w -O3 -march=native -mtune=native")
SET(FFTW_CFLAGS "${CFLAGS} -fPIC -w -O3 -march=native -mtune=native")
SET(FFTW_CONFIG ${FFTW_PREFIX}/src/configure --enable-silent-rules --quiet --disable-fortran --prefix=${FFTW_PREFIX}/install)
SET(FFTW_BUILD make -j CFLAGS=${FFTW_CFLAGS} --silent V=0 && make install --silent V=0 && make clean --silent V=0)
endif ()
Expand Down

0 comments on commit 4d73ac7

Please sign in to comment.