diff --git a/python/xmos_ai_tools/xinterpreters/CMakeLists.txt b/python/xmos_ai_tools/xinterpreters/CMakeLists.txt index 2cb407639..965b57505 100644 --- a/python/xmos_ai_tools/xinterpreters/CMakeLists.txt +++ b/python/xmos_ai_tools/xinterpreters/CMakeLists.txt @@ -49,7 +49,11 @@ target_sources(host_xtflitemicro PRIVATE ${XTFLIB_KERNEL_SOURCES} ) +if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") + set(BUILD_FLAGS ${BUILD_FLAGS} "-fPIC") +endif() target_compile_options(host_xtflitemicro PRIVATE ${BUILD_FLAGS}) + target_link_options(host_xtflitemicro PRIVATE ${BUILD_FLAGS}) target_compile_definitions(host_xtflitemicro PUBLIC ${DEFINTIONS}