Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • alistair23/pmaports
  • exkc/pmaports
  • fossdd/pmaports
  • JustSoup321/pmaports
  • Eisenbahnfan/pmaports
  • raihan2000/pmaports
  • sleirsgoevy/pmaports
  • Adrian/pmaports
  • adamthiede/pmaports
  • jianhua/pmaports
  • knuxify/pmaports
  • Arnavion/pmaports
  • barni2000/pmaports
  • longnoserob/pmaports
  • smankusors/pmaports
  • Aren/pmaports
  • langfingaz/pmaports
  • sicelo/pmaports
  • kouta-kun/pmaports
  • craftyguy/pmaports
  • rdacayan/pmaports
  • rmader/pmaports
  • Haui111/pmaports
  • jakko/pmaports
  • dujem/pmaports
  • methanal/pmaports
  • WeirdTreeThing/pmaports
  • MightyM17/pmaports
  • sertonix/pmaports
  • amessier/pmaports
  • akemnade/pmaports
  • setotau/pmaports
  • kevinwidjaja21/pmaports
  • NekoCWD/pmaports
  • ollieparanoid/pmaports
  • manoedinata/pmaports
  • Drakulix/pmaports
  • grimler/pmaports
  • benpicco/pmaports
  • Frieder.Hannenheim/pmaports
  • andrisas/pmaports
  • EspiDev/pmaports
  • maze42/pmaports
  • anjandev/pmaports
  • danct12/pmaports
  • ijiki16/pmaports
  • jja2000/pmaports
  • fancsali/pmaports
  • bolilingmeng89006/pmaports
  • Minecrell/pmaports
  • chipiguay/pmaports
  • cherrypicker/pmaports
  • fortuna-mainline/pmaports
  • pevik/pmaports
  • Patriot-06/pmaports
  • JoseskVolpe/pmaports
  • verdre/pmaports
  • proycon/pmaports
  • AutumnSpark1226/pmaports
  • PsychoGame/pmaports
  • fraolt/pmaports
  • VaporGame/pmaports
  • pugzarecute/pmaports
  • CalcProgrammer1/pmaports
  • hexaheximal/pmaports
  • dabao1955/pmaports
  • HenriDellal/pmaports
  • semfault/pmaports
  • strobo5/pmaports
  • andrewgigena/pmaports
  • Athozus/pmaports
  • 1peter10/pmaports
  • vixalien/pmaports
  • Tooniis/pmaports
  • adomerle/pmaports
  • bjorn3/pmaports
  • StacyHarper/pmaports
  • Jack_Kekzoz/pmaports
  • Ceddicedced/pmaports
  • Justin_Zobel/pmaports
  • airtower-luna/pmaports
  • f-izzo/pmaports
  • cosmo/pmaports
  • 9lore/pmaports
  • postmarketOS/pmaports
  • Johnnynator/pmaports
  • iAboothahir/pmaports
  • N1kroks/pmaports
  • neuschaefer/pmaports
  • DylanVanAssche/pmaports
  • yehiashamaa987/pmaports
  • Operachi/pmaports
  • faveoled/pmaports
  • ilpianista/pmaports
  • johkra/pmaports
  • HDDTHR/pmaports
  • zsoltiv/pmaports
  • Justin/pmaports
  • Kaloyan501/pmaports_huawei_p8_lite_2015_fix
  • joelselvaraj/pmaports
  • rontti/pmaports
  • dsankouski/pmaports
  • StandaSK/pmaports
  • paricbat/pmaports
  • asdfugil/pmaports
  • komaru-yml/pmaports
  • MasterPlexus/pmaports
  • Felix/pmaports
  • ayakael/pmaports
  • feisuzhu/pmaports
  • AJ-RR/pmaports
  • SzczurekYT/pmaports
  • mediaberry/pmaports
  • justsomeguy/pmaports
  • Augis154/pmaports
  • hrdl/pmaports
  • sib0ndt/pmaports
  • 19atlas/pmaports
  • vipaoL/pmaports
  • wannjanjic/pmaports
  • dh/pmaports
  • LogicalErzor/pmaports
  • halamix2/pmaports
  • Shamilkv34/pmaports
  • Cogitri/pmaports
  • fallenritemonk/pmaports
  • user0-07161/pmaports
  • rock3tsprocket/pmaports
  • ellyq/pmaports
  • rodent/pmaports
  • mkorpershoek/pmaports
  • candrew/pmaports
  • fallaciousreasoning/pmaports
  • chalkin/pmaports
  • ungeskriptet/pmaports
  • r00t/pmaports
  • panpanpanpan/pmaports
  • celiffe/pmaports
  • davidfurey/pmaports
  • kidd/pmaports
  • tpikonen/pmaports
  • camelCaseNick/pmaports
  • ermine/pmaports
  • lgh/pmaports
  • sajattack/pmaports
  • StephanieBread/pmaports
  • M0Rf30/pmaports
  • notfound405/pmaports
  • samueldr/pmaports
  • r10nw7fd3/pmaports
  • treid998/pmaports-merge
  • denysvitali/pmaports
  • rodriguezst/pmaports
  • puppiestdoggo1/pmaports
  • donihalim/pmaports
  • EDKPiepaint/pmaports-apple-tonga-test
  • SanyaPilot/pmaports
157 results
Show changes
Commits on Source (3)
  • Clayton Craft's avatar
    cross/gcc-*: upgrade to 14.2.0-r4 (MR 5722) · ad9a7874
    Clayton Craft authored and Luca Weiss's avatar Luca Weiss committed
    
    Quite a messy upgrade due to changes in both abuild and in the upstream
    gcc APKBUILD breaking various things. Pmbootstrap also seems to
    misbehave in GitLab CI making it difficult to validate.
    
    Manual fixups:
    * Set !tracedeps - changed behavior in abuild
    * Manually add "so:" dependencies to avoid issues with !tracedeps set
      (becomes obvious with crossdirect)
    * Add back makedepends="$makedepends_build $makedepends_host"
    * Disable move of some files into usr/lib to avoid
      ERROR: gcc-aarch64-14.2.0-r4: trying to overwrite usr/lib/libgcc_s.so.1 owned by libgcc-14.2.0-r4.
    
    [ci:skip-build] # pmbootstrap bugs will prohibit this from building
                    # anyways, don't even attempt
    
    Co-developed-by: default avatarLuca Weiss <luca@lucaweiss.eu>
    Unverified
    ad9a7874
  • Clayton Craft's avatar
    main/postmarketos-base-ui: configure flathub from file drop-in (MR 5726) · 901cb952
    Clayton Craft authored
    Per the flatpak manpage, repos can be configured OOTB by dropping config under /etc/flatpak/remotes.d. Using the install script requires doing stuff over the internet, which may not always work at image build time. By using the drop-in file, we avoid having to connect to flathub.
    
    The manpage only mentions /etc/flatpak, and nothing about /usr ...
    Unverified
    901cb952
  • Caleb Connolly's avatar
    CI: fix autoupdate bot and don't enable it for local CI (MR 5724) · a79aaf01
    Caleb Connolly authored
    
    Update the bot email address, and don't enable the script for local CI
    since it relies on protected GitLab CI variables. This could be fixed in
    the future by safely handling these not being available.
    
    Signed-off-by: default avatarCaleb Connolly <caleb@postmarketos.org>
    Unverified
    a79aaf01
Showing
with 1420 additions and 993 deletions
#!/bin/sh -e
# Description: update a list of packages
# Options: native slow
# https://postmarketos.org/pmb-ci
if [ "$(id -u)" = 0 ]; then
set -x
......@@ -14,11 +11,7 @@ fi
git config --global --add safe.directory "$CI_PROJECT_DIR"
git config --global user.name "postmarketOS CI"
# pmaports
# The email address is the username of the bot (from the GitLab group members page) @noreply.gitlab.com
git config --global user.email "project_8065375_bot_13cf44ca4cd2c938688af6e3d500d9cb@noreply.gitlab.com"
# For testing with pmaports-autoupdate-test repo
# git config --global user.email "project_58002231_bot_be2d4e9e7aba929855726aafe12940d6@noreply.gitlab.com"
git config --global user.email "project_226_bot_a365eaa0c380d1bee0af03adf42ebea3@noreply.gitlab.postmarketos.org"
# Configure SSH key for signing
mkdir -p ~/.ssh
......
......@@ -34,7 +34,7 @@ _pkgsnap="${pkgver##*_git}"
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
pkgname=gcc-aarch64
pkgrel=3
pkgrel=4
pkgdesc="Stage2 cross-compiler for aarch64"
url="https://gcc.gnu.org"
arch="x86_64"
......@@ -44,9 +44,10 @@ depends="binutils-aarch64 mpc1"
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-aarch64 binutils-aarch64"
subpackages="g++-aarch64:gpp libstdc++-dev-aarch64:libcxx_dev"
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
replaces="libstdc++ binutils"
options="!strip"
options="!strip !tracedeps"
depends="$depends so:libc.musl-x86_64.so.1 so:libgcc_s.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libstdc++.so.6 so:libz.so.1"
: "${LANG_CXX:=true}"
: "${LANG_D:=true}"
......@@ -135,7 +136,6 @@ else
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
export LDFLAGS_FOR_TARGET="$LDFLAGS"
export BOOT_CFLAGS="$CFLAGS"
export BOOT_CXXFLAGS="$CXXFLAGS"
export BOOT_LDFLAGS="$LDFLAGS"
fi
......@@ -170,7 +170,7 @@ esac
# currently on x86, x86_64 and ia64
_libquadmath=$LANG_FORTRAN
case "$CTARGET_ARCH" in
x86 | x86_64 | ppc64le) _libquadmath=$LANG_FORTRAN ;;
x86 | x86_64 | ppc64le) ;;
*) _libquadmath=false ;;
esac
......@@ -218,13 +218,12 @@ if $LANG_FORTRAN; then
_languages="$_languages,fortran"
fi
if $LANG_ADA; then
subpackages="$subpackages gcc-gnat$_target:gnat"
subpackages="$subpackages gcc-gnat$_target:gnat libgnat::$CTARGET_ARCH"
_languages="$_languages,ada"
if [ "$CBUILD" = "$CTARGET" ]; then
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH"
else
subpackages="$subpackages libgnat::$CTARGET_ARCH"
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
fi
fi
......@@ -234,7 +233,7 @@ fi
makedepends="$makedepends_build $makedepends_host"
# when using upstream releases, use this URI template
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
# https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
#
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
......@@ -244,7 +243,7 @@ makedepends="$makedepends_build $makedepends_host"
# PLEASE submit all patches to gcc to https://gitlab.alpinelinux.org/kaniini/alpine-gcc-patches,
# so that they can be properly tracked and easily rebased if needed.
#source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${_pkgbase%%.*}-$_pkgsnap.tar.xz
source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
0001-posix_memalign.patch
0002-gcc-poison-system-directories.patch
0003-specs-turn-on-Wl-z-now-by-default.patch
......@@ -283,6 +282,7 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
0036-libphobos-add-riscv64-and-loongarch64-support.patch
fix-arm64.patch
ppc64le-quadmath.patch
riscv64-improve-build-time.patch
"
# secfixes:
......@@ -290,44 +290,21 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
# - CVE-2023-4039
# we build out-of-tree
#_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
#builddir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
builddir="$srcdir"/gcc-$_pkgbase
_gcclibdir="/usr/lib/gcc/$CTARGET/$_pkgbase"
_gcclibexec="/usr/libexec/gcc/$CTARGET/$_pkgbase"
prepare() {
cd "$_gccdir"
_err=
for i in $source; do
case "$i" in
*.patch)
msg "Applying $i"
patch -p1 -i "$srcdir"/$i || _err="$_err $i"
;;
esac
done
if [ -n "$_err" ]; then
error "The following patches failed:"
for i in $_err; do
echo " $i"
done
return 1
fi
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
default_prepare
echo $_pkgbase > gcc/BASE-VER
}
build() {
local _arch_configure=
local _libc_configure=
local _bootstrap_configure=
local _symvers=
local _jit_configure=
cd "$_gccdir"
case "$CTARGET" in
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
......@@ -351,15 +328,7 @@ build() {
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
esac
case "$CTARGET_LIBC" in
musl)
# musl does not support libsanitizer
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
_libc_configure="--disable-libssp --disable-libsanitizer"
_symvers="--disable-symvers"
export libat_cv_have_ifunc=no
;;
esac
export libat_cv_have_ifunc=no
case "$BOOTSTRAP" in
......@@ -388,10 +357,8 @@ build() {
echo " CHOST=$CHOST"
echo " CTARGET=$CTARGET"
echo " CTARGET_ARCH=$CTARGET_ARCH"
echo " CTARGET_LIBC=$CTARGET_LIBC"
echo " languages=$_languages"
echo " arch_configure=$_arch_configure"
echo " libc_configure=$_libc_configure"
echo " cross_configure=$_cross_configure"
echo " bootstrap_configure=$_bootstrap_configure"
echo " hash_style_configure=$_hash_style_configure"
......@@ -412,7 +379,7 @@ build() {
--disable-multilib
--disable-nls
--disable-werror
$_symvers
--disable-symvers
--enable-__cxa_atexit
--enable-default-pie
--enable-default-ssp
......@@ -420,7 +387,8 @@ build() {
--enable-link-serialization=2
--enable-linker-build-id
$_arch_configure
$_libc_configure
--disable-libssp
--disable-libsanitizer
$_cross_configure
$_bootstrap_configure
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
......@@ -430,7 +398,7 @@ build() {
mkdir -p "$_builddir"
cd "$_builddir"
"$_gccdir"/configure $gccconfiguration \
"$builddir"/configure $gccconfiguration \
--with-pkgversion="$version"
msg "building gcc"
......@@ -446,7 +414,7 @@ build() {
if $LANG_JIT; then
mkdir -p "$_builddir"/libgccjit-build
cd "$_builddir"/libgccjit-build
"$_gccdir"/configure $gccconfiguration \
"$builddir"/configure $gccconfiguration \
--disable-bootstrap \
--enable-host-shared \
--enable-languages=jit \
......@@ -461,7 +429,7 @@ package() {
cd "$_builddir"
make -j1 DESTDIR="$pkgdir" install
ln -s gcc "$pkgdir"/usr/bin/cc
[ "$CHOST" = "$CTARGET" ] && ln -s gcc "$pkgdir"/usr/bin/cc
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
if $LANG_JIT; then
......@@ -505,25 +473,23 @@ package() {
# move ada runtime libs
if $LANG_ADA; then
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 \( -name "libgna*.so" -o -name "libgna*.a" \) ); do
mv "$i" "$pkgdir"/usr/lib/
ln -s ../../../../${i##*/} $i
done
if [ "$CHOST" = "$CTARGET" ]; then
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
mv "$i" "$pkgdir"/usr/lib/
ln -s ../../../../${i##*/} $i
done
fi
fi
if [ "$CHOST" != "$CTARGET" ]; then
# cross-gcc: remove any files that would conflict with the
# native gcc package
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
rm -rf "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
# libcc1 does not depend on target, don't ship it
rm -rf "$pkgdir"/usr/lib/libcc1.so*
# These are moved into packages with arch=$CTARGET_ARCH so remove
# cross prefix
#mv "$pkgdir"/usr/$CTARGET/lib/*.so.* "$pkgdir"/usr/lib/ # FIXME
# fixup gcc library symlinks to be linker scripts so
# linker finds the libs from relocated sysroot
for so in "$pkgdir"/usr/"$CTARGET"/lib/*.so; do
......@@ -572,8 +538,7 @@ libatomic() {
depends=
replaces="gcc"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libatomic.so.*
}
libcxx() {
......@@ -586,8 +551,7 @@ libcxx() {
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
fi
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libstdc++.so.*
}
libcxx_dev() {
......@@ -605,15 +569,12 @@ libcxx_dev() {
gpp() {
pkgdesc="GNU C++ standard library and compiler"
depends="libstdc++=$_gccrel libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel libc-dev"
mkdir -p "$subpkgdir/$_gcclibexec" \
"$subpkgdir"/usr/bin \
"$subpkgdir"/usr/${_target:+$CTARGET/}include \
"$subpkgdir"/usr/${_target:+$CTARGET/}lib \
mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/"
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
depends="$depends so:libc.musl-x86_64.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
amove $_gcclibexec/cc1plus
amove usr/bin/*++
}
jit() {
......@@ -632,30 +593,26 @@ libobjc() {
pkgdesc="GNU Objective-C runtime"
replaces="objc"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libobjc.so.*
}
objc() {
pkgdesc="GNU Objective-C"
replaces="gcc"
depends="libc-dev gcc=$_gccrel libobjc=$_gccrel"
mkdir -p "$subpkgdir/$_gcclibexec" \
"$subpkgdir"/$_gcclibdir/include \
"$subpkgdir"/usr/lib
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/
mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \
"$subpkgdir"/usr/lib/
depends="musl-dev gcc=$_gccrel libobjc=$_gccrel"
amove $_gcclibexec/cc1obj
amove $_gcclibdir/include/objc
amove usr/lib/libobjc.so
amove usr/lib/libobjc.a
}
libgcc() {
pkgdesc="GNU C compiler runtime libraries"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgcc_s.so.*
}
libgomp() {
......@@ -663,17 +620,15 @@ libgomp() {
depends=
replaces="gcc"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgomp.so.*
}
libgphobos() {
pkgdesc="D programming language standard library for GCC"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgdruntime.so.*
amove usr/lib/libgphobos.so.*
}
gdc() {
......@@ -682,42 +637,26 @@ gdc() {
[ "$CBUILD" = "$CTARGET" ] && depends="$depends libgphobos=$_gccrel"
[ "$CHOST" = "$CTARGET" ] && provides="gcc-gdc-bootstrap=$_gccrel"
mkdir -p "$subpkgdir/$_gcclibexec" \
"$subpkgdir"/$_gcclibdir/include/d/ \
"$subpkgdir"/usr/lib \
"$subpkgdir"/usr/bin
# Copy: The installed '.d' files, the static lib, the binary itself
# The shared libs are part of 'libgphobos' so one can run program
# without installing the compiler
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
amove $_gcclibexec/d21
amove $_gcclibdir/include/d
if [ "$CBUILD" = "$CTARGET" ]; then
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
fi
if [ "$CHOST" = "$CTARGET" ]; then
mv "$pkgdir"/usr/lib/libgdruntime.a "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgphobos.a "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgphobos.spec "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/bin/gdc "$subpkgdir"/usr/bin/
else
mkdir -p "$subpkgdir"/usr/$CTARGET/lib/
mv "$pkgdir"/usr/$CTARGET/lib/libgdruntime.a \
"$subpkgdir"/usr/$CTARGET/lib/
mv "$pkgdir"/usr/$CTARGET/lib/libgphobos.a \
"$subpkgdir"/usr/$CTARGET/lib/
mv "$pkgdir"/usr/$CTARGET/lib/libgphobos.spec \
"$subpkgdir"/usr/$CTARGET/lib/
amove usr/lib/libgdruntime.so
amove usr/lib/libgphobos.so
fi
mv "$pkgdir"/usr/bin/$CTARGET-gdc "$subpkgdir"/usr/bin/
amove usr/${_target:+$CTARGET/}lib/libgdruntime.a
amove usr/${_target:+$CTARGET/}lib/libgphobos.a
amove usr/${_target:+$CTARGET/}lib/libgphobos.spec
amove usr/bin/*gdc
}
libgo() {
pkgdesc="Go runtime library for GCC"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgo.so.*
}
go() {
......@@ -725,31 +664,25 @@ go() {
depends="gcc=$_gccrel libgo=$_gccrel !go"
install="$pkgname-go.post-install"
mkdir -p "$subpkgdir"/$_gcclibexec \
"$subpkgdir"/usr/lib \
"$subpkgdir"/usr/bin
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/usr/lib/libgo.a \
"$pkgdir"/usr/lib/libgo.so \
"$pkgdir"/usr/lib/libgobegin.a \
"$pkgdir"/usr/lib/libgolibbegin.a \
"$subpkgdir"/usr/lib/
amove usr/lib/go
amove usr/bin/*go
amove usr/bin/*gofmt
amove $_gcclibexec/go1
amove $_gcclibexec/cgo
amove $_gcclibexec/buildid
amove $_gcclibexec/test2json
amove $_gcclibexec/vet
amove usr/lib/libgo.a
amove usr/lib/libgo.so
amove usr/lib/libgobegin.a
amove usr/lib/libgolibbegin.a
}
libgfortran() {
pkgdesc="Fortran runtime library for GCC"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgfortran.so.*
}
libquadmath() {
......@@ -757,8 +690,7 @@ libquadmath() {
pkgdesc="128-bit math library for GCC"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libquadmath.so.*
}
gfortran() {
......@@ -767,38 +699,30 @@ gfortran() {
$_libquadmath && depends="$depends libquadmath=$_gccrel"
replaces="gcc"
mkdir -p "$subpkgdir"/$_gcclibexec \
"$subpkgdir"/$_gcclibdir \
"$subpkgdir"/usr/lib \
"$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/
mv "$pkgdir"/usr/lib/libgfortran.a \
"$pkgdir"/usr/lib/libgfortran.so \
"$subpkgdir"/usr/lib/
amove usr/bin/*gfortran
amove usr/lib/libgfortran.a
amove usr/lib/libgfortran.so
if $_libquadmath; then
mv "$pkgdir"/usr/lib/libquadmath.a \
"$pkgdir"/usr/lib/libquadmath.so \
"$subpkgdir"/usr/lib/
amove usr/lib/libquadmath.a
amove usr/lib/libquadmath.so
fi
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec
mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir
amove $_gcclibdir/finclude
amove $_gcclibexec/f951
mv -v "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir/
}
libgnat() {
pkgdesc="GNU Ada runtime shared libraries"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
amove usr/lib/libgna*.so
}
libgnatstatic() {
pkgdesc="GNU Ada static libraries"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
amove usr/lib/libgna*.a
}
gnat() {
......@@ -807,12 +731,9 @@ gnat() {
provides="$pkgname-gnat-bootstrap=$_gccrel"
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
mkdir -p "$subpkgdir"/$_gcclibexec \
"$subpkgdir"/$_gcclibdir \
"$subpkgdir"/usr/bin
mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
amove $_gcclibexec/*gnat*
amove $_gcclibdir/*ada*
amove usr/bin/*gnat*
}
gdb() {
......@@ -864,4 +785,5 @@ c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
"
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2cf89ae83225f932b226cd57ef2d083a59bcf8a3
--
From 2cf89ae83225f932b226cd57ef2d083a59bcf8a3 Mon Sep 17 00:00:00 2001
From: Richard Biener <rguenther@suse.de>
Date: Tue, 6 Aug 2024 14:56:26 +0200
Subject: [PATCH] tree-optimization/116166 - forward jump-threading going wild
Currently the forward threader isn't limited as to the search space
it explores and with it now using path-ranger for simplifying
conditions it runs into it became pretty slow for degenerate cases
like compiling insn-emit.cc for RISC-V esp. when compiling for
a host with LOGICAL_OP_NON_SHORT_CIRCUIT disabled.
The following makes the forward threader honor the search space
limit I introduced for the backward threader. This reduces
compile-time from minutes to seconds for the testcase in PR116166.
Note this wasn't necessary before we had ranger but with ranger
the work we do is quadatic in the length of the threading path
we build up (the same is true for the backwards threader).
PR tree-optimization/116166
* tree-ssa-threadedge.h (jump_threader::thread_around_empty_blocks):
Add limit parameter.
(jump_threader::thread_through_normal_block): Likewise.
* tree-ssa-threadedge.cc (jump_threader::thread_around_empty_blocks):
Honor and decrement limit parameter.
(jump_threader::thread_through_normal_block): Likewise.
(jump_threader::thread_across_edge): Initialize limit from
param_max_jump_thread_paths and pass it down to workers.
---
gcc/tree-ssa-threadedge.cc | 30 ++++++++++++++++++++++--------
gcc/tree-ssa-threadedge.h | 4 ++--
2 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/gcc/tree-ssa-threadedge.cc b/gcc/tree-ssa-threadedge.cc
index 7f82639b8ecc..0aa2aa851430 100644
--- a/gcc/tree-ssa-threadedge.cc
+++ b/gcc/tree-ssa-threadedge.cc
@@ -786,13 +786,17 @@ propagate_threaded_block_debug_into (basic_block dest, basic_block src)
bool
jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
edge taken_edge,
- bitmap visited)
+ bitmap visited, unsigned &limit)
{
basic_block bb = taken_edge->dest;
gimple_stmt_iterator gsi;
gimple *stmt;
tree cond;
+ if (limit == 0)
+ return false;
+ --limit;
+
/* The key property of these blocks is that they need not be duplicated
when threading. Thus they cannot have visible side effects such
as PHI nodes. */
@@ -830,7 +834,8 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
m_state->append_path (taken_edge->dest);
bitmap_set_bit (visited, taken_edge->dest->index);
- return thread_around_empty_blocks (path, taken_edge, visited);
+ return thread_around_empty_blocks (path, taken_edge, visited,
+ limit);
}
}
@@ -872,7 +877,7 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
m_state->append_path (taken_edge->dest);
- thread_around_empty_blocks (path, taken_edge, visited);
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
return true;
}
@@ -899,8 +904,13 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
int
jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
- edge e, bitmap visited)
+ edge e, bitmap visited,
+ unsigned &limit)
{
+ if (limit == 0)
+ return 0;
+ limit--;
+
m_state->register_equivs_edge (e);
/* PHIs create temporary equivalences.
@@ -989,7 +999,7 @@ jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
visited. This may be overly conservative. */
bitmap_set_bit (visited, dest->index);
bitmap_set_bit (visited, e->dest->index);
- thread_around_empty_blocks (path, taken_edge, visited);
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
return 1;
}
}
@@ -1075,9 +1085,12 @@ jump_threader::thread_across_edge (edge e)
bitmap_set_bit (visited, e->src->index);
bitmap_set_bit (visited, e->dest->index);
+ /* Limit search space. */
+ unsigned limit = param_max_jump_thread_paths;
+
int threaded = 0;
if ((e->flags & EDGE_DFS_BACK) == 0)
- threaded = thread_through_normal_block (path, e, visited);
+ threaded = thread_through_normal_block (path, e, visited, limit);
if (threaded > 0)
{
@@ -1148,11 +1161,12 @@ jump_threader::thread_across_edge (edge e)
m_registry->push_edge (path, e, EDGE_START_JUMP_THREAD);
m_registry->push_edge (path, taken_edge, EDGE_COPY_SRC_JOINER_BLOCK);
- found = thread_around_empty_blocks (path, taken_edge, visited);
+ found = thread_around_empty_blocks (path, taken_edge, visited, limit);
if (!found)
found = thread_through_normal_block (path,
- path->last ()->e, visited) > 0;
+ path->last ()->e, visited,
+ limit) > 0;
/* If we were able to thread through a successor of E->dest, then
record the jump threading opportunity. */
diff --git a/gcc/tree-ssa-threadedge.h b/gcc/tree-ssa-threadedge.h
index 9f6cbfe93307..245b3506a550 100644
--- a/gcc/tree-ssa-threadedge.h
+++ b/gcc/tree-ssa-threadedge.h
@@ -101,9 +101,9 @@ private:
unsigned limit);
bool thread_around_empty_blocks (vec<class jump_thread_edge *> *path,
- edge, bitmap visited);
+ edge, bitmap visited, unsigned &limit);
int thread_through_normal_block (vec<jump_thread_edge *> *path,
- edge, bitmap visited);
+ edge, bitmap visited, unsigned &limit);
void thread_across_edge (edge);
bool record_temporary_equivalences_from_phis (edge);
gimple *record_temporary_equivalences_from_stmts_at_dest (edge);
--
2.43.5
......@@ -34,7 +34,7 @@ _pkgsnap="${pkgver##*_git}"
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
pkgname=gcc-armhf
pkgrel=3
pkgrel=4
pkgdesc="Stage2 cross-compiler for armhf"
url="https://gcc.gnu.org"
arch="x86_64"
......@@ -44,9 +44,10 @@ depends="binutils-armhf mpc1"
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-armhf binutils-armhf"
subpackages="g++-armhf:gpp libstdc++-dev-armhf:libcxx_dev"
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
replaces="libstdc++ binutils"
options="!strip"
options="!strip !tracedeps"
depends="$depends so:libc.musl-x86_64.so.1 so:libgcc_s.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libstdc++.so.6 so:libz.so.1"
: "${LANG_CXX:=true}"
: "${LANG_D:=true}"
......@@ -135,7 +136,6 @@ else
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
export LDFLAGS_FOR_TARGET="$LDFLAGS"
export BOOT_CFLAGS="$CFLAGS"
export BOOT_CXXFLAGS="$CXXFLAGS"
export BOOT_LDFLAGS="$LDFLAGS"
fi
......@@ -170,7 +170,7 @@ esac
# currently on x86, x86_64 and ia64
_libquadmath=$LANG_FORTRAN
case "$CTARGET_ARCH" in
x86 | x86_64 | ppc64le) _libquadmath=$LANG_FORTRAN ;;
x86 | x86_64 | ppc64le) ;;
*) _libquadmath=false ;;
esac
......@@ -218,13 +218,12 @@ if $LANG_FORTRAN; then
_languages="$_languages,fortran"
fi
if $LANG_ADA; then
subpackages="$subpackages gcc-gnat$_target:gnat"
subpackages="$subpackages gcc-gnat$_target:gnat libgnat::$CTARGET_ARCH"
_languages="$_languages,ada"
if [ "$CBUILD" = "$CTARGET" ]; then
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH"
else
subpackages="$subpackages libgnat::$CTARGET_ARCH"
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
fi
fi
......@@ -234,7 +233,7 @@ fi
makedepends="$makedepends_build $makedepends_host"
# when using upstream releases, use this URI template
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
# https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
#
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
......@@ -244,7 +243,7 @@ makedepends="$makedepends_build $makedepends_host"
# PLEASE submit all patches to gcc to https://gitlab.alpinelinux.org/kaniini/alpine-gcc-patches,
# so that they can be properly tracked and easily rebased if needed.
#source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${_pkgbase%%.*}-$_pkgsnap.tar.xz
source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
0001-posix_memalign.patch
0002-gcc-poison-system-directories.patch
0003-specs-turn-on-Wl-z-now-by-default.patch
......@@ -283,6 +282,7 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
0036-libphobos-add-riscv64-and-loongarch64-support.patch
fix-arm64.patch
ppc64le-quadmath.patch
riscv64-improve-build-time.patch
"
# secfixes:
......@@ -290,44 +290,21 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
# - CVE-2023-4039
# we build out-of-tree
#_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
#builddir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
builddir="$srcdir"/gcc-$_pkgbase
_gcclibdir="/usr/lib/gcc/$CTARGET/$_pkgbase"
_gcclibexec="/usr/libexec/gcc/$CTARGET/$_pkgbase"
prepare() {
cd "$_gccdir"
_err=
for i in $source; do
case "$i" in
*.patch)
msg "Applying $i"
patch -p1 -i "$srcdir"/$i || _err="$_err $i"
;;
esac
done
if [ -n "$_err" ]; then
error "The following patches failed:"
for i in $_err; do
echo " $i"
done
return 1
fi
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
default_prepare
echo $_pkgbase > gcc/BASE-VER
}
build() {
local _arch_configure=
local _libc_configure=
local _bootstrap_configure=
local _symvers=
local _jit_configure=
cd "$_gccdir"
case "$CTARGET" in
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
......@@ -351,15 +328,7 @@ build() {
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
esac
case "$CTARGET_LIBC" in
musl)
# musl does not support libsanitizer
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
_libc_configure="--disable-libssp --disable-libsanitizer"
_symvers="--disable-symvers"
export libat_cv_have_ifunc=no
;;
esac
export libat_cv_have_ifunc=no
case "$BOOTSTRAP" in
......@@ -388,10 +357,8 @@ build() {
echo " CHOST=$CHOST"
echo " CTARGET=$CTARGET"
echo " CTARGET_ARCH=$CTARGET_ARCH"
echo " CTARGET_LIBC=$CTARGET_LIBC"
echo " languages=$_languages"
echo " arch_configure=$_arch_configure"
echo " libc_configure=$_libc_configure"
echo " cross_configure=$_cross_configure"
echo " bootstrap_configure=$_bootstrap_configure"
echo " hash_style_configure=$_hash_style_configure"
......@@ -412,7 +379,7 @@ build() {
--disable-multilib
--disable-nls
--disable-werror
$_symvers
--disable-symvers
--enable-__cxa_atexit
--enable-default-pie
--enable-default-ssp
......@@ -420,7 +387,8 @@ build() {
--enable-link-serialization=2
--enable-linker-build-id
$_arch_configure
$_libc_configure
--disable-libssp
--disable-libsanitizer
$_cross_configure
$_bootstrap_configure
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
......@@ -430,7 +398,7 @@ build() {
mkdir -p "$_builddir"
cd "$_builddir"
"$_gccdir"/configure $gccconfiguration \
"$builddir"/configure $gccconfiguration \
--with-pkgversion="$version"
msg "building gcc"
......@@ -446,7 +414,7 @@ build() {
if $LANG_JIT; then
mkdir -p "$_builddir"/libgccjit-build
cd "$_builddir"/libgccjit-build
"$_gccdir"/configure $gccconfiguration \
"$builddir"/configure $gccconfiguration \
--disable-bootstrap \
--enable-host-shared \
--enable-languages=jit \
......@@ -461,7 +429,7 @@ package() {
cd "$_builddir"
make -j1 DESTDIR="$pkgdir" install
ln -s gcc "$pkgdir"/usr/bin/cc
[ "$CHOST" = "$CTARGET" ] && ln -s gcc "$pkgdir"/usr/bin/cc
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
if $LANG_JIT; then
......@@ -505,25 +473,23 @@ package() {
# move ada runtime libs
if $LANG_ADA; then
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 \( -name "libgna*.so" -o -name "libgna*.a" \) ); do
mv "$i" "$pkgdir"/usr/lib/
ln -s ../../../../${i##*/} $i
done
if [ "$CHOST" = "$CTARGET" ]; then
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
mv "$i" "$pkgdir"/usr/lib/
ln -s ../../../../${i##*/} $i
done
fi
fi
if [ "$CHOST" != "$CTARGET" ]; then
# cross-gcc: remove any files that would conflict with the
# native gcc package
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
rm -rf "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
# libcc1 does not depend on target, don't ship it
rm -rf "$pkgdir"/usr/lib/libcc1.so*
# These are moved into packages with arch=$CTARGET_ARCH so remove
# cross prefix
#mv "$pkgdir"/usr/$CTARGET/lib/*.so.* "$pkgdir"/usr/lib/ # FIXME
# fixup gcc library symlinks to be linker scripts so
# linker finds the libs from relocated sysroot
for so in "$pkgdir"/usr/"$CTARGET"/lib/*.so; do
......@@ -572,8 +538,7 @@ libatomic() {
depends=
replaces="gcc"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libatomic.so.*
}
libcxx() {
......@@ -586,8 +551,7 @@ libcxx() {
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
fi
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libstdc++.so.*
}
libcxx_dev() {
......@@ -605,15 +569,12 @@ libcxx_dev() {
gpp() {
pkgdesc="GNU C++ standard library and compiler"
depends="libstdc++=$_gccrel libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel libc-dev"
mkdir -p "$subpkgdir/$_gcclibexec" \
"$subpkgdir"/usr/bin \
"$subpkgdir"/usr/${_target:+$CTARGET/}include \
"$subpkgdir"/usr/${_target:+$CTARGET/}lib \
mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/"
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
depends="$depends so:libc.musl-x86_64.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
amove $_gcclibexec/cc1plus
amove usr/bin/*++
}
jit() {
......@@ -632,30 +593,26 @@ libobjc() {
pkgdesc="GNU Objective-C runtime"
replaces="objc"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libobjc.so.*
}
objc() {
pkgdesc="GNU Objective-C"
replaces="gcc"
depends="libc-dev gcc=$_gccrel libobjc=$_gccrel"
mkdir -p "$subpkgdir/$_gcclibexec" \
"$subpkgdir"/$_gcclibdir/include \
"$subpkgdir"/usr/lib
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/
mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \
"$subpkgdir"/usr/lib/
depends="musl-dev gcc=$_gccrel libobjc=$_gccrel"
amove $_gcclibexec/cc1obj
amove $_gcclibdir/include/objc
amove usr/lib/libobjc.so
amove usr/lib/libobjc.a
}
libgcc() {
pkgdesc="GNU C compiler runtime libraries"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgcc_s.so.*
}
libgomp() {
......@@ -663,17 +620,15 @@ libgomp() {
depends=
replaces="gcc"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgomp.so.*
}
libgphobos() {
pkgdesc="D programming language standard library for GCC"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgdruntime.so.*
amove usr/lib/libgphobos.so.*
}
gdc() {
......@@ -682,42 +637,26 @@ gdc() {
[ "$CBUILD" = "$CTARGET" ] && depends="$depends libgphobos=$_gccrel"
[ "$CHOST" = "$CTARGET" ] && provides="gcc-gdc-bootstrap=$_gccrel"
mkdir -p "$subpkgdir/$_gcclibexec" \
"$subpkgdir"/$_gcclibdir/include/d/ \
"$subpkgdir"/usr/lib \
"$subpkgdir"/usr/bin
# Copy: The installed '.d' files, the static lib, the binary itself
# The shared libs are part of 'libgphobos' so one can run program
# without installing the compiler
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
amove $_gcclibexec/d21
amove $_gcclibdir/include/d
if [ "$CBUILD" = "$CTARGET" ]; then
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
fi
if [ "$CHOST" = "$CTARGET" ]; then
mv "$pkgdir"/usr/lib/libgdruntime.a "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgphobos.a "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgphobos.spec "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/bin/gdc "$subpkgdir"/usr/bin/
else
mkdir -p "$subpkgdir"/usr/$CTARGET/lib/
mv "$pkgdir"/usr/$CTARGET/lib/libgdruntime.a \
"$subpkgdir"/usr/$CTARGET/lib/
mv "$pkgdir"/usr/$CTARGET/lib/libgphobos.a \
"$subpkgdir"/usr/$CTARGET/lib/
mv "$pkgdir"/usr/$CTARGET/lib/libgphobos.spec \
"$subpkgdir"/usr/$CTARGET/lib/
amove usr/lib/libgdruntime.so
amove usr/lib/libgphobos.so
fi
mv "$pkgdir"/usr/bin/$CTARGET-gdc "$subpkgdir"/usr/bin/
amove usr/${_target:+$CTARGET/}lib/libgdruntime.a
amove usr/${_target:+$CTARGET/}lib/libgphobos.a
amove usr/${_target:+$CTARGET/}lib/libgphobos.spec
amove usr/bin/*gdc
}
libgo() {
pkgdesc="Go runtime library for GCC"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgo.so.*
}
go() {
......@@ -725,31 +664,25 @@ go() {
depends="gcc=$_gccrel libgo=$_gccrel !go"
install="$pkgname-go.post-install"
mkdir -p "$subpkgdir"/$_gcclibexec \
"$subpkgdir"/usr/lib \
"$subpkgdir"/usr/bin
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/usr/lib/libgo.a \
"$pkgdir"/usr/lib/libgo.so \
"$pkgdir"/usr/lib/libgobegin.a \
"$pkgdir"/usr/lib/libgolibbegin.a \
"$subpkgdir"/usr/lib/
amove usr/lib/go
amove usr/bin/*go
amove usr/bin/*gofmt
amove $_gcclibexec/go1
amove $_gcclibexec/cgo
amove $_gcclibexec/buildid
amove $_gcclibexec/test2json
amove $_gcclibexec/vet
amove usr/lib/libgo.a
amove usr/lib/libgo.so
amove usr/lib/libgobegin.a
amove usr/lib/libgolibbegin.a
}
libgfortran() {
pkgdesc="Fortran runtime library for GCC"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgfortran.so.*
}
libquadmath() {
......@@ -757,8 +690,7 @@ libquadmath() {
pkgdesc="128-bit math library for GCC"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libquadmath.so.*
}
gfortran() {
......@@ -767,38 +699,30 @@ gfortran() {
$_libquadmath && depends="$depends libquadmath=$_gccrel"
replaces="gcc"
mkdir -p "$subpkgdir"/$_gcclibexec \
"$subpkgdir"/$_gcclibdir \
"$subpkgdir"/usr/lib \
"$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/
mv "$pkgdir"/usr/lib/libgfortran.a \
"$pkgdir"/usr/lib/libgfortran.so \
"$subpkgdir"/usr/lib/
amove usr/bin/*gfortran
amove usr/lib/libgfortran.a
amove usr/lib/libgfortran.so
if $_libquadmath; then
mv "$pkgdir"/usr/lib/libquadmath.a \
"$pkgdir"/usr/lib/libquadmath.so \
"$subpkgdir"/usr/lib/
amove usr/lib/libquadmath.a
amove usr/lib/libquadmath.so
fi
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec
mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir
amove $_gcclibdir/finclude
amove $_gcclibexec/f951
mv -v "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir/
}
libgnat() {
pkgdesc="GNU Ada runtime shared libraries"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
amove usr/lib/libgna*.so
}
libgnatstatic() {
pkgdesc="GNU Ada static libraries"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
amove usr/lib/libgna*.a
}
gnat() {
......@@ -807,12 +731,9 @@ gnat() {
provides="$pkgname-gnat-bootstrap=$_gccrel"
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
mkdir -p "$subpkgdir"/$_gcclibexec \
"$subpkgdir"/$_gcclibdir \
"$subpkgdir"/usr/bin
mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
amove $_gcclibexec/*gnat*
amove $_gcclibdir/*ada*
amove usr/bin/*gnat*
}
gdb() {
......@@ -864,4 +785,5 @@ c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
"
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2cf89ae83225f932b226cd57ef2d083a59bcf8a3
--
From 2cf89ae83225f932b226cd57ef2d083a59bcf8a3 Mon Sep 17 00:00:00 2001
From: Richard Biener <rguenther@suse.de>
Date: Tue, 6 Aug 2024 14:56:26 +0200
Subject: [PATCH] tree-optimization/116166 - forward jump-threading going wild
Currently the forward threader isn't limited as to the search space
it explores and with it now using path-ranger for simplifying
conditions it runs into it became pretty slow for degenerate cases
like compiling insn-emit.cc for RISC-V esp. when compiling for
a host with LOGICAL_OP_NON_SHORT_CIRCUIT disabled.
The following makes the forward threader honor the search space
limit I introduced for the backward threader. This reduces
compile-time from minutes to seconds for the testcase in PR116166.
Note this wasn't necessary before we had ranger but with ranger
the work we do is quadatic in the length of the threading path
we build up (the same is true for the backwards threader).
PR tree-optimization/116166
* tree-ssa-threadedge.h (jump_threader::thread_around_empty_blocks):
Add limit parameter.
(jump_threader::thread_through_normal_block): Likewise.
* tree-ssa-threadedge.cc (jump_threader::thread_around_empty_blocks):
Honor and decrement limit parameter.
(jump_threader::thread_through_normal_block): Likewise.
(jump_threader::thread_across_edge): Initialize limit from
param_max_jump_thread_paths and pass it down to workers.
---
gcc/tree-ssa-threadedge.cc | 30 ++++++++++++++++++++++--------
gcc/tree-ssa-threadedge.h | 4 ++--
2 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/gcc/tree-ssa-threadedge.cc b/gcc/tree-ssa-threadedge.cc
index 7f82639b8ecc..0aa2aa851430 100644
--- a/gcc/tree-ssa-threadedge.cc
+++ b/gcc/tree-ssa-threadedge.cc
@@ -786,13 +786,17 @@ propagate_threaded_block_debug_into (basic_block dest, basic_block src)
bool
jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
edge taken_edge,
- bitmap visited)
+ bitmap visited, unsigned &limit)
{
basic_block bb = taken_edge->dest;
gimple_stmt_iterator gsi;
gimple *stmt;
tree cond;
+ if (limit == 0)
+ return false;
+ --limit;
+
/* The key property of these blocks is that they need not be duplicated
when threading. Thus they cannot have visible side effects such
as PHI nodes. */
@@ -830,7 +834,8 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
m_state->append_path (taken_edge->dest);
bitmap_set_bit (visited, taken_edge->dest->index);
- return thread_around_empty_blocks (path, taken_edge, visited);
+ return thread_around_empty_blocks (path, taken_edge, visited,
+ limit);
}
}
@@ -872,7 +877,7 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
m_state->append_path (taken_edge->dest);
- thread_around_empty_blocks (path, taken_edge, visited);
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
return true;
}
@@ -899,8 +904,13 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
int
jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
- edge e, bitmap visited)
+ edge e, bitmap visited,
+ unsigned &limit)
{
+ if (limit == 0)
+ return 0;
+ limit--;
+
m_state->register_equivs_edge (e);
/* PHIs create temporary equivalences.
@@ -989,7 +999,7 @@ jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
visited. This may be overly conservative. */
bitmap_set_bit (visited, dest->index);
bitmap_set_bit (visited, e->dest->index);
- thread_around_empty_blocks (path, taken_edge, visited);
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
return 1;
}
}
@@ -1075,9 +1085,12 @@ jump_threader::thread_across_edge (edge e)
bitmap_set_bit (visited, e->src->index);
bitmap_set_bit (visited, e->dest->index);
+ /* Limit search space. */
+ unsigned limit = param_max_jump_thread_paths;
+
int threaded = 0;
if ((e->flags & EDGE_DFS_BACK) == 0)
- threaded = thread_through_normal_block (path, e, visited);
+ threaded = thread_through_normal_block (path, e, visited, limit);
if (threaded > 0)
{
@@ -1148,11 +1161,12 @@ jump_threader::thread_across_edge (edge e)
m_registry->push_edge (path, e, EDGE_START_JUMP_THREAD);
m_registry->push_edge (path, taken_edge, EDGE_COPY_SRC_JOINER_BLOCK);
- found = thread_around_empty_blocks (path, taken_edge, visited);
+ found = thread_around_empty_blocks (path, taken_edge, visited, limit);
if (!found)
found = thread_through_normal_block (path,
- path->last ()->e, visited) > 0;
+ path->last ()->e, visited,
+ limit) > 0;
/* If we were able to thread through a successor of E->dest, then
record the jump threading opportunity. */
diff --git a/gcc/tree-ssa-threadedge.h b/gcc/tree-ssa-threadedge.h
index 9f6cbfe93307..245b3506a550 100644
--- a/gcc/tree-ssa-threadedge.h
+++ b/gcc/tree-ssa-threadedge.h
@@ -101,9 +101,9 @@ private:
unsigned limit);
bool thread_around_empty_blocks (vec<class jump_thread_edge *> *path,
- edge, bitmap visited);
+ edge, bitmap visited, unsigned &limit);
int thread_through_normal_block (vec<jump_thread_edge *> *path,
- edge, bitmap visited);
+ edge, bitmap visited, unsigned &limit);
void thread_across_edge (edge);
bool record_temporary_equivalences_from_phis (edge);
gimple *record_temporary_equivalences_from_stmts_at_dest (edge);
--
2.43.5
......@@ -34,7 +34,7 @@ _pkgsnap="${pkgver##*_git}"
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
pkgname=gcc-armv7
pkgrel=3
pkgrel=4
pkgdesc="Stage2 cross-compiler for armv7"
url="https://gcc.gnu.org"
arch="x86_64"
......@@ -44,9 +44,10 @@ depends="binutils-armv7 mpc1"
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-armv7 binutils-armv7"
subpackages="g++-armv7:gpp libstdc++-dev-armv7:libcxx_dev"
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
replaces="libstdc++ binutils"
options="!strip"
options="!strip !tracedeps"
depends="$depends so:libc.musl-x86_64.so.1 so:libgcc_s.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libstdc++.so.6 so:libz.so.1"
: "${LANG_CXX:=true}"
: "${LANG_D:=true}"
......@@ -135,7 +136,6 @@ else
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
export LDFLAGS_FOR_TARGET="$LDFLAGS"
export BOOT_CFLAGS="$CFLAGS"
export BOOT_CXXFLAGS="$CXXFLAGS"
export BOOT_LDFLAGS="$LDFLAGS"
fi
......@@ -170,7 +170,7 @@ esac
# currently on x86, x86_64 and ia64
_libquadmath=$LANG_FORTRAN
case "$CTARGET_ARCH" in
x86 | x86_64 | ppc64le) _libquadmath=$LANG_FORTRAN ;;
x86 | x86_64 | ppc64le) ;;
*) _libquadmath=false ;;
esac
......@@ -218,13 +218,12 @@ if $LANG_FORTRAN; then
_languages="$_languages,fortran"
fi
if $LANG_ADA; then
subpackages="$subpackages gcc-gnat$_target:gnat"
subpackages="$subpackages gcc-gnat$_target:gnat libgnat::$CTARGET_ARCH"
_languages="$_languages,ada"
if [ "$CBUILD" = "$CTARGET" ]; then
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH"
else
subpackages="$subpackages libgnat::$CTARGET_ARCH"
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
fi
fi
......@@ -234,7 +233,7 @@ fi
makedepends="$makedepends_build $makedepends_host"
# when using upstream releases, use this URI template
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
# https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
#
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
......@@ -244,7 +243,7 @@ makedepends="$makedepends_build $makedepends_host"
# PLEASE submit all patches to gcc to https://gitlab.alpinelinux.org/kaniini/alpine-gcc-patches,
# so that they can be properly tracked and easily rebased if needed.
#source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${_pkgbase%%.*}-$_pkgsnap.tar.xz
source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
0001-posix_memalign.patch
0002-gcc-poison-system-directories.patch
0003-specs-turn-on-Wl-z-now-by-default.patch
......@@ -283,6 +282,7 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
0036-libphobos-add-riscv64-and-loongarch64-support.patch
fix-arm64.patch
ppc64le-quadmath.patch
riscv64-improve-build-time.patch
"
# secfixes:
......@@ -290,44 +290,21 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
# - CVE-2023-4039
# we build out-of-tree
#_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
#builddir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
builddir="$srcdir"/gcc-$_pkgbase
_gcclibdir="/usr/lib/gcc/$CTARGET/$_pkgbase"
_gcclibexec="/usr/libexec/gcc/$CTARGET/$_pkgbase"
prepare() {
cd "$_gccdir"
_err=
for i in $source; do
case "$i" in
*.patch)
msg "Applying $i"
patch -p1 -i "$srcdir"/$i || _err="$_err $i"
;;
esac
done
if [ -n "$_err" ]; then
error "The following patches failed:"
for i in $_err; do
echo " $i"
done
return 1
fi
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
default_prepare
echo $_pkgbase > gcc/BASE-VER
}
build() {
local _arch_configure=
local _libc_configure=
local _bootstrap_configure=
local _symvers=
local _jit_configure=
cd "$_gccdir"
case "$CTARGET" in
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
......@@ -351,15 +328,7 @@ build() {
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
esac
case "$CTARGET_LIBC" in
musl)
# musl does not support libsanitizer
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
_libc_configure="--disable-libssp --disable-libsanitizer"
_symvers="--disable-symvers"
export libat_cv_have_ifunc=no
;;
esac
export libat_cv_have_ifunc=no
case "$BOOTSTRAP" in
......@@ -388,10 +357,8 @@ build() {
echo " CHOST=$CHOST"
echo " CTARGET=$CTARGET"
echo " CTARGET_ARCH=$CTARGET_ARCH"
echo " CTARGET_LIBC=$CTARGET_LIBC"
echo " languages=$_languages"
echo " arch_configure=$_arch_configure"
echo " libc_configure=$_libc_configure"
echo " cross_configure=$_cross_configure"
echo " bootstrap_configure=$_bootstrap_configure"
echo " hash_style_configure=$_hash_style_configure"
......@@ -412,7 +379,7 @@ build() {
--disable-multilib
--disable-nls
--disable-werror
$_symvers
--disable-symvers
--enable-__cxa_atexit
--enable-default-pie
--enable-default-ssp
......@@ -420,7 +387,8 @@ build() {
--enable-link-serialization=2
--enable-linker-build-id
$_arch_configure
$_libc_configure
--disable-libssp
--disable-libsanitizer
$_cross_configure
$_bootstrap_configure
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
......@@ -430,7 +398,7 @@ build() {
mkdir -p "$_builddir"
cd "$_builddir"
"$_gccdir"/configure $gccconfiguration \
"$builddir"/configure $gccconfiguration \
--with-pkgversion="$version"
msg "building gcc"
......@@ -446,7 +414,7 @@ build() {
if $LANG_JIT; then
mkdir -p "$_builddir"/libgccjit-build
cd "$_builddir"/libgccjit-build
"$_gccdir"/configure $gccconfiguration \
"$builddir"/configure $gccconfiguration \
--disable-bootstrap \
--enable-host-shared \
--enable-languages=jit \
......@@ -461,7 +429,7 @@ package() {
cd "$_builddir"
make -j1 DESTDIR="$pkgdir" install
ln -s gcc "$pkgdir"/usr/bin/cc
[ "$CHOST" = "$CTARGET" ] && ln -s gcc "$pkgdir"/usr/bin/cc
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
if $LANG_JIT; then
......@@ -505,25 +473,23 @@ package() {
# move ada runtime libs
if $LANG_ADA; then
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 \( -name "libgna*.so" -o -name "libgna*.a" \) ); do
mv "$i" "$pkgdir"/usr/lib/
ln -s ../../../../${i##*/} $i
done
if [ "$CHOST" = "$CTARGET" ]; then
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
mv "$i" "$pkgdir"/usr/lib/
ln -s ../../../../${i##*/} $i
done
fi
fi
if [ "$CHOST" != "$CTARGET" ]; then
# cross-gcc: remove any files that would conflict with the
# native gcc package
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
rm -rf "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
# libcc1 does not depend on target, don't ship it
rm -rf "$pkgdir"/usr/lib/libcc1.so*
# These are moved into packages with arch=$CTARGET_ARCH so remove
# cross prefix
#mv "$pkgdir"/usr/$CTARGET/lib/*.so.* "$pkgdir"/usr/lib/ # FIXME
# fixup gcc library symlinks to be linker scripts so
# linker finds the libs from relocated sysroot
for so in "$pkgdir"/usr/"$CTARGET"/lib/*.so; do
......@@ -572,8 +538,7 @@ libatomic() {
depends=
replaces="gcc"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libatomic.so.*
}
libcxx() {
......@@ -586,8 +551,7 @@ libcxx() {
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
fi
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libstdc++.so.*
}
libcxx_dev() {
......@@ -605,15 +569,12 @@ libcxx_dev() {
gpp() {
pkgdesc="GNU C++ standard library and compiler"
depends="libstdc++=$_gccrel libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel libc-dev"
mkdir -p "$subpkgdir/$_gcclibexec" \
"$subpkgdir"/usr/bin \
"$subpkgdir"/usr/${_target:+$CTARGET/}include \
"$subpkgdir"/usr/${_target:+$CTARGET/}lib \
mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/"
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
depends="$depends so:libc.musl-x86_64.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
amove $_gcclibexec/cc1plus
amove usr/bin/*++
}
jit() {
......@@ -632,30 +593,26 @@ libobjc() {
pkgdesc="GNU Objective-C runtime"
replaces="objc"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libobjc.so.*
}
objc() {
pkgdesc="GNU Objective-C"
replaces="gcc"
depends="libc-dev gcc=$_gccrel libobjc=$_gccrel"
mkdir -p "$subpkgdir/$_gcclibexec" \
"$subpkgdir"/$_gcclibdir/include \
"$subpkgdir"/usr/lib
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/
mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \
"$subpkgdir"/usr/lib/
depends="musl-dev gcc=$_gccrel libobjc=$_gccrel"
amove $_gcclibexec/cc1obj
amove $_gcclibdir/include/objc
amove usr/lib/libobjc.so
amove usr/lib/libobjc.a
}
libgcc() {
pkgdesc="GNU C compiler runtime libraries"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgcc_s.so.*
}
libgomp() {
......@@ -663,17 +620,15 @@ libgomp() {
depends=
replaces="gcc"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgomp.so.*
}
libgphobos() {
pkgdesc="D programming language standard library for GCC"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgdruntime.so.*
amove usr/lib/libgphobos.so.*
}
gdc() {
......@@ -682,42 +637,26 @@ gdc() {
[ "$CBUILD" = "$CTARGET" ] && depends="$depends libgphobos=$_gccrel"
[ "$CHOST" = "$CTARGET" ] && provides="gcc-gdc-bootstrap=$_gccrel"
mkdir -p "$subpkgdir/$_gcclibexec" \
"$subpkgdir"/$_gcclibdir/include/d/ \
"$subpkgdir"/usr/lib \
"$subpkgdir"/usr/bin
# Copy: The installed '.d' files, the static lib, the binary itself
# The shared libs are part of 'libgphobos' so one can run program
# without installing the compiler
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
amove $_gcclibexec/d21
amove $_gcclibdir/include/d
if [ "$CBUILD" = "$CTARGET" ]; then
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
fi
if [ "$CHOST" = "$CTARGET" ]; then
mv "$pkgdir"/usr/lib/libgdruntime.a "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgphobos.a "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgphobos.spec "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/bin/gdc "$subpkgdir"/usr/bin/
else
mkdir -p "$subpkgdir"/usr/$CTARGET/lib/
mv "$pkgdir"/usr/$CTARGET/lib/libgdruntime.a \
"$subpkgdir"/usr/$CTARGET/lib/
mv "$pkgdir"/usr/$CTARGET/lib/libgphobos.a \
"$subpkgdir"/usr/$CTARGET/lib/
mv "$pkgdir"/usr/$CTARGET/lib/libgphobos.spec \
"$subpkgdir"/usr/$CTARGET/lib/
amove usr/lib/libgdruntime.so
amove usr/lib/libgphobos.so
fi
mv "$pkgdir"/usr/bin/$CTARGET-gdc "$subpkgdir"/usr/bin/
amove usr/${_target:+$CTARGET/}lib/libgdruntime.a
amove usr/${_target:+$CTARGET/}lib/libgphobos.a
amove usr/${_target:+$CTARGET/}lib/libgphobos.spec
amove usr/bin/*gdc
}
libgo() {
pkgdesc="Go runtime library for GCC"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgo.so.*
}
go() {
......@@ -725,31 +664,25 @@ go() {
depends="gcc=$_gccrel libgo=$_gccrel !go"
install="$pkgname-go.post-install"
mkdir -p "$subpkgdir"/$_gcclibexec \
"$subpkgdir"/usr/lib \
"$subpkgdir"/usr/bin
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/usr/lib/libgo.a \
"$pkgdir"/usr/lib/libgo.so \
"$pkgdir"/usr/lib/libgobegin.a \
"$pkgdir"/usr/lib/libgolibbegin.a \
"$subpkgdir"/usr/lib/
amove usr/lib/go
amove usr/bin/*go
amove usr/bin/*gofmt
amove $_gcclibexec/go1
amove $_gcclibexec/cgo
amove $_gcclibexec/buildid
amove $_gcclibexec/test2json
amove $_gcclibexec/vet
amove usr/lib/libgo.a
amove usr/lib/libgo.so
amove usr/lib/libgobegin.a
amove usr/lib/libgolibbegin.a
}
libgfortran() {
pkgdesc="Fortran runtime library for GCC"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgfortran.so.*
}
libquadmath() {
......@@ -757,8 +690,7 @@ libquadmath() {
pkgdesc="128-bit math library for GCC"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libquadmath.so.*
}
gfortran() {
......@@ -767,38 +699,30 @@ gfortran() {
$_libquadmath && depends="$depends libquadmath=$_gccrel"
replaces="gcc"
mkdir -p "$subpkgdir"/$_gcclibexec \
"$subpkgdir"/$_gcclibdir \
"$subpkgdir"/usr/lib \
"$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/
mv "$pkgdir"/usr/lib/libgfortran.a \
"$pkgdir"/usr/lib/libgfortran.so \
"$subpkgdir"/usr/lib/
amove usr/bin/*gfortran
amove usr/lib/libgfortran.a
amove usr/lib/libgfortran.so
if $_libquadmath; then
mv "$pkgdir"/usr/lib/libquadmath.a \
"$pkgdir"/usr/lib/libquadmath.so \
"$subpkgdir"/usr/lib/
amove usr/lib/libquadmath.a
amove usr/lib/libquadmath.so
fi
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec
mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir
amove $_gcclibdir/finclude
amove $_gcclibexec/f951
mv -v "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir/
}
libgnat() {
pkgdesc="GNU Ada runtime shared libraries"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
amove usr/lib/libgna*.so
}
libgnatstatic() {
pkgdesc="GNU Ada static libraries"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
amove usr/lib/libgna*.a
}
gnat() {
......@@ -807,12 +731,9 @@ gnat() {
provides="$pkgname-gnat-bootstrap=$_gccrel"
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
mkdir -p "$subpkgdir"/$_gcclibexec \
"$subpkgdir"/$_gcclibdir \
"$subpkgdir"/usr/bin
mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
amove $_gcclibexec/*gnat*
amove $_gcclibdir/*ada*
amove usr/bin/*gnat*
}
gdb() {
......@@ -864,4 +785,5 @@ c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
"
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2cf89ae83225f932b226cd57ef2d083a59bcf8a3
--
From 2cf89ae83225f932b226cd57ef2d083a59bcf8a3 Mon Sep 17 00:00:00 2001
From: Richard Biener <rguenther@suse.de>
Date: Tue, 6 Aug 2024 14:56:26 +0200
Subject: [PATCH] tree-optimization/116166 - forward jump-threading going wild
Currently the forward threader isn't limited as to the search space
it explores and with it now using path-ranger for simplifying
conditions it runs into it became pretty slow for degenerate cases
like compiling insn-emit.cc for RISC-V esp. when compiling for
a host with LOGICAL_OP_NON_SHORT_CIRCUIT disabled.
The following makes the forward threader honor the search space
limit I introduced for the backward threader. This reduces
compile-time from minutes to seconds for the testcase in PR116166.
Note this wasn't necessary before we had ranger but with ranger
the work we do is quadatic in the length of the threading path
we build up (the same is true for the backwards threader).
PR tree-optimization/116166
* tree-ssa-threadedge.h (jump_threader::thread_around_empty_blocks):
Add limit parameter.
(jump_threader::thread_through_normal_block): Likewise.
* tree-ssa-threadedge.cc (jump_threader::thread_around_empty_blocks):
Honor and decrement limit parameter.
(jump_threader::thread_through_normal_block): Likewise.
(jump_threader::thread_across_edge): Initialize limit from
param_max_jump_thread_paths and pass it down to workers.
---
gcc/tree-ssa-threadedge.cc | 30 ++++++++++++++++++++++--------
gcc/tree-ssa-threadedge.h | 4 ++--
2 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/gcc/tree-ssa-threadedge.cc b/gcc/tree-ssa-threadedge.cc
index 7f82639b8ecc..0aa2aa851430 100644
--- a/gcc/tree-ssa-threadedge.cc
+++ b/gcc/tree-ssa-threadedge.cc
@@ -786,13 +786,17 @@ propagate_threaded_block_debug_into (basic_block dest, basic_block src)
bool
jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
edge taken_edge,
- bitmap visited)
+ bitmap visited, unsigned &limit)
{
basic_block bb = taken_edge->dest;
gimple_stmt_iterator gsi;
gimple *stmt;
tree cond;
+ if (limit == 0)
+ return false;
+ --limit;
+
/* The key property of these blocks is that they need not be duplicated
when threading. Thus they cannot have visible side effects such
as PHI nodes. */
@@ -830,7 +834,8 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
m_state->append_path (taken_edge->dest);
bitmap_set_bit (visited, taken_edge->dest->index);
- return thread_around_empty_blocks (path, taken_edge, visited);
+ return thread_around_empty_blocks (path, taken_edge, visited,
+ limit);
}
}
@@ -872,7 +877,7 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
m_state->append_path (taken_edge->dest);
- thread_around_empty_blocks (path, taken_edge, visited);
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
return true;
}
@@ -899,8 +904,13 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
int
jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
- edge e, bitmap visited)
+ edge e, bitmap visited,
+ unsigned &limit)
{
+ if (limit == 0)
+ return 0;
+ limit--;
+
m_state->register_equivs_edge (e);
/* PHIs create temporary equivalences.
@@ -989,7 +999,7 @@ jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
visited. This may be overly conservative. */
bitmap_set_bit (visited, dest->index);
bitmap_set_bit (visited, e->dest->index);
- thread_around_empty_blocks (path, taken_edge, visited);
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
return 1;
}
}
@@ -1075,9 +1085,12 @@ jump_threader::thread_across_edge (edge e)
bitmap_set_bit (visited, e->src->index);
bitmap_set_bit (visited, e->dest->index);
+ /* Limit search space. */
+ unsigned limit = param_max_jump_thread_paths;
+
int threaded = 0;
if ((e->flags & EDGE_DFS_BACK) == 0)
- threaded = thread_through_normal_block (path, e, visited);
+ threaded = thread_through_normal_block (path, e, visited, limit);
if (threaded > 0)
{
@@ -1148,11 +1161,12 @@ jump_threader::thread_across_edge (edge e)
m_registry->push_edge (path, e, EDGE_START_JUMP_THREAD);
m_registry->push_edge (path, taken_edge, EDGE_COPY_SRC_JOINER_BLOCK);
- found = thread_around_empty_blocks (path, taken_edge, visited);
+ found = thread_around_empty_blocks (path, taken_edge, visited, limit);
if (!found)
found = thread_through_normal_block (path,
- path->last ()->e, visited) > 0;
+ path->last ()->e, visited,
+ limit) > 0;
/* If we were able to thread through a successor of E->dest, then
record the jump threading opportunity. */
diff --git a/gcc/tree-ssa-threadedge.h b/gcc/tree-ssa-threadedge.h
index 9f6cbfe93307..245b3506a550 100644
--- a/gcc/tree-ssa-threadedge.h
+++ b/gcc/tree-ssa-threadedge.h
@@ -101,9 +101,9 @@ private:
unsigned limit);
bool thread_around_empty_blocks (vec<class jump_thread_edge *> *path,
- edge, bitmap visited);
+ edge, bitmap visited, unsigned &limit);
int thread_through_normal_block (vec<jump_thread_edge *> *path,
- edge, bitmap visited);
+ edge, bitmap visited, unsigned &limit);
void thread_across_edge (edge);
bool record_temporary_equivalences_from_phis (edge);
gimple *record_temporary_equivalences_from_stmts_at_dest (edge);
--
2.43.5
......@@ -34,7 +34,7 @@ _pkgsnap="${pkgver##*_git}"
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
pkgname=gcc-riscv64
pkgrel=3
pkgrel=4
pkgdesc="Stage2 cross-compiler for riscv64"
url="https://gcc.gnu.org"
arch="x86_64"
......@@ -44,9 +44,10 @@ depends="binutils-riscv64 mpc1"
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-riscv64 binutils-riscv64"
subpackages="g++-riscv64:gpp libstdc++-dev-riscv64:libcxx_dev"
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
replaces="libstdc++ binutils"
options="!strip"
options="!strip !tracedeps"
depends="$depends so:libc.musl-x86_64.so.1 so:libgcc_s.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libstdc++.so.6 so:libz.so.1"
: "${LANG_CXX:=true}"
: "${LANG_D:=true}"
......@@ -135,7 +136,6 @@ else
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
export LDFLAGS_FOR_TARGET="$LDFLAGS"
export BOOT_CFLAGS="$CFLAGS"
export BOOT_CXXFLAGS="$CXXFLAGS"
export BOOT_LDFLAGS="$LDFLAGS"
fi
......@@ -170,7 +170,7 @@ esac
# currently on x86, x86_64 and ia64
_libquadmath=$LANG_FORTRAN
case "$CTARGET_ARCH" in
x86 | x86_64 | ppc64le) _libquadmath=$LANG_FORTRAN ;;
x86 | x86_64 | ppc64le) ;;
*) _libquadmath=false ;;
esac
......@@ -218,13 +218,12 @@ if $LANG_FORTRAN; then
_languages="$_languages,fortran"
fi
if $LANG_ADA; then
subpackages="$subpackages gcc-gnat$_target:gnat"
subpackages="$subpackages gcc-gnat$_target:gnat libgnat::$CTARGET_ARCH"
_languages="$_languages,ada"
if [ "$CBUILD" = "$CTARGET" ]; then
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH"
else
subpackages="$subpackages libgnat::$CTARGET_ARCH"
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
fi
fi
......@@ -234,7 +233,7 @@ fi
makedepends="$makedepends_build $makedepends_host"
# when using upstream releases, use this URI template
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
# https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
#
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
......@@ -244,7 +243,7 @@ makedepends="$makedepends_build $makedepends_host"
# PLEASE submit all patches to gcc to https://gitlab.alpinelinux.org/kaniini/alpine-gcc-patches,
# so that they can be properly tracked and easily rebased if needed.
#source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${_pkgbase%%.*}-$_pkgsnap.tar.xz
source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
0001-posix_memalign.patch
0002-gcc-poison-system-directories.patch
0003-specs-turn-on-Wl-z-now-by-default.patch
......@@ -283,6 +282,7 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
0036-libphobos-add-riscv64-and-loongarch64-support.patch
fix-arm64.patch
ppc64le-quadmath.patch
riscv64-improve-build-time.patch
"
# secfixes:
......@@ -290,44 +290,21 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
# - CVE-2023-4039
# we build out-of-tree
#_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
#builddir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
builddir="$srcdir"/gcc-$_pkgbase
_gcclibdir="/usr/lib/gcc/$CTARGET/$_pkgbase"
_gcclibexec="/usr/libexec/gcc/$CTARGET/$_pkgbase"
prepare() {
cd "$_gccdir"
_err=
for i in $source; do
case "$i" in
*.patch)
msg "Applying $i"
patch -p1 -i "$srcdir"/$i || _err="$_err $i"
;;
esac
done
if [ -n "$_err" ]; then
error "The following patches failed:"
for i in $_err; do
echo " $i"
done
return 1
fi
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
default_prepare
echo $_pkgbase > gcc/BASE-VER
}
build() {
local _arch_configure=
local _libc_configure=
local _bootstrap_configure=
local _symvers=
local _jit_configure=
cd "$_gccdir"
case "$CTARGET" in
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
......@@ -351,15 +328,7 @@ build() {
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
esac
case "$CTARGET_LIBC" in
musl)
# musl does not support libsanitizer
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
_libc_configure="--disable-libssp --disable-libsanitizer"
_symvers="--disable-symvers"
export libat_cv_have_ifunc=no
;;
esac
export libat_cv_have_ifunc=no
case "$BOOTSTRAP" in
......@@ -388,10 +357,8 @@ build() {
echo " CHOST=$CHOST"
echo " CTARGET=$CTARGET"
echo " CTARGET_ARCH=$CTARGET_ARCH"
echo " CTARGET_LIBC=$CTARGET_LIBC"
echo " languages=$_languages"
echo " arch_configure=$_arch_configure"
echo " libc_configure=$_libc_configure"
echo " cross_configure=$_cross_configure"
echo " bootstrap_configure=$_bootstrap_configure"
echo " hash_style_configure=$_hash_style_configure"
......@@ -412,7 +379,7 @@ build() {
--disable-multilib
--disable-nls
--disable-werror
$_symvers
--disable-symvers
--enable-__cxa_atexit
--enable-default-pie
--enable-default-ssp
......@@ -420,7 +387,8 @@ build() {
--enable-link-serialization=2
--enable-linker-build-id
$_arch_configure
$_libc_configure
--disable-libssp
--disable-libsanitizer
$_cross_configure
$_bootstrap_configure
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
......@@ -430,7 +398,7 @@ build() {
mkdir -p "$_builddir"
cd "$_builddir"
"$_gccdir"/configure $gccconfiguration \
"$builddir"/configure $gccconfiguration \
--with-pkgversion="$version"
msg "building gcc"
......@@ -446,7 +414,7 @@ build() {
if $LANG_JIT; then
mkdir -p "$_builddir"/libgccjit-build
cd "$_builddir"/libgccjit-build
"$_gccdir"/configure $gccconfiguration \
"$builddir"/configure $gccconfiguration \
--disable-bootstrap \
--enable-host-shared \
--enable-languages=jit \
......@@ -461,7 +429,7 @@ package() {
cd "$_builddir"
make -j1 DESTDIR="$pkgdir" install
ln -s gcc "$pkgdir"/usr/bin/cc
[ "$CHOST" = "$CTARGET" ] && ln -s gcc "$pkgdir"/usr/bin/cc
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
if $LANG_JIT; then
......@@ -505,25 +473,23 @@ package() {
# move ada runtime libs
if $LANG_ADA; then
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 \( -name "libgna*.so" -o -name "libgna*.a" \) ); do
mv "$i" "$pkgdir"/usr/lib/
ln -s ../../../../${i##*/} $i
done
if [ "$CHOST" = "$CTARGET" ]; then
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
mv "$i" "$pkgdir"/usr/lib/
ln -s ../../../../${i##*/} $i
done
fi
fi
if [ "$CHOST" != "$CTARGET" ]; then
# cross-gcc: remove any files that would conflict with the
# native gcc package
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
rm -rf "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
# libcc1 does not depend on target, don't ship it
rm -rf "$pkgdir"/usr/lib/libcc1.so*
# These are moved into packages with arch=$CTARGET_ARCH so remove
# cross prefix
#mv "$pkgdir"/usr/$CTARGET/lib/*.so.* "$pkgdir"/usr/lib/ # FIXME
# fixup gcc library symlinks to be linker scripts so
# linker finds the libs from relocated sysroot
for so in "$pkgdir"/usr/"$CTARGET"/lib/*.so; do
......@@ -572,8 +538,7 @@ libatomic() {
depends=
replaces="gcc"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libatomic.so.*
}
libcxx() {
......@@ -586,8 +551,7 @@ libcxx() {
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
fi
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libstdc++.so.*
}
libcxx_dev() {
......@@ -605,15 +569,12 @@ libcxx_dev() {
gpp() {
pkgdesc="GNU C++ standard library and compiler"
depends="libstdc++=$_gccrel libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel libc-dev"
mkdir -p "$subpkgdir/$_gcclibexec" \
"$subpkgdir"/usr/bin \
"$subpkgdir"/usr/${_target:+$CTARGET/}include \
"$subpkgdir"/usr/${_target:+$CTARGET/}lib \
mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/"
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
depends="$depends so:libc.musl-x86_64.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
amove $_gcclibexec/cc1plus
amove usr/bin/*++
}
jit() {
......@@ -632,30 +593,26 @@ libobjc() {
pkgdesc="GNU Objective-C runtime"
replaces="objc"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libobjc.so.*
}
objc() {
pkgdesc="GNU Objective-C"
replaces="gcc"
depends="libc-dev gcc=$_gccrel libobjc=$_gccrel"
mkdir -p "$subpkgdir/$_gcclibexec" \
"$subpkgdir"/$_gcclibdir/include \
"$subpkgdir"/usr/lib
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/
mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \
"$subpkgdir"/usr/lib/
depends="musl-dev gcc=$_gccrel libobjc=$_gccrel"
amove $_gcclibexec/cc1obj
amove $_gcclibdir/include/objc
amove usr/lib/libobjc.so
amove usr/lib/libobjc.a
}
libgcc() {
pkgdesc="GNU C compiler runtime libraries"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgcc_s.so.*
}
libgomp() {
......@@ -663,17 +620,15 @@ libgomp() {
depends=
replaces="gcc"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgomp.so.*
}
libgphobos() {
pkgdesc="D programming language standard library for GCC"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgdruntime.so.*
amove usr/lib/libgphobos.so.*
}
gdc() {
......@@ -682,42 +637,26 @@ gdc() {
[ "$CBUILD" = "$CTARGET" ] && depends="$depends libgphobos=$_gccrel"
[ "$CHOST" = "$CTARGET" ] && provides="gcc-gdc-bootstrap=$_gccrel"
mkdir -p "$subpkgdir/$_gcclibexec" \
"$subpkgdir"/$_gcclibdir/include/d/ \
"$subpkgdir"/usr/lib \
"$subpkgdir"/usr/bin
# Copy: The installed '.d' files, the static lib, the binary itself
# The shared libs are part of 'libgphobos' so one can run program
# without installing the compiler
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
amove $_gcclibexec/d21
amove $_gcclibdir/include/d
if [ "$CBUILD" = "$CTARGET" ]; then
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
fi
if [ "$CHOST" = "$CTARGET" ]; then
mv "$pkgdir"/usr/lib/libgdruntime.a "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgphobos.a "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgphobos.spec "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/bin/gdc "$subpkgdir"/usr/bin/
else
mkdir -p "$subpkgdir"/usr/$CTARGET/lib/
mv "$pkgdir"/usr/$CTARGET/lib/libgdruntime.a \
"$subpkgdir"/usr/$CTARGET/lib/
mv "$pkgdir"/usr/$CTARGET/lib/libgphobos.a \
"$subpkgdir"/usr/$CTARGET/lib/
mv "$pkgdir"/usr/$CTARGET/lib/libgphobos.spec \
"$subpkgdir"/usr/$CTARGET/lib/
amove usr/lib/libgdruntime.so
amove usr/lib/libgphobos.so
fi
mv "$pkgdir"/usr/bin/$CTARGET-gdc "$subpkgdir"/usr/bin/
amove usr/${_target:+$CTARGET/}lib/libgdruntime.a
amove usr/${_target:+$CTARGET/}lib/libgphobos.a
amove usr/${_target:+$CTARGET/}lib/libgphobos.spec
amove usr/bin/*gdc
}
libgo() {
pkgdesc="Go runtime library for GCC"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgo.so.*
}
go() {
......@@ -725,31 +664,25 @@ go() {
depends="gcc=$_gccrel libgo=$_gccrel !go"
install="$pkgname-go.post-install"
mkdir -p "$subpkgdir"/$_gcclibexec \
"$subpkgdir"/usr/lib \
"$subpkgdir"/usr/bin
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/usr/lib/libgo.a \
"$pkgdir"/usr/lib/libgo.so \
"$pkgdir"/usr/lib/libgobegin.a \
"$pkgdir"/usr/lib/libgolibbegin.a \
"$subpkgdir"/usr/lib/
amove usr/lib/go
amove usr/bin/*go
amove usr/bin/*gofmt
amove $_gcclibexec/go1
amove $_gcclibexec/cgo
amove $_gcclibexec/buildid
amove $_gcclibexec/test2json
amove $_gcclibexec/vet
amove usr/lib/libgo.a
amove usr/lib/libgo.so
amove usr/lib/libgobegin.a
amove usr/lib/libgolibbegin.a
}
libgfortran() {
pkgdesc="Fortran runtime library for GCC"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgfortran.so.*
}
libquadmath() {
......@@ -757,8 +690,7 @@ libquadmath() {
pkgdesc="128-bit math library for GCC"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libquadmath.so.*
}
gfortran() {
......@@ -767,38 +699,30 @@ gfortran() {
$_libquadmath && depends="$depends libquadmath=$_gccrel"
replaces="gcc"
mkdir -p "$subpkgdir"/$_gcclibexec \
"$subpkgdir"/$_gcclibdir \
"$subpkgdir"/usr/lib \
"$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/
mv "$pkgdir"/usr/lib/libgfortran.a \
"$pkgdir"/usr/lib/libgfortran.so \
"$subpkgdir"/usr/lib/
amove usr/bin/*gfortran
amove usr/lib/libgfortran.a
amove usr/lib/libgfortran.so
if $_libquadmath; then
mv "$pkgdir"/usr/lib/libquadmath.a \
"$pkgdir"/usr/lib/libquadmath.so \
"$subpkgdir"/usr/lib/
amove usr/lib/libquadmath.a
amove usr/lib/libquadmath.so
fi
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec
mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir
amove $_gcclibdir/finclude
amove $_gcclibexec/f951
mv -v "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir/
}
libgnat() {
pkgdesc="GNU Ada runtime shared libraries"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
amove usr/lib/libgna*.so
}
libgnatstatic() {
pkgdesc="GNU Ada static libraries"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
amove usr/lib/libgna*.a
}
gnat() {
......@@ -807,12 +731,9 @@ gnat() {
provides="$pkgname-gnat-bootstrap=$_gccrel"
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
mkdir -p "$subpkgdir"/$_gcclibexec \
"$subpkgdir"/$_gcclibdir \
"$subpkgdir"/usr/bin
mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
amove $_gcclibexec/*gnat*
amove $_gcclibdir/*ada*
amove usr/bin/*gnat*
}
gdb() {
......@@ -864,4 +785,5 @@ c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
"
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2cf89ae83225f932b226cd57ef2d083a59bcf8a3
--
From 2cf89ae83225f932b226cd57ef2d083a59bcf8a3 Mon Sep 17 00:00:00 2001
From: Richard Biener <rguenther@suse.de>
Date: Tue, 6 Aug 2024 14:56:26 +0200
Subject: [PATCH] tree-optimization/116166 - forward jump-threading going wild
Currently the forward threader isn't limited as to the search space
it explores and with it now using path-ranger for simplifying
conditions it runs into it became pretty slow for degenerate cases
like compiling insn-emit.cc for RISC-V esp. when compiling for
a host with LOGICAL_OP_NON_SHORT_CIRCUIT disabled.
The following makes the forward threader honor the search space
limit I introduced for the backward threader. This reduces
compile-time from minutes to seconds for the testcase in PR116166.
Note this wasn't necessary before we had ranger but with ranger
the work we do is quadatic in the length of the threading path
we build up (the same is true for the backwards threader).
PR tree-optimization/116166
* tree-ssa-threadedge.h (jump_threader::thread_around_empty_blocks):
Add limit parameter.
(jump_threader::thread_through_normal_block): Likewise.
* tree-ssa-threadedge.cc (jump_threader::thread_around_empty_blocks):
Honor and decrement limit parameter.
(jump_threader::thread_through_normal_block): Likewise.
(jump_threader::thread_across_edge): Initialize limit from
param_max_jump_thread_paths and pass it down to workers.
---
gcc/tree-ssa-threadedge.cc | 30 ++++++++++++++++++++++--------
gcc/tree-ssa-threadedge.h | 4 ++--
2 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/gcc/tree-ssa-threadedge.cc b/gcc/tree-ssa-threadedge.cc
index 7f82639b8ecc..0aa2aa851430 100644
--- a/gcc/tree-ssa-threadedge.cc
+++ b/gcc/tree-ssa-threadedge.cc
@@ -786,13 +786,17 @@ propagate_threaded_block_debug_into (basic_block dest, basic_block src)
bool
jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
edge taken_edge,
- bitmap visited)
+ bitmap visited, unsigned &limit)
{
basic_block bb = taken_edge->dest;
gimple_stmt_iterator gsi;
gimple *stmt;
tree cond;
+ if (limit == 0)
+ return false;
+ --limit;
+
/* The key property of these blocks is that they need not be duplicated
when threading. Thus they cannot have visible side effects such
as PHI nodes. */
@@ -830,7 +834,8 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
m_state->append_path (taken_edge->dest);
bitmap_set_bit (visited, taken_edge->dest->index);
- return thread_around_empty_blocks (path, taken_edge, visited);
+ return thread_around_empty_blocks (path, taken_edge, visited,
+ limit);
}
}
@@ -872,7 +877,7 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
m_state->append_path (taken_edge->dest);
- thread_around_empty_blocks (path, taken_edge, visited);
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
return true;
}
@@ -899,8 +904,13 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
int
jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
- edge e, bitmap visited)
+ edge e, bitmap visited,
+ unsigned &limit)
{
+ if (limit == 0)
+ return 0;
+ limit--;
+
m_state->register_equivs_edge (e);
/* PHIs create temporary equivalences.
@@ -989,7 +999,7 @@ jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
visited. This may be overly conservative. */
bitmap_set_bit (visited, dest->index);
bitmap_set_bit (visited, e->dest->index);
- thread_around_empty_blocks (path, taken_edge, visited);
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
return 1;
}
}
@@ -1075,9 +1085,12 @@ jump_threader::thread_across_edge (edge e)
bitmap_set_bit (visited, e->src->index);
bitmap_set_bit (visited, e->dest->index);
+ /* Limit search space. */
+ unsigned limit = param_max_jump_thread_paths;
+
int threaded = 0;
if ((e->flags & EDGE_DFS_BACK) == 0)
- threaded = thread_through_normal_block (path, e, visited);
+ threaded = thread_through_normal_block (path, e, visited, limit);
if (threaded > 0)
{
@@ -1148,11 +1161,12 @@ jump_threader::thread_across_edge (edge e)
m_registry->push_edge (path, e, EDGE_START_JUMP_THREAD);
m_registry->push_edge (path, taken_edge, EDGE_COPY_SRC_JOINER_BLOCK);
- found = thread_around_empty_blocks (path, taken_edge, visited);
+ found = thread_around_empty_blocks (path, taken_edge, visited, limit);
if (!found)
found = thread_through_normal_block (path,
- path->last ()->e, visited) > 0;
+ path->last ()->e, visited,
+ limit) > 0;
/* If we were able to thread through a successor of E->dest, then
record the jump threading opportunity. */
diff --git a/gcc/tree-ssa-threadedge.h b/gcc/tree-ssa-threadedge.h
index 9f6cbfe93307..245b3506a550 100644
--- a/gcc/tree-ssa-threadedge.h
+++ b/gcc/tree-ssa-threadedge.h
@@ -101,9 +101,9 @@ private:
unsigned limit);
bool thread_around_empty_blocks (vec<class jump_thread_edge *> *path,
- edge, bitmap visited);
+ edge, bitmap visited, unsigned &limit);
int thread_through_normal_block (vec<jump_thread_edge *> *path,
- edge, bitmap visited);
+ edge, bitmap visited, unsigned &limit);
void thread_across_edge (edge);
bool record_temporary_equivalences_from_phis (edge);
gimple *record_temporary_equivalences_from_stmts_at_dest (edge);
--
2.43.5
......@@ -34,7 +34,7 @@ _pkgsnap="${pkgver##*_git}"
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
pkgname=gcc-x86
pkgrel=3
pkgrel=4
pkgdesc="Stage2 cross-compiler for x86"
url="https://gcc.gnu.org"
arch="x86_64"
......@@ -44,9 +44,10 @@ depends="binutils-x86 mpc1"
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-x86 binutils-x86"
subpackages="g++-x86:gpp libstdc++-dev-x86:libcxx_dev"
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
replaces="libstdc++ binutils"
options="!strip"
options="!strip !tracedeps"
depends="$depends so:libc.musl-x86_64.so.1 so:libgcc_s.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libstdc++.so.6 so:libz.so.1"
: "${LANG_CXX:=true}"
: "${LANG_D:=true}"
......@@ -135,7 +136,6 @@ else
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
export LDFLAGS_FOR_TARGET="$LDFLAGS"
export BOOT_CFLAGS="$CFLAGS"
export BOOT_CXXFLAGS="$CXXFLAGS"
export BOOT_LDFLAGS="$LDFLAGS"
fi
......@@ -170,7 +170,7 @@ esac
# currently on x86, x86_64 and ia64
_libquadmath=$LANG_FORTRAN
case "$CTARGET_ARCH" in
x86 | x86_64 | ppc64le) _libquadmath=$LANG_FORTRAN ;;
x86 | x86_64 | ppc64le) ;;
*) _libquadmath=false ;;
esac
......@@ -218,13 +218,12 @@ if $LANG_FORTRAN; then
_languages="$_languages,fortran"
fi
if $LANG_ADA; then
subpackages="$subpackages gcc-gnat$_target:gnat"
subpackages="$subpackages gcc-gnat$_target:gnat libgnat::$CTARGET_ARCH"
_languages="$_languages,ada"
if [ "$CBUILD" = "$CTARGET" ]; then
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH"
else
subpackages="$subpackages libgnat::$CTARGET_ARCH"
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
fi
fi
......@@ -234,7 +233,7 @@ fi
makedepends="$makedepends_build $makedepends_host"
# when using upstream releases, use this URI template
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
# https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
#
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
......@@ -244,7 +243,7 @@ makedepends="$makedepends_build $makedepends_host"
# PLEASE submit all patches to gcc to https://gitlab.alpinelinux.org/kaniini/alpine-gcc-patches,
# so that they can be properly tracked and easily rebased if needed.
#source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${_pkgbase%%.*}-$_pkgsnap.tar.xz
source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
0001-posix_memalign.patch
0002-gcc-poison-system-directories.patch
0003-specs-turn-on-Wl-z-now-by-default.patch
......@@ -283,6 +282,7 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
0036-libphobos-add-riscv64-and-loongarch64-support.patch
fix-arm64.patch
ppc64le-quadmath.patch
riscv64-improve-build-time.patch
"
# secfixes:
......@@ -290,44 +290,21 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
# - CVE-2023-4039
# we build out-of-tree
#_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
#builddir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
builddir="$srcdir"/gcc-$_pkgbase
_gcclibdir="/usr/lib/gcc/$CTARGET/$_pkgbase"
_gcclibexec="/usr/libexec/gcc/$CTARGET/$_pkgbase"
prepare() {
cd "$_gccdir"
_err=
for i in $source; do
case "$i" in
*.patch)
msg "Applying $i"
patch -p1 -i "$srcdir"/$i || _err="$_err $i"
;;
esac
done
if [ -n "$_err" ]; then
error "The following patches failed:"
for i in $_err; do
echo " $i"
done
return 1
fi
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
default_prepare
echo $_pkgbase > gcc/BASE-VER
}
build() {
local _arch_configure=
local _libc_configure=
local _bootstrap_configure=
local _symvers=
local _jit_configure=
cd "$_gccdir"
case "$CTARGET" in
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
......@@ -351,15 +328,7 @@ build() {
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
esac
case "$CTARGET_LIBC" in
musl)
# musl does not support libsanitizer
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
_libc_configure="--disable-libssp --disable-libsanitizer"
_symvers="--disable-symvers"
export libat_cv_have_ifunc=no
;;
esac
export libat_cv_have_ifunc=no
case "$BOOTSTRAP" in
......@@ -388,10 +357,8 @@ build() {
echo " CHOST=$CHOST"
echo " CTARGET=$CTARGET"
echo " CTARGET_ARCH=$CTARGET_ARCH"
echo " CTARGET_LIBC=$CTARGET_LIBC"
echo " languages=$_languages"
echo " arch_configure=$_arch_configure"
echo " libc_configure=$_libc_configure"
echo " cross_configure=$_cross_configure"
echo " bootstrap_configure=$_bootstrap_configure"
echo " hash_style_configure=$_hash_style_configure"
......@@ -412,7 +379,7 @@ build() {
--disable-multilib
--disable-nls
--disable-werror
$_symvers
--disable-symvers
--enable-__cxa_atexit
--enable-default-pie
--enable-default-ssp
......@@ -420,7 +387,8 @@ build() {
--enable-link-serialization=2
--enable-linker-build-id
$_arch_configure
$_libc_configure
--disable-libssp
--disable-libsanitizer
$_cross_configure
$_bootstrap_configure
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
......@@ -430,7 +398,7 @@ build() {
mkdir -p "$_builddir"
cd "$_builddir"
"$_gccdir"/configure $gccconfiguration \
"$builddir"/configure $gccconfiguration \
--with-pkgversion="$version"
msg "building gcc"
......@@ -446,7 +414,7 @@ build() {
if $LANG_JIT; then
mkdir -p "$_builddir"/libgccjit-build
cd "$_builddir"/libgccjit-build
"$_gccdir"/configure $gccconfiguration \
"$builddir"/configure $gccconfiguration \
--disable-bootstrap \
--enable-host-shared \
--enable-languages=jit \
......@@ -461,7 +429,7 @@ package() {
cd "$_builddir"
make -j1 DESTDIR="$pkgdir" install
ln -s gcc "$pkgdir"/usr/bin/cc
[ "$CHOST" = "$CTARGET" ] && ln -s gcc "$pkgdir"/usr/bin/cc
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
if $LANG_JIT; then
......@@ -505,25 +473,23 @@ package() {
# move ada runtime libs
if $LANG_ADA; then
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 \( -name "libgna*.so" -o -name "libgna*.a" \) ); do
mv "$i" "$pkgdir"/usr/lib/
ln -s ../../../../${i##*/} $i
done
if [ "$CHOST" = "$CTARGET" ]; then
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
mv "$i" "$pkgdir"/usr/lib/
ln -s ../../../../${i##*/} $i
done
fi
fi
if [ "$CHOST" != "$CTARGET" ]; then
# cross-gcc: remove any files that would conflict with the
# native gcc package
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
rm -rf "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
# libcc1 does not depend on target, don't ship it
rm -rf "$pkgdir"/usr/lib/libcc1.so*
# These are moved into packages with arch=$CTARGET_ARCH so remove
# cross prefix
#mv "$pkgdir"/usr/$CTARGET/lib/*.so.* "$pkgdir"/usr/lib/ # FIXME
# fixup gcc library symlinks to be linker scripts so
# linker finds the libs from relocated sysroot
for so in "$pkgdir"/usr/"$CTARGET"/lib/*.so; do
......@@ -572,8 +538,7 @@ libatomic() {
depends=
replaces="gcc"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libatomic.so.*
}
libcxx() {
......@@ -586,8 +551,7 @@ libcxx() {
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
fi
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libstdc++.so.*
}
libcxx_dev() {
......@@ -605,15 +569,12 @@ libcxx_dev() {
gpp() {
pkgdesc="GNU C++ standard library and compiler"
depends="libstdc++=$_gccrel libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel libc-dev"
mkdir -p "$subpkgdir/$_gcclibexec" \
"$subpkgdir"/usr/bin \
"$subpkgdir"/usr/${_target:+$CTARGET/}include \
"$subpkgdir"/usr/${_target:+$CTARGET/}lib \
mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/"
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
depends="$depends so:libc.musl-x86_64.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
amove $_gcclibexec/cc1plus
amove usr/bin/*++
}
jit() {
......@@ -632,30 +593,26 @@ libobjc() {
pkgdesc="GNU Objective-C runtime"
replaces="objc"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libobjc.so.*
}
objc() {
pkgdesc="GNU Objective-C"
replaces="gcc"
depends="libc-dev gcc=$_gccrel libobjc=$_gccrel"
mkdir -p "$subpkgdir/$_gcclibexec" \
"$subpkgdir"/$_gcclibdir/include \
"$subpkgdir"/usr/lib
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/
mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \
"$subpkgdir"/usr/lib/
depends="musl-dev gcc=$_gccrel libobjc=$_gccrel"
amove $_gcclibexec/cc1obj
amove $_gcclibdir/include/objc
amove usr/lib/libobjc.so
amove usr/lib/libobjc.a
}
libgcc() {
pkgdesc="GNU C compiler runtime libraries"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgcc_s.so.*
}
libgomp() {
......@@ -663,17 +620,15 @@ libgomp() {
depends=
replaces="gcc"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgomp.so.*
}
libgphobos() {
pkgdesc="D programming language standard library for GCC"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgdruntime.so.*
amove usr/lib/libgphobos.so.*
}
gdc() {
......@@ -682,42 +637,26 @@ gdc() {
[ "$CBUILD" = "$CTARGET" ] && depends="$depends libgphobos=$_gccrel"
[ "$CHOST" = "$CTARGET" ] && provides="gcc-gdc-bootstrap=$_gccrel"
mkdir -p "$subpkgdir/$_gcclibexec" \
"$subpkgdir"/$_gcclibdir/include/d/ \
"$subpkgdir"/usr/lib \
"$subpkgdir"/usr/bin
# Copy: The installed '.d' files, the static lib, the binary itself
# The shared libs are part of 'libgphobos' so one can run program
# without installing the compiler
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
amove $_gcclibexec/d21
amove $_gcclibdir/include/d
if [ "$CBUILD" = "$CTARGET" ]; then
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
fi
if [ "$CHOST" = "$CTARGET" ]; then
mv "$pkgdir"/usr/lib/libgdruntime.a "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgphobos.a "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgphobos.spec "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/bin/gdc "$subpkgdir"/usr/bin/
else
mkdir -p "$subpkgdir"/usr/$CTARGET/lib/
mv "$pkgdir"/usr/$CTARGET/lib/libgdruntime.a \
"$subpkgdir"/usr/$CTARGET/lib/
mv "$pkgdir"/usr/$CTARGET/lib/libgphobos.a \
"$subpkgdir"/usr/$CTARGET/lib/
mv "$pkgdir"/usr/$CTARGET/lib/libgphobos.spec \
"$subpkgdir"/usr/$CTARGET/lib/
amove usr/lib/libgdruntime.so
amove usr/lib/libgphobos.so
fi
mv "$pkgdir"/usr/bin/$CTARGET-gdc "$subpkgdir"/usr/bin/
amove usr/${_target:+$CTARGET/}lib/libgdruntime.a
amove usr/${_target:+$CTARGET/}lib/libgphobos.a
amove usr/${_target:+$CTARGET/}lib/libgphobos.spec
amove usr/bin/*gdc
}
libgo() {
pkgdesc="Go runtime library for GCC"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgo.so.*
}
go() {
......@@ -725,31 +664,25 @@ go() {
depends="gcc=$_gccrel libgo=$_gccrel !go"
install="$pkgname-go.post-install"
mkdir -p "$subpkgdir"/$_gcclibexec \
"$subpkgdir"/usr/lib \
"$subpkgdir"/usr/bin
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/usr/lib/libgo.a \
"$pkgdir"/usr/lib/libgo.so \
"$pkgdir"/usr/lib/libgobegin.a \
"$pkgdir"/usr/lib/libgolibbegin.a \
"$subpkgdir"/usr/lib/
amove usr/lib/go
amove usr/bin/*go
amove usr/bin/*gofmt
amove $_gcclibexec/go1
amove $_gcclibexec/cgo
amove $_gcclibexec/buildid
amove $_gcclibexec/test2json
amove $_gcclibexec/vet
amove usr/lib/libgo.a
amove usr/lib/libgo.so
amove usr/lib/libgobegin.a
amove usr/lib/libgolibbegin.a
}
libgfortran() {
pkgdesc="Fortran runtime library for GCC"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgfortran.so.*
}
libquadmath() {
......@@ -757,8 +690,7 @@ libquadmath() {
pkgdesc="128-bit math library for GCC"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libquadmath.so.*
}
gfortran() {
......@@ -767,38 +699,30 @@ gfortran() {
$_libquadmath && depends="$depends libquadmath=$_gccrel"
replaces="gcc"
mkdir -p "$subpkgdir"/$_gcclibexec \
"$subpkgdir"/$_gcclibdir \
"$subpkgdir"/usr/lib \
"$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/
mv "$pkgdir"/usr/lib/libgfortran.a \
"$pkgdir"/usr/lib/libgfortran.so \
"$subpkgdir"/usr/lib/
amove usr/bin/*gfortran
amove usr/lib/libgfortran.a
amove usr/lib/libgfortran.so
if $_libquadmath; then
mv "$pkgdir"/usr/lib/libquadmath.a \
"$pkgdir"/usr/lib/libquadmath.so \
"$subpkgdir"/usr/lib/
amove usr/lib/libquadmath.a
amove usr/lib/libquadmath.so
fi
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec
mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir
amove $_gcclibdir/finclude
amove $_gcclibexec/f951
mv -v "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir/
}
libgnat() {
pkgdesc="GNU Ada runtime shared libraries"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
amove usr/lib/libgna*.so
}
libgnatstatic() {
pkgdesc="GNU Ada static libraries"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
amove usr/lib/libgna*.a
}
gnat() {
......@@ -807,12 +731,9 @@ gnat() {
provides="$pkgname-gnat-bootstrap=$_gccrel"
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
mkdir -p "$subpkgdir"/$_gcclibexec \
"$subpkgdir"/$_gcclibdir \
"$subpkgdir"/usr/bin
mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
amove $_gcclibexec/*gnat*
amove $_gcclibdir/*ada*
amove usr/bin/*gnat*
}
gdb() {
......@@ -864,4 +785,5 @@ c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
"
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2cf89ae83225f932b226cd57ef2d083a59bcf8a3
--
From 2cf89ae83225f932b226cd57ef2d083a59bcf8a3 Mon Sep 17 00:00:00 2001
From: Richard Biener <rguenther@suse.de>
Date: Tue, 6 Aug 2024 14:56:26 +0200
Subject: [PATCH] tree-optimization/116166 - forward jump-threading going wild
Currently the forward threader isn't limited as to the search space
it explores and with it now using path-ranger for simplifying
conditions it runs into it became pretty slow for degenerate cases
like compiling insn-emit.cc for RISC-V esp. when compiling for
a host with LOGICAL_OP_NON_SHORT_CIRCUIT disabled.
The following makes the forward threader honor the search space
limit I introduced for the backward threader. This reduces
compile-time from minutes to seconds for the testcase in PR116166.
Note this wasn't necessary before we had ranger but with ranger
the work we do is quadatic in the length of the threading path
we build up (the same is true for the backwards threader).
PR tree-optimization/116166
* tree-ssa-threadedge.h (jump_threader::thread_around_empty_blocks):
Add limit parameter.
(jump_threader::thread_through_normal_block): Likewise.
* tree-ssa-threadedge.cc (jump_threader::thread_around_empty_blocks):
Honor and decrement limit parameter.
(jump_threader::thread_through_normal_block): Likewise.
(jump_threader::thread_across_edge): Initialize limit from
param_max_jump_thread_paths and pass it down to workers.
---
gcc/tree-ssa-threadedge.cc | 30 ++++++++++++++++++++++--------
gcc/tree-ssa-threadedge.h | 4 ++--
2 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/gcc/tree-ssa-threadedge.cc b/gcc/tree-ssa-threadedge.cc
index 7f82639b8ecc..0aa2aa851430 100644
--- a/gcc/tree-ssa-threadedge.cc
+++ b/gcc/tree-ssa-threadedge.cc
@@ -786,13 +786,17 @@ propagate_threaded_block_debug_into (basic_block dest, basic_block src)
bool
jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
edge taken_edge,
- bitmap visited)
+ bitmap visited, unsigned &limit)
{
basic_block bb = taken_edge->dest;
gimple_stmt_iterator gsi;
gimple *stmt;
tree cond;
+ if (limit == 0)
+ return false;
+ --limit;
+
/* The key property of these blocks is that they need not be duplicated
when threading. Thus they cannot have visible side effects such
as PHI nodes. */
@@ -830,7 +834,8 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
m_state->append_path (taken_edge->dest);
bitmap_set_bit (visited, taken_edge->dest->index);
- return thread_around_empty_blocks (path, taken_edge, visited);
+ return thread_around_empty_blocks (path, taken_edge, visited,
+ limit);
}
}
@@ -872,7 +877,7 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
m_state->append_path (taken_edge->dest);
- thread_around_empty_blocks (path, taken_edge, visited);
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
return true;
}
@@ -899,8 +904,13 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
int
jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
- edge e, bitmap visited)
+ edge e, bitmap visited,
+ unsigned &limit)
{
+ if (limit == 0)
+ return 0;
+ limit--;
+
m_state->register_equivs_edge (e);
/* PHIs create temporary equivalences.
@@ -989,7 +999,7 @@ jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
visited. This may be overly conservative. */
bitmap_set_bit (visited, dest->index);
bitmap_set_bit (visited, e->dest->index);
- thread_around_empty_blocks (path, taken_edge, visited);
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
return 1;
}
}
@@ -1075,9 +1085,12 @@ jump_threader::thread_across_edge (edge e)
bitmap_set_bit (visited, e->src->index);
bitmap_set_bit (visited, e->dest->index);
+ /* Limit search space. */
+ unsigned limit = param_max_jump_thread_paths;
+
int threaded = 0;
if ((e->flags & EDGE_DFS_BACK) == 0)
- threaded = thread_through_normal_block (path, e, visited);
+ threaded = thread_through_normal_block (path, e, visited, limit);
if (threaded > 0)
{
@@ -1148,11 +1161,12 @@ jump_threader::thread_across_edge (edge e)
m_registry->push_edge (path, e, EDGE_START_JUMP_THREAD);
m_registry->push_edge (path, taken_edge, EDGE_COPY_SRC_JOINER_BLOCK);
- found = thread_around_empty_blocks (path, taken_edge, visited);
+ found = thread_around_empty_blocks (path, taken_edge, visited, limit);
if (!found)
found = thread_through_normal_block (path,
- path->last ()->e, visited) > 0;
+ path->last ()->e, visited,
+ limit) > 0;
/* If we were able to thread through a successor of E->dest, then
record the jump threading opportunity. */
diff --git a/gcc/tree-ssa-threadedge.h b/gcc/tree-ssa-threadedge.h
index 9f6cbfe93307..245b3506a550 100644
--- a/gcc/tree-ssa-threadedge.h
+++ b/gcc/tree-ssa-threadedge.h
@@ -101,9 +101,9 @@ private:
unsigned limit);
bool thread_around_empty_blocks (vec<class jump_thread_edge *> *path,
- edge, bitmap visited);
+ edge, bitmap visited, unsigned &limit);
int thread_through_normal_block (vec<jump_thread_edge *> *path,
- edge, bitmap visited);
+ edge, bitmap visited, unsigned &limit);
void thread_across_edge (edge);
bool record_temporary_equivalences_from_phis (edge);
gimple *record_temporary_equivalences_from_stmts_at_dest (edge);
--
2.43.5
......@@ -34,7 +34,7 @@ _pkgsnap="${pkgver##*_git}"
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
pkgname=gcc-x86_64
pkgrel=3
pkgrel=4
pkgdesc="Stage2 cross-compiler for x86_64"
url="https://gcc.gnu.org"
arch="aarch64"
......@@ -44,9 +44,11 @@ depends="binutils-x86_64 mpc1"
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-x86_64 binutils-x86_64"
subpackages="g++-x86_64:gpp libstdc++-dev-x86_64:libcxx_dev"
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
replaces="libstdc++ binutils"
options="!strip"
options="!strip !tracedeps"
depends="$depends so:libc.musl-aarch64.so.1 so:libgcc_s.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libstdc++.so.6 so:libz.so.1"
: "${LANG_CXX:=true}"
: "${LANG_D:=true}"
......@@ -135,7 +137,6 @@ else
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
export LDFLAGS_FOR_TARGET="$LDFLAGS"
export BOOT_CFLAGS="$CFLAGS"
export BOOT_CXXFLAGS="$CXXFLAGS"
export BOOT_LDFLAGS="$LDFLAGS"
fi
......@@ -170,7 +171,7 @@ esac
# currently on x86, x86_64 and ia64
_libquadmath=$LANG_FORTRAN
case "$CTARGET_ARCH" in
x86 | x86_64 | ppc64le) _libquadmath=$LANG_FORTRAN ;;
x86 | x86_64 | ppc64le) ;;
*) _libquadmath=false ;;
esac
......@@ -218,13 +219,12 @@ if $LANG_FORTRAN; then
_languages="$_languages,fortran"
fi
if $LANG_ADA; then
subpackages="$subpackages gcc-gnat$_target:gnat"
subpackages="$subpackages gcc-gnat$_target:gnat libgnat::$CTARGET_ARCH"
_languages="$_languages,ada"
if [ "$CBUILD" = "$CTARGET" ]; then
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH"
else
subpackages="$subpackages libgnat::$CTARGET_ARCH"
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
fi
fi
......@@ -234,7 +234,7 @@ fi
makedepends="$makedepends_build $makedepends_host"
# when using upstream releases, use this URI template
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
# https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
#
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
......@@ -244,7 +244,7 @@ makedepends="$makedepends_build $makedepends_host"
# PLEASE submit all patches to gcc to https://gitlab.alpinelinux.org/kaniini/alpine-gcc-patches,
# so that they can be properly tracked and easily rebased if needed.
#source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${_pkgbase%%.*}-$_pkgsnap.tar.xz
source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
0001-posix_memalign.patch
0002-gcc-poison-system-directories.patch
0003-specs-turn-on-Wl-z-now-by-default.patch
......@@ -283,6 +283,7 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
0036-libphobos-add-riscv64-and-loongarch64-support.patch
fix-arm64.patch
ppc64le-quadmath.patch
riscv64-improve-build-time.patch
"
# secfixes:
......@@ -290,44 +291,21 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkg
# - CVE-2023-4039
# we build out-of-tree
#_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
#builddir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
builddir="$srcdir"/gcc-$_pkgbase
_gcclibdir="/usr/lib/gcc/$CTARGET/$_pkgbase"
_gcclibexec="/usr/libexec/gcc/$CTARGET/$_pkgbase"
prepare() {
cd "$_gccdir"
_err=
for i in $source; do
case "$i" in
*.patch)
msg "Applying $i"
patch -p1 -i "$srcdir"/$i || _err="$_err $i"
;;
esac
done
if [ -n "$_err" ]; then
error "The following patches failed:"
for i in $_err; do
echo " $i"
done
return 1
fi
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
default_prepare
echo $_pkgbase > gcc/BASE-VER
}
build() {
local _arch_configure=
local _libc_configure=
local _bootstrap_configure=
local _symvers=
local _jit_configure=
cd "$_gccdir"
case "$CTARGET" in
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
......@@ -351,15 +329,7 @@ build() {
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
esac
case "$CTARGET_LIBC" in
musl)
# musl does not support libsanitizer
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
_libc_configure="--disable-libssp --disable-libsanitizer"
_symvers="--disable-symvers"
export libat_cv_have_ifunc=no
;;
esac
export libat_cv_have_ifunc=no
case "$BOOTSTRAP" in
......@@ -388,10 +358,8 @@ build() {
echo " CHOST=$CHOST"
echo " CTARGET=$CTARGET"
echo " CTARGET_ARCH=$CTARGET_ARCH"
echo " CTARGET_LIBC=$CTARGET_LIBC"
echo " languages=$_languages"
echo " arch_configure=$_arch_configure"
echo " libc_configure=$_libc_configure"
echo " cross_configure=$_cross_configure"
echo " bootstrap_configure=$_bootstrap_configure"
echo " hash_style_configure=$_hash_style_configure"
......@@ -412,7 +380,7 @@ build() {
--disable-multilib
--disable-nls
--disable-werror
$_symvers
--disable-symvers
--enable-__cxa_atexit
--enable-default-pie
--enable-default-ssp
......@@ -420,7 +388,8 @@ build() {
--enable-link-serialization=2
--enable-linker-build-id
$_arch_configure
$_libc_configure
--disable-libssp
--disable-libsanitizer
$_cross_configure
$_bootstrap_configure
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
......@@ -430,7 +399,7 @@ build() {
mkdir -p "$_builddir"
cd "$_builddir"
"$_gccdir"/configure $gccconfiguration \
"$builddir"/configure $gccconfiguration \
--with-pkgversion="$version"
msg "building gcc"
......@@ -446,7 +415,7 @@ build() {
if $LANG_JIT; then
mkdir -p "$_builddir"/libgccjit-build
cd "$_builddir"/libgccjit-build
"$_gccdir"/configure $gccconfiguration \
"$builddir"/configure $gccconfiguration \
--disable-bootstrap \
--enable-host-shared \
--enable-languages=jit \
......@@ -461,7 +430,7 @@ package() {
cd "$_builddir"
make -j1 DESTDIR="$pkgdir" install
ln -s gcc "$pkgdir"/usr/bin/cc
[ "$CHOST" = "$CTARGET" ] && ln -s gcc "$pkgdir"/usr/bin/cc
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
if $LANG_JIT; then
......@@ -505,25 +474,23 @@ package() {
# move ada runtime libs
if $LANG_ADA; then
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 \( -name "libgna*.so" -o -name "libgna*.a" \) ); do
mv "$i" "$pkgdir"/usr/lib/
ln -s ../../../../${i##*/} $i
done
if [ "$CHOST" = "$CTARGET" ]; then
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do
mv "$i" "$pkgdir"/usr/lib/
ln -s ../../../../${i##*/} $i
done
fi
fi
if [ "$CHOST" != "$CTARGET" ]; then
# cross-gcc: remove any files that would conflict with the
# native gcc package
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
rm -rf "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
# libcc1 does not depend on target, don't ship it
rm -rf "$pkgdir"/usr/lib/libcc1.so*
# These are moved into packages with arch=$CTARGET_ARCH so remove
# cross prefix
#mv "$pkgdir"/usr/$CTARGET/lib/*.so.* "$pkgdir"/usr/lib/ # FIXME
# fixup gcc library symlinks to be linker scripts so
# linker finds the libs from relocated sysroot
for so in "$pkgdir"/usr/"$CTARGET"/lib/*.so; do
......@@ -572,8 +539,7 @@ libatomic() {
depends=
replaces="gcc"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libatomic.so.*
}
libcxx() {
......@@ -586,8 +552,7 @@ libcxx() {
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
fi
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libstdc++.so.*
}
libcxx_dev() {
......@@ -605,15 +570,13 @@ libcxx_dev() {
gpp() {
pkgdesc="GNU C++ standard library and compiler"
depends="libstdc++=$_gccrel libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel libc-dev"
mkdir -p "$subpkgdir/$_gcclibexec" \
"$subpkgdir"/usr/bin \
"$subpkgdir"/usr/${_target:+$CTARGET/}include \
"$subpkgdir"/usr/${_target:+$CTARGET/}lib \
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
depends="$depends so:libc.musl-aarch64.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/"
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/
amove $_gcclibexec/cc1plus
amove usr/bin/*++
}
jit() {
......@@ -632,30 +595,26 @@ libobjc() {
pkgdesc="GNU Objective-C runtime"
replaces="objc"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libobjc.so.*
}
objc() {
pkgdesc="GNU Objective-C"
replaces="gcc"
depends="libc-dev gcc=$_gccrel libobjc=$_gccrel"
mkdir -p "$subpkgdir/$_gcclibexec" \
"$subpkgdir"/$_gcclibdir/include \
"$subpkgdir"/usr/lib
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/
mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \
"$subpkgdir"/usr/lib/
depends="musl-dev gcc=$_gccrel libobjc=$_gccrel"
amove $_gcclibexec/cc1obj
amove $_gcclibdir/include/objc
amove usr/lib/libobjc.so
amove usr/lib/libobjc.a
}
libgcc() {
pkgdesc="GNU C compiler runtime libraries"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgcc_s.so.*
}
libgomp() {
......@@ -663,17 +622,15 @@ libgomp() {
depends=
replaces="gcc"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgomp.so.*
}
libgphobos() {
pkgdesc="D programming language standard library for GCC"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgdruntime.so.*
amove usr/lib/libgphobos.so.*
}
gdc() {
......@@ -682,42 +639,26 @@ gdc() {
[ "$CBUILD" = "$CTARGET" ] && depends="$depends libgphobos=$_gccrel"
[ "$CHOST" = "$CTARGET" ] && provides="gcc-gdc-bootstrap=$_gccrel"
mkdir -p "$subpkgdir/$_gcclibexec" \
"$subpkgdir"/$_gcclibdir/include/d/ \
"$subpkgdir"/usr/lib \
"$subpkgdir"/usr/bin
# Copy: The installed '.d' files, the static lib, the binary itself
# The shared libs are part of 'libgphobos' so one can run program
# without installing the compiler
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
amove $_gcclibexec/d21
amove $_gcclibdir/include/d
if [ "$CBUILD" = "$CTARGET" ]; then
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
fi
if [ "$CHOST" = "$CTARGET" ]; then
mv "$pkgdir"/usr/lib/libgdruntime.a "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgphobos.a "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgphobos.spec "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/bin/gdc "$subpkgdir"/usr/bin/
else
mkdir -p "$subpkgdir"/usr/$CTARGET/lib/
mv "$pkgdir"/usr/$CTARGET/lib/libgdruntime.a \
"$subpkgdir"/usr/$CTARGET/lib/
mv "$pkgdir"/usr/$CTARGET/lib/libgphobos.a \
"$subpkgdir"/usr/$CTARGET/lib/
mv "$pkgdir"/usr/$CTARGET/lib/libgphobos.spec \
"$subpkgdir"/usr/$CTARGET/lib/
amove usr/lib/libgdruntime.so
amove usr/lib/libgphobos.so
fi
mv "$pkgdir"/usr/bin/$CTARGET-gdc "$subpkgdir"/usr/bin/
amove usr/${_target:+$CTARGET/}lib/libgdruntime.a
amove usr/${_target:+$CTARGET/}lib/libgphobos.a
amove usr/${_target:+$CTARGET/}lib/libgphobos.spec
amove usr/bin/*gdc
}
libgo() {
pkgdesc="Go runtime library for GCC"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgo.so.*
}
go() {
......@@ -725,31 +666,25 @@ go() {
depends="gcc=$_gccrel libgo=$_gccrel !go"
install="$pkgname-go.post-install"
mkdir -p "$subpkgdir"/$_gcclibexec \
"$subpkgdir"/usr/lib \
"$subpkgdir"/usr/bin
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/usr/lib/libgo.a \
"$pkgdir"/usr/lib/libgo.so \
"$pkgdir"/usr/lib/libgobegin.a \
"$pkgdir"/usr/lib/libgolibbegin.a \
"$subpkgdir"/usr/lib/
amove usr/lib/go
amove usr/bin/*go
amove usr/bin/*gofmt
amove $_gcclibexec/go1
amove $_gcclibexec/cgo
amove $_gcclibexec/buildid
amove $_gcclibexec/test2json
amove $_gcclibexec/vet
amove usr/lib/libgo.a
amove usr/lib/libgo.so
amove usr/lib/libgobegin.a
amove usr/lib/libgolibbegin.a
}
libgfortran() {
pkgdesc="Fortran runtime library for GCC"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libgfortran.so.*
}
libquadmath() {
......@@ -757,8 +692,7 @@ libquadmath() {
pkgdesc="128-bit math library for GCC"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/
amove usr/lib/libquadmath.so.*
}
gfortran() {
......@@ -767,38 +701,30 @@ gfortran() {
$_libquadmath && depends="$depends libquadmath=$_gccrel"
replaces="gcc"
mkdir -p "$subpkgdir"/$_gcclibexec \
"$subpkgdir"/$_gcclibdir \
"$subpkgdir"/usr/lib \
"$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/
mv "$pkgdir"/usr/lib/libgfortran.a \
"$pkgdir"/usr/lib/libgfortran.so \
"$subpkgdir"/usr/lib/
amove usr/bin/*gfortran
amove usr/lib/libgfortran.a
amove usr/lib/libgfortran.so
if $_libquadmath; then
mv "$pkgdir"/usr/lib/libquadmath.a \
"$pkgdir"/usr/lib/libquadmath.so \
"$subpkgdir"/usr/lib/
amove usr/lib/libquadmath.a
amove usr/lib/libquadmath.so
fi
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec
mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir
amove $_gcclibdir/finclude
amove $_gcclibexec/f951
mv -v "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir/
}
libgnat() {
pkgdesc="GNU Ada runtime shared libraries"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/
amove usr/lib/libgna*.so
}
libgnatstatic() {
pkgdesc="GNU Ada static libraries"
depends=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
amove usr/lib/libgna*.a
}
gnat() {
......@@ -807,12 +733,9 @@ gnat() {
provides="$pkgname-gnat-bootstrap=$_gccrel"
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
mkdir -p "$subpkgdir"/$_gcclibexec \
"$subpkgdir"/$_gcclibdir \
"$subpkgdir"/usr/bin
mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
amove $_gcclibexec/*gnat*
amove $_gcclibdir/*ada*
amove usr/bin/*gnat*
}
gdb() {
......@@ -864,4 +787,5 @@ c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
"
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2cf89ae83225f932b226cd57ef2d083a59bcf8a3
--
From 2cf89ae83225f932b226cd57ef2d083a59bcf8a3 Mon Sep 17 00:00:00 2001
From: Richard Biener <rguenther@suse.de>
Date: Tue, 6 Aug 2024 14:56:26 +0200
Subject: [PATCH] tree-optimization/116166 - forward jump-threading going wild
Currently the forward threader isn't limited as to the search space
it explores and with it now using path-ranger for simplifying
conditions it runs into it became pretty slow for degenerate cases
like compiling insn-emit.cc for RISC-V esp. when compiling for
a host with LOGICAL_OP_NON_SHORT_CIRCUIT disabled.
The following makes the forward threader honor the search space
limit I introduced for the backward threader. This reduces
compile-time from minutes to seconds for the testcase in PR116166.
Note this wasn't necessary before we had ranger but with ranger
the work we do is quadatic in the length of the threading path
we build up (the same is true for the backwards threader).
PR tree-optimization/116166
* tree-ssa-threadedge.h (jump_threader::thread_around_empty_blocks):
Add limit parameter.
(jump_threader::thread_through_normal_block): Likewise.
* tree-ssa-threadedge.cc (jump_threader::thread_around_empty_blocks):
Honor and decrement limit parameter.
(jump_threader::thread_through_normal_block): Likewise.
(jump_threader::thread_across_edge): Initialize limit from
param_max_jump_thread_paths and pass it down to workers.
---
gcc/tree-ssa-threadedge.cc | 30 ++++++++++++++++++++++--------
gcc/tree-ssa-threadedge.h | 4 ++--
2 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/gcc/tree-ssa-threadedge.cc b/gcc/tree-ssa-threadedge.cc
index 7f82639b8ecc..0aa2aa851430 100644
--- a/gcc/tree-ssa-threadedge.cc
+++ b/gcc/tree-ssa-threadedge.cc
@@ -786,13 +786,17 @@ propagate_threaded_block_debug_into (basic_block dest, basic_block src)
bool
jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
edge taken_edge,
- bitmap visited)
+ bitmap visited, unsigned &limit)
{
basic_block bb = taken_edge->dest;
gimple_stmt_iterator gsi;
gimple *stmt;
tree cond;
+ if (limit == 0)
+ return false;
+ --limit;
+
/* The key property of these blocks is that they need not be duplicated
when threading. Thus they cannot have visible side effects such
as PHI nodes. */
@@ -830,7 +834,8 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
m_state->append_path (taken_edge->dest);
bitmap_set_bit (visited, taken_edge->dest->index);
- return thread_around_empty_blocks (path, taken_edge, visited);
+ return thread_around_empty_blocks (path, taken_edge, visited,
+ limit);
}
}
@@ -872,7 +877,7 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
m_state->append_path (taken_edge->dest);
- thread_around_empty_blocks (path, taken_edge, visited);
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
return true;
}
@@ -899,8 +904,13 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
int
jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
- edge e, bitmap visited)
+ edge e, bitmap visited,
+ unsigned &limit)
{
+ if (limit == 0)
+ return 0;
+ limit--;
+
m_state->register_equivs_edge (e);
/* PHIs create temporary equivalences.
@@ -989,7 +999,7 @@ jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
visited. This may be overly conservative. */
bitmap_set_bit (visited, dest->index);
bitmap_set_bit (visited, e->dest->index);
- thread_around_empty_blocks (path, taken_edge, visited);
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
return 1;
}
}
@@ -1075,9 +1085,12 @@ jump_threader::thread_across_edge (edge e)
bitmap_set_bit (visited, e->src->index);
bitmap_set_bit (visited, e->dest->index);
+ /* Limit search space. */
+ unsigned limit = param_max_jump_thread_paths;
+
int threaded = 0;
if ((e->flags & EDGE_DFS_BACK) == 0)
- threaded = thread_through_normal_block (path, e, visited);
+ threaded = thread_through_normal_block (path, e, visited, limit);
if (threaded > 0)
{
@@ -1148,11 +1161,12 @@ jump_threader::thread_across_edge (edge e)
m_registry->push_edge (path, e, EDGE_START_JUMP_THREAD);
m_registry->push_edge (path, taken_edge, EDGE_COPY_SRC_JOINER_BLOCK);
- found = thread_around_empty_blocks (path, taken_edge, visited);
+ found = thread_around_empty_blocks (path, taken_edge, visited, limit);
if (!found)
found = thread_through_normal_block (path,
- path->last ()->e, visited) > 0;
+ path->last ()->e, visited,
+ limit) > 0;
/* If we were able to thread through a successor of E->dest, then
record the jump threading opportunity. */
diff --git a/gcc/tree-ssa-threadedge.h b/gcc/tree-ssa-threadedge.h
index 9f6cbfe93307..245b3506a550 100644
--- a/gcc/tree-ssa-threadedge.h
+++ b/gcc/tree-ssa-threadedge.h
@@ -101,9 +101,9 @@ private:
unsigned limit);
bool thread_around_empty_blocks (vec<class jump_thread_edge *> *path,
- edge, bitmap visited);
+ edge, bitmap visited, unsigned &limit);
int thread_through_normal_block (vec<jump_thread_edge *> *path,
- edge, bitmap visited);
+ edge, bitmap visited, unsigned &limit);
void thread_across_edge (edge);
bool record_temporary_equivalences_from_phis (edge);
gimple *record_temporary_equivalences_from_stmts_at_dest (edge);
--
2.43.5
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=postmarketos-base-ui
pkgver=28
pkgrel=6
pkgver=29
pkgrel=0
pkgdesc="Meta package for minimal postmarketOS UI base"
url="https://postmarketos.org"
arch="noarch"
......@@ -56,6 +56,7 @@ _pmb_recommends="font-droid font-droid-nonlatin font-twemoji"
_source644="
etc/chrony/chrony.conf
etc/elogind/logind.conf
etc/flatpak/remotes.d/flathub.flatpakrepo
etc/conf.d/bluetooth
etc/conf.d/openrc-settingsd
etc/conf.d/tinydm
......@@ -289,14 +290,14 @@ _audio_pulseaudio() {
flatpak() {
install_if="$pkgname=$pkgver-r$pkgrel flatpak"
install="$subpkgname.post-install"
mkdir "$subpkgdir"
amove etc/flatpak/remotes.d/flathub.flatpakrepo
}
sha512sums="
187baa4a2b77e1e97a13536553ef2e1f64c3968f07ab2a372b550e4eee10a801a3b9797766d0d9f566148230335f3d4d150cd335bc40050322313a195874d608 rootfs-etc-chrony-chrony.conf
8d2c54fe3ca62c62f8337fb6be28479d0e02ea63f32abae81907f2768631e65c9e17485f8bc0854a013377f729b06dd1873e2b75f86f657ece866d00aecbbdb4 rootfs-etc-elogind-logind.conf
54620e508a5070ec8819e3661e592acfcfd26c52170b0ecc4dbbc1c61998963ce20bf9d9b051a608b76d6fc17e61c65decc16602b7d58061b9149667a968d258 rootfs-etc-flatpak-remotes.d-flathub.flatpakrepo
b841282b96110ec59a7aa539db0737327b09549d55c78dc4b2c3b28b4a6ad1facf015b3175cb6d3a38f13e47aa6314ef3dc1514a4e60dd653a97409ec54ba706 rootfs-etc-conf.d-bluetooth
49fb494b659fe0149a93eafe109609acce6a470bb8acea160638d07e0e4b11af2544f34549d5ef2deb2914a7ef13d0d470b04ad62981f14f96999af02a5f24cf rootfs-etc-conf.d-openrc-settingsd
44e4283c6f77de83915977dd3bc2d8e2d96b3ed6cc68d3cc156304359ae649b5a8b0bac843e517ec6faa2066dd43ba85e313899b1eda04862f864fb9eb508aa0 rootfs-etc-conf.d-tinydm
......
#!/bin/sh
# add a default repo (flathub.org)
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
# Downloaded from https://flathub.org/repo/flathub.flatpakrepo
[Flatpak Repo]
Title=Flathub
Url=https://dl.flathub.org/repo/
Homepage=https://flathub.org/
Comment=Central repository of Flatpak applications
Description=Central repository of Flatpak applications
Icon=https://dl.flathub.org/repo/logo.svg
GPGKey=mQINBFlD2sABEADsiUZUOYBg1UdDaWkEdJYkTSZD68214m8Q1fbrP5AptaUfCl8KYKFMNoAJRBXn9FbE6q6VBzghHXj/rSnA8WPnkbaEWR7xltOqzB1yHpCQ1l8xSfH5N02DMUBSRtD/rOYsBKbaJcOgW0K21sX+BecMY/AI2yADvCJEjhVKrjR9yfRX+NQEhDcbXUFRGt9ZT+TI5yT4xcwbvvTu7aFUR/dH7+wjrQ7lzoGlZGFFrQXSs2WI0WaYHWDeCwymtohXryF8lcWQkhH8UhfNJVBJFgCY8Q6UHkZG0FxMu8xnIDBMjBmSZKwKQn0nwzwM2afskZEnmNPYDI8nuNsSZBZSAw+ThhkdCZHZZRwzmjzyRuLLVFpOj3XryXwZcSefNMPDkZAuWWzPYjxS80cm2hG1WfqrG0Gl8+iX69cbQchb7gbEb0RtqNskTo9DDmO0bNKNnMbzmIJ3/rTbSahKSwtewklqSP/01o0WKZiy+n/RAkUKOFBprjJtWOZkc8SPXV/rnoS2dWsJWQZhuPPtv3tefdDiEyp7ePrfgfKxuHpZES0IZRiFI4J/nAUP5bix+srcIxOVqAam68CbAlPvWTivRUMRVbKjJiGXIOJ78wAMjqPg3QIC0GQ0EPAWwAOzzpdgbnG7TCQetaVV8rSYCuirlPYN+bJIwBtkOC9SWLoPMVZTwQARAQABtC5GbGF0aHViIFJlcG8gU2lnbmluZyBLZXkgPGZsYXRodWJAZmxhdGh1Yi5vcmc+iQJUBBMBCAA+FiEEblwF2XnHba+TwIE1QYTdTZB6fK4FAllD2sACGwMFCRLMAwAFCwkIBwIGFQgJCgsCBBYCAwECHgECF4AACgkQQYTdTZB6fK5RJQ/+Ptd4sWxaiAW91FFk7+wmYOkEe1NY2UDNJjEEz34PNP/1RoxveHDt43kYJQ23OWaPJuZAbu+fWtjRYcMBzOsMCaFcRSHFiDIC9aTp4ux/mo+IEeyarYt/oyKb5t5lta6xaAqg7rwt65jW5/aQjnS4h7eFZ+dAKta7Y/fljNrOznUp81/SMcx4QA5G2Pw0hs4Xrxg59oONOTFGBgA6FF8WQghrpR7SnEe0FSEOVsAjwQ13Cfkfa7b70omXSWp7GWfUzgBKyoWxKTqzMN3RQHjjhPJcsQnrqH5enUu4Pcb2LcMFpzimHnUgb9ft72DP5wxfzHGAWOUiUXHbAekfq5iFks8cha/RST6wkxG3Rf44Zn09aOxh1btMcGL+5xb1G0BuCQnA0fP/kDYIPwh9z22EqwRQOspIcvGeLVkFeIfubxpcMdOfQqQnZtHMCabV5Q/Rk9K1ZGc8M2hlg8gHbXMFch2xJ0Wu72eXbA/UY5MskEeBgawTQnQOK/vNm7t0AJMpWK26Qg6178UmRghmeZDj9uNRc3EI1nSbgvmGlpDmCxaAGqaGL1zW4KPW5yN25/qeqXcgCvUjZLI9PNq3Kvizp1lUrbx7heRiSoazCucvHQ1VHUzcPVLUKKTkoTP8okThnRRRsBcZ1+jI4yMWIDLOCT7IW3FePr+3xyuy5eEo9a25Ag0EWUPa7AEQALT/CmSyZ8LWlRYQZKYw417p7Z2hxqd6TjwkwM3IQ1irumkWcTZBZIbBgrSOg6CcXD2oWydCQHWi9qaxhuhEl2bJL5LskmBcMxVdQeD0LLHd8QUnbnnIby8ocvWN1alPfvJFjCUTrmD22U1ycOzRw2lIe4kiQONbOZtdWrVImQQSndjFlisitbmlWHvHm2lOOYy8+GJB7YffVV193hmnBSJffCy4bvkuLxsI+n1DhOzc7MPV3z6HGk4HiEcF0yyt9tCYhpsxHFdBoq2h771HfAcS0s98EVAqYMFnf9em+4cnYpdI6mhIfS1FQiKl6DBAYA8tT3ggla00DurPo0JwX/zN+PaO5h/6O9aCZwV7G6rbkgMuqMergXaf8oP38gr0z+MqWnkfM63Bodq68GP4l4hd02BoFBbDf38TMuGQB14+twJMdfbAxo2MbgluvQgfwHfZ2ca6gyEY+9s/YD1gugLjV+S6CB51WkFNe1z4tAPgJZNxUcKCbeaHNbthl8Hks/pY9RCEseX/EdfzF18epbSjJMPh4DPQXbUoFwmyuYcoBOPmvZHNl9hK7B/1RP8w1ZrXk8qdupC0SNbafX7270B7lMMVImzZetGsM9ypXJ6llhp3FwW09iseNyGJGPsr/dvTMGDXqOPfU/9SAS1LSTY4K9PbRtdrBE318YX8mIk5ABEBAAGJBHIEGAEIACYWIQRuXAXZecdtr5PAgTVBhN1NkHp8rgUCWUPa7AIbAgUJEswDAAJACRBBhN1NkHp8rsF0IAQZAQgAHRYhBFSmzd2JGfsgQgDYrFYnAunj7X7oBQJZQ9rsAAoJEFYnAunj7X7oR6AP/0KYmiAFeqx14Z43/6s2gt3VhxlSd8bmcVV7oJFbMhdHBIeWBp2BvsUf00I0Zl14ZkwCKfLwbbORC2eIxvzJ+QWjGfPhDmS4XUSmhlXxWnYEveSek5Tde+fmu6lqKM8CHg5BNx4GWIX/vdLi1wWJZyhrUwwICAxkuhKxuP2Z1An48930eslTD2GGcjByc27+9cIZjHKa07I/aLffo04V+oMT9/tgzoquzgpVV4jwekADo2MJjhkkPveSNI420bgT+Q7Fi1l0X1aFUniBvQMsaBa27PngWm6xE2ZYvh7nWCdd5g0c0eLIHxWwzV1lZ4Ryx4ITO/VL25ItECcjhTRdYa64sA62MYSaB0x3eR+SihpgP3wSNPFu3MJo6FKTFdi4CBAEmpWHFW7FcRmd+cQXeFrHLN3iNVWryy0HK/CUEJmiZEmpNiXecl4vPIIuyF0zgSCztQtKoMr+injpmQGC/rF/ELBVZTUSLNB350S0Ztvw0FKWDAJSxFmoxt3xycqvvt47rxTrhi78nkk6jATKGyvP55sO+K7Q7Wh0DXA69hvPrYW2eu8jGCdVGxi6HX7L1qcfEd0378S71dZ3g9o6KKl1OsDWWQ6MJ6FGBZedl/ibRfs8p5+sbCX3lQSjEFy3rx6n0rUrXx8U2qb+RCLzJlmC5MNBOTDJwHPcX6gKsUcXZrEQALmRHoo3SrewO41RCr+5nUlqiqV3AohBMhnQbGzyHf2+drutIaoh7Rj80XRh2bkkuPLwlNPf+bTXwNVGse4bej7B3oV6Ae1N7lTNVF4Qh+1OowtGjmfJPWo0z1s6HFJVxoIof9z58Msvgao0zrKGqaMWaNQ6LUeC9g9Aj/9Uqjbo8X54aLiYs8Z1WNc06jKP+gv8AWLtv6CR+l2kLez1YMDucjm7v6iuCMVAmZdmxhg5I/X2+OM3vBsqPDdQpr2TPDLX3rCrSBiS0gOQ6DwN5N5QeTkxmY/7QO8bgLo/Wzu1iilH4vMKW6LBKCaRx5UEJxKpL4wkgITsYKneIt3NTHo5EOuaYk+y2+Dvt6EQFiuMsdbfUjs3seIHsghX/cbPJa4YUqZAL8C4OtVHaijwGo0ymt9MWvS9yNKMyT0JhN2/BdeOVWrHk7wXXJn/ZjpXilicXKPx4udCF76meE+6N2u/T+RYZ7fP1QMEtNZNmYDOfA6sViuPDfQSHLNbauJBo/n1sRYAsL5mcG22UDchJrlKvmK3EOADCQg+myrm8006LltubNB4wWNzHDJ0Ls2JGzQZCd/xGyVmUiidCBUrD537WdknOYE4FD7P0cHaM9brKJ/M8LkEH0zUlo73bY4XagbnCqve6PvQb5G2Z55qhWphd6f4B6DGed86zJEa/RhS