Use -fPIC for the sources that will be part of a shared library
authorNikolai Merinov <n.merinov@samsung.com>
Wed, 13 Feb 2019 06:03:44 +0000 (09:03 +0300)
committerNikolai Merinov <n.merinov@samsung.com>
Wed, 13 Feb 2019 06:27:08 +0000 (09:27 +0300)
interface/khronos/CMakeLists.txt
interface/vmcs_host/CMakeLists.txt
opensrc/helpers/libfdt/CMakeLists.txt

index 9ad615b8de6b6e7ba2ac4a03d466f2eba1409ff8..d4e2f2474cc010bc6a133957fa70ea2d12889f29 100755 (executable)
@@ -60,6 +60,7 @@ add_library(GLESv2 ${SHARED} ${GLES_SOURCE})
 add_library(OpenVG ${SHARED} ${VG_SOURCE})
 add_library(WFC ${SHARED} ${WFC_SOURCE})
 add_library(khrn_client ${CLIENT_SOURCE})
+target_compile_options(khrn_client PUBLIC -fPIC)
 
 # TODO do we need EGL_static and GLESv2_static now that khrn_static exists?
 add_library(EGL_static STATIC ${EGL_SOURCE})
index fde18dafc3ca3dea028dc272b54731b122c1a622..7978b271bf9d15a4dfb45d9830a479d62e0bce2a 100755 (executable)
@@ -6,6 +6,8 @@
 
 # vc_vchi_gencmd.c has a type-punning problem in vc_gencmd_read_response
 add_definitions(-fno-strict-aliasing)
+# vchostif will be part of the shared library
+add_definitions(-fPIC)
 
 include_directories(${VMCS_TARGET}/vcfiled)
 
index f57c61cbbf3765d4539196ad5fbfd78a4b020b9e..cf271efd1310a877be014e5bf299bce472c271db 100755 (executable)
@@ -8,6 +8,7 @@ add_library(fdt
             fdt_sw.c
             fdt_strerror.c
             fdt_wip.c)
+target_compile_options(fdt PUBLIC -fPIC)
 
 INSTALL(FILES)