packaging: append -ldl -lpthread to ASan force options.
When building for address sanitization, some packages complain about
missing symbols due to omitted -ldl or -pthread. This patch appends
-ldl and -lpthread to the ASan force options in order to resolve this
kind of issue. Note that since -ldl and -lpthread are already needed
by libasan, adding them to the ASan force options should not cause any
problems.
This patch also adds -Wl,--as-needed before -ldl -lpthread in the
force options to prevent libdl or libpthread from being linked when
unnecessary.
Change-Id: Ic50059d4684e15773f56c589cfacda0bc944d955
Signed-off-by: Sangmin Seo <sangmin7.seo@samsung.com>