From 4d73ac739311eb4cf65ee16884c1233af5d31590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Est=C3=A9vez?= Date: Wed, 25 Sep 2024 11:54:03 +0200 Subject: [PATCH] fftw: compile with -fPIC instead of -fPIE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1d86f6c2..e2521e78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 ()