add -Wl,--as-needed to global cflags (all the profiles) 73/61073/2
authorDongkyun, Son <dongkyun.s@samsung.com>
Fri, 4 Mar 2016 00:03:29 +0000 (09:03 +0900)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Thu, 10 Mar 2016 04:48:28 +0000 (20:48 -0800)
‘--as-needed’ is a linker option. It affects linking of dynamic
libraries which follow the ‘—as-needed’ flag on the linker command
line. Normally, the linker will generate a runtime dependency against
all dynamic libraries mentioned on command line regardless of whether
libraries are actually needed or not. ‘--as-needed’ option causes
dependency to be only emitted for a library that at that point in the
link.

Change-Id: Id7306902cfcb495825b9f708b55364479a8fb545
Signed-off-by: Dongkyun, Son <dongkyun.s@samsung.com>
Tizen:Base/_config

index fee4863..1e3e914 100644 (file)
@@ -170,7 +170,7 @@ Substitute: glibc-devel-32bit
 %endif
 
 ########## compilation flags ##########
-%define __global_cflags -O2 -g2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector -Wformat-security -fmessage-length=0
+%define __global_cflags -O2 -g2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector -Wformat-security -fmessage-length=0 -Wl,--as-needed
 
 Optflags: armv7l %{__global_cflags} --param=ssp-buffer-size=4 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -mthumb -Wp,-D__SOFTFP__ -Wl,-O1 -Wl,--hash-style=gnu -Wa,-mimplicit-it=thumb
 Optflags: aarch64 %{__global_cflags} -feliminate-unused-debug-types -Wformat -march=armv8-a+fp+simd+crc+crypto -mtune=cortex-a57.cortex-a53