summaryrefslogtreecommitdiff
path: root/app-shells/bash
diff options
context:
space:
mode:
Diffstat (limited to 'app-shells/bash')
-rw-r--r--app-shells/bash/Manifest6
-rw-r--r--app-shells/bash/bash-5.2_rc2-r1.ebuild45
-rw-r--r--app-shells/bash/bash-9999.ebuild45
-rw-r--r--app-shells/bash/metadata.xml3
4 files changed, 68 insertions, 31 deletions
diff --git a/app-shells/bash/Manifest b/app-shells/bash/Manifest
index 1af41e4d33f6..bbf85c340d9f 100644
--- a/app-shells/bash/Manifest
+++ b/app-shells/bash/Manifest
@@ -390,6 +390,6 @@ EBUILD bash-4.3_p48-r2.ebuild 6035 BLAKE2B 408bffd82a0375ccfbe706fd3799a3dc34ce8
EBUILD bash-4.4_p23-r2.ebuild 6090 BLAKE2B d09c2e76a0766ec38ace27c76b5219a52a6fa5cf2ec87e932950e3d5e3f6dadb84a5e594863b53739314aaad953f5a5fd1427bd9101ab1b4ca69c38e37ba9847 SHA512 9507a94d51dfce866e7ffe36880ad1879cc8a328f941103fb12ff84ab05492edfebee5deab7a19d8f8ff192c2b180656a7e0227f417b771ec32702dc4b549367
EBUILD bash-5.0_p18.ebuild 7423 BLAKE2B ca28a57b4407a5971bdf25f477e4c6b40b6c2b1f79aaffaf778838f41490dcf7da7eb7dbe4652b47164210c25e764751f8ec60d4dc1c30751373bc0636d9d3ea SHA512 bddcc1a7813ed881f8ba6bf440a890f5ac633335e743ea1393082a6a55d99a3604b36271c6f15c9e2a7b06eefac1820f8f6ee4f92f582afc9ea86181c43ace6b
EBUILD bash-5.1_p16-r1.ebuild 8047 BLAKE2B 920477ad40a57b693a034c2a526b9769e90d6a8c71a7e956551f198e4cb84605abe32e580df99f78340c183e85590640f213b76a437b825d7710b5c5d755a493 SHA512 d3dba26ef514f9dd93c9743d73dd5ea6041e006bc3f4e5d330898f4579267d08d87cdd0634de57e7f740d065e6f4e518119c141447f691679a0b4a3df7a0a147
-EBUILD bash-5.2_rc2-r1.ebuild 8715 BLAKE2B 40799d55b67f941a09081a65356c7e537dd2eb065cd9da8da206ecb2a5c5693c5b684a02cb6b58588476ccdb6bdfa73ad68eabc8e7b305413727098195c5c597 SHA512 8cd04982a52473594a2329387ca40b828ff41176b6a506a65dbcf04ef8e0c3e2c3a5a9e43b1fea7ccb78a8bedcbaecaeef502f44bd865668deb80c246c0eb9b7
-EBUILD bash-9999.ebuild 8715 BLAKE2B d2dbc006f3cc1aed3a991729dd7b820d5ed2cf2fcf39d1d1776092a921df7cb0ab18281185584361c320f911318ab2e3214d35764497bc2b16746b39d4bec393 SHA512 fc0f13b6d2605329f62895ea951b62b122f3abc9f5a86ed25f2d499ed4b1907cf9b8ef44f47eaa6a81852287713697dec7a5268ef5332d89ebb7bca2d0ae1163
-MISC metadata.xml 872 BLAKE2B 44dab1d48a5fc7820a6c8c0f643142103c086c724a1f187ff981d463b9208197087729e2fcc0f37c78abef899fb08b292bb23b0775161cb20c8177d386d804f0 SHA512 476513729efb606963986b96231db6e8fc00757f026981ba4ea5d6a60fee4f6c16ac222466ed8e49bb6e15d0f2dfc5daea2f1f695d94d185c184cea6dbe2b017
+EBUILD bash-5.2_rc2-r1.ebuild 9300 BLAKE2B b7606ad969d6186c9a9d5c156d56a9c2c798cb96589ce30fd9064f184102d91c40c1650b00121ea1ef12dc5a5a81f4b61f91af5ac3c240a3a2428a8e46b36056 SHA512 233119c2e1133bdd194953921b396894dee24a9706a90cd029e36076f0d13298da45ee00d9a5f8b2dadeeca237ca6a995ba9959c07e3d934f5bdd707131c8d26
+EBUILD bash-9999.ebuild 9300 BLAKE2B 42bc50dc775a5c8b08a10a638384b03b30b4efdb42afc192e3149125d40d445857bbe50d6dbecc256199aa839af44e2c2f858e7630437fbd588375c5c6457e34 SHA512 4b1edc976d8fda2df2ffedae43e83ecdcd879432c7c78404e10d92e003c9362878469ac8ff6bfa84e172641c0c855d5d4d21455dac05bad60164eaaa5681ec75
+MISC metadata.xml 963 BLAKE2B cadf4453d8e9f77353fcae360e6d2b0a254303ba4ee422bd799be1d44733ca2833c1a2cf21c0ce30fdca365e70f0bb295f946669483c1d284ffa89fbffdf6a50 SHA512 51079c00a5d93eed4169a69fdae98c292df842de195bb8880319a582bf37ed1d1574ae57805ccf57baf0880391871c07b794487806257da3eab19744d8090e35
diff --git a/app-shells/bash/bash-5.2_rc2-r1.ebuild b/app-shells/bash/bash-5.2_rc2-r1.ebuild
index 3fa9e5592430..38b23139ba9a 100644
--- a/app-shells/bash/bash-5.2_rc2-r1.ebuild
+++ b/app-shells/bash/bash-5.2_rc2-r1.ebuild
@@ -70,7 +70,7 @@ SLOT="0"
if is_release ; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
-IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline"
+IUSE="afs bashlogger examples mem-scramble +net nls plugins pgo +readline"
DEPEND="
>=sys-libs/ncurses-5.2-r2:0=
@@ -84,7 +84,10 @@ RDEPEND="
"
# We only need yacc when the .y files get patched (bash42-005, bash51-011)
#BDEPEND="virtual/yacc"
-BDEPEND="verify-sig? ( sec-keys/openpgp-keys-chetramey )"
+BDEPEND="
+ pgo? ( dev-util/gperf )
+ verify-sig? ( sec-keys/openpgp-keys-chetramey )
+"
S="${WORKDIR}/${MY_P}"
@@ -186,16 +189,16 @@ src_configure() {
#use static && export LDFLAGS="${LDFLAGS} -static"
use nls || myconf+=( --disable-nls )
- # Historically, we always used the builtin readline, but since
- # our handling of SONAME upgrades has gotten much more stable
- # in the PM (and the readline ebuild itself preserves the old
- # libs during upgrades), linking against the system copy should
- # be safe.
- # Exact cached version here doesn't really matter as long as it
- # is at least what's in the DEPEND up above.
- export ac_cv_rl_version=${READLINE_VER%%_*}
-
if is_release ; then
+ # Historically, we always used the builtin readline, but since
+ # our handling of SONAME upgrades has gotten much more stable
+ # in the PM (and the readline ebuild itself preserves the old
+ # libs during upgrades), linking against the system copy should
+ # be safe.
+ # Exact cached version here doesn't really matter as long as it
+ # is at least what's in the DEPEND up above.
+ export ac_cv_rl_version=${READLINE_VER%%_*}
+
# Use system readline only with released versions.
myconf+=( --with-installed-readline=. )
fi
@@ -220,10 +223,24 @@ src_configure() {
}
src_compile() {
- emake
+ if use pgo ; then
+ # Build Bash and run its tests to generate profiles.
+ emake CFLAGS="${CFLAGS} -fprofile-generate=${T}/pgo -fprofile-dir=${T}/pgo"
- if use plugins ; then
- emake -C examples/loadables all others
+ # Used in test suite.
+ unset A
+
+ emake CFLAGS="${CFLAGS} -fprofile-generate=${T}/pgo -fprofile-dir=${T}/pgo" -k check
+
+ # Rebuild Bash using the profiling data we just generated.
+ emake clean
+ emake CFLAGS="${CFLAGS} -fprofile-use=${T}/pgo -fprofile-dir=${T}/pgo"
+
+ use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} -fprofile-use=${T}/pgo -fprofile-dir=${T}/pgo" all others
+ else
+ emake
+
+ use plugins && emake -C examples/loadables all others
fi
}
diff --git a/app-shells/bash/bash-9999.ebuild b/app-shells/bash/bash-9999.ebuild
index 065cb2bc6dee..3d2370ffe950 100644
--- a/app-shells/bash/bash-9999.ebuild
+++ b/app-shells/bash/bash-9999.ebuild
@@ -70,7 +70,7 @@ SLOT="0"
if is_release ; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
-IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline"
+IUSE="afs bashlogger examples mem-scramble +net nls plugins pgo +readline"
DEPEND="
>=sys-libs/ncurses-5.2-r2:0=
@@ -84,7 +84,10 @@ RDEPEND="
"
# We only need yacc when the .y files get patched (bash42-005, bash51-011)
#BDEPEND="virtual/yacc"
-BDEPEND="verify-sig? ( sec-keys/openpgp-keys-chetramey )"
+BDEPEND="
+ pgo? ( dev-util/gperf )
+ verify-sig? ( sec-keys/openpgp-keys-chetramey )
+"
S="${WORKDIR}/${MY_P}"
@@ -186,16 +189,16 @@ src_configure() {
#use static && export LDFLAGS="${LDFLAGS} -static"
use nls || myconf+=( --disable-nls )
- # Historically, we always used the builtin readline, but since
- # our handling of SONAME upgrades has gotten much more stable
- # in the PM (and the readline ebuild itself preserves the old
- # libs during upgrades), linking against the system copy should
- # be safe.
- # Exact cached version here doesn't really matter as long as it
- # is at least what's in the DEPEND up above.
- export ac_cv_rl_version=${READLINE_VER%%_*}
-
if is_release ; then
+ # Historically, we always used the builtin readline, but since
+ # our handling of SONAME upgrades has gotten much more stable
+ # in the PM (and the readline ebuild itself preserves the old
+ # libs during upgrades), linking against the system copy should
+ # be safe.
+ # Exact cached version here doesn't really matter as long as it
+ # is at least what's in the DEPEND up above.
+ export ac_cv_rl_version=${READLINE_VER%%_*}
+
# Use system readline only with released versions.
myconf+=( --with-installed-readline=. )
fi
@@ -220,10 +223,24 @@ src_configure() {
}
src_compile() {
- emake
+ if use pgo ; then
+ # Build Bash and run its tests to generate profiles.
+ emake CFLAGS="${CFLAGS} -fprofile-generate=${T}/pgo -fprofile-dir=${T}/pgo"
- if use plugins ; then
- emake -C examples/loadables all others
+ # Used in test suite.
+ unset A
+
+ emake CFLAGS="${CFLAGS} -fprofile-generate=${T}/pgo -fprofile-dir=${T}/pgo" -k check
+
+ # Rebuild Bash using the profiling data we just generated.
+ emake clean
+ emake CFLAGS="${CFLAGS} -fprofile-use=${T}/pgo -fprofile-dir=${T}/pgo"
+
+ use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} -fprofile-use=${T}/pgo -fprofile-dir=${T}/pgo" all others
+ else
+ emake
+
+ use plugins && emake -C examples/loadables all others
fi
}
diff --git a/app-shells/bash/metadata.xml b/app-shells/bash/metadata.xml
index 67efcea3d7d5..6ec75e4bd86f 100644
--- a/app-shells/bash/metadata.xml
+++ b/app-shells/bash/metadata.xml
@@ -19,6 +19,9 @@
<flag name="plugins">
Add support for loading builtins at runtime via 'enable'
</flag>
+ <flag name="pgo">
+ Optimize the build using Profile Guided Optimization (PGO)
+ </flag>
</use>
<upstream>
<bugs-to>mailto:bug-bash@gnu.org</bugs-to>