Fix ASan build 47/127247/2 accepted/tizen/4.0/unified/20170816.011055 accepted/tizen/unified/20170705.162934 submit/tizen/20170704.075025 submit/tizen/20170705.025138 submit/tizen_4.0/20170811.094300
authorGonzha Dmitriy Evgenevich <d.gonzha@samsung.com>
Wed, 26 Apr 2017 16:14:50 +0000 (19:14 +0300)
committerDong Sun Lee <ds73.lee@samsung.com>
Tue, 4 Jul 2017 05:33:48 +0000 (05:33 +0000)
Added server CMakeLists.txt option to add additional libraries
and -lpthread in .spec for asan build case

Change-Id: Ie03684ca0e9ccaa50db08c6d47a0858788ad87f9

packaging/auth-fw.spec
src/server/CMakeLists.txt

index 423b4f8cb06f67c6e4f9709584fc457618457791..a25e9c4f2031b1864e6960139813b05a43627380 100644 (file)
@@ -85,7 +85,8 @@ export LDFLAGS+="-Wl,--rpath=%{_libdir}"
         -DSOCK_PASSWD_CHECK=%{sock_passwd_check} \
         -DSOCK_PASSWD_SET=%{sock_passwd_set} \
         -DSOCK_PASSWD_RESET=%{sock_passwd_reset} \
-        -DSOCK_PASSWD_POLICY=%{sock_passwd_policy}
+        -DSOCK_PASSWD_POLICY=%{sock_passwd_policy} \
+        -DADDITIONAL_LIBRARIES=%{?asan:"-lpthread"}
 
 make %{?jobs:-j%jobs}
 
index e8b800559e40fda9ca57a6ba8f89b949159a02c0..d442c65fc97afec91f3e5bbeefe0294f1755f5cd 100644 (file)
@@ -45,6 +45,7 @@ TARGET_LINK_LIBRARIES(${TARGET_SERVER}
     ${SERVER_DEP_LIBRARIES}
     -pie
     -ldl
+    ${ADDITIONAL_LIBRARIES}
     )
 
 INSTALL(TARGETS ${TARGET_SERVER}