packaging: Enable LTO and set visibility to hidden 83/236383/1 accepted/tizen/6.0/base/20201029.110008 accepted/tizen/6.0/base/tool/20201029.111701 accepted/tizen/6.0/base/tool/hotfix/20201030.124509 accepted/tizen/6.0/base/tool/hotfix/20201102.085627 accepted/tizen/6.5/base/tool/20211027.121810 accepted/tizen/base/tool/20200803.000045 submit/tizen_6.0_base/20201029.184802 submit/tizen_6.0_base_hotfix/20201030.192502 submit/tizen_6.0_base_hotfix/20201102.162702 submit/tizen_6.5_base/20211026.180901 submit/tizen_6.5_base/20211027.183101 submit/tizen_6.5_base/20211027.201201 submit/tizen_base/20200720.235336 submit/tizen_base/20200726.235124 submit/tizen_base/20201207.055733 submit/tizen_base/20201208.051231 submit/tizen_base/20201208.051733 tizen_6.0.m2_release tizen_6.5.m2_release
authorSlava Barinov <v.barinov@samsung.com>
Tue, 16 Jun 2020 13:54:47 +0000 (16:54 +0300)
committerSlava Barinov <v.barinov@samsung.com>
Tue, 16 Jun 2020 14:26:20 +0000 (17:26 +0300)
Change-Id: Ida0e9975246c14bd733cf2e98c7124edcf5fb869
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
packaging/bash.spec

index c6d9249c2abbbb813f3a992edc79e1e6ade2cecc..60863b5b396b2d658f049f12c7761ef8808f6193 100644 (file)
@@ -31,15 +31,15 @@ incorporates useful features from the Korn shell (ksh) and the C shell
 cp %{SOURCE1001} .
 
 %build
-CFLAGS+=" -fPIC"
-LDFLAGS+=" -pie"
+export CFLAGS+=" -fPIC -fvisibility=hidden -flto "
+export LDFLAGS+=" -pie -fvisibility=hidden -flto "
 autoconf
 %configure --enable-largefile \
-            --without-bash-malloc \
-            --disable-nls \
-            --enable-alias \
-            --enable-readline  \
-            --enable-history
+             --without-bash-malloc \
+             --disable-nls \
+             --enable-alias \
+             --enable-readline  \
+             --enable-history
 
 # Recycles pids is neccessary. When bash's last fork's pid was X
 # and new fork's pid is also X, bash has to wait for this same pid.
@@ -156,4 +156,3 @@ fi
 %{_bindir}/sh
 %{_bindir}/bash
 %dir %{_sysconfdir}/bash_completion.d
-