packaging: Enable LTO and set visibility to hidden
authorSlava Barinov <v.barinov@samsung.com>
Tue, 16 Jun 2020 13:54:47 +0000 (16:54 +0300)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 12 Dec 2022 06:39:20 +0000 (15:39 +0900)
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
-