From: Nikolai Merinov Date: Wed, 13 Feb 2019 06:03:44 +0000 (+0300) Subject: Use -fPIC for the sources that will be part of a shared library X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e47b48dd893a132fae8045f9e1b8fad853932aa4;p=platform%2Fadaptation%2Fbroadcom%2Flibomxil-vc4.git Use -fPIC for the sources that will be part of a shared library --- diff --git a/interface/khronos/CMakeLists.txt b/interface/khronos/CMakeLists.txt index 9ad615b..d4e2f24 100755 --- a/interface/khronos/CMakeLists.txt +++ b/interface/khronos/CMakeLists.txt @@ -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}) diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt index fde18da..7978b27 100755 --- a/interface/vmcs_host/CMakeLists.txt +++ b/interface/vmcs_host/CMakeLists.txt @@ -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) diff --git a/opensrc/helpers/libfdt/CMakeLists.txt b/opensrc/helpers/libfdt/CMakeLists.txt index f57c61c..cf271ef 100755 --- a/opensrc/helpers/libfdt/CMakeLists.txt +++ b/opensrc/helpers/libfdt/CMakeLists.txt @@ -8,6 +8,7 @@ add_library(fdt fdt_sw.c fdt_strerror.c fdt_wip.c) +target_compile_options(fdt PUBLIC -fPIC) INSTALL(FILES)