Skip to content

Commit

Permalink
legacy_apps: Fix rpc demo dynamic library build
Browse files Browse the repository at this point in the history
Add the missing -fPIC option for dynamic library generation to fix the
following error:

/usr/bin/ld: CMakeFiles/rpc_demod-shared.dir/__/__/system/linux/machine/generic/rsc_table.c.o:
relocation R_X86_64_PC32 against symbol `resources' can not be used when making a shared object;
recompile with -fPIC

Signed-off-by: Arnaud Pouliquen <[email protected]>
  • Loading branch information
arnopo committed Dec 11, 2024
1 parent e2fbb0a commit a628dde
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/legacy_apps/examples/rpc_demo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ foreach (_app ${app_list})

if (WITH_SHARED_LIB)
add_executable (${_app}-shared ${_sources})
target_compile_options (${_app}-shared PRIVATE "-fPIC")
target_link_libraries (${_app}-shared -shared ${OPENAMP_LIB} ${_deps})
install (TARGETS ${_app}-shared RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif (WITH_SHARED_LIB)
Expand Down

0 comments on commit a628dde

Please sign in to comment.