Support prelink feature 37/217837/2
authorHwankyu Jhun <h.jhun@samsung.com>
Fri, 15 Nov 2019 02:02:49 +0000 (11:02 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Fri, 15 Nov 2019 02:30:31 +0000 (11:30 +0900)
If the `_prelink_enable` is defined, the app_launcher tool will be
compiled without -pie option.

Change-Id: I0ece66dd0dbd040c8493d39376ba09b6045a55e2
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
packaging/aul.spec
tool/CMakeLists.txt

index 0322476..144beb0 100755 (executable)
@@ -56,6 +56,12 @@ Requires:   %{name} = %{version}-%{release}
 %description test
 Application utility library (test tools)
 
+%if "%{?_prelink_enable}" == "y"
+%define tizen_feature_prelink 1
+%else
+%define tizen_feature_prelink 0
+%endif
+
 %prep
 %setup -q
 sed -i 's|TZ_SYS_DB|%{TZ_SYS_DB}|g' %{SOURCE1001}
@@ -66,9 +72,14 @@ cp %{SOURCE1001} .
 CFLAGS="%{optflags} -D__emul__"; export CFLAGS
 %endif
 
+%if 0%{?tizen_feature_prelink}
+_TIZEN_FEATURE_PRELINK=ON
+%endif
+
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
 %cmake -DFULLVER=%{version} \
        -DMAJORVER=${MAJORVER} \
+       -D_TIZEN_FEATURE_PRELINK:BOOL=${_TIZEN_FEATURE_PRELINK} \
        .
 
 %__make %{?_smp_mflags}
index fd4c5d7..b63af07 100644 (file)
@@ -28,7 +28,15 @@ INSTALL(TARGETS launch_debug DESTINATION bin)
 
 add_executable(app_launcher
                app_launcher.c)
+
+IF(_TIZEN_FEATURE_PRELINK)
+message(STATUS "[__PRELINK__] Enable")
+target_link_libraries(app_launcher aul ${pkgs_LDFLAGS})
+ELSE(_TIZEN_FEATURE_PRELINK)
+message(STATUS "[__PRELINK__] Disable")
 target_link_libraries(app_launcher aul ${pkgs_LDFLAGS} "-pie")
+ENDIF(_TIZEN_FEATURE_PRELINK)
+
 INSTALL(TARGETS app_launcher DESTINATION bin)
 
 add_executable(appgroup_info