Skip to content

Commit

Permalink
Merge pull request #848 from xmos/fixlinux
Browse files Browse the repository at this point in the history
Add PIC flag for Linux
  • Loading branch information
panickal-xmos authored Oct 30, 2023
2 parents 9fd4739 + 182eb27 commit 82b004e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/xmos_ai_tools/xinterpreters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 82b004e

Please sign in to comment.