Updated: Mon Apr 26 12:19:54 AM CEST 2021

This commit is contained in:
Marcin Woźniak 2021-04-26 00:19:54 +02:00
parent 453645a038
commit 49b1b1c767
Signed by: y0rune
GPG Key ID: F204C385F57EB348
41 changed files with 3675 additions and 2105 deletions

768
bashrc.d/10-flag.sh Normal file
View File

@ -0,0 +1,768 @@
#!/bin/bash
# (C) Martin V\"ath <martin at mvath.de>
# SPDX-License-Identifier: GPL-2.0-only
FLAG_FILTER_C_CXX=(
'-fall-intrinsics'
'-fbackslash'
'-fcray-pointer'
'-fd-lines-as-*'
'-fdec*'
'-fdefault-*'
'-fdollar-ok'
'-ffixed-*'
'-ffree-*'
'-fimplicit-none'
'-finteger-4-integer-8'
'-fmax-identifier-length*'
'-fmodule-private'
'-fno-range-check'
'-freal-*'
'-ftest-forall-temp'
'-std=f*'
'-std=gnu'
'-std=legacy'
)
FLAG_FILTER_CXX_FORTRAN=(
'-std=c1*'
'-std=c8*'
'-std=c9*'
'-std=gnu1*'
'-std=gnu8*'
'-std=gnu9*'
'-std=iso*'
'-Wimplicit-function-declaration'
)
FLAG_FILTER_C_FORTRAN=(
'-fabi-*'
'-faligned-new'
'-fcheck-new'
'-fconcepts'
'-fconstexpr-*'
'-fdeduce-init-list'
'-fext*'
'-ffor-scope'
'-ffriend-injection'
'-fms-extensions'
'-fnew-inheriting-ctors'
'-fnew-ttp-matching'
'-fno-access-control'
'-fno-elide-constructors'
'-fno-enforce-eh-specs'
'-fno-extern-tls-init'
'-fno-for-scope'
'-fno-gnu-keywords'
'-fno-implement-inlines'
'-fno-implicit-*'
'-fno-nonansi-builtins'
'-fno-operator-names'
'-fno-optional-diags'
'-fno-pretty-templates'
'-fno-rtti'
'-fno-threadsafe-statics'
'-fno-use-cxa-get-exception-ptr'
'-fno-weak'
'-fnothrow-opt'
'-fpermissive'
'-frepo'
'-fsized-deallocation'
'-fstrict-enums'
'-fstrong-eval-order'
'-ftemplate-*'
'-fuse-cxa-atexit'
'-fvisibility-*'
'-nostdinc++'
'-std=c++*'
'-std=gnu++*'
'-Wabi*'
'-Wctor-dtor-privacy'
'-Wdelete-non-virtual-dtor'
'-Weffc++'
'-Wliteral-suffix'
'-Wlto-type-mismatch'
'-Wmultiple-inheritance'
'-Wnamespaces'
'-Wno-narrowing'
'-Wno-non-template-friend'
'-Wno-pmf-conversions'
'-Wno-terminate'
'-Wnoexcept'
'-Wnon-virtual-dtor'
'-Wold-style-cast'
'-Woverloaded-virtual'
'-Wregister'
'-Wreorder'
'-Wsign-promo'
'-Wstrict-null-sentinel'
'-Wtemplates'
'-Wvirtual-inheritance'
)
FLAG_FILTER_CFLAGS=(
)
FLAG_FILTER_CXXFLAGS=(
)
FLAG_FILTER_FORTRAN=(
'-ansi'
'-fallow-parameterless-variadic-functions'
'-fcilkplus'
'-fcond-mismatch'
'-fdirectives-only'
'-ffreestanding'
'-fgimple'
'-fgnu-tm'
'-fgnu89-inline'
'-fhosted'
'-flax-vector-conversions'
'-fms-extensions'
'-fno-asm'
'-fno-builtin*'
'-fno-signed-bitfields'
'-fno-unsigned-bitfields'
'-fpermitted-flt-eval-methods*'
'-fplan9-extensions'
'-fsigned-*'
'-fsso-struct*'
'-funsigned-*'
'-Wchkp'
'-Wclobbered'
'-Wformat*'
'-Wvolatile-register-var'
)
FLAG_FILTER_FFLAGS=(
)
FLAG_FILTER_FCFLAGS=(
)
FLAG_FILTER_F77FLAGS=(
)
FLAG_FILTER_NONGNU=(
'-fcf-protection*'
'-fdevirtualize-at-ltrans'
'-fdevirtualize-speculatively'
'-fdirectives-only'
'-ffat-lto-objects'
'-fgcse*'
'-fgraphite*'
'-finline-functions'
'-fipa-pta'
'-fira-loop-pressure'
'-fisolate-erroneous-paths-attribute'
'-fivopts'
'-flimit-function-alignment'
'-floop*'
'-flto=[0-9]*'
'-flto=auto'
'-flto=jobserver'
'-flto-partition=*'
'-flto-compression-level=*'
'-fmodulo*'
'-fno-enforce-eh-specs'
'-fno-ident'
'-fno-ipa-cp-clone'
'-fno-plt' # causes various runtime segfaults for clang:6 compiled code
'-fno-semantic-interposition'
'-fnothrow-opt'
'-fpredictive-commoning'
'-frename-registers'
'-freorder-functions'
'-frerun-cse-after-loop'
'-fsched*'
'-fsection-anchors'
'-fstack-clash-protection'
'-ftree*'
'-funsafe-loop*'
'-fuse-linker-plugin'
'-fvect-cost-model'
'-fweb'
'-fwhole-program'
'-malign-data*'
'-mfunction-return*'
'-mindirect-branch*'
'-mvectorize*'
'-Wl,-z,retpolineplt' # does not work, currently
)
FLAG_FILTER_GNU=(
'-emit-llvm'
'-flto=full'
'-flto=thin'
'-flto-jobs=*'
'-fopenmp=*'
'-frewrite-includes'
'-fsanitize=cfi'
'-fsanitize=safe-stack'
'-mllvm'
'-mretpoline*'
'-polly*'
'-Wl,-z,retpolineplt'
)
FlagEval() {
case $- in
*f*) eval "$*";;
*) set -f
eval "$*"
set +f;;
esac
}
FlagNodupAdd() {
local addres addf addvar dups
dups=$1
shift
addvar=$1
shift
eval addres=\$$addvar
for addf
do case " $addres $dups " in
*[[:space:]]"$addf"[[:space:]]*)
continue;;
esac
addres=$addres${addres:+\ }$addf
done
eval $addvar=\$addres
}
FlagAdd() {
FlagNodupAdd '' "$@"
}
FlagSub() {
local subres subpat subf subvar sublist
subvar=$1
shift
subres=
eval sublist=\$$subvar
for subf in $sublist
do for subpat
do [ -n "${subpat:++}" ] || continue
case $subf in
$subpat)
subf=
break;;
esac
done
[ -z "${subf:++}" ] || subres=$subres${subres:+\ }$subf
done
eval $subvar=\$subres
}
FlagReplace() {
local repres repf repcurr repvar reppat
repvar=$1
shift
eval repf=\$$repvar
reppat=$1
shift
repres=
for repcurr in $repf
do case $repcurr in
$reppat)
$repfound && FlagAdd repres "$@"
continue;;
esac
repres=$repres${repres:+\ }$repcurr
done
eval $repvar=\$repres
}
FlagSet() {
local setvar
setvar=$1
shift
eval $setvar=\$*
}
FlagAddCFlags() {
FlagAdd CFLAGS "$@"
FlagAdd CXXFLAGS "$@"
}
FlagSubCFlags() {
FlagSub CFLAGS "$@"
FlagSub CXXFLAGS "$@"
FlagSub CPPFLAGS "$@"
FlagSub OPTCFLAGS "$@"
FlagSub OPTCXXFLAGS "$@"
FlagSub OPTCPPFLAGS "$@"
}
FlagReplaceCFlags() {
FlagReplace CFLAGS "$@"
FlagReplace CXXFLAGS "$@"
FlagReplace CPPFLAGS "$@"
FlagSub OPTCFLAGS "$1"
FlagSub OPTCXXFLAGS "$1"
FlagSub OPTCPPFLAGS "$1"
}
FlagSetCFlags() {
FlagSet CFLAGS "$@"
CXXFLAGS=$CFLAGS
CPPFLAGS=
OPTCFLAGS=
OPTCXXFLAGS=
OPTCPPFLAGS=
}
FlagAddFFlags() {
FlagAdd FFLAGS "$@"
FlagAdd FCFLAGS "$@"
FlagAdd F77FLAGS "$@"
}
FlagSubFFlags() {
FlagSub FFLAGS "$@"
FlagSub FCFLAGS "$@"
FlagSub F77FLAGS "$@"
}
FlagReplaceFFlags() {
FlagReplace FFLAGS "$@"
FlagReplace FCFLAGS "$@"
FlagReplace F77FLAGS "$@"
}
FlagSetFFlags() {
FlagSet FFLAGS "$@"
FlagSet FCFLAGS "$@"
FlagSet F77FLAGS "$@"
}
FlagAddAllFlags() {
FlagAddCFlags "$@"
FlagAddFFlags "$@"
}
FlagSubAllFlags() {
FlagSubCFlags "$@"
FlagSubFFlags "$@"
FlagSub LDFLAGS "$@"
FlagSub OPTLDFLAGS "$@"
}
FlagReplaceAllFlags() {
FlagReplaceCFlags "$@"
FlagReplaceFFlags "$@"
FlagSub LDFLAGS "$1"
FlagSub OPTLDFLAGS "$1"
}
FlagSetAllFlags() {
FlagSetCFlags "$@"
FlagSetFFlags "$@"
LDFLAGS=
OPTLDFLAGS=
}
FlagAthlon() {
FlagSubCFlags '-march=*'
FlagAddCFlags '-march=athlon-4'
command -v x86_64-pc-linux-gnu-gcc32 >/dev/null 2>&1 && \
export CC=x86_64-pc-linux-gnu-gcc32
command -v x86_64-pc-linux-gnu-g++32 >/dev/null 2>&1 && \
export CXX=x86_64-pc-linux-gnu-g++32
}
FlagExecute() {
local ex exy excurr
for excurr
do case $excurr in
'#'*)
return;;
'!'*)
[ "$HOSTTYPE" = 'i686' ] || continue
ex=${excurr#?};;
'~'*)
[ "$HOSTTYPE" = 'x86_64' ] || continue
ex=${excurr#?};;
*)
ex=$excurr;;
esac
case $ex in
/*/*)
ex=${ex%/}
ex=${ex#/}
FlagEval FlagReplaceAllFlags "${ex%%/*}" "${ex#*/}";;
'-'*)
FlagAddCFlags "$ex";;
'+flto*')
FlagSubAllFlags '-flto*' '-fuse-linker-plugin' '-emit-llvm';;
'+'*)
FlagSubAllFlags "-${ex#+}";;
'C*FLAGS-='*)
FlagEval FlagSubCFlags ${ex#*-=};;
'C*FLAGS+='*)
FlagEval FlagAddCFlags ${ex#*+=};;
'C*FLAGS='*)
FlagEval FlagSetCFlags "${ex#*=}";;
'C*FLAGS/=/'*/*)
ex=${ex%/}
ex=${ex#*/=/}
FlagEval FlagReplaceCFlags "${ex%%/*}" "${ex#*/}";;
'F*FLAGS-='*)
FlagEval FlagSubFFlags ${ex#*-=};;
'F*FLAGS+='*)
FlagEval FlagAddFFlags ${ex#*+=};;
'F*FLAGS='*)
FlagEval FlagSetFFlags "${ex#*=}";;
'F*FLAGS/=/'*/*)
ex=${ex%/}
ex=${ex#*/=/}
FlagEval FlagReplaceFFlags "${ex%%/*}" "${ex#*/}";;
'*FLAGS-='*)
FlagEval FlagSubAllFlags ${ex#*-=};;
'*FLAGS+='*)
FlagEval FlagAddAllFlags ${ex#*+=};;
'*FLAGS='*)
FlagEval FlagSetAllFlags "${ex#*=}";;
'*FLAGS/=/'*/*)
ex=${ex%/}
ex=${ex#*/=/}
FlagEval FlagReplaceAllFlags "${ex%%/*}" "${ex#*/}";;
'ATHLON32')
FlagAthlon;;
'NOC*OPT='*|'NOC*='*)
FlagEval FlagSet NOCOPT "${ex#*=}"
NOCXXOPT=$NOCOPT
NOCPPOPT=$NOCOPT;;
'NO*OPT='*)
FlagEval FlagSet NOCOPT "${ex#*=}"
NOCXXOPT=$NOCOPT
NOCPPOPT=$NOCOPT
NOLDOPT=$NOCOPT;;
'NOLD*='*)
FlagEval FlagSet NOLDOPT "${ex#*=}"
NOLDADD=$NOLDOPT;;
'NO*'*)
FlagEval FlagSet NOCOPT "${ex#*=}"
NOCXXOPT=$NOCOPT
NOCPPOPT=$NOCOPT
NOLDOPT=$NOCOPT
NOLDADD=$NOCOPT
NOFFLAGS=$NOCOPT
NOFCFLAGS=$NOCOPT
NOF77FLAGS=$NOCOPT;;
'SAFE')
NOCOPT=1
NOCXXOPT=1
NOCPPOPT=1
NOLDOPT=1
MESONDEDUP=1
LDFLAGS=
CONFIG_SITE=
NOLAFILEREMOVE=1
unset CMAKE_MAKEFILE_GENERATOR;;
*' '*'='*)
FlagEval "$ex";;
*'/=/'*'/'*)
ex=${ex%/}
exy=${ex#*/=/}
FlagEval FlagReplace "${ex%%/=/*}" "${exy%%/*}" "${exy#*/}";;
*'-='*)
FlagEval FlagSub "${ex%%-=*}" ${ex#*-=};;
*'+='*)
FlagEval FlagAdd "${ex%%+=*}" ${ex#*+=};;
*'='*)
FlagEval FlagSet "${ex%%=*}" "${ex#*=}";;
*)
FlagEval "$ex";;
esac
done
}
FlagMask() {
if command -v masked-packages >/dev/null 2>&1
then
FlagMask() {
masked-packages -qm "$1" -- "$CATEGORY/$PF:${SLOT:-0}${PORTAGE_REPO_NAME:+::}${PORTAGE_REPO_NAME-}"
}
else
FlagMask() {
local add=
case ${1%::*} in
*':'*)
add=:${SLOT:-0};;
esac
case $1 in
*'::'*)
add=$add::$PORTAGE_REPO_NAME;;
esac
case $1 in
'~'*)
case "~$CATEGORY/$PN-$PV$add" in
$1)
return;;
esac;;
'='*)
case "=$CATEGORY/$PF$add" in
$1)
return;;
esac;;
*)
case "$CATEGORY/$PN$add" in
$1)
return;;
esac;;
esac
return 1
}
fi
FlagMask "$@"
}
FlagParseLine() {
local scanp scanl scansaveifs
scanl=$2
while :
do case $scanl in
[[:space:]]*)
scanl=${scanl#?}
continue;;
'#'*)
return;;
*[[:space:]]*)
break;;
esac
return
done
scanp=${scanl%%[[:space:]]*}
scanl=${scanl#*[[:space:]]}
[ -n "${scanl:++}" ] || return 0
FlagMask "$scanp" || return 0
scansaveifs=$IFS
IFS=$1
BashrcdEcho "$scanfile -> $scanp: $scanl"
FlagEval FlagExecute $scanl
IFS=$scansaveifs
}
FlagScanFiles() {
local scanfile scanl oldifs scanifs
scanifs=$IFS
IFS=
for scanfile
do [ -z "${scanfile:++}" ] && continue
test -r "$scanfile" || continue
while read -r scanl
do FlagParseLine "$scanifs" "$scanl"
done <"$scanfile"
done
IFS=$scanifs
}
FlagScanDir() {
local scantmp scanifs scanfile
scanifs=$IFS
if test -d "$1"
then IFS='
'
for scantmp in `find -L "$1" \
'(' '(' -name '.*' -o -name '*~' ')' -prune ')' -o \
-type f -print`
do IFS=$scanifs
FlagScanFiles "$scantmp"
done
else FlagScanFiles "$1"
fi
scanfile='FLAG_ADDLINES'
IFS='
'
for scantmp in $FLAG_ADDLINES
do FlagParseLine "$scanifs" "$scantmp"
done
IFS=$scanifs
}
FlagSetUseNonGNU() {
case $CC$CXX in
*clang*)
return 0;;
esac
return 1
}
FlagSetNonGNU() {
: ${NOLDADD:=1}
FlagSubAllFlags "${FLAG_FILTER_NONGNU[@]}"
FlagReplaceAllFlags '-fstack-check*' '-fstack-check'
# FlagAddCFlags '-flto' '-emit-llvm'
}
FlagSetGNU() {
FlagSubAllFlags "${FLAG_FILTER_GNU[@]}"
}
FlagMesonDedup() {
local newld=
FlagNodupAdd "$CFLAGS $CXXFLAGS $CPPFLAGS $FFLAGS $FCFLAGS $F77FLAGS" \
newld $LDFLAGS
LDFLAGS=$newld
}
FlagSetFlags() {
local ld i
ld=
: ${PGO_PARENT:=/var/cache/pgo}
: ${PGO_DIR:=$PGO_PARENT/$CATEGORY:$P}
FlagScanDir "${PORTAGE_CONFIGROOT%/}/etc/portage/package.cflags"
[ -z "${USE_NONGNU++}" ] && FlagSetUseNonGNU && USE_NONGNU=1
if BashrcdTrue "${USE_NONGNU-}"
then FlagSetNonGNU
else FlagSetGNU
fi
if [ -n "$FLAG_ADD" ]
then BashrcdEcho "FLAG_ADD: $FLAG_ADD"
FlagEval FlagExecute "$FLAG_ADD"
fi
PGO_DIR=${PGO_DIR%/}
case ${PGO_DIR:-/} in
/)
error 'PGO_DIR must not be empty'
false;;
/*)
:;;
*)
error 'PGO_DIR must be an absolute path'
false;;
esac || {
die 'Bad PGO_DIR'
exit 2
}
use_pgo=false
if test -r "$PGO_DIR"
then unset PGO
BashrcdTrue $NOPGO || use_pgo=:
fi
if BashrcdTrue $PGO
then FlagAddCFlags "-fprofile-generate=$PGO_DIR" \
-fvpt -fprofile-arcs
FlagAdd LDFLAGS -fprofile-arcs
addpredict "$PGO_PARENT"
elif $use_pgo
then FlagAddCFlags "-fprofile-use=$PGO_DIR" \
-fvpt -fbranch-probabilities -fprofile-correction
else : ${KEEPPGO:=:}
fi
BashrcdTrue $NOLDOPT || FlagAdd LDFLAGS $OPTLDFLAGS
BashrcdTrue $NOCADD || BashrcdTrue $MESONDEDUP || \
case " $LDFLAGS $CFLAGS $CXXFLAGS" in
*[[:space:]]'-flto'*)
ld="$CFLAGS $CXXFLAGS";;
esac
BashrcdTrue $NOLDADD || BashrcdTrue $MESONDEDUP || FlagAddCFlags $LDFLAGS
FlagAdd LDFLAGS $ld
BashrcdTrue $NOCOPT || FlagAdd CFLAGS $OPTCFLAGS
BashrcdTrue $NOCXXOPT || FlagAdd CXXFLAGS $OPTCXXFLAGS
BashrcdTrue $NOCPPOPT || FlagAdd CPPFLAGS $OPTCPPFLAGS
BashrcdTrue $NOFFLAGS || FFLAGS=$CFLAGS
BashrcdTrue $NOFCFLAGS || FCFLAGS=$FFLAGS
BashrcdTrue $NOF77FLAGS || F77FLAGS=$FFLAGS
BashrcdTrue $NOFILTER_CXXFLAGS || FlagSub CXXFLAGS \
"${FLAG_FILTER_C_CXX[@]}" "${FLAG_FILTER_CXX_FORTRAN[@]}" \
"${FLAG_FILTER_CXXFLAGS[@]}"
BashrcdTrue $NOFILTER_CFLAGS || FlagSub CFLAGS \
"${FLAG_FILTER_C_CXX[@]}" "${FLAG_FILTER_C_FORTRAN[@]}" \
"${FLAG_FILTER_CFLAGS[@]}"
BashrcdTrue $NOFILTER_FFLAGS || FlagSub FFLAGS \
"${FLAG_FILTER_C_FORTRAN[@]}" "${FLAG_FILTER_CXX_FORTRAN[@]}" \
"${FLAG_FILTER_FORTRAN[@]}" "${FLAG_FILTER_FFLAGS[@]}"
BashrcdTrue $NOFILTER_FCFLAGS || FlagSub FCFLAGS \
"${FLAG_FILTER_C_FORTRAN[@]}" "${FLAG_FILTER_CXX_FORTRAN[@]}" \
"${FLAG_FILTER_FORTRAN[@]}" "${FLAG_FILTER_FCFLAGS[@]}"
BashrcdTrue $NOFILTER_F77FLAGS || FlagSub FCFLAGS \
"${FLAG_FILTER_C_FORTRAN[@]}" "${FLAG_FILTER_CXX_FORTRAN[@]}" \
"${FLAG_FILTER_FORTRAN[@]}" "${FLAG_FILTER_F77LAGS[@]}"
! BashrcdTrue $MESONDEDUP || FlagMesonDedup
unset OPTCFLAGS OPTCXXFLAGS OPTCPPFLAGS OPTLDFLAGS
unset NOLDOPT NOLDADD NOCOPT NOCXXOPT NOFFLAGS NOFCFLAGS NOF77FLAGS
unset NOFILTER_CXXFLAGS NOFILTER_CFLAGS
unset NOFILTER_FFLAGS NOFILTER_FCFLAGS NOFILTER_F77FLAGS
}
FlagInfoExport() {
local out
for out in FEATURES CFLAGS CXXFLAGS CPPFLAGS FFLAGS FCFLAGS F77FLAGS \
LDFLAGS MAKEOPTS EXTRA_ECONF EXTRA_EMAKE USE_NONGNU
do eval "if [ -n \"\${$out:++}\" ]
then export $out
BashrcdEcho \"$out='\$$out'\"
else unset $out
fi"
done
if BashrcdTrue $PGO
then BashrcdEcho "Create PGO into $PGO_DIR"
elif $use_pgo
then BashrcdEcho "Using PGO from $PGO_DIR"
fi
out=`${CC:-gcc} --version | head -n 1` || out=
BashrcdEcho "${out:-cannot determine gcc version}"
out=`${CXX:-g++} --version | head -n 1` || out=
BashrcdEcho "${out:-cannot determine g++ version}"
out=`${LD:-ld} --version | head -n 1` || out=
BashrcdEcho "${out:-cannot determine ld version}"
BashrcdEcho "`uname -a`"
}
FlagCompile() {
eerror \
"${PORTAGE_CONFIGROOT%/}/etc/portage/bashrc.d/*flag.sh strange order of EBUILD_PHASE:"
die "compile or preinst before setup"
exit 2
}
FlagPreinst() {
FlagCompile
}
FlagSetup() {
FlagCompile() {
:
}
local use_pgo
FlagSetFlags
if BashrcdTrue $PGO
then
FlagPreinst() {
test -d "$PGO_DIR" || mkdir -p -m +1777 -- "$PGO_DIR" || {
eerror "cannot create pgo directory $PGO_DIR"
die 'cannot create PGO_DIR'
exit 2
}
ewarn "$CATEGORY/$PN will write profile info to world-writable"
ewarn "$PGO_DIR"
ewarn 'Reemerge it soon for an optimized version and removal of that directory'
}
elif BashrcdTrue $KEEPPGO
then
FlagPreinst() {
:
}
else
FlagPreinst() {
test -d "$PGO_DIR" || return 0
BashrcdLog "removing pgo directory $PGO_DIR"
rm -r -f -- "$PGO_DIR" || {
eerror "cannot remove pgo directory $PGO_DIR"
die 'cannot remove PGO_DIR'
exit 2
}
local g
g=${PGO_DIR%/*}
[ -z "$g" ] || rmdir -p -- "$g" >/dev/null 2>&1
}
fi
FlagInfoExport
}
BashrcdPhase compile FlagCompile
BashrcdPhase preinst FlagPreinst
BashrcdPhase setup FlagSetup

47
bashrc.d/20-title.sh Normal file
View File

@ -0,0 +1,47 @@
#!/bin/bash
# (C) Martin V\"ath <martin at mvath.de>
# SPDX-License-Identifier: GPL-2.0-only
QlopSetup() {
local num sec hour min date
! BashrcdTrue "${NOQLOP-}" && command -v qlop >/dev/null 2>&1 || return 0
qlop -amH -- "$CATEGORY/$PN"
qlop -tmH -- "$CATEGORY/$PN"
command -v title >/dev/null 2>&1 || return 0
num=$(tail -n1 /var/log/emerge.log | \
sed -e 's/^.*(\([0-9]*\) of \([0-9]*\)).*$/\1|\2/') \
&& [ -n "$num" ] || {
date=$(date +%T)
title "emerge $date $PN"
return
}
case ${QLOPCOUNT:-1} in
*[!0123456789]*)
sec=$(qlop -ACMm -- "$CATEGORY/$PN" | awk \
'/[[:space:]][0123456789]+$/{a=$NF}
END{if(a!=""){print a}}');;
[123456789]*)
sec=$(qlop -tCMm -- "$CATEGORY/$PN" | \
awk -v 'i=0' -v 'm=0' -v "n=${QLOPCOUNT:-3}" \
'/[[:space:]][0123456789]+$/{a[i++]=$NF;if(i>m){m=i};if(i>=n){i=0}}
END{s=0;for(i=m;i>0;){s+=a[--i]};if(m>0){print int(s/m+1/2)}}');;
*)
false;;
esac && [ -n "$sec" ] || {
date=$(date +%T)
title "emerge $date $num $PN"
return
}
hour=$(( $sec / 3600 ))
[ "$hour" -gt 0 ] || hour=
hour=$hour${hour:+:}
sec=$(( $sec % 3600 ))
min=$(( $sec / 60 ))
sec=$(( $sec % 60 ))
[ "$min" -gt 9 ] || min=0$min
[ "$sec" -gt 9 ] || sec=0$sec
date=$(date +%T)
title "emerge $date $num $PN $hour$min:$sec"
}
BashrcdPhase setup QlopSetup

1
bashrc.d/41-lto-patch.sh Symbolic link
View File

@ -0,0 +1 @@
/var/db/repos/lto-overlay/sys-config/ltoize/files/bashrc.d/41-lto-patch.sh

View File

@ -0,0 +1 @@
/var/db/repos/lto-overlay/sys-config/ltoize/files/bashrc.d/43-lto-no-common.sh

42
bashrc.d/50-ccache.sh Normal file
View File

@ -0,0 +1,42 @@
#!/bin/bash
# (C) Martin V\"ath <martin at mvath.de>
# SPDX-License-Identifier: GPL-2.0-only
# Portage explicitly unsets all CCACHE_* variables in each phase.
# Therefore, we save them to BASHRCD_CCACHE_* in the setup phase;
# in all later phases, we restore CCACHE_* from these variables
CcacheSetup() {
local i
: ${CCACHE_BASEDIR=${PORTAGE_TMPDIR:-/var/tmp}/portage}
: ${CCACHE_SLOPPINESS='file_macro,time_macros,include_file_mtime,include_file_ctime,file_stat_matches,pch_defines'}
: ${CCACHE_COMPRESS=true}
if BashrcdTrue $USE_NONGNU && BashrcdTrue $CCACHE_CPP2_OPTIONAL
then : ${CCACHE_CPP2=true}
fi
# Default to NOHASHDIR unless contrary is specified
BashrcdTrue "${CCACHE_HASHDIR-}" || CCACHE_NOHASHDIR=true
for i in ${!CCACHE_*}
do if eval "BashrcdTrue \$$i"
then eval BASHRCD_$i=\$$i
export $i
else unset $i
fi
done
CcacheRestore() {
local i j
unset ${!CCACHE_*}
for i in ${!BASHRCD_CCACHE_*}
do j=${i##BASHRCD_}
eval $j=\$$i
export $j
done
}
}
CcacheRestore() {
:
}
# Register CcacheRestore before CcacheSetup to save time in setup phase
BashrcdPhase all CcacheRestore
BashrcdPhase setup CcacheSetup

412
bashrc.d/80-localepurge.sh Normal file
View File

@ -0,0 +1,412 @@
#!/bin/bash
# (C) Martin V\"ath <martin at mvath.de>
# SPDX-License-Identifier: GPL-2.0-only
ALL_LOCALES="
aa
af
af_ZA
am
am_ET
ang
ar
ar_AE
ar_BH
ar_DZ
ar_EG
ar_IN
ar_IQ
ar_JO
ar_KW
ar_LB
ar_LY
ar_MA
ar_OM
ar_QA
ar_SA
ar_SD
ar_SY
ar_TN
ar_YE
as
ast
az
az_AZ
az_IR
be
be@latin
be_BY
bg
bg_BG
bn
bn_IN
br
br_FR
bs
bs_BA
byn
ca
ca@valencia
ca_ES
ca_ES@euro
ca_ES@valencia
chs
cht
crh
cs
cs_CZ
cy
cy_GB
cz
da
da_DK
de
de_AT
de_AT@euro
de_BE
de_BE@euro
de_CH
de_DE
de_DE.UTF-8
de_DE@euro
de_LU
de_LU@euro
dk
dv
dz
el
el_GR
el_GR.UTF-8
el_GR@euro
en
en@IPA
en@boldquot
en@quot
en@shaw
en_AU
en_BW
en_CA
en_DK
en_GB
en_GB.UTF-8
en_HK
en_IE
en_IE@euro
en_IN
en_NZ
en_PH
en_RN
en_SG
en_UK
en_US
en_US.UTF-8
en_ZA
en_ZW
eo
eo_EO
es
es_AR
es_BO
es_CL
es_CO
es_CR
es_DO
es_EC
es_ES
es_ES.UTF-8
es_ES@euro
es_GT
es_HN
es_MX
es_NI
es_PA
es_PE
es_PR
es_PY
es_SV
es_US
es_UY
es_VE
et
et_EE
eu
eu_ES
eu_ES@euro
fa
fa_IR
fa_IR.UTF-8
fi
fi_FI
fi_FI@euro
fo
fo_FO
fr
fr_BE
fr_BE@euro
fr_CA
fr_CH
fr_FR
fr_FR.UTF-8
fr_FR@euro
fr_LU
fr_LU@euro
fur
fy
ga
ga_IE
ga_IE@euro
gd
gd_GB
gez
gl
gl_ES
gl_ES@euro
gr
gu
gv
gv_GB
haw
he
he_IL
hi
hi_IN
hi_IN.UTF-8
hr
hr_HR
hu
hu_HU
hy
hy_AM
ia
id
id_ID
is
is_IS
it
it_CH
it_IT
it_IT@euro
iu
iw
iw_IL
ja
ja_JP
ja_JP.EUC
ja_JP.EUC-JP
ja_JP.UTF-8
ja_JP.eucJP
ka
ka_GE
kk
kl
kl_GL
km
km_KH
kn
ko
ko_KR
ko_KR.EUC-KR
ko_KR.UTF-8
kok
ku
kw
kw_GB
ky
la
lg
li
lo
lt
lt_LT
lv
lv_LV
mai
mg
mhr
mi
mi_NZ
mk
mk_MK
ml
mn
mr
mr_IN
mr_IN.UTF-8
ms
ms_MY
mt
mt_MT
my
my_MM
nb
nb_NO
nds
ne
nl
nl_BE
nl_BE@euro
nl_NL
nl_NL@euro
nn
nn_NO
no
no_NO
nso
nyc
oc
oc_FR
om
or
pa
pl
pl_PL
ps
pt
pt_BR
pt_PT
pt_PT@euro
rm
ro
ro_RO
ru
ru_RU
ru_RU.KOI8-R
ru_RU.UTF-8
ru_UA
rw
sa
si
sid
sk
sk_SK
sl
sl_SI
so
sp
sq
sq_AL
sr
sr@Latn
sr@ije
sr@latin
sr_RS
sr_YU
sr_YU@cyrillic
sv
sv_FI
sv_FI@euro
sv_SE
sw
syr
ta
ta_IN
te
te_IN
tg
tg_TJ
th
th_TH
ti
ti_ER
ti_ET
tig
tk
tl
tl_PH
tr
tr_TR
tt
tt_RU
ug
uk
uk_UA
ur
ur_PK
uz
uz@Latn
uz_UZ
ve
vi
vi_VN
vi_VN.UTF-8
wa
wal
wo
xh
yi
yi_US
zh
zh_CN
zh_CN.GB18030
zh_CN.GB2312
zh_CN.GBK
zh_CN.UTF-8
zh_HK
zh_HK.UTF-8
zh_SG
zh_TW
zh_TW.Big5
zh_TW.EUC-TW
zh_TW.UTF-8
zu
"
LocalePurgeNokeep() {
local locale_keep
for locale_keep in $KEEP_LOCALES
do case $1 in
$locale_keep)
return 1;;
esac
done
}
LocalePurgeMain() {
local locale_list locale_item locale_cmd
locale_list=
for locale_item in $ALL_LOCALES ${ALL_LOCALES_ADD-}
do [ -n "$locale_item" ] && LocalePurgeNokeep "$locale_item" && \
locale_list=$locale_list' '$locale_item
done
locale_cmd='for d
do for l in $locale_list
do if test -d "$d/$l$k"
then rm -rvf -- "$d/$l"
fi
done
done'
export locale_list
shell=`command -v sh` || shell=
: ${shell:=/bin/sh}
if BashrcdTrue $LOCALEPURGE
then einfo 'removing undesired locales'
find "$ED" -name locale -type d \
-exec "$shell" -c "k='/LC_MESSAGES'
$locale_cmd" sh '{}' '+'
fi
if BashrcdTrue $MANPURGE
then einfo 'removing undesired manpages'
find "$ED" -name man -type d \
-exec "$shell" -c "k=
$locale_cmd" sh '{}' '+'
fi
unset locale_list
}
LocalePurge() {
if BashrcdTrue $NOLOCALEPURGE || {
! BashrcdTrue $LOCALEPURGE && ! BashrcdTrue $MANPURGE
} || [ -z "${KEEP_LOCALES++}" ]
then return 0
fi
case $- in
*f*)
LocalePurgeMain;;
*)
set -f
LocalePurgeMain
set +f;;
esac
}
BashrcdPhase preinst LocalePurge

25
bashrc.d/80-remove_la.sh Normal file
View File

@ -0,0 +1,25 @@
#!/bin/bash
# (C) Martin V\"ath <martin at mvath.de>
# SPDX-License-Identifier: GPL-2.0-only
Remove_la() {
BashrcdTrue $NOLAFILEREMOVE && return
# Some packages are known to rely on .la files (e.g. for building of plugins):
case "$CATEGORY/$PN" in
'media-libs/gst-plugins-base'|'media-libs/libsidplay')
return 0;;
esac
einfo 'removing unneeded *.la files'
local shell
shell=`command -v sh` || shell=
: ${shell:=/bin/sh}
Dexport=$ED find "$ED" -name '*.la' '!' -name 'libltdl.la' \
-exec "$shell" -c "for i
do if grep -q -- '^shouldnotlink=no\$' \"\$i\"
then printf '\\t%s\\n' \"\${i#\$Dexport}\"
rm -- \"\$i\" || echo 'removing failed!'
fi
done" sh '{}' '+'
}
BashrcdPhase preinst Remove_la

BIN
bashrc.d/README.bz2 Normal file

Binary file not shown.

86
bashrc.d/bashrcd.sh Normal file
View File

@ -0,0 +1,86 @@
#!/bin/bash
# (C) Martin V\"ath <martin at mvath.de>
# SPDX-License-Identifier: GPL-2.0-only
BashrcdTrue() {
case ${1:-n} in
[nNfF]*|[oO][fF]*|0|-)
return 1;;
esac
:
}
BashrcdLog() {
local i m=elog
BashrcdTrue $BASHRCDNOLOG && m=einfo
for i
do $m "$i"
done
}
BashrcdEcho() {
local i m=einfo
BashrcdTrue $BASHRCDLOG && m=elog
for i
do $m "$i"
done
}
BashrcdPhase() {
local c
eval c=\${bashrcd_phases_c_$1}
if [ -n "${c:++}" ]
then c=$(( $c + 1 ))
else c=0
fi
eval "bashrcd_phases_c_$1=\$c
bashrcd_phases_${c}_$1=\$2"
}
BashrcdMain() {
local bashrcd
for bashrcd in "${PORTAGE_CONFIGROOT%/}/etc/portage/bashrc.d/"*.sh
do case $bashrcd in
*'/bashrcd.sh')
continue;;
esac
test -r "$bashrcd" || continue
. "$bashrcd"
BashrcdTrue $BASHRCD_DEBUG && BashrcdEcho "$bashrcd sourced"
done
unset -f BashrcdPhase
BashrcdMain() {
local bashrcd_ebuild_phase bashrcd_phase bashrcd_num bashrcd_max
bashrcd_ebuild_phase=$EBUILD_PHASE
[ -n "${bashrcd_ebuild_phase:++}" ] || [ $# -eq 0 ] || bashrcd_ebuild_phase=$1
: ${ED:=${D%/}${EPREFIX%/}/}
BashrcdTrue $BASHRCD_DEBUG && BashrcdEcho \
"$0: $* ($# args)" \
"EBUILD_PHASE=$EBUILD_PHASE" \
"PORTDIR=$PORTDIR" \
"CATEGORY=$CATEGORY" \
"P=$P" \
"USER=$USER" \
"UID=$UID" \
"HOME=$HOME" \
"PATH=$PATH" \
"ROOT=$ROOT" \
"PORTAGE_CONFIGROOT=$PORTAGE_CONFIGROOT" \
"LD_PRELOAD=$LD_PRELOAD" \
"EPREFIX=$EPREFIX" \
"D=$D" \
"ED=$ED"
for bashrcd_phase in all "$bashrcd_ebuild_phase"
do eval bashrcd_max=\${bashrcd_phases_c_$bashrcd_phase}
[ -z "${bashrcd_max:++}" ] && continue
bashrcd_num=0
while {
eval eval \"\\\${bashrcd_phases_${bashrcd_num}_$bashrcd_phase}\"
[ $bashrcd_num -ne $bashrcd_max ]
}
do bashrcd_num=$(( $bashrcd_num + 1 ))
done
done
}
BashrcdMain "$@"
}

BIN
env/.no-fno-lto.conf.un~ vendored Normal file

Binary file not shown.

BIN
env/.notmpfs.conf.un~ vendored Normal file

Binary file not shown.

6
env/llvm-repair.conf vendored Normal file
View File

@ -0,0 +1,6 @@
COMMON_FLAGS="-flto -O3 -march=haswell -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
LDFLAGS="-Wl,-O1 -Wl,--no-as-needed"

5
env/mega.conf vendored Normal file
View File

@ -0,0 +1,5 @@
COMMON_FLAGS="-march=native -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"

1
env/no-fno-lto.conf vendored Normal file
View File

@ -0,0 +1 @@
CFLAGS="${CFLAGS} -fno-lto"

5
env/no-lto.conf vendored Normal file
View File

@ -0,0 +1,5 @@
COMMON_FLAGS="-march=native -O3 -pipe -fno-strict-aliasing"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"

1
env/notmpfs.conf vendored Normal file
View File

@ -0,0 +1 @@
PORTAGE_TMPDIR="/var/tmpnotmpfs"

View File

@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.11.11-gentoo Kernel Configuration
# Linux/x86 5.11.12-gentoo Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="x86_64-pc-linux-gnu-gcc (Gentoo 10.2.0-r5 p6) 10.2.0"
CONFIG_CC_IS_GCC=y
@ -195,8 +195,7 @@ CONFIG_RD_LZO=y
CONFIG_RD_LZ4=y
CONFIG_RD_ZSTD=y
# CONFIG_BOOT_CONFIG is not set
# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set
CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y
CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_LD_ORPHAN_WARN=y
CONFIG_SYSCTL=y
@ -6081,6 +6080,7 @@ CONFIG_STAGING=y
#
# Android
#
# CONFIG_ASHMEM is not set
# end of Android
# CONFIG_LTE_GDM724X is not set
@ -6345,7 +6345,11 @@ CONFIG_RAS=y
#
# Android
#
# CONFIG_ANDROID is not set
CONFIG_ANDROID=y
CONFIG_ANDROID_BINDER_IPC=y
CONFIG_ANDROID_BINDERFS=y
CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder"
CONFIG_ANDROID_BINDER_IPC_SELFTEST=y
# end of Android
# CONFIG_LIBNVDIMM is not set

View File

@ -10,7 +10,6 @@ acct-group/kvm
acct-group/ldap
acct-group/lp
acct-group/lpadmin
acct-group/lxc
acct-group/mail
acct-group/man
acct-group/messagebus
@ -20,21 +19,17 @@ acct-group/pcap
acct-group/plugdev
acct-group/polkitd
acct-group/portage
acct-group/quassel
acct-group/render
acct-group/sshd
acct-group/stapdev
acct-group/stapsys
acct-group/stapusr
acct-group/transmission
acct-group/utmp
acct-group/video
acct-group/vmware
acct-user/avahi
acct-user/bitlbee
acct-user/geoclue
acct-user/gkrellmd
acct-user/ldap
acct-user/lxc
acct-user/mail
acct-user/man
acct-user/messagebus
@ -43,6 +38,7 @@ acct-user/openvpn
acct-user/polkitd
acct-user/portage
acct-user/postmaster
acct-user/quassel
acct-user/sshd
acct-user/transmission
app-accessibility/at-spi2-atk
@ -61,15 +57,16 @@ app-arch/cabextract
app-arch/cpio
app-arch/gzip
app-arch/libarchive
app-arch/lz4
app-arch/p7zip
app-arch/pigz
app-arch/rpm2targz
app-arch/tar
app-arch/unrar
app-arch/unzip
app-arch/xz-utils
app-arch/zip
app-arch/zstd
app-backup/rsnapshot
app-crypt/argon2
app-crypt/gcr
app-crypt/gnupg
@ -77,14 +74,17 @@ app-crypt/gpgme
app-crypt/johntheripper
app-crypt/libb2
app-crypt/libsecret
app-crypt/mhash
app-crypt/mit-krb5
app-crypt/openpgp-keys-gentoo-release
app-crypt/p11-kit
app-crypt/pinentry
app-crypt/qca
app-crypt/rhash
app-crypt/veracrypt
app-dicts/aspell-en
app-dicts/aspell-pl
app-doc/doxygen
app-doc/xmltoman
app-editors/emacs
app-editors/neovim
@ -96,7 +96,6 @@ app-emulation/containerd
app-emulation/docker
app-emulation/docker-compose
app-emulation/docker-proxy
app-emulation/lxc
app-emulation/qemu
app-emulation/runc
app-emulation/spice
@ -132,13 +131,17 @@ app-misc/pax-utils
app-misc/ranger
app-misc/screen
app-misc/tmux
app-office/openoffice-bin
app-office/libreoffice
app-office/libreoffice-l10n
app-portage/eix
app-portage/elt-patches
app-portage/gemato
app-portage/genlop
app-portage/gentoolkit
app-portage/lto-rebuild
app-portage/nattka
app-portage/pgo
app-portage/portage-bashrc-mv
app-portage/portage-utils
app-portage/repoman
app-shells/bash
@ -146,22 +149,42 @@ app-shells/fzf
app-shells/oh-my-zsh
app-shells/push
app-shells/quoter
app-shells/runtitle
app-shells/zsh
app-text/asciidoc
app-text/aspell
app-text/build-docbook-catalog
app-text/djvu
app-text/docbook-xml-dtd
app-text/docbook-xsl-ns-stylesheets
app-text/docbook-xsl-stylesheets
app-text/dos2unix
app-text/dvipsk
app-text/ghostscript-gpl
app-text/html2text
app-text/hunspell
app-text/iso-codes
app-text/lcdf-typetools
app-text/lesspipe
app-text/libabw
app-text/libebook
app-text/libepubgen
app-text/libetonyek
app-text/libexttextcat
app-text/liblangtag
app-text/libmspub
app-text/libmwaw
app-text/libnumbertext
app-text/libodfgen
app-text/libpaper
app-text/libqxp
app-text/libstaroffice
app-text/libwpd
app-text/libwpg
app-text/libwps
app-text/manpager
app-text/mupdf
app-text/mythes
app-text/opensp
app-text/pandoc-bin
app-text/po4a
@ -183,12 +206,13 @@ app-text/wgetpaste
app-text/xmlto
app-vim/gentoo-syntax
dev-cpp/abseil-cpp
dev-cpp/gtest
dev-cpp/properties-cpp
dev-cpp/sdbus-cpp
dev-cpp/clucene
dev-cpp/libcmis
dev-db/dbeaver-bin
dev-db/lmdb
dev-db/mariadb-connector-c
dev-db/sqlite
dev-db/unixODBC
dev-go/go-md2man
dev-java/java-config
dev-java/openjdk-bin
@ -227,6 +251,7 @@ dev-libs/gobject-introspection-common
dev-libs/gumbo
dev-libs/hyphen
dev-libs/icu
dev-libs/isl
dev-libs/jansson
dev-libs/json-c
dev-libs/jsoncpp
@ -238,6 +263,7 @@ dev-libs/libatomic_ops
dev-libs/libbsd
dev-libs/libconfig
dev-libs/libdaemon
dev-libs/libdbusmenu-qt
dev-libs/libev
dev-libs/libevdev
dev-libs/libevent
@ -246,15 +272,17 @@ dev-libs/libgcrypt
dev-libs/libgpg-error
dev-libs/libgudev
dev-libs/libinput
dev-libs/libixion
dev-libs/libksba
dev-libs/libltdl
dev-libs/libmpack
dev-libs/libmspack
dev-libs/libnl
dev-libs/liborcus
dev-libs/libpcre
dev-libs/libpcre2
dev-libs/libpipeline
dev-libs/libratbag
dev-libs/librevenge
dev-libs/libsodium
dev-libs/libtasn1
dev-libs/libtermkey
@ -287,17 +315,22 @@ dev-libs/pkcs11-helper
dev-libs/popt
dev-libs/protobuf
dev-libs/ptexenc
dev-libs/rapidjson
dev-libs/rasqal
dev-libs/redland
dev-libs/stfl
dev-libs/tinyxml
dev-libs/tinyxml2
dev-libs/unibilium
dev-libs/vala-common
dev-libs/wayland
dev-libs/xmlsec
dev-libs/zziplib
dev-lua/lpeg
dev-lua/LuaBitOp
dev-lua/luv
dev-lua/mpack
dev-perl/Archive-Zip
dev-perl/Authen-SASL
dev-perl/B-Hooks-EndOfScope
dev-perl/Class-Data-Inheritable
@ -422,6 +455,7 @@ dev-python/dockerpty
dev-python/docker-py
dev-python/docopt
dev-python/docutils
dev-python/ebuildtester
dev-python/entrypoints
dev-python/extras
dev-python/fixtures
@ -430,6 +464,7 @@ dev-python/html5lib
dev-python/hyperlink
dev-python/idna
dev-python/imagesize
dev-python/importlib_metadata
dev-python/incremental
dev-python/ipykernel
dev-python/ipyparallel
@ -437,6 +472,7 @@ dev-python/ipython
dev-python/ipython_genutils
dev-python/isodate
dev-python/jedi
dev-python/jeepney
dev-python/jinja
dev-python/jmespath
dev-python/jsonpointer
@ -444,6 +480,8 @@ dev-python/jsonschema
dev-python/jupyter_client
dev-python/jupyter_core
dev-python/jupyterlab_pygments
dev-python/keyring
dev-python/lazy-object-proxy
dev-python/linecache2
dev-python/lxml
dev-python/m2crypto
@ -466,11 +504,13 @@ dev-python/pandocfilters
dev-python/paramiko
dev-python/parso
dev-python/path-py
dev-python/pathspec
dev-python/pbr
dev-python/pexpect
dev-python/pickleshare
dev-python/pillow
dev-python/pip
dev-python/pkginfo
dev-python/ply
dev-python/prometheus_client
dev-python/prompt_toolkit
@ -500,18 +540,23 @@ dev-python/python-mimeparse
dev-python/pytz
dev-python/pyyaml
dev-python/pyzmq
dev-python/readme_renderer
dev-python/regex
dev-python/requests
dev-python/requests-toolbelt
dev-python/rfc3339-validator
dev-python/rfc3986
dev-python/rfc3986-validator
dev-python/rfc3987
dev-python/rsa
dev-python/s3transfer
dev-python/secretstorage
dev-python/send2trash
dev-python/service_identity
dev-python/setuptools
dev-python/setuptools_scm
dev-python/six
dev-python/snakeoil
dev-python/snowballstemmer
dev-python/sphinx
dev-python/sphinxcontrib-applehelp
@ -527,8 +572,11 @@ dev-python/testpath
dev-python/testtools
dev-python/texttable
dev-python/toml
dev-python/tqdm
dev-python/traceback2
dev-python/traitlets
dev-python/tree-sitter
dev-python/twine
dev-python/twisted
dev-python/unittest2
dev-python/urllib3
@ -536,6 +584,7 @@ dev-python/wcwidth
dev-python/webcolors
dev-python/webencodings
dev-python/websocket-client
dev-python/zipp
dev-python/zope-interface
dev-qt/linguist-tools
dev-qt/qtchooser
@ -549,6 +598,8 @@ dev-qt/qtmultimedia
dev-qt/qtnetwork
dev-qt/qtprintsupport
dev-qt/qtquickcontrols
dev-qt/qtscript
dev-qt/qtsql
dev-qt/qtsvg
dev-qt/qttest
dev-qt/qtwebkit
@ -599,6 +650,7 @@ dev-tex/pgf
dev-util/boost-build
dev-util/cbindgen
dev-util/ccache
dev-util/ccls
dev-util/cmake
dev-util/cmocka
dev-util/colm
@ -613,26 +665,27 @@ dev-util/gtk-update-icon-cache
dev-util/gyp
dev-util/intltool
dev-util/itstool
dev-util/mdds
dev-util/meson
dev-util/meson-format-array
dev-util/netsurf-buildsystem
dev-util/ninja
dev-util/patchelf
dev-util/packer
dev-util/patchutils
dev-util/pkgcheck
dev-util/pkgconf
dev-util/ragel
dev-util/re2c
dev-util/shadowman
dev-util/shellcheck-bin
dev-util/systemtap
dev-util/wayland-scanner
dev-vcs/git
dev-vcs/tig
games-engines/box2d
games-util/game-device-udev-rules
games-util/lutris
games-util/steam-launcher
gnome-base/dconf
gnome-base/gconf
gnome-base/gnome-desktop
gnome-base/gnome-keyring
gnome-base/gsettings-desktop-schemas
@ -641,6 +694,8 @@ gnome-extra/nm-applet
gnome-extra/zenity
gui-libs/display-manager-init
gui-libs/libhandy
kde-frameworks/breeze-icons
kde-frameworks/extra-cmake-modules
lxde-base/lxappearance
mail-client/neomutt
mail-mta/msmtp
@ -653,6 +708,7 @@ media-fonts/terminus-font
media-fonts/urw-fonts
media-gfx/exiv2
media-gfx/feh
media-gfx/fontforge
media-gfx/gimp
media-gfx/gnome-screenshot
media-gfx/graphite2
@ -684,10 +740,11 @@ media-libs/imlib2
media-libs/jbig2dec
media-libs/lcms
media-libs/libaom
media-libs/libart_lgpl
media-libs/libass
media-libs/libcanberra
media-libs/libcdr
media-libs/libepoxy
media-libs/libfreehand
media-libs/libglvnd
media-libs/libjpeg-turbo
media-libs/libmad
@ -695,19 +752,22 @@ media-libs/libmediainfo
media-libs/libmypaint
media-libs/libnsgif
media-libs/libogg
media-libs/libpagemaker
media-libs/libpng
media-libs/libraw
media-libs/libsdl2
media-libs/libsndfile
media-libs/libuninameslist
media-libs/libvisio
media-libs/libvorbis
media-libs/libwebp
media-libs/libzen
media-libs/libzmf
media-libs/mesa
media-libs/nv-codec-headers
media-libs/openh264
media-libs/openjpeg
media-libs/opus
media-libs/sdl2-image
media-libs/raptor
media-libs/speex
media-libs/speexdsp
media-libs/tiff
@ -728,7 +788,6 @@ media-video/mpv
media-video/rtmpdump
net-analyzer/hping
net-analyzer/net-snmp
net-analyzer/wireshark
net-dialup/ppp
net-dialup/ppp-scripts
net-dns/avahi
@ -745,6 +804,7 @@ net-im/bitlbee
net-im/bitlbee-facebook
net-im/discord-bin
net-im/teams
net-irc/quassel
net-irc/weechat
net-libs/glib-networking
net-libs/gnutls
@ -766,6 +826,7 @@ net-libs/libssh
net-libs/libtirpc
net-libs/libvncserver
net-libs/miniupnpc
net-libs/neon
net-libs/nghttp2
net-libs/nodejs
net-libs/rpcsvc-proto
@ -779,7 +840,6 @@ net-misc/curl
net-misc/dhcpcd
net-misc/freerdp
net-misc/iputils
net-misc/megacmd
net-misc/meganz-sdk
net-misc/megasync
net-misc/mobile-broadband-provider-info
@ -814,7 +874,10 @@ net-wireless/wireless-regdb
net-wireless/wpa_supplicant
perl-core/File-Temp
sci-calculators/qalculate-gtk
sci-libs/colamd
sci-libs/libqalculate
sci-libs/suitesparseconfig
sci-mathematics/lpsolve
sci-mathematics/z3
sys-apps/acl
sys-apps/attr
@ -854,6 +917,7 @@ sys-apps/net-tools
sys-apps/openrc
sys-apps/opentmpfiles
sys-apps/pciutils
sys-apps/pkgcore
sys-apps/portage
sys-apps/ripgrep
sys-apps/sandbox
@ -878,6 +942,7 @@ sys-auth/ykpers
sys-block/thin-provisioning-tools
sys-boot/efibootmgr
sys-boot/grub
sys-config/ltoize
sys-devel/autoconf
sys-devel/autoconf-archive
sys-devel/autoconf-wrapper
@ -902,6 +967,7 @@ sys-devel/llvm-common
sys-devel/m4
sys-devel/make
sys-devel/patch
sys-devel/ucpp
sys-firmware/edk2-ovmf
sys-firmware/ipxe
sys-firmware/seabios
@ -962,7 +1028,9 @@ virtual/dev-manager
virtual/editor
virtual/freedesktop-icon-theme
virtual/glu
virtual/jdk
virtual/jpeg
virtual/jre
virtual/krb5
virtual/latex-base
virtual/libc
@ -984,6 +1052,7 @@ virtual/perl-Carp
virtual/perl-Compress-Raw-Bzip2
virtual/perl-Compress-Raw-Zlib
virtual/perl-CPAN-Meta
virtual/perl-CPAN-Meta-Requirements
virtual/perl-CPAN-Meta-YAML
virtual/perl-Data-Dumper
virtual/perl-Digest-MD5

View File

@ -1,17 +1,20 @@
COMMON_FLAGS="-march=native -O3 -pipe"
NTHREADS="8"
source /etc/portage/make.conf.lto.defines
COMMON_FLAGS="-march=native -O3 ${GRAPHITE} ${DEVIRTLTO} ${IPAPTA} ${SEMINTERPOS} ${FLTO} -fuse-linker-plugin -falign-functions=32"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${CFLAGS}"
FCFLAGS="${CFLAGS}"
FFLAGS="${CFLAGS}"
PORTAGE_BINHOST="http://packages.gentooexperimental.org/packages/"
GENTOO_MIRRORS="https://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/ https://gentoo.osuosl.org/ http://ftp.vectranet.pl/gentoo/ http://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/"
MAKEOPTS="-j2 --load-average=2.4"
EMERGE_DEFAULT_OPTS="--jobs=2 --load-average=2.4 --with-bdeps=y --keep-going=y --quiet-build"
#MAKEOPTS="-j4 --load-average=4.4"
#EMERGE_DEFAULT_OPTS="--jobs=4 --load-average=4.4 --with-bdeps=y --keep-going=y --quiet-build"
#MAKEOPTS="-j8 --load-average=6.4"
#EMERGE_DEFAULT_OPTS="--jobs=8 --load-average=6.4 --with-bdeps=y --keep-going=y --quiet-build"
MAKEOPTS="-j8 --load-average=6.4"
EMERGE_DEFAULT_OPTS="--jobs=8 --load-average=6.4 --with-bdeps=y --keep-going=y --quiet-build"
ACCEPT_LICENSE="*"
ACCEPT_KEYWORDS="~amd64"
@ -23,14 +26,14 @@ FEATURES="${FEATURES} sign ccache buildpkg userfetch multilib-strict sandbox use
USE="-bluetooth"
PORTAGE_GPG_KEY="D34FB8A44F324B8A"
DCO_SIGNED_OFF_BY="Marcin Wozniak <y0rune@aol.com>"
SIGNED_OFF_BY="Marcin Woźniak <y0rune@aol.com>"
RUBY_TARGETS="ruby30 ruby26 ruby27"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTDIR_OVERLAY="/usr/portage"
PORTDIR="/var/db/repos/gentoo"
DISTDIR="/var/cache/distfiles"
PKGDIR="/var/cache/binpkgs"
CCACHE_DIR="/usr/ccache"
LC_MESSAGES=C

1
make.conf.lto Symbolic link
View File

@ -0,0 +1 @@
/var/db/repos/lto-overlay/sys-config/ltoize/files/make.conf.lto

68
make.conf.lto.defines Normal file
View File

@ -0,0 +1,68 @@
#This file contains the definitions for the optimization settings used by GentooLTO.
#source this file directly in your make.conf if you want to cherry-pick settings
#and don't want to use the make.conf.lto default configuration, defining the number of threads
#to use during the LTO process beforehand:
#NTHREADS="12"
#source make.conf.lto.defines
#Guidelines:
#* Your CFLAGS should contain ${FLTO}
#* If you want Graphite, include "${GRAPHITE}" in your CFLAGS
#* If you want -fipa-pta, include "${IPAPTA}" in your CFLAGS
#* Anything else is up to you, such as -march, -pipe, -O{3,2,s,1}, etc...
#* CXXFLAGS should be set to CFLAGS
#* Optionally, set other *FLAGS for languages compiled with GCC as well
#* LDFLAGS of your Gentoo profile should be respected.
# See make.conf.lto for more details.
FLTO="-flto=${NTHREADS}"
#FLTO is of the form -flto[=n] where n is the number of threads to use during linking.
#It's usually a good idea to set this to the number of hardware threads in your system
#You may also set this to "auto" to have gcc determine optimal number of cores (GCC 10+)
GRAPHITE="-fgraphite-identity -floop-nest-optimize"
#GRAPHITE contains Graphite specific optimizations and other optimizations that are disabled at O3 but don't influence the compiler's judgement.
#Since GCC 8.1.0, -ftree-loop-distribution is enabled by default at -O3
#NOTE: To use graphite, make sure you have gcc compiled with graphite support (add graphite to your USE). Otherwise GCC will complain!
IPAPTA="-fipa-pta"
#IPAPTA contains -fipa* opts that are disabled by default in GCC. These are interprocedural optimizations. For now this is only -fipa-pta.
#This option increases compile times, but can potentially produce better binaries, especially with LTO.
#Essentially, it allows the compiler to look into called function bodies when performing alias analysis
SEMINTERPOS="-fno-semantic-interposition"
#With -fno-semantic-interposition the compiler assumes that if interposition happens for functions
#the overwriting function will have precisely the same semantics (and side effects).
#Similarly if interposition happens for variables, the constructor of the variable will be the same.
#The flag has no effect for functions explicitly declared inline (where it is never allowed for interposition to change semantics) and for symbols explicitly declared weak.
NOCOMMON="-fno-common"
# This option only affects C code. Only non-conformant C code needs -fcommon, which is enabled by default. Clear Linux leaves this flag off by default.
# This is enabled by default with GCC 10 and is kept here only for documentation purposes. Use `-fcommon` to restore
# GCC 9.x behaviour and below.
SAFEST_FAST_MATH="-fno-math-errno -fno-trapping-math"
SAFER_UNSAFE_MATH_OPTS="-fno-signed-zeros -fno-trapping-math -fassociative-math -freciprocal-math"
SAFER_FAST_MATH="${SAFER_UNSAFE_MATH_OPTS} -fno-math-errno -ffinite-math-only -fno-rounding-math -fno-signaling-nans -fcx-limited-range -fexcess-precision=fast"
#These are flags left off by default that we're planning to start using. Clear Linux uses these in lieu of full -ffast-math optimizations
#They DO break compliance with ISO C++, so we'll be careful about introducing these.
#Relevant discussion: https://gcc.gnu.org/ml/gcc/2017-09/msg00079.html
#We may end up just going full -Ofast, with exceptions done in the usual way.
DEVIRTLTO="-fdevirtualize-at-ltrans"
#This allows GCC to perform devirtualization across object file boundaries using LTO.
NOPLT="-fno-plt"
#This option omits the PLT from the executable, making calls go through the GOT directly.
#It inhibits lazy binding, so this is not enabled by default. If you use prelink, this is
#strictly better than lazy binding.

View File

@ -1 +1 @@
../../usr/portage/profiles/default/linux/amd64/17.1
../../var/db/repos/gentoo/profiles/default/linux/amd64/17.1

View File

@ -6,5 +6,6 @@ app-emulation/docker -~amd64
app-emulation/docker-proxy -~amd64
app-emulation/containerd -~amd64
app-emulation/runc -~amd64
dev-util/cppcheck -~amd64
net-misc/streamlink **
net-misc/youtube-dl **

1
package.cflags/clang.conf Symbolic link
View File

@ -0,0 +1 @@
/var/db/repos/lto-overlay/sys-config/ltoize/files/package.cflags/clang.conf

View File

@ -0,0 +1 @@
/var/db/repos/lto-overlay/sys-config/ltoize/files/package.cflags/cmake-makefile.conf

View File

@ -0,0 +1 @@
/var/db/repos/lto-overlay/sys-config/ltoize/files/package.cflags/devirtualize-at-ltrans.conf

View File

@ -0,0 +1 @@
/var/db/repos/lto-overlay/sys-config/ltoize/files/package.cflags/graphite.conf

1
package.cflags/ipa-pta.conf Symbolic link
View File

@ -0,0 +1 @@
/var/db/repos/lto-overlay/sys-config/ltoize/files/package.cflags/ipa-pta.conf

1
package.cflags/lto.conf Symbolic link
View File

@ -0,0 +1 @@
/var/db/repos/lto-overlay/sys-config/ltoize/files/package.cflags/lto.conf

View File

@ -0,0 +1 @@
/var/db/repos/lto-overlay/sys-config/ltoize/files/package.cflags/no-common-libtool.conf

1
package.cflags/no-plt.conf Symbolic link
View File

@ -0,0 +1 @@
/var/db/repos/lto-overlay/sys-config/ltoize/files/package.cflags/no-plt.conf

View File

@ -0,0 +1 @@
/var/db/repos/lto-overlay/sys-config/ltoize/files/package.cflags/no-semantic-interposition.conf

View File

@ -0,0 +1 @@
/var/db/repos/lto-overlay/sys-config/ltoize/files/package.cflags/optimizations.conf

View File

@ -0,0 +1 @@
/var/db/repos/lto-overlay/sys-config/ltoize/files/package.cflags/portage-bashrc-mv.conf

View File

@ -0,0 +1 @@
/var/db/repos/lto-overlay/sys-config/ltoize/files/package.cflags/tls-dialect.conf

1
package.cflags/use-ld.conf Symbolic link
View File

@ -0,0 +1 @@
/var/db/repos/lto-overlay/sys-config/ltoize/files/package.cflags/use-ld.conf

18
package.env Normal file
View File

@ -0,0 +1,18 @@
app-office/libreoffice notmpfs.conf
dev-lang/spidermonkey notmpfs.conf
dev-lang/rust notmpfs.conf
dev-libs/libaio no-fno-lto.conf
dev-libs/libbsd no-fno-lto.conf
sys-apps/sandbox no-fno-lto.conf
media-libs/x264 no-fno-lto.conf
media-libs/alsa-lib no-fno-lto.conf
sys-libs/efivar no-fno-lto.conf
sys-libs/libomp no-fno-lto.conf
dev-python/twisted no-fno-lto.conf
app-text/texlive-core no-fno-lto.conf
app-text/lcdf-typetools no-lto.conf
sys-devel/llvm no-lto.conf
#net-misc/megasync mega.conf
net-analyzer/wireshark no-lto.conf
dev-qt/* no-lto.conf
net-libs/webkit-gtk no-lto.conf

View File

@ -51,7 +51,7 @@ media-sound/teamspeak-client alsa pulseaudio
>=virtual/libcrypt-1 abi_x86_32
>=app-arch/zstd-1.4.4-r2 abi_x86_32
media-sound/cmus alsa ffmpeg pulseaudio
sys-devel/gcc lto pgo
sys-devel/gcc graphite lto pgo
# NM APPLET
>=gnome-extra/nm-applet-1.8.24 gtk
@ -266,6 +266,7 @@ dev-lang/python sqlite
>=virtual/rubygems-15-r99 ruby_targets_ruby27 ruby_targets_ruby30
>=dev-ruby/rubygems-3.0.6 ruby_targets_ruby27 ruby_targets_ruby30
>=virtual/ruby-ssl-11 ruby_targets_ruby27 ruby_targets_ruby30
>=dev-ruby/rbs-1.2.0 ruby_targets_ruby30
>=dev-cpp/abseil-cpp-20200923.2 cxx17
app-admin/keepassxc yubikey autotype
@ -361,26 +362,6 @@ dev-java/openjdk-bin gentoo-vm
# StreamLink
net-misc/streamlink python_single_target_python3_8
# Unchanged python version
#>=dev-python/certifi-10001-r1 python_targets_python3_7
#>=dev-python/setuptools_scm-4.1.2-r1 python_targets_python3_7
#>=dev-python/PySocks-1.7.1-r1 python_targets_python3_7
#>=dev-python/pycryptodome-3.9.9 python_targets_python3_7
#>=virtual/python-cffi-1 python_targets_python3_7
#dev-python/websocket-client python_targets_python3_7
#dev-python/requests python_targets_python3_7
#dev-python/chardet python_targets_python3_7
#dev-python/setuptools python_targets_python3_7
#dev-python/ply python_targets_python3_7
#dev-python/pycparser python_targets_python3_7
#dev-python/urllib3 python_targets_python3_7
#dev-python/PySocks1 python_targets_python3_7
#dev-python/cryptography python_targets_python3_7
#dev-python/pyopenssl python_targets_python3_7
#dev-python/six python_targets_python3_7
#dev-python/cffi python_targets_python3_7
#dev-python/pycparser python_targets_python3_7
# Haskell
dev-lang/ghc binary
@ -421,5 +402,9 @@ app-emulation/vmware-workstation doc macos-guests vmware-tools-darwin vmware-too
# TigerVnc
net-misc/tigervnc xinerama
# Android Emulator
app-emulation/anbox X
# GentooLTO
sys-config/ltoize clang
# Quassel
net-irc/quassel X -server monolithic
>=dev-db/sqlite-3.35.4 -secure-delete

View File

@ -1,71 +1,79 @@
[DEFAULT]
main-repo = gentoo
uync-user = yorune
[gentoo]
location = /usr/portage
#sync-type = rsync
#sync-uri = rsync://rsync.gentoo.org/gentoo-portage
location = /var/db/repos/gentoo
sync-type = git
#sync-uri = https://anongit.gentoo.org/git/repo/gentoo.git
sync-uri = https://github.com/gentoo-mirror/gentoo.git
auto-sync = yes
[hossie]
priority = 50
location = /usr/repos/hossie
layman-type = git
auto-sync = No
location = /var/db/repos/hossie
sync-uri = https://github.com/gentoo-mirror/hossie.git
sync-type = git
auto-sync = Yes
[src_prepare-overlay]
priority = 50
location = /usr/repos/src_prepare-overlay
layman-type = git
auto-sync = No
location = /var/db/repos/src_prepare-overlay
sync-uri = https://gitlab.com/src_prepare/src_prepare-overlay.git
sync-type = git
auto-sync = Yes
[ricerlay]
priority = 50
location = /usr/repos/ricerlay
layman-type = git
auto-sync = No
location = /var/db/repos/ricerlay
sync-uri = https://github.com/azahi/ricerlay.git
sync-type = git
auto-sync = Yes
[steam-overlay]
location = /usr/repos/steam-overlay
location = /var/db/repos/steam-overlay
sync-type = git
sync-uri = https://github.com/anyc/steam-overlay.git
priority = 50
auto-sync = No
auto-sync = Yes
[gentoo-yorune]
location = /usr/repos/gentoo-yorune
location = /var/db/dev/gentoo-yorune
sync-type = git
sync-uri = https://github.com/y0rune/gentoo-yorune.git
sync-uri = gitea@git.yorune.pl:y0rune/gentoo-yorune.git
priority = 50
auto-sync = No
auto-sync = Yes
[guru]
priority = 50
location = /usr/repos/guru
location = /var/db/repos/guru
sync-type = git
sync-uri = https://anongit.gentoo.org/git/repo/proj/guru.git
auto-sync = Yes
[2xsaiko]
priority = 50
location = /usr/repos/2xsaiko
location = /var/db/repos/2xsaiko
sync-type = git
sync-uri = https://git.sr.ht/~dblsaiko/ebuilds
auto-sync = No
auto-sync = Yes
[bombo82]
priority = 50
location = /usr/repos/bombo82
location = /var/db/repos/bombo82
sync-type = git
sync-uri = https://github.com/bombo82/bombo82-overlay.git
auto-sync = Yes
#[trinity]
#location = /usr/local/overlay/trinity
#sync-type = git
#sync-uri = https://github.com/Fat-Zer/trinity.git
#auto-sync = yes
#masters = gentoo
[mv]
priority = 50
location = /var/db/repos/mv
sync-type = git
sync-uri = https://github.com/vaeth/mv-overlay.git
auto-sync = Yes
[lto-overlay]
priority = 50
location = /var/db/repos/lto-overlay
sync-type = git
sync-uri = https://github.com/InBetweenNames/gentooLTO.git
auto-sync = Yes

View File

@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Busybox version: 1.33.0
# Wed Jan 6 21:45:27 2021
# Wed Apr 21 08:40:14 2021
#
CONFIG_HAVE_DOT_CONFIG=y

File diff suppressed because it is too large Load Diff