apply ASLR 15/53315/1 accepted/tizen/mobile/20151204.062005 accepted/tizen/tv/20151204.062026 accepted/tizen/wearable/20151204.062050 submit/tizen/20151204.013647
authorHwankyu Jhun <h.jhun@samsung.com>
Fri, 4 Dec 2015 01:24:44 +0000 (10:24 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Fri, 4 Dec 2015 01:25:14 +0000 (10:25 +0900)
Change-Id: Ie675608a62692782ddce4ddb5fbbaa9a4d021063
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
CMakeLists.txt
test/CMakeLists.txt

index 940ccc9..1ea3eba 100644 (file)
@@ -86,19 +86,22 @@ ADD_EXECUTABLE(amd
        am_daemon/amd_app_group.c
        am_daemon/amd_cynara.c
        )
-TARGET_LINK_LIBRARIES(amd aul_mods aul ${pkgs_LDFLAGS})
+SET_TARGET_PROPERTIES(amd PROPERTIES COMPILE_FLAGS "${EXTRA_CFLAGS} -fPIE")
+TARGET_LINK_LIBRARIES(amd aul_mods aul ${pkgs_LDFLAGS} "-pie")
 INSTALL(TARGETS amd DESTINATION bin)
 
 # app_launcher
 SET(APP_LAUNCHER "app_launcher")
 ADD_EXECUTABLE(${APP_LAUNCHER} app_launcher.c)
-TARGET_LINK_LIBRARIES(${APP_LAUNCHER} aul aul_mods ${APP_LAUNCHER_DEPS_LDFLAGS})
+SET_TARGET_PROPERTIES(${APP_LAUNCHER} PROPERTIES COMPILE_FLAGS "${EXTRA_CFLAGS} -fPIE")
+TARGET_LINK_LIBRARIES(${APP_LAUNCHER} aul aul_mods ${APP_LAUNCHER_DEPS_LDFLAGS} "-pie")
 INSTALL(TARGETS app_launcher DESTINATION bin)
 
 # appgroup info tool
 SET(APPGROUP_INFO "appgroup_info")
 ADD_EXECUTABLE(${APPGROUP_INFO} tool/app_group_info.c)
-TARGET_LINK_LIBRARIES(${APPGROUP_INFO} aul aul_mods ${APPGROUP_INFO_DEPS_LDFLAGS})
+SET_TARGET_PROPERTIES(${APPGROUP_INFO} PROPERTIES COMPILE_FLAGS "${EXTRA_CFLAGS} -fPIE")
+TARGET_LINK_LIBRARIES(${APPGROUP_INFO} aul aul_mods ${APPGROUP_INFO_DEPS_LDFLAGS} "-pie")
 INSTALL(TARGETS appgroup_info DESTINATION bin)
 
 # pkgconfig file
index f9f65ed..899820f 100644 (file)
@@ -1,18 +1,18 @@
 # Test executables
 
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TEST_CFLAGS}")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TEST_CFLAGS} -fPIE")
 
 add_executable(aul_test
                aul_test.c)
-target_link_libraries(aul_test aul ${pkgs_LDFLAGS})
+target_link_libraries(aul_test aul ${pkgs_LDFLAGS} "-pie")
 INSTALL(TARGETS aul_test DESTINATION bin)
 
 add_executable(launch_app
                launch_app.c)
-target_link_libraries(launch_app aul ${pkgs_LDFLAGS})
+target_link_libraries(launch_app aul ${pkgs_LDFLAGS} "-pie")
 INSTALL(TARGETS launch_app DESTINATION bin)
 
 add_executable(open_app
                 open_app.c)
-target_link_libraries(open_app aul ${pkgs_LDFLAGS})
+target_link_libraries(open_app aul ${pkgs_LDFLAGS} "-pie")
 INSTALL(TARGETS open_app DESTINATION bin)