From 09ebd6e4509eacd4ad71971fac013274a9c1cc06 Mon Sep 17 00:00:00 2001 From: Dongsun Lee Date: Mon, 19 Mar 2018 16:57:10 +0900 Subject: [PATCH] Fix ASAN build failure for relocation R_X86_64_PC32 against symbol Change-Id: If948594b3c34659b417128e4bc7daadffe0f90d0 Signed-off-by: Dongsun Lee --- CMakeLists.txt | 32 ++--------------------- initializer/CMakeLists.txt | 30 +++++++++++++++++++++ {service => initializer}/drm-tapps-initialize.cpp | 0 3 files changed, 32 insertions(+), 30 deletions(-) create mode 100644 initializer/CMakeLists.txt rename {service => initializer}/drm-tapps-initialize.cpp (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index a9d327a..b5c545e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,36 +88,6 @@ TARGET_LINK_LIBRARIES(${PROJECT_NAME} INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR}) ################################################################# -PKG_CHECK_MODULES(DRM_INITIALIZE_DEP - REQUIRED - db-util - dlog - openssl -) - -INCLUDE_DIRECTORIES(${DRM_INITIALIZE_DEP_INCLUDE_DIRS}) - -SET(DRMTAPPSINITIALIZE_SRCS - service/drm-tapps-initialize.cpp - tappsd/src/db/DTapps2SqlData.cpp - tappsd/src/db/DTapps2SqliteDB.cpp - tappsd/src/intf/drm_intf_tapps.cpp -) - -SET_SOURCE_FILES_PROPERTIES(${DRMTAPPSINITIALIZE_SRCS} - PROPERTIES - COMPILE_FLAGS "-fPIE" -) - -ADD_EXECUTABLE(${DRMTAPPSINITIALIZE} ${DRMTAPPSINITIALIZE_SRCS}) - -TARGET_LINK_LIBRARIES(${DRMTAPPSINITIALIZE} - ${DRM_INITIALIZE_DEP_LIBRARIES} - -pie -) - -INSTALL(TARGETS ${DRMTAPPSINITIALIZE} DESTINATION ${BIN_DIR}) -################################################################# CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY) INSTALL(FILES ${PROJECT_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) @@ -130,6 +100,8 @@ INSTALL(FILES include/drm-tizen-apps.h include/drm-tizen-error.h ################################################################# +ADD_SUBDIRECTORY(initializer) + IF(DEFINED BUILD_TEST_DRM_SERVICE_CORE_TIZEN) ADD_DEFINITIONS("-DTEST_DATA_DIR=\"${TEST_DATA_DIR}\"") ADD_SUBDIRECTORY(test) diff --git a/initializer/CMakeLists.txt b/initializer/CMakeLists.txt new file mode 100644 index 0000000..576ea75 --- /dev/null +++ b/initializer/CMakeLists.txt @@ -0,0 +1,30 @@ +################################################################# +PKG_CHECK_MODULES(DRM_INITIALIZE_DEP + REQUIRED + db-util + dlog + openssl +) + +INCLUDE_DIRECTORIES(${DRM_INITIALIZE_DEP_INCLUDE_DIRS}) + +SET(DRMTAPPSINITIALIZE_SRCS + ${PROJECT_SOURCE_DIR}/initializer/drm-tapps-initialize.cpp + ${PROJECT_SOURCE_DIR}/tappsd/src/db/DTapps2SqlData.cpp + ${PROJECT_SOURCE_DIR}/tappsd/src/db/DTapps2SqliteDB.cpp + ${PROJECT_SOURCE_DIR}/tappsd/src/intf/drm_intf_tapps.cpp +) + +SET_SOURCE_FILES_PROPERTIES(${DRMTAPPSINITIALIZE_SRCS} + PROPERTIES + COMPILE_FLAGS "-fPIE" +) + +ADD_EXECUTABLE(${DRMTAPPSINITIALIZE} ${DRMTAPPSINITIALIZE_SRCS}) + +TARGET_LINK_LIBRARIES(${DRMTAPPSINITIALIZE} + ${DRM_INITIALIZE_DEP_LIBRARIES} + -pie +) + +INSTALL(TARGETS ${DRMTAPPSINITIALIZE} DESTINATION ${BIN_DIR}) diff --git a/service/drm-tapps-initialize.cpp b/initializer/drm-tapps-initialize.cpp similarity index 100% rename from service/drm-tapps-initialize.cpp rename to initializer/drm-tapps-initialize.cpp -- 2.7.4