diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-11-30 23:50:39 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-11-30 23:50:39 +0000 |
commit | 77819fe3944f22678c3bcdf1d773a095441f5140 (patch) | |
tree | ddc9dcd1edebe1e94204dfb4bf09ade2c9552f0f | |
parent | 826d1b3f488d3549cbd42ccc73ad90ea1ce88f0b (diff) |
toolchain bump
32 files changed, 530 insertions, 1193 deletions
diff --git a/dev-libs/mpc/Manifest b/dev-libs/mpc/Manifest index 77c563ea..9c5ed85f 100644 --- a/dev-libs/mpc/Manifest +++ b/dev-libs/mpc/Manifest @@ -1 +1 @@ -DIST mpc-1.1.0.tar.gz 701263 BLAKE2B afd9fefe687b7cd3c3a483e183f366348e34f58f5d713e2f6b38da16e2e382248b446d9da01ea89fe7202b795b08929b7c42c89c2c1e9a57482faf01ee697beb SHA512 72d657958b07c7812dc9c7cbae093118ce0e454c68a585bfb0e2fa559f1bf7c5f49b93906f580ab3f1073e5b595d23c6494d4d76b765d16dde857a18dd239628 +DIST mpc-1.2.1.tar.gz 838731 BLAKE2B 9cd03c6a71839e4cdb3c1f18d718cc4d3097c3f8ec307a5c756bd5df27c68aa013755156b3b156efee1acabfee2269602c6a3a358092ef0d522271c9c56c133d SHA512 3279f813ab37f47fdcc800e4ac5f306417d07f539593ca715876e43e04896e1d5bceccfb288ef2908a3f24b760747d0dbd0392a24b9b341bc3e12082e5c836ee diff --git a/dev-libs/mpc/mpc-1.1.0-r314.ebuild b/dev-libs/mpc/mpc-1.2.1-r10.ebuild index 07c116f2..8ad0ab8b 100644 --- a/dev-libs/mpc/mpc-1.1.0-r314.ebuild +++ b/dev-libs/mpc/mpc-1.2.1-r10.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 inherit multilib-minimal @@ -10,12 +10,12 @@ HOMEPAGE="http://mpc.multiprecision.org/" SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" LICENSE="LGPL-2.1" -SLOT="0/3" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +SLOT="0/3" # libmpc.so.3 +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" IUSE="static-libs" DEPEND=">=dev-libs/gmp-5.0.0:0=[${MULTILIB_USEDEP},static-libs?] - >=dev-libs/mpfr-3.0.0:0=[${MULTILIB_USEDEP},static-libs?]" + >=dev-libs/mpfr-4.1.0:0=[${MULTILIB_USEDEP},static-libs?]" RDEPEND="${DEPEND}" multilib_src_configure() { diff --git a/dev-libs/mpfr/Manifest b/dev-libs/mpfr/Manifest index f8323055..77f8d183 100644 --- a/dev-libs/mpfr/Manifest +++ b/dev-libs/mpfr/Manifest @@ -1 +1 @@ -DIST mpfr-4.0.2.tar.xz 1441996 BLAKE2B 4c1a15208c2dc3dcc1424974de506198e9cc479c70255149876c7f541133499ada5c89f07393b120b7079e6bbaf8ea03e5e496e1350b295e687392a6e0341c1c SHA512 d583555d08863bf36c89b289ae26bae353d9a31f08ee3894520992d2c26e5683c4c9c193d7ad139632f71c0a476d85ea76182702a98bf08dde7b6f65a54f8b88 +DIST mpfr-4.1.0.tar.xz 1525476 BLAKE2B 41d1be0c4b557760f12a4525ad3a84b6e2cd6f0927c935fcfba577ac0490e582d1ae4b581dce58e21e705cf9d7c88373054d7fb7a94bb32c69b339f99a25dc68 SHA512 1bd1c349741a6529dfa53af4f0da8d49254b164ece8a46928cdb13a99460285622d57fe6f68cef19c6727b3f9daa25ddb3d7d65c201c8f387e421c7f7bee6273 diff --git a/dev-libs/mpfr/mpfr-4.0.2-r314.ebuild b/dev-libs/mpfr/mpfr-4.0.2-r314.ebuild deleted file mode 100644 index 908b8e54..00000000 --- a/dev-libs/mpfr/mpfr-4.0.2-r314.ebuild +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -# NOTE: we cannot depend on autotools here starting with gcc-4.3.x -inherit libtool multilib-minimal preserve-libs - -MY_PV=${PV/_p*} -MY_P=${PN}-${MY_PV} -PLEVEL=${PV/*p} -DESCRIPTION="library for multiple-precision floating-point computations with exact rounding" -HOMEPAGE="https://www.mpfr.org/" -SRC_URI="https://www.mpfr.org/mpfr-${MY_PV}/${MY_P}.tar.xz" - -LICENSE="LGPL-2.1" -SLOT="0/6" # libmpfr.so version -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="static-libs" - -RDEPEND=">=dev-libs/gmp-5.0.0[${MULTILIB_USEDEP},static-libs?]" -DEPEND="${RDEPEND}" - -S=${WORKDIR}/${MY_P} - -HTML_DOCS=( doc/FAQ.html ) - -src_prepare() { - if [[ ${PLEVEL} != ${PV} ]] ; then - local i - for (( i = 1; i <= PLEVEL; ++i )) ; do - eapply "${FILESDIR}"/${MY_PV}/patch$(printf '%02d' ${i}) - done - fi - eapply_user - find . -type f -exec touch -r configure {} + - elibtoolize -} - -multilib_src_configure() { - # Make sure mpfr doesn't go probing toolchains it shouldn't #476336#19 - ECONF_SOURCE=${S} \ - user_redefine_cc=yes \ - econf $(use_enable static-libs static) -} - -multilib_src_install_all() { - rm "${ED}"/usr/share/doc/"${P}"/COPYING* - use static-libs || find "${ED}"/usr -name '*.la' -delete -} - -pkg_preinst() { - preserve_old_lib /usr/$(get_libdir)/libmpfr$(get_libname 4) -} - -pkg_postinst() { - preserve_old_lib_notify /usr/$(get_libdir)/libmpfr$(get_libname 4) -} diff --git a/dev-libs/mpfr/mpfr-4.1.0-r10.ebuild b/dev-libs/mpfr/mpfr-4.1.0-r10.ebuild new file mode 100644 index 00000000..cc7640cf --- /dev/null +++ b/dev-libs/mpfr/mpfr-4.1.0-r10.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit multilib-minimal + +DESCRIPTION="library for multiple-precision floating-point computations with exact rounding" +HOMEPAGE="https://www.mpfr.org/" +SRC_URI="https://www.mpfr.org/mpfr-${PV}/${P}.tar.xz" + +LICENSE="LGPL-2.1" +SLOT="0/6" # libmpfr.so version +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="static-libs" + +RDEPEND=">=dev-libs/gmp-5.0.0[${MULTILIB_USEDEP},static-libs?]" +DEPEND="${RDEPEND}" + +HTML_DOCS=( doc/FAQ.html ) + +multilib_src_configure() { + # Make sure mpfr doesn't go probing toolchains it shouldn't #476336#19 + ECONF_SOURCE=${S} \ + user_redefine_cc=yes \ + econf $(use_enable static-libs static) +} + +multilib_src_install_all() { + rm "${ED}"/usr/share/doc/"${P}"/COPYING* + use static-libs || find "${ED}"/usr -name '*.la' -delete +} diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest index 7cea1217..49d69a0b 100644 --- a/sys-devel/binutils/Manifest +++ b/sys-devel/binutils/Manifest @@ -1,2 +1,2 @@ -DIST binutils-2.34-patches-1.tar.xz 20388 BLAKE2B 8828505f62259a307de445357320827e7f6bc416a7f4c72140add505f62eef3928c7daec13be158b52c2a7a1d989f539025e4be6ec27ef80ede81477a42c5042 SHA512 951dffcc30ad5706dc48e71995217655c5d96472446ab66a357f19486b57d1868143a9809887eab7ba8c42c33124f8b37d3bab6618388ea8a08b4399d348a645 -DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd +DIST binutils-2.35.1-patches-2.tar.xz 72236 BLAKE2B 584cb3edbda28c69171ed64e941535f992150d86f25201cadd07b63daaa36bf76b07dc0aa8a4837da17d1672feb47a7b15f83efdeec5409e695965a10142147a SHA512 b704ebe82c4402f058f9c96991a89256a6b369d28f844bf020ed2c77766894d9a2ca0596cd609de7b389fa8cd52bfab674b6deb10ea2096e50aa57921be2083e +DIST binutils-2.35.1.tar.xz 22031720 BLAKE2B d3468da90b75e9b5fa7fbd64d3fdb0a4bc445e4cb7da5ae058f73a1e9d948b3e9438bc9f1b5b351db369b76a25960c9c1f58f828fd2c7646f555de45fa3c052b SHA512 94ff72708403413b70b247f3af4099ebaa882b6659249869f1ed9941a0f1912e313f08357d470f9fd2359e7f5e5b0eb86285e5eaf883fa8187789d6b1bd304eb diff --git a/sys-devel/binutils/binutils-2.34-r314.ebuild b/sys-devel/binutils/binutils-2.35.1-r10.ebuild index 805c709d..57dc7a30 100644 --- a/sys-devel/binutils/binutils-2.34-r314.ebuild +++ b/sys-devel/binutils/binutils-2.35.1-r10.ebuild @@ -8,10 +8,10 @@ inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs DESCRIPTION="Tools necessary to build programs" HOMEPAGE="https://sourceware.org/binutils/" LICENSE="GPL-3+" -IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test" +IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test vanilla" REQUIRED_USE="default-gold? ( gold )" -# Variables that can be set here: +# Variables that can be set here (ignored for live ebuilds) # PATCH_VER - the patchset version # Default: empty, no patching # PATCH_BINUTILS_VER - the binutils version in the patchset name @@ -19,41 +19,22 @@ REQUIRED_USE="default-gold? ( gold )" # PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/... # for the patchsets -PATCH_VER=1 -PATCH_DEV=slyfox - -case ${PV} in - 9999) - EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" - inherit git-r3 - S=${WORKDIR}/binutils - EGIT_CHECKOUT_DIR=${S} - SLOT=${PV} - ;; - *.9999) - EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" - inherit git-r3 - S=${WORKDIR}/binutils - EGIT_CHECKOUT_DIR=${S} - EGIT_BRANCH=$(ver_cut 1-2) - EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch" - SLOT=$(ver_cut 1-2) - ;; - *) - SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz" - SLOT=$(ver_cut 1-2) - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" - ;; -esac - -# -# The Gentoo patchset -# -PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}} -PATCH_DEV=${PATCH_DEV:-slyfox} - -[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI} - https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz" +PATCH_VER=2 +PATCH_DEV=dilfridge + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 + SLOT=${PV} +else + PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}} + PATCH_DEV=${PATCH_DEV:-slyfox} + SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz" + [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI} + https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz" + SLOT=$(ver_cut 1-2) + # live ebuild + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi # # The cross-compile logic @@ -84,31 +65,44 @@ BDEPEND=" RESTRICT="!test? ( test )" -PATCHES=( - "${FILESDIR}"/${PN}-2.33-gcc-10.patch -) - MY_BUILDDIR=${WORKDIR}/build src_unpack() { - case ${PV} in - *9999) - git-r3_src_unpack - ;; - *) - ;; - esac - default - mkdir -p "${MY_BUILDDIR}" + if [[ ${PV} == 9999* ]] ; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git + git-r3_src_unpack + mv patches-git/9999 patch || die + + EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" + S=${WORKDIR}/binutils + EGIT_CHECKOUT_DIR=${S} + git-r3_src_unpack + else + unpack ${P}.tar.xz + + cd "${WORKDIR}" || die + unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz + fi + + cd "${WORKDIR}" || die + mkdir -p "${MY_BUILDDIR}" || die } src_prepare() { - if [[ ! -z ${PATCH_VER} ]] ; then - # Use upstream patch to enable development mode - rm -v "${WORKDIR}/patch"/0000-Gentoo-Git-is-development.patch || die + local patchsetname + if [[ ${PV} == 9999* ]] ; then + patchsetname="from git master" + else + patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}" + fi - einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}" - eapply "${WORKDIR}/patch"/*.patch + if [[ ! -z ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then + if ! use vanilla; then + einfo "Applying binutils patchset ${patchsetname}" + eapply "${WORKDIR}/patch" + einfo "Done." + fi fi # This check should probably go somewhere else, like pkg_pretend. @@ -249,6 +243,8 @@ src_configure() { --enable-relro # Newer versions (>=2.24) make this an explicit option. #497268 --enable-install-libiberty + # Available from 2.35 on + --enable-textrel-check=warning --disable-werror --with-bugurl="$(toolchain-binutils_bugurl)" --with-pkgversion="$(toolchain-binutils_pkgversion)" diff --git a/sys-devel/binutils/files/binutils-2.33-gcc-10.patch b/sys-devel/binutils/files/binutils-2.33-gcc-10.patch deleted file mode 100644 index 9e1a999b..00000000 --- a/sys-devel/binutils/files/binutils-2.33-gcc-10.patch +++ /dev/null @@ -1,39 +0,0 @@ -binutils: drop redundant 'program_name' definition - -https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=0b398d69acde3377dfbbeb8a4cfe87ae8c8562fa ---- a/binutils/coffdump.c -+++ b/binutils/coffdump.c -@@ -456,8 +456,6 @@ coff_dump (struct coff_ofile *ptr) - dump_coff_section (ptr->sections + i); - } - --char * program_name; -- - static void - show_usage (FILE *file, int status) - { ---- a/binutils/srconv.c -+++ b/binutils/srconv.c -@@ -1687,8 +1687,6 @@ prescan (struct coff_ofile *otree) - } - } - --char *program_name; -- - ATTRIBUTE_NORETURN static void - show_usage (FILE *ffile, int status) - { ---- a/binutils/sysdump.c -+++ b/binutils/sysdump.c -@@ -633,8 +633,6 @@ module (void) - } - } - --char *program_name; -- - ATTRIBUTE_NORETURN static void - show_usage (FILE *ffile, int status) - { --- -2.25.0 - diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest index d4de0ae7..a0b6c670 100644 --- a/sys-devel/gcc/Manifest +++ b/sys-devel/gcc/Manifest @@ -1,2 +1,2 @@ -DIST gcc-9.3.0-patches-2.tar.bz2 13230 BLAKE2B d37859c753864be2c4b8c98847f6e51d9c2b1c091304971c31cf680d6f2194131bac3dfd625077117ca452d6f4416e72c7892d19ccc5880eac7a6bcbe5b2a286 SHA512 c5f7c9d4350879e5ca61e97897e37e4cfea56d0c961aad8df09041e6b1fededad0d7ed89387836d0779b947bdfe7696009d5c61c73630c45f09ca1f3ec3b163c -DIST gcc-9.3.0.tar.xz 70533868 BLAKE2B 21efb1432aefad5ed9b9b395e88ef2adfda3a8ea6e3e808cd151da6e66df9fed1bafdc8b8ff055d4b2272ac786d8b7ddc4293bb6b51c55c40a261a0eda0e7cb4 SHA512 4b9e3639eef6e623747a22c37a904b4750c93b6da77cf3958d5047e9b5ebddb7eebe091cc16ca0a227c0ecbd2bf3b984b221130f269a97ee4cc18f9cf6c444de +DIST gcc-10.2.0-patches-4.tar.bz2 23266 BLAKE2B 8173474d3dea27a440b36eb80c89aabb08c37528c3ec2382839c46fc36336aff7f9cdf3dfbc66947df9286b1cfe9f479d615f77d81ab24ff68a3edf5df5b2350 SHA512 17080f358a3f231837de35188ad1a6ae554a4ca6199efae6dacf9b17706937379559d6c8de330b4237480fea6f5cffffc1158c1d5ecc36ec3a7b410546a2684b +DIST gcc-10.2.0.tar.xz 75004144 BLAKE2B 1d79397330354e61439283cac96a109bf78ffc726265442e6d3ec131f107589ab7349d6612836edd8c8512f7bcc1d901a65a0d5d925d28a5bf3ef5cc3f9787ee SHA512 42ae38928bd2e8183af445da34220964eb690b675b1892bbeb7cd5bb62be499011ec9a93397dba5e2fb681afadfc6f2767d03b9035b44ba9be807187ae6dc65e diff --git a/sys-devel/gcc/files/awk/fixlafiles.awk b/sys-devel/gcc/files/awk/fixlafiles.awk deleted file mode 100644 index aa2ecb60..00000000 --- a/sys-devel/gcc/files/awk/fixlafiles.awk +++ /dev/null @@ -1,313 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# -# Helper functions -# -function printn(string) { - printf("%s", string) -} -function einfo(string) { - printf(" \033[32;01m*\033[0m %s\n", string) -} -function einfon(string) { - printf(" \033[32;01m*\033[0m %s", string) -} -function ewarn(string) { - printf(" \033[33;01m*\033[0m %s\n", string) -} -function ewarnn(string) { - printf(" \033[33;01m*\033[0m %s", string) -} -function eerror(string) { - printf(" \033[31;01m*\033[0m %s\n", string) -} - -# -# assert(condition, errmsg) -# assert that a condition is true. Otherwise exit. -# -function assert(condition, string) { - if (! condition) { - printf("%s:%d: assertion failed: %s\n", - FILENAME, FNR, string) > "/dev/stderr" - _assert_exit = 1 - exit 1 - } -} - -# -# system(command, return) -# wrapper that normalizes return codes ... -# -function dosystem(command, ret) { - ret = 0 - ret = system(command) - if (ret == 0) - return 1 - else - return 0 -} - -BEGIN { - # - # Get our variables from environment - # - OLDVER = ENVIRON["OLDVER"] - OLDCHOST = ENVIRON["OLDCHOST"] - - if (OLDVER == "") { - eerror("Could not get OLDVER!"); - exit 1 - } - - # Setup some sane defaults - LIBCOUNT = 2 - HAVE_GCC34 = 0 - DIRLIST[1] = "/lib" - DIRLIST[2] = "/usr/lib" - - # - # Walk /etc/ld.so.conf to discover all our library paths - # - pipe = "cat /etc/ld.so.conf | sort 2>/dev/null" - while(((pipe) | getline ldsoconf_data) > 0) { - if (ldsoconf_data !~ /^[[:space:]]*#/) { - if (ldsoconf_data == "") continue - - # Remove any trailing comments - sub(/#.*$/, "", ldsoconf_data) - # Remove any trailing spaces - sub(/[[:space:]]+$/, "", ldsoconf_data) - - # If there's more than one path per line, split - # it up as if they were sep lines - split(ldsoconf_data, nodes, /[:,[:space:]]/) - - # Now add the rest from ld.so.conf - for (x in nodes) { - # wtf does this line do ? - sub(/=.*/, "", nodes[x]) - # Prune trailing / - sub(/\/$/, "", nodes[x]) - - if (nodes[x] == "") continue - - # - # Drop the directory if its a child directory of - # one that was already added ... - # For example, if we have: - # /usr/lib /usr/libexec /usr/lib/mozilla /usr/lib/nss - # We really just want to save /usr/lib /usr/libexec - # - CHILD = 0 - for (y in DIRLIST) { - if (nodes[x] ~ "^" DIRLIST[y] "(/|$)") { - CHILD = 1 - break - } - } - if (CHILD) continue - - DIRLIST[++LIBCOUNT] = nodes[x] - } - } - } - close(pipe) - - # - # Get line from gcc's output containing CHOST - # - pipe = "gcc -print-file-name=libgcc.a 2>/dev/null" - if ((!((pipe) | getline TMP_CHOST)) || (TMP_CHOST == "")) { - close(pipe) - - # If we fail to get the CHOST, see if we can get the CHOST - # portage thinks we are using ... - pipe = "/usr/bin/portageq envvar 'CHOST'" - assert(((pipe) | getline CHOST), "(" pipe ") | getline CHOST") - } else { - # Check pre gcc-3.4.x versions - CHOST = gensub("^.+lib/gcc-lib/([^/]+)/[0-9]+.+$", "\\1", 1, TMP_CHOST) - - if (CHOST == TMP_CHOST || CHOST == "") { - # Check gcc-3.4.x or later - CHOST = gensub("^.+lib/gcc/([^/]+)/[0-9]+.+$", "\\1", 1, TMP_CHOST); - - if (CHOST == TMP_CHOST || CHOST == "") - CHOST = "" - else - HAVE_GCC34 = 1 - } - } - close(pipe) - - if (CHOST == "") { - eerror("Could not get gcc's CHOST!") - exit 1 - } - - if (OLDCHOST != "") - if (OLDCHOST == CHOST) - OLDCHOST = "" - - GCCLIBPREFIX_OLD = "/usr/lib/gcc-lib/" - GCCLIBPREFIX_NEW = "/usr/lib/gcc/" - - if (HAVE_GCC34) - GCCLIBPREFIX = GCCLIBPREFIX_NEW - else - GCCLIBPREFIX = GCCLIBPREFIX_OLD - - GCCLIB = GCCLIBPREFIX CHOST - - if (OLDCHOST != "") { - OLDGCCLIB1 = GCCLIBPREFIX_OLD OLDCHOST - OLDGCCLIB2 = GCCLIBPREFIX_NEW OLDCHOST - } - - # Get current gcc's version - pipe = "gcc -dumpversion" - assert(((pipe) | getline NEWVER), "(" pipe ") | getline NEWVER)") - close(pipe) - - if (NEWVER == "") { - eerror("Could not get gcc's version!") - exit 1 - } - - # Nothing to do ? - if ((OLDVER == NEWVER) && (OLDCHOST == "")) - exit 0 - - # - # Ok, now let's scan for the .la files and actually fix them up - # - for (x = 1; x <= LIBCOUNT; x++) { - # Do nothing if the target dir is gcc's internal library path - if (DIRLIST[x] ~ GCCLIBPREFIX_OLD || - DIRLIST[x] ~ GCCLIBPREFIX_NEW) - continue - - einfo(" [" x "/" LIBCOUNT "] Scanning " DIRLIST[x] " ...") - - pipe = "find " DIRLIST[x] "/ -name '*.la' 2>/dev/null" - while (((pipe) | getline la_files) > 0) { - - # Do nothing if the .la file is located in gcc's internal lib path - if (la_files ~ GCCLIBPREFIX_OLD || - la_files ~ GCCLIBPREFIX_NEW) - continue - - CHANGED = 0 - CHOST_CHANGED = 0 - - # See if we need to fix the .la file - while ((getline la_data < (la_files)) > 0) { - if (OLDCHOST != "") { - if ((gsub(OLDGCCLIB1 "[/[:space:]]+", - GCCLIB, la_data) > 0) || - (gsub(OLDGCCLIB2 "[/[:space:]]+", - GCCLIB, la_data) > 0)) { - CHANGED = 1 - CHOST_CHANGED = 1 - } - } - if (OLDVER != NEWVER) { - if ((gsub(GCCLIBPREFIX_OLD CHOST "/" OLDVER "[/[:space:]]*", - GCCLIB "/" NEWVER, la_data) > 0) || - (gsub(GCCLIBPREFIX_NEW CHOST "/" OLDVER "[/[:space:]]*", - GCCLIB "/" NEWVER, la_data) > 0)) - CHANGED = 1 - } - } - close(la_files) - - # Do the actual changes in a second loop, as we can then - # verify that CHOST_CHANGED among things is correct ... - if (CHANGED) { - ewarnn(" FIXING: " la_files " ...") - - if (CHANGED) - printn("[") - - # Clear the temp file (removing rather than '>foo' is better - # out of a security point of view?) - dosystem("rm -f " la_files ".new") - - while ((getline la_data < (la_files)) > 0) { - if (OLDCHOST != "") { - tmpstr = gensub(OLDGCCLIB1 "([/[:space:]]+)", - GCCLIB "\\1", "g", la_data) - tmpstr = gensub(OLDGCCLIB2 "([/[:space:]]+)", - GCCLIB "\\1", "g", tmpstr) - - if (la_data != tmpstr) { - printn("c") - la_data = tmpstr - } - - if (CHOST_CHANGED > 0) { - # We try to be careful about CHOST changes outside - # the gcc library path (meaning we cannot match it - # via /GCCLIBPREFIX CHOST/) ... - - # Catch: - # - # dependency_libs=' -L/usr/CHOST/{bin,lib}' - # - gsub("-L/usr/" OLDCHOST "/", - "-L/usr/" CHOST "/", la_data) - # Catch: - # - # dependency_libs=' -L/usr/lib/gcc-lib/CHOST/VER/../../../../CHOST/lib' - # - la_data = gensub("(" GCCLIB "/[^[:space:]]+)/" OLDCHOST "/", - "\\1/" CHOST "/", "g", la_data) - } - } - - if (OLDVER != NEWVER) { - # Catch: - # - # dependency_libs=' -L/usr/lib/gcc/CHOST/VER' - # - tmpstr = gensub(GCCLIBPREFIX_OLD CHOST "/" OLDVER "([/[:space:]]+)", - GCCLIB "/" NEWVER "\\1", "g", la_data) - tmpstr = gensub(GCCLIBPREFIX_NEW CHOST "/" OLDVER "([/[:space:]]+)", - GCCLIB "/" NEWVER "\\1", "g", tmpstr) - - if (la_data != tmpstr) { - # Catch: - # - # dependency_libs=' -L/usr/lib/gcc-lib/../../CHOST/lib' - # - # in cases where we have gcc34 - tmpstr = gensub(GCCLIBPREFIX_OLD "(../../" CHOST "/lib)", - GCCLIBPREFIX "\\1", "g", tmpstr) - tmpstr = gensub(GCCLIBPREFIX_NEW "(../../" CHOST "/lib)", - GCCLIBPREFIX "\\1", "g", tmpstr) - printn("v") - la_data = tmpstr - } - } - - print la_data >> (la_files ".new") - } - - if (CHANGED) - print "]" - - close(la_files) - close(la_files ".new") - - assert(dosystem("mv -f " la_files ".new " la_files), - "dosystem(\"mv -f " la_files ".new " la_files "\")") - } - } - - close(pipe) - } -} - -# vim:ts=4 diff --git a/sys-devel/gcc/files/awk/fixlafiles.awk-no_gcc_la b/sys-devel/gcc/files/awk/fixlafiles.awk-no_gcc_la deleted file mode 100644 index d95a3c06..00000000 --- a/sys-devel/gcc/files/awk/fixlafiles.awk-no_gcc_la +++ /dev/null @@ -1,334 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# -# Helper functions -# -function printn(string) { - printf("%s", string) -} -function einfo(string) { - printf(" \033[32;01m*\033[0m %s\n", string) -} -function einfon(string) { - printf(" \033[32;01m*\033[0m %s", string) -} -function ewarn(string) { - printf(" \033[33;01m*\033[0m %s\n", string) -} -function ewarnn(string) { - printf(" \033[33;01m*\033[0m %s", string) -} -function eerror(string) { - printf(" \033[31;01m*\033[0m %s\n", string) -} - -# -# assert(condition, errmsg) -# assert that a condition is true. Otherwise exit. -# -function assert(condition, string) { - if (! condition) { - printf("%s:%d: assertion failed: %s\n", - FILENAME, FNR, string) > "/dev/stderr" - _assert_exit = 1 - exit 1 - } -} - -# -# system(command, return) -# wrapper that normalizes return codes ... -# -function dosystem(command, ret) { - ret = 0 - ret = system(command) - if (ret == 0) - return 1 - else - return 0 -} - -# -# parse_ld_conf(config_file) -# -function parse_ld_conf(conf, pipe, ldsoconf_data, CHILD, y) { - pipe = "cd /etc; cat " conf " | sort 2>/dev/null" - while(((pipe) | getline ldsoconf_data) > 0) { - if (ldsoconf_data ~ /^[[:space:]]*#/) - continue - if (ldsoconf_data == "") - continue - - # Handle the "include" keyword - if (ldsoconf_data ~ /^include /) { - sub(/^include /, "", ldsoconf_data) - parse_ld_conf(ldsoconf_data) - continue - } - - # Remove any trailing comments - sub(/#.*$/, "", ldsoconf_data) - # Remove any trailing spaces - sub(/[[:space:]]+$/, "", ldsoconf_data) - # Eat duplicate slashes - sub(/\/\//, "/", ldsoconf_data) - # Prune trailing / - sub(/\/$/, "", ldsoconf_data) - - # - # Drop the directory if its a child directory of - # one that was already added ... - # For example, if we have: - # /usr/lib /usr/libexec /usr/lib/mozilla /usr/lib/nss - # We really just want to save /usr/lib /usr/libexec - # - CHILD = 0 - for (y in DIRLIST) { - if (ldsoconf_data ~ "^" DIRLIST[y] "(/|$)") { - CHILD = 1 - break - } - } - if (CHILD) continue - - DIRLIST[++LIBCOUNT] = ldsoconf_data - } - close(pipe) -} - -BEGIN { - # - # Get our variables from environment - # - OLDVER = ENVIRON["OLDVER"] - OLDCHOST = ENVIRON["OLDCHOST"] - - if (OLDVER == "") { - eerror("Could not get OLDVER!"); - exit 1 - } - - # Setup some sane defaults - LIBCOUNT = 2 - HAVE_GCC34 = 0 - DIRLIST[1] = "/lib" - DIRLIST[2] = "/usr/lib" - - # - # Walk /etc/ld.so.conf to discover all our library paths - # - parse_ld_conf("/etc/ld.so.conf") - - # - # Get line from gcc's output containing CHOST - # - pipe = "gcc -print-file-name=libgcc.a 2>/dev/null" - if ((!((pipe) | getline TMP_CHOST)) || (TMP_CHOST == "")) { - close(pipe) - - # If we fail to get the CHOST, see if we can get the CHOST - # portage thinks we are using ... - pipe = "/usr/bin/portageq envvar 'CHOST'" - assert(((pipe) | getline CHOST), "(" pipe ") | getline CHOST") - } else { - # Check pre gcc-3.4.x versions - CHOST = gensub("^.+lib/gcc-lib/([^/]+)/[0-9]+.+$", "\\1", 1, TMP_CHOST) - - if (CHOST == TMP_CHOST || CHOST == "") { - # Check gcc-3.4.x or later - CHOST = gensub("^.+lib/gcc/([^/]+)/[0-9]+.+$", "\\1", 1, TMP_CHOST); - - if (CHOST == TMP_CHOST || CHOST == "") - CHOST = "" - else - HAVE_GCC34 = 1 - } - } - close(pipe) - - if (CHOST == "") { - eerror("Could not get gcc's CHOST!") - exit 1 - } - - if (OLDCHOST != "") - if (OLDCHOST == CHOST) - OLDCHOST = "" - - GCCLIBPREFIX_OLD = "/usr/lib/gcc-lib/" - GCCLIBPREFIX_NEW = "/usr/lib/gcc/" - - if (HAVE_GCC34) - GCCLIBPREFIX = GCCLIBPREFIX_NEW - else - GCCLIBPREFIX = GCCLIBPREFIX_OLD - - GCCLIB = GCCLIBPREFIX CHOST - - if (OLDCHOST != "") { - OLDGCCLIB1 = GCCLIBPREFIX_OLD OLDCHOST - OLDGCCLIB2 = GCCLIBPREFIX_NEW OLDCHOST - } - - # Get current gcc's version - pipe = "gcc -dumpversion" - assert(((pipe) | getline NEWVER), "(" pipe ") | getline NEWVER)") - close(pipe) - - if (NEWVER == "") { - eerror("Could not get gcc's version!") - exit 1 - } - - # Nothing to do ? - # NB: Do not check for (OLDVER == NEWVER) anymore, as we might need to - # replace libstdc++.la .... - if ((OLDVER == "") && (OLDCHOST == "")) - exit 0 - - # - # Ok, now let's scan for the .la files and actually fix them up - # - for (x = 1; x <= LIBCOUNT; x++) { - # Do nothing if the target dir is gcc's internal library path - if (DIRLIST[x] ~ GCCLIBPREFIX_OLD || - DIRLIST[x] ~ GCCLIBPREFIX_NEW) - continue - - einfo(" [" x "/" LIBCOUNT "] Scanning " DIRLIST[x] " ...") - - pipe = "find " DIRLIST[x] "/ -name '*.la' 2>/dev/null" - while (((pipe) | getline la_files) > 0) { - - # Do nothing if the .la file is located in gcc's internal lib path - if (la_files ~ GCCLIBPREFIX_OLD || - la_files ~ GCCLIBPREFIX_NEW) - continue - - CHANGED = 0 - CHOST_CHANGED = 0 - - # See if we need to fix the .la file - while ((getline la_data < (la_files)) > 0) { - if (OLDCHOST != "") { - if ((gsub(OLDGCCLIB1 "[/[:space:]]+", - GCCLIB, la_data) > 0) || - (gsub(OLDGCCLIB2 "[/[:space:]]+", - GCCLIB, la_data) > 0)) { - CHANGED = 1 - CHOST_CHANGED = 1 - } - } - if (OLDVER != NEWVER) { - if ((gsub(GCCLIBPREFIX_OLD CHOST "/" OLDVER "[/[:space:]]*", - GCCLIB "/" NEWVER, la_data) > 0) || - (gsub(GCCLIBPREFIX_NEW CHOST "/" OLDVER "[/[:space:]]*", - GCCLIB "/" NEWVER, la_data) > 0)) - CHANGED = 1 - } - # We now check if we have libstdc++.la, as we remove the - # libtool linker scripts for gcc ... - # We do this last, as we only match the new paths - if (gsub(GCCLIB "/" NEWVER "/libstdc\\+\\+\\.la", - "-lstdc++", la_data) > 0) - CHANGED = 1 - } - close(la_files) - - # Do the actual changes in a second loop, as we can then - # verify that CHOST_CHANGED among things is correct ... - if (CHANGED) { - ewarnn(" FIXING: " la_files " ...[") - - # Clear the temp file (removing rather than '>foo' is better - # out of a security point of view?) - dosystem("rm -f " la_files ".new") - - while ((getline la_data < (la_files)) > 0) { - if (OLDCHOST != "") { - tmpstr = gensub(OLDGCCLIB1 "([/[:space:]]+)", - GCCLIB "\\1", "g", la_data) - tmpstr = gensub(OLDGCCLIB2 "([/[:space:]]+)", - GCCLIB "\\1", "g", tmpstr) - - if (la_data != tmpstr) { - printn("c") - la_data = tmpstr - } - - if (CHOST_CHANGED > 0) { - # We try to be careful about CHOST changes outside - # the gcc library path (meaning we cannot match it - # via /GCCLIBPREFIX CHOST/) ... - - # Catch: - # - # dependency_libs=' -L/usr/CHOST/{bin,lib}' - # - gsub("-L/usr/" OLDCHOST "/", - "-L/usr/" CHOST "/", la_data) - # Catch: - # - # dependency_libs=' -L/usr/lib/gcc-lib/CHOST/VER/../../../../CHOST/lib' - # - la_data = gensub("(" GCCLIB "/[^[:space:]]+)/" OLDCHOST "/", - "\\1/" CHOST "/", "g", la_data) - } - } - - if (OLDVER != NEWVER) { - # Catch: - # - # dependency_libs=' -L/usr/lib/gcc/CHOST/VER' - # - tmpstr = gensub(GCCLIBPREFIX_OLD CHOST "/" OLDVER "([/[:space:]]+)", - GCCLIB "/" NEWVER "\\1", "g", la_data) - tmpstr = gensub(GCCLIBPREFIX_NEW CHOST "/" OLDVER "([/[:space:]]+)", - GCCLIB "/" NEWVER "\\1", "g", tmpstr) - - if (la_data != tmpstr) { - # Catch: - # - # dependency_libs=' -L/usr/lib/gcc-lib/../../CHOST/lib' - # - # in cases where we have gcc34 - tmpstr = gensub(GCCLIBPREFIX_OLD "(../../" CHOST "/lib)", - GCCLIBPREFIX "\\1", "g", tmpstr) - tmpstr = gensub(GCCLIBPREFIX_NEW "(../../" CHOST "/lib)", - GCCLIBPREFIX "\\1", "g", tmpstr) - printn("v") - la_data = tmpstr - } - } - - # We now check if we have libstdc++.la, as we remove the - # libtool linker scripts for gcc and any referencese in any - # libtool linker scripts. - # We do this last, as we only match the new paths - tmpstr = gensub(GCCLIB "/" NEWVER "/libstdc\\+\\+\\.la", - "-lstdc++", "g", la_data); - if (la_data != tmpstr) { - printn("l") - la_data = tmpstr - } - - print la_data >> (la_files ".new") - } - - if (CHANGED) - print "]" - - close(la_files) - close(la_files ".new") - - assert(dosystem("mv -f " la_files ".new " la_files), - "dosystem(\"mv -f " la_files ".new " la_files "\")") - } - } - - close(pipe) - } -} - -# vim:ts=4 diff --git a/sys-devel/gcc/files/c89 b/sys-devel/gcc/files/c89 deleted file mode 100644 index cee0325f..00000000 --- a/sys-devel/gcc/files/c89 +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/sh - -# Call the appropriate C compiler with options to accept ANSI/ISO C -# The following options are the same (as of gcc-2.95): -# -ansi -# -std=c89 -# -std=iso9899:1990 - -for i; do - case "$i" in - -ansi|-std=c89|-std=iso9899:1990) - ;; - -std=*) - echo >&2 "`basename $0` called with non ANSI/ISO C90 option $i" - exit 1 - ;; - esac -done - -exec gcc -std=c89 -pedantic -U_FORTIFY_SOURCE "$@" diff --git a/sys-devel/gcc/files/c99 b/sys-devel/gcc/files/c99 deleted file mode 100644 index c9542095..00000000 --- a/sys-devel/gcc/files/c99 +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh - -# Call the appropriate C compiler with options to accept ANSI/ISO C -# The following options are the same (as of gcc-3.3): -# -std=c99 -# -std=c9x -# -std=iso9899:1999 -# -std=iso9899:199x - -for i; do - case "$i" in - -std=c9[9x]|-std=iso9899:199[9x]) - ;; - -ansi|-std=*) - echo >&2 "`basename $0` called with non ANSI/ISO C99 option $i" - exit 1 - ;; - esac -done - -exec gcc -std=c99 -pedantic -U_FORTIFY_SOURCE ${1+"$@"} diff --git a/sys-devel/gcc/files/fix_libtool_files.sh b/sys-devel/gcc/files/fix_libtool_files.sh deleted file mode 100644 index af085e1e..00000000 --- a/sys-devel/gcc/files/fix_libtool_files.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -usage() { -cat << "USAGE_END" -Usage: fix_libtool_files.sh <old-gcc-version> [--oldarch <old-CHOST>] - - Where <old-gcc-version> is the version number of the - previous gcc version. For example, if you updated to - gcc-3.2.1, and you had gcc-3.2 installed, run: - - # fix_libtool_files.sh 3.2 - - If you updated to gcc-3.2.3, and the old CHOST was i586-pc-linux-gnu - but you now have CHOST as i686-pc-linux-gnu, run: - - # fix_libtool_files.sh 3.2 --oldarch i586-pc-linux-gnu - - Note that if only the CHOST and not the version changed, you can run - it with the current version and the '--oldarch <old-CHOST>' arguments, - and it will do the expected: - - # fix_libtool_files.sh `gcc -dumpversion` --oldarch i586-pc-linux-gnu - -USAGE_END - exit 1 -} - -case $2 in ---oldarch) [ $# -ne 3 ] && usage ;; -*) [ $# -ne 1 ] && usage ;; -esac - -ARGV1=$1 -ARGV2=$2 -ARGV3=$3 - -. /etc/profile || exit 1 - -if [ ${EUID:-0} -ne 0 -a "${EPREFIX}" = '' ] ; then - echo "${0##*/}: Must be root." - exit 1 -fi - -# make sure the files come out sane -umask 0022 - -OLDCHOST= -[ "${ARGV2}" = "--oldarch" ] && OLDCHOST=${ARGV3} - -AWKDIR="/usr/share/gcc-data" - -if [ ! -r "${AWKDIR}/fixlafiles.awk" ] ; then - echo "${0##*/}: ${AWKDIR}/fixlafiles.awk does not exist!" - exit 1 -fi - -OLDVER=${ARGV1} - -export OLDVER OLDCHOST - -echo "Scanning libtool files for hardcoded gcc library paths..." -exec gawk -f "${AWKDIR}/fixlafiles.awk" - -# vim:ts=4 diff --git a/sys-devel/gcc/files/gcc-8.3.0-ia64-bootstrap.patch b/sys-devel/gcc/files/gcc-8.3.0-ia64-bootstrap.patch deleted file mode 100644 index 0a0a25b5..00000000 --- a/sys-devel/gcc/files/gcc-8.3.0-ia64-bootstrap.patch +++ /dev/null @@ -1,41 +0,0 @@ -https://gcc.gnu.org/PR87338 - -From 1cc1dc32fcf6b47db4e6d28f55de343713f824a4 Mon Sep 17 00:00:00 2001 -From: James Clarke <jrtc27@jrtc27.com> -Date: Thu, 25 Apr 2019 15:58:55 +0200 -Subject: [PATCH] PR bootstrap/87338: Fix ia64 bootstrap comparison regression - in r257511 -To: gcc-patches@gcc.gnu.org - -By using ASM_OUTPUT_LABEL, r257511 forced the assembler to start a new -bundle when emitting an inline entry label on. Instead, use -ASM_OUTPUT_DEBUG_LABEL like for the block begin and end labels so tags are -emitted rather than labels. - -gcc/ - PR bootstrap/87338 - * dwarf2out.c (dwarf2out_inline_entry): Use ASM_OUTPUT_DEBUG_LABEL - instead of ASM_GENERATE_INTERNAL_LABEL and ASM_OUTPUT_LABEL. ---- - gcc/dwarf2out.c | 7 ++----- - 1 file changed, 2 insertions(+), 5 deletions(-) - ---- a/gcc/dwarf2out.c -+++ b/gcc/dwarf2out.c -@@ -27670,11 +27670,8 @@ dwarf2out_inline_entry (tree block) - if (cur_line_info_table) - ied->view = cur_line_info_table->view; - -- char label[MAX_ARTIFICIAL_LABEL_BYTES]; -- -- ASM_GENERATE_INTERNAL_LABEL (label, BLOCK_INLINE_ENTRY_LABEL, -- BLOCK_NUMBER (block)); -- ASM_OUTPUT_LABEL (asm_out_file, label); -+ ASM_OUTPUT_DEBUG_LABEL (asm_out_file, BLOCK_INLINE_ENTRY_LABEL, -+ BLOCK_NUMBER (block)); - } - - /* Called from finalize_size_functions for size functions so that their body --- -1.8.5.3 - diff --git a/sys-devel/gcc/files/gcc-8.3.0-norisc32.patch b/sys-devel/gcc/files/gcc-8.3.0-norisc32.patch deleted file mode 100644 index 19f4f568..00000000 --- a/sys-devel/gcc/files/gcc-8.3.0-norisc32.patch +++ /dev/null @@ -1,29 +0,0 @@ -https://gcc.gnu.org/PR90419 - -diff -ruN gcc-8.3.0.orig/gcc/config/riscv/t-linux-multilib gcc-8.3.0/gcc/config/riscv/t-linux-multilib ---- gcc-8.3.0.orig/gcc/config/riscv/t-linux-multilib 2017-02-06 22:38:37.000000000 +0100 -+++ gcc-8.3.0/gcc/config/riscv/t-linux-multilib 2019-04-28 16:37:44.377841943 +0200 -@@ -20,21 +20,9 @@ - ilp32d \ - lp64 \ - lp64d --MULTILIB_REQUIRED = march=rv32imac/mabi=ilp32 \ --march=rv32imafdc/mabi=ilp32d \ --march=rv64imac/mabi=lp64 \ -+MULTILIB_REQUIRED = march=rv64imac/mabi=lp64 \ - march=rv64imafdc/mabi=lp64d --MULTILIB_REUSE = march.rv32imac/mabi.ilp32=march.rv32ima/mabi.ilp32 \ --march.rv32imac/mabi.ilp32=march.rv32imaf/mabi.ilp32 \ --march.rv32imac/mabi.ilp32=march.rv32imafd/mabi.ilp32 \ --march.rv32imac/mabi.ilp32=march.rv32imafc/mabi.ilp32 \ --march.rv32imac/mabi.ilp32=march.rv32imafdc/mabi.ilp32 \ --march.rv32imac/mabi.ilp32=march.rv32g/mabi.ilp32 \ --march.rv32imac/mabi.ilp32=march.rv32gc/mabi.ilp32 \ --march.rv32imafdc/mabi.ilp32d=march.rv32imafd/mabi.ilp32d \ --march.rv32imafdc/mabi.ilp32d=march.rv32gc/mabi.ilp32d \ --march.rv32imafdc/mabi.ilp32d=march.rv32g/mabi.ilp32d \ --march.rv64imac/mabi.lp64=march.rv64ima/mabi.lp64 \ -+MULTILIB_REUSE = march.rv64imac/mabi.lp64=march.rv64ima/mabi.lp64 \ - march.rv64imac/mabi.lp64=march.rv64imaf/mabi.lp64 \ - march.rv64imac/mabi.lp64=march.rv64imafd/mabi.lp64 \ - march.rv64imac/mabi.lp64=march.rv64imafc/mabi.lp64 \ diff --git a/sys-devel/gcc/files/gcc-9.1.0-norisc32.patch b/sys-devel/gcc/files/gcc-9.1.0-norisc32.patch deleted file mode 100644 index ad0128a0..00000000 --- a/sys-devel/gcc/files/gcc-9.1.0-norisc32.patch +++ /dev/null @@ -1,53 +0,0 @@ -Autogenerated patch disabling the 32bit RISCV support -See https://gcc.gnu.org/PR90419 - -diff -ruN gcc-9.1.0.orig/gcc/config/riscv/t-linux-multilib gcc-9.1.0/gcc/config/riscv/t-linux-multilib ---- gcc-9.1.0.orig/gcc/config/riscv/t-linux-multilib 2017-02-06 22:38:37.000000000 +0100 -+++ gcc-9.1.0/gcc/config/riscv/t-linux-multilib 2019-05-18 23:04:54.849400774 +0200 -@@ -1,40 +1,18 @@ - # This file was generated by multilib-generator with the command: --# ./multilib-generator rv32imac-ilp32-rv32ima,rv32imaf,rv32imafd,rv32imafc,rv32imafdc- rv32imafdc-ilp32d-rv32imafd- rv64imac-lp64-rv64ima,rv64imaf,rv64imafd,rv64imafc,rv64imafdc- rv64imafdc-lp64d-rv64imafd- --MULTILIB_OPTIONS = march=rv32imac/march=rv32ima/march=rv32imaf/march=rv32imafd/march=rv32imafc/march=rv32imafdc/march=rv32g/march=rv32gc/march=rv64imac/march=rv64ima/march=rv64imaf/march=rv64imafd/march=rv64imafc/march=rv64imafdc/march=rv64g/march=rv64gc mabi=ilp32/mabi=ilp32d/mabi=lp64/mabi=lp64d --MULTILIB_DIRNAMES = rv32imac \ --rv32ima \ --rv32imaf \ --rv32imafd \ --rv32imafc \ --rv32imafdc \ --rv32g \ --rv32gc \ --rv64imac \ -+# ./multilib-generator rv64imac-lp64-rv64ima,rv64imaf,rv64imafd,rv64imafc,rv64imafdc- rv64imafdc-lp64d-rv64imafd- -+MULTILIB_OPTIONS = march=rv64imac/march=rv64ima/march=rv64imaf/march=rv64imafd/march=rv64imafc/march=rv64imafdc/march=rv64g/march=rv64gc mabi=lp64/mabi=lp64d -+MULTILIB_DIRNAMES = rv64imac \ - rv64ima \ - rv64imaf \ - rv64imafd \ - rv64imafc \ - rv64imafdc \ - rv64g \ --rv64gc ilp32 \ --ilp32d \ --lp64 \ -+rv64gc lp64 \ - lp64d --MULTILIB_REQUIRED = march=rv32imac/mabi=ilp32 \ --march=rv32imafdc/mabi=ilp32d \ --march=rv64imac/mabi=lp64 \ -+MULTILIB_REQUIRED = march=rv64imac/mabi=lp64 \ - march=rv64imafdc/mabi=lp64d --MULTILIB_REUSE = march.rv32imac/mabi.ilp32=march.rv32ima/mabi.ilp32 \ --march.rv32imac/mabi.ilp32=march.rv32imaf/mabi.ilp32 \ --march.rv32imac/mabi.ilp32=march.rv32imafd/mabi.ilp32 \ --march.rv32imac/mabi.ilp32=march.rv32imafc/mabi.ilp32 \ --march.rv32imac/mabi.ilp32=march.rv32imafdc/mabi.ilp32 \ --march.rv32imac/mabi.ilp32=march.rv32g/mabi.ilp32 \ --march.rv32imac/mabi.ilp32=march.rv32gc/mabi.ilp32 \ --march.rv32imafdc/mabi.ilp32d=march.rv32imafd/mabi.ilp32d \ --march.rv32imafdc/mabi.ilp32d=march.rv32gc/mabi.ilp32d \ --march.rv32imafdc/mabi.ilp32d=march.rv32g/mabi.ilp32d \ --march.rv64imac/mabi.lp64=march.rv64ima/mabi.lp64 \ -+MULTILIB_REUSE = march.rv64imac/mabi.lp64=march.rv64ima/mabi.lp64 \ - march.rv64imac/mabi.lp64=march.rv64imaf/mabi.lp64 \ - march.rv64imac/mabi.lp64=march.rv64imafd/mabi.lp64 \ - march.rv64imac/mabi.lp64=march.rv64imafc/mabi.lp64 \ diff --git a/sys-devel/gcc/gcc-9.3.0-r314.ebuild b/sys-devel/gcc/gcc-10.2.0-r10.ebuild index 257d96bf..9bda9722 100644 --- a/sys-devel/gcc/gcc-9.3.0-r314.ebuild +++ b/sys-devel/gcc/gcc-10.2.0-r10.ebuild @@ -3,17 +3,16 @@ EAPI="7" -PATCH_VER="2" +PATCH_VER="4" inherit toolchain KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" RDEPEND="" -DEPEND="${RDEPEND} - elibc_glibc? ( >=sys-libs/glibc-2.13 ) - >=${CATEGORY}/binutils-2.20" +BDEPEND="${CATEGORY}/binutils" -if [[ ${CATEGORY} != cross-* ]] ; then - PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.13 )" -fi +src_prepare() { + has_version '>=sys-libs/glibc-2.32-r1' && rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch" + toolchain_src_prepare +} diff --git a/sys-devel/libtool/libtool-2.4.6-r314.ebuild b/sys-devel/libtool/libtool-2.4.6-r10.ebuild index 1e876837..1e876837 100644 --- a/sys-devel/libtool/libtool-2.4.6-r314.ebuild +++ b/sys-devel/libtool/libtool-2.4.6-r10.ebuild diff --git a/sys-kernel/linux-headers/Manifest b/sys-kernel/linux-headers/Manifest index 07646424..04a0716c 100644 --- a/sys-kernel/linux-headers/Manifest +++ b/sys-kernel/linux-headers/Manifest @@ -1,2 +1,2 @@ -DIST gentoo-headers-4.19-1.tar.xz 4040 BLAKE2B 4ccaf4fb6bde84f0b1f29534cf2f6effca48cb81d63b33086a1ec667069bcb57a3c3d5697c50bff8521343954d01d9c27139d62a9cf2c9f5f12bc0461441f4af SHA512 511accdfd104d9cc84b568132f1eb822f97d35120a438768c313c2cc2651197414dae7af05db81e26b32fb4febbf1e0812030fcb98395f6f65271f6605dc7bb6 -DIST gentoo-headers-base-4.19.tar.xz 7956220 BLAKE2B 5b6868188b6cb505556b8f307972be6b27c0201e8287f6a2c4d0ac8bf16cfe048cb05afacf879731ba81de5e2a8c5afc4adad007e00b12efb8b2a158a666f4dd SHA512 ef0f159cb31651bf8e00c31d8ac807e64413c7bf88807e1ab4779524db10eec4726b65af0fad034a0cb2e000cd61a6008bcc174828061ffaf633c170dd09645c +DIST gentoo-headers-5.9-1.tar.xz 4304 BLAKE2B 5dda91dac529cf3afca220d0ec323f679eae00e850e127ca6fb7dd42313afe7d4e2b23860a5b58673c070456e1ebd6b0d48efd681a764eef1bab996de579fd11 SHA512 3522d25e4d13f703e69a7e8da1813b38c8977821363b56af1988d78c446087dea4c3499283a2fdef2dc000fde29b945abb821a01f53ac0ac6c2b551699b3b18c +DIST linux-5.9.tar.xz 115507140 BLAKE2B e8d11472d63a9f8409ca12a2e8c97c6963a3d4516b5a398b627d6ece565584526f9b5a1377a2fa4bd184c09c7db94c987428bc5d52df0c788464a67e9e8d6dcb SHA512 d3d92ce4246bad74c9a784212f160d98449b1e8793970c2c308276568d852b8effe0528686bdb87d55d691f09a826abf7938d69bdd4759ce65ddd5c05ffe4eca diff --git a/sys-kernel/linux-headers/linux-headers-4.19-r314.ebuild b/sys-kernel/linux-headers/linux-headers-4.19-r314.ebuild deleted file mode 100644 index 47d53c8e..00000000 --- a/sys-kernel/linux-headers/linux-headers-4.19-r314.ebuild +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -ETYPE="headers" -H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" -inherit kernel-2 toolchain-funcs -detect_version - -PATCH_VER="1" -SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz - https://dev.gentoo.org/~slyfox/distfiles/gentoo-headers-base-${PV}.tar.xz - ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz} - ${PATCH_VER:+https://dev.gentoo.org/~slyfox/distfiles/gentoo-headers-${PV}-${PATCH_VER}.tar.xz} -" - -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux" - -DEPEND="app-arch/xz-utils - dev-lang/perl" -RDEPEND="" - -S=${WORKDIR}/gentoo-headers-base-${PV} - -src_unpack() { - unpack ${A} -} - -src_prepare() { - default - - [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}"/${PV}/*.patch -} - -src_install() { - kernel-2_src_install - - # hrm, build system sucks - find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete - find "${ED}" -depth -type d -delete 2>/dev/null -} - -src_test() { - # Make sure no uapi/ include paths are used by accident. - egrep -r \ - -e '# *include.*["<]uapi/' \ - "${D}" && die "#include uapi/xxx detected" - - einfo "Possible unescaped attribute/type usage" - egrep -r \ - -e '(^|[[:space:](])(asm|volatile|inline)[[:space:](]' \ - -e '\<([us](8|16|32|64))\>' \ - . - - einfo "Missing linux/types.h include" - egrep -l -r -e '__[us](8|16|32|64)' "${ED}" | xargs grep -L linux/types.h - - emake ARCH=$(tc-arch-kernel) headers_check -} diff --git a/sys-kernel/linux-headers/linux-headers-5.9-r10.ebuild b/sys-kernel/linux-headers/linux-headers-5.9-r10.ebuild new file mode 100644 index 00000000..3c7e3cd2 --- /dev/null +++ b/sys-kernel/linux-headers/linux-headers-5.9-r10.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +ETYPE="headers" +H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh sparc x86 xtensa" +inherit kernel-2 toolchain-funcs +detect_version + +PATCH_PV=${PV} # to ease testing new versions against not existing patches +PATCH_VER="1" +SRC_URI="${KERNEL_URI} + ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz} + ${PATCH_VER:+https://dev.gentoo.org/~slyfox/distfiles/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz} +" + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" + +DEPEND="app-arch/xz-utils + dev-lang/perl" +RDEPEND="" + +S=${WORKDIR}/linux-${PV} + +src_unpack() { + unpack ${A} +} + +src_prepare() { + [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}"/${PATCH_PV}/*.patch + + default +} + +src_install() { + kernel-2_src_install + + # hrm, build system sucks + find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete + find "${ED}" -depth -type d -delete 2>/dev/null +} + +src_test() { + emake headers_check ${xmakeopts} +} diff --git a/sys-libs/binutils-libs/Manifest b/sys-libs/binutils-libs/Manifest index 7cea1217..49d69a0b 100644 --- a/sys-libs/binutils-libs/Manifest +++ b/sys-libs/binutils-libs/Manifest @@ -1,2 +1,2 @@ -DIST binutils-2.34-patches-1.tar.xz 20388 BLAKE2B 8828505f62259a307de445357320827e7f6bc416a7f4c72140add505f62eef3928c7daec13be158b52c2a7a1d989f539025e4be6ec27ef80ede81477a42c5042 SHA512 951dffcc30ad5706dc48e71995217655c5d96472446ab66a357f19486b57d1868143a9809887eab7ba8c42c33124f8b37d3bab6618388ea8a08b4399d348a645 -DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd +DIST binutils-2.35.1-patches-2.tar.xz 72236 BLAKE2B 584cb3edbda28c69171ed64e941535f992150d86f25201cadd07b63daaa36bf76b07dc0aa8a4837da17d1672feb47a7b15f83efdeec5409e695965a10142147a SHA512 b704ebe82c4402f058f9c96991a89256a6b369d28f844bf020ed2c77766894d9a2ca0596cd609de7b389fa8cd52bfab674b6deb10ea2096e50aa57921be2083e +DIST binutils-2.35.1.tar.xz 22031720 BLAKE2B d3468da90b75e9b5fa7fbd64d3fdb0a4bc445e4cb7da5ae058f73a1e9d948b3e9438bc9f1b5b351db369b76a25960c9c1f58f828fd2c7646f555de45fa3c052b SHA512 94ff72708403413b70b247f3af4099ebaa882b6659249869f1ed9941a0f1912e313f08357d470f9fd2359e7f5e5b0eb86285e5eaf883fa8187789d6b1bd304eb diff --git a/sys-libs/binutils-libs/binutils-libs-2.34-r314.ebuild b/sys-libs/binutils-libs/binutils-libs-2.35.1-r10.ebuild index c7a02375..2ea27567 100644 --- a/sys-libs/binutils-libs/binutils-libs-2.34-r314.ebuild +++ b/sys-libs/binutils-libs/binutils-libs-2.35.1-r10.ebuild @@ -3,8 +3,8 @@ EAPI=7 -PATCH_VER=1 -PATCH_DEV=slyfox +PATCH_VER=2 +PATCH_DEV=dilfridge inherit eutils libtool toolchain-funcs multilib-minimal @@ -21,7 +21,7 @@ SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz LICENSE="|| ( GPL-3 LGPL-3 )" SLOT="0/${PV}" IUSE="64-bit-bfd multitarget nls static-libs" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" BDEPEND="nls? ( sys-devel/gettext )" DEPEND="sys-libs/zlib[${MULTILIB_USEDEP}]" @@ -38,9 +38,6 @@ MULTILIB_WRAPPED_HEADERS=( src_prepare() { if [[ ! -z ${PATCH_VER} ]] ; then - # Use upstream patch to enable development mode - rm -v "${WORKDIR}/patch"/0000-Gentoo-Git-is-development.patch || die - einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}" eapply "${WORKDIR}/patch"/*.patch fi diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest index f1a1af01..d79185b0 100644 --- a/sys-libs/glibc/Manifest +++ b/sys-libs/glibc/Manifest @@ -1,3 +1,5 @@ +DIST backport-rv32.txz 26416 BLAKE2B 7a6b593859f88a3c040f06324dace4cc6137d14d4580fad9ea285829666d761c3dd01c190746e86846c219423124c77a55bc57b6e56efe6401a9c99d7fa445cd SHA512 d08dc02c4f0a3c5a15c57fbb5190588121c0e0728e6ab2119483407a98625efe58b3c83b44d750b0146171e63dcf8a6dbb6d1a057d042f794eed9adbd1f0293e DIST gcc-multilib-bootstrap-20180511.tar.xz 2392908 BLAKE2B f3cf614399368acd8908f60d894c6344a2fa09383b30c1633a0682bc668367c8a2f8c6fec2d41b6e2178d709a2bd8db57e8b2ab56ba263c7d56f819c15acd061 SHA512 98c766e913693ab42ff790557acde2a36a8001e2648046a685b21964200df8d4d52d8452d499c0068c6648284d086ce062c2d36e2c6c2fd8aacd232d193f2853 -DIST glibc-2.30-patches-10.tar.xz 72808 BLAKE2B a7a95c99482524b2896d15539766f1e6b1fe34a22f32119248c6dd44f42632076e86fdcbbdc2d604ec73ceccdd8a7f5936a62a6f4c3d039fae8f6901dfc6be77 SHA512 af5e213ff08bf38f6f529816c36b4e38df27207c2df254609ebe45b2f039ab553bbe563aa6f64b6667d328fd2c120dc21b6e2676540bdd94e58079237089eac3 -DIST glibc-2.30.tar.xz 16576920 BLAKE2B bd5aae4c9854f40785b91f83c3b632de6d48d811027ddfe61651cb1bc617db8017d7914c23a770cdd3feed06fcc316da841eea916cdba54179e7eace4ea45484 SHA512 37483990cd653685873e96c45dd1651b32b441b6d7919a68ebe3bae31a0c3f7ce183fc9b110f0b268b353f80312f18370559a1e7aecea0e5aa755c8f2aef1d6b +DIST glibc-2.32-patches-2.tar.xz 8588 BLAKE2B 57a85241e3270d14df0332b039a933c5a7ee4d089684d85cca564eeec2d6796735de60b628c5746858757342922d58993d6cf7187ce1d7102b2299ca2cf8513f SHA512 45bbab9e2f813f55cb4a1438dcd9365170b8facff50b11648ba6022da06c20029bb65a4b06fd906af82aa7461b7374f85105fd7eedb7915cec3f1df3779b68a3 +DIST glibc-2.32.tar.xz 16744512 BLAKE2B a56b4afbb35315c5cd6dca0f62e44455dceae3e6e88a8453621f9a5394a60ddf10ca9309b2db0911830c7fd77e3faa5d94694eb94d5b2c05fc5285cef52255da SHA512 8460c155b7003e04f18dabece4ed9ad77445fa2288a7dc08e80a8fc4c418828af29e0649951bd71a54ea2ad2d4da7570aafd9bdfe4a37e9951b772b442afe50b +DIST locale-gen-2.10.tar.gz 7747 BLAKE2B 49f569c5ae5260fca128503bc6f22d6f6f1cda817920c41fdadadf1527bbb4f3eb161f79fa729830666a4673e9092f99f4685ec8fcac8ddea0b8242bca9c1f4f SHA512 e350e60d458d67638e3090711fca05af6fafac06c51b97648244549f8a0621dab7543f09dc7ad4c62392f13bdae8e5875dc6d0b6c3d83efc29d116bc2eef92db diff --git a/sys-libs/glibc/files/2.19/glibc-2.19-gcc-10.patch b/sys-libs/glibc/files/2.19/glibc-2.19-gcc-10.patch new file mode 100644 index 00000000..45e8ab80 --- /dev/null +++ b/sys-libs/glibc/files/2.19/glibc-2.19-gcc-10.patch @@ -0,0 +1,15 @@ +Identify gcc-10+ as a good compiler. + +Index: work/glibc-2.19/configure +=================================================================== +--- glibc-2.19/configure ++++ glibc-2.19/configure +@@ -4710,7 +4710,7 @@ $as_echo_n "checking version of $CC... " + ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 4.[4-9].* | 4.[1-9][0-9].* | [5-9].* ) ++ 4.[4-9].* | 4.[1-9][0-9].* | [5-9].* | [1-9][0-9].* ) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + diff --git a/sys-libs/glibc/files/2.19/glibc-2.19-ia64-gcc-4.8-reloc-hack.patch b/sys-libs/glibc/files/2.19/glibc-2.19-ia64-gcc-4.8-reloc-hack.patch new file mode 100644 index 00000000..72a616a0 --- /dev/null +++ b/sys-libs/glibc/files/2.19/glibc-2.19-ia64-gcc-4.8-reloc-hack.patch @@ -0,0 +1,32 @@ +https://bugs.gentoo.org/503838 +http://gcc.gnu.org/PR60465 +https://sourceware.org/ml/libc-alpha/2015-12/msg00556.html +https://trofi.github.io/posts/189-glibc-on-ia64-or-how-relocations-bootstrap.html + +newer versions of gcc generate relocations in the elf_get_dynamic_info func +which glibc relies on to populate some info structs. those structs are then +used by ldso to process relocations in itself. glibc requires that there are +no relocations until that point (*after* elf_get_dynamic_info), so we end up +crashing during elf_get_dynamic_info because the relocation has not yet been +processed. + +this hack shuffles the code in a way that tricks gcc into not generating the +relocation. we need to figure out something better for upstream. + +--- a/elf/get-dynamic-info.h ++++ b/elf/get-dynamic-info.h +@@ -66,8 +66,12 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp) + info[DT_VALTAGIDX (dyn->d_tag) + DT_NUM + DT_THISPROCNUM + + DT_VERSIONTAGNUM + DT_EXTRANUM] = dyn; + else if ((d_tag_utype) DT_ADDRTAGIDX (dyn->d_tag) < DT_ADDRNUM) +- info[DT_ADDRTAGIDX (dyn->d_tag) + DT_NUM + DT_THISPROCNUM +- + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM] = dyn; ++ { ++ d_tag_utype i = ++ DT_ADDRTAGIDX (dyn->d_tag) + DT_NUM + DT_THISPROCNUM ++ + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM; ++ info[i] = dyn; ++ } + ++dyn; + } + diff --git a/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-compat.patch b/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-compat.patch new file mode 100644 index 00000000..bf75f80c --- /dev/null +++ b/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-compat.patch @@ -0,0 +1,85 @@ +Remove newer symbols that does not work on linux-2.6.16. + +This is only for Prefix standalone. + +Index: glibc-2.19/io/sys/stat.h +=================================================================== +--- glibc-2.19.orig/io/sys/stat.h ++++ glibc-2.19/io/sys/stat.h +@@ -361,10 +361,6 @@ extern int mkfifoat (int __fd, const cha + #ifdef __USE_ATFILE + /* Set file access and modification times relative to directory file + descriptor. */ +-extern int utimensat (int __fd, const char *__path, +- const struct timespec __times[2], +- int __flags) +- __THROW __nonnull ((2)); + #endif + + #ifdef __USE_XOPEN2K8 +Index: glibc-2.19/posix/unistd.h +=================================================================== +--- glibc-2.19.orig/posix/unistd.h ++++ glibc-2.19/posix/unistd.h +@@ -419,7 +419,6 @@ extern int pipe (int __pipedes[2]) __THR + #ifdef __USE_GNU + /* Same as pipe but apply flags passed in FLAGS to the new file + descriptors. */ +-extern int pipe2 (int __pipedes[2], int __flags) __THROW __wur; + #endif + + /* Schedule an alarm. In SECONDS seconds, the process will get a SIGALRM. +Index: glibc-2.19/sysdeps/unix/sysv/linux/x86/bits/epoll.h +=================================================================== +--- glibc-2.19.orig/sysdeps/unix/sysv/linux/x86/bits/epoll.h ++++ glibc-2.19/sysdeps/unix/sysv/linux/x86/bits/epoll.h +@@ -19,11 +19,5 @@ + # error "Never use <bits/epoll.h> directly; include <sys/epoll.h> instead." + #endif + +-/* Flags to be passed to epoll_create1. */ +-enum +- { +- EPOLL_CLOEXEC = 02000000 +-#define EPOLL_CLOEXEC EPOLL_CLOEXEC +- }; + + #define __EPOLL_PACKED __attribute__ ((__packed__)) +Index: glibc-2.19/sysdeps/unix/sysv/linux/bits/fcntl-linux.h +=================================================================== +--- glibc-2.19.orig/sysdeps/unix/sysv/linux/bits/fcntl-linux.h ++++ glibc-2.19/sysdeps/unix/sysv/linux/bits/fcntl-linux.h +@@ -187,8 +187,6 @@ + # define F_GETPIPE_SZ 1032 /* Set pipe page size array. */ + #endif + #ifdef __USE_XOPEN2K8 +-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with +- close-on-exit set. */ + #endif + + /* For F_[GET|SET]FD. */ +Index: glibc-2.19/sysdeps/unix/sysv/linux/sys/epoll.h +=================================================================== +--- glibc-2.19.orig/sysdeps/unix/sysv/linux/sys/epoll.h ++++ glibc-2.19/sysdeps/unix/sysv/linux/sys/epoll.h +@@ -101,7 +101,6 @@ extern int epoll_create (int __size) __T + + /* Same as epoll_create but with an FLAGS parameter. The unused SIZE + parameter has been dropped. */ +-extern int epoll_create1 (int __flags) __THROW; + + + /* Manipulate an epoll instance "epfd". Returns 0 in case of success, +Index: glibc-2.19/time/sys/time.h +=================================================================== +--- glibc-2.19.orig/time/sys/time.h ++++ glibc-2.19/time/sys/time.h +@@ -140,8 +140,6 @@ extern int utimes (const char *__file, c + + #ifdef __USE_BSD + /* Same as `utimes', but does not follow symbolic links. */ +-extern int lutimes (const char *__file, const struct timeval __tvp[2]) +- __THROW __nonnull ((1)); + + /* Same as `utimes', but takes an open file descriptor instead of a name. */ + extern int futimes (int __fd, const struct timeval __tvp[2]) __THROW; diff --git a/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-hide-pipe2.patch b/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-hide-pipe2.patch new file mode 100644 index 00000000..2b9cccec --- /dev/null +++ b/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-hide-pipe2.patch @@ -0,0 +1,16 @@ +Remove the pipe2 symbol from libc.so, otherwise meson will pick it up. + +This is a balance. We decide not to strip all the O_CLOEXEC, otherwise +gtk+ will need to be patched. +Index: glibc-2.19/sysdeps/unix/make-syscalls.sh +=================================================================== +--- glibc-2.19.orig/sysdeps/unix/make-syscalls.sh ++++ glibc-2.19/sysdeps/unix/make-syscalls.sh +@@ -131,6 +131,7 @@ emit_weak_aliases() + echo " echo 'libc_hidden_def ($name)'; \\" + ;; + *) ++ [ $name = pipe2 ] && continue + echo " echo 'weak_alias ($strong, $name)'; \\" + echo " echo 'libc_hidden_weak ($name)'; \\" + ;; diff --git a/sys-libs/glibc/files/host.conf-1 b/sys-libs/glibc/files/host.conf-1 new file mode 100644 index 00000000..4c58e52d --- /dev/null +++ b/sys-libs/glibc/files/host.conf-1 @@ -0,0 +1,24 @@ +# /etc/host.conf: +# $Header: /var/cvsroot/gentoo/src/patchsets/glibc/extra/etc/host.conf,v 1.1 2006/09/29 23:52:23 vapier Exp $ + +# The file /etc/host.conf contains configuration information specific to +# the resolver library. It should contain one configuration keyword per +# line, followed by appropriate configuration information. The keywords +# recognized are order, trim, mdns, multi, nospoof, spoof, and reorder. + + + +# This keyword specifies how host lookups are to be performed. It +# should be followed by one or more lookup methods, separated by +# commas. Valid methods are bind, hosts, and nis. +# +order hosts, bind + + +# Valid values are on and off. If set to on, the resolv+ library +# will return all valid addresses for a host that appears in the +# /etc/hosts file, instead of only the first. This is off by +# default, as it may cause a substantial performance loss at sites +# with large hosts files. +# +multi off diff --git a/sys-libs/glibc/files/nscd-1 b/sys-libs/glibc/files/nscd-1 new file mode 100644 index 00000000..f69c8e2e --- /dev/null +++ b/sys-libs/glibc/files/nscd-1 @@ -0,0 +1,85 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="The 'Name Service Cache Daemon' is a daemon that provides a cache" +description="${description} for the most common name service requests" + +extra_started_commands="flush_all flush_hosts flush_group flush_passwd flush_netgroup flush_services" + +description_flush_all="Will invalidate hosts, group, passwd, netgroup and services cache" +description_flush_hosts="Will invalidate hosts cache" +description_flush_group="Will invalidate group cache" +description_flush_passwd="Will invalidate passwd cache" +description_flush_netgroup="Will invalidate netgroup cache" +description_flush_services="Will invalidate services cache" + +pidfile="/run/nscd/nscd.pid" +command="/usr/sbin/nscd" + +depend() { + use dns ldap net slapd logger +} + +checkconfig() { + if [ ! -d /run/nscd ] ; then + checkpath -d -m 755 /run/nscd + fi + + if [ -z "${NSCD_PERMS_OK}" ] && [ "$(stat -c %a /run/nscd)" != "755" ] ; then + ewarn "nscd run dir is not world readable, you should reset the perms:" + ewarn "chmod 755 /run/nscd" + ewarn "chmod a+rw /run/nscd/socket" + ewarn "To disable this warning, set 'NSCD_PERMS_OK' in /etc/conf.d/nscd" + fi + + if grep -qs '^[[:space:]]*persistent\>' /etc/nscd.conf ; then + checkpath -d -m 700 /var/db/nscd + fi +} + +_flush() { + local table=$1 + + ebegin "Flushing ${table} table" + ${command} --invalidate ${table} + eend $? +} + +flush_all() { + local has_errors=0 + + ebegin "Flushing all caches" + + local table= + for table in passwd group hosts netgroup services; do + ${command} --invalidate ${table} + [ $? -ne 0 ] && has_errors=1 + done + + eend ${has_errors} +} + +flush_hosts() { + _flush hosts +} + +flush_group() { + _flush group +} + +flush_passwd() { + _flush passwd +} + +flush_netgroup() { + _flush netgroup +} + +flush_services() { + _flush services +} + +start_pre() { + checkconfig +} diff --git a/sys-libs/glibc/glibc-2.30-r314.ebuild b/sys-libs/glibc/glibc-2.32-r10.ebuild index ca347296..bbb7b0df 100644 --- a/sys-libs/glibc/glibc-2.30-r314.ebuild +++ b/sys-libs/glibc/glibc-2.32-r10.ebuild @@ -3,7 +3,7 @@ EAPI=7 -PYTHON_COMPAT=( python3_{6,7,8} ) +PYTHON_COMPAT=( python3_{6,7,8,9} ) inherit python-any-r1 prefix eutils toolchain-funcs flag-o-matic gnuconfig \ multilib systemd multiprocessing @@ -15,26 +15,29 @@ SLOT="2.2" EMULTILIB_PKG="true" +# Gentoo patchset (ignored for live ebuilds) +PATCH_VER=2 +PATCH_DEV=dilfridge + if [[ ${PV} == 9999* ]]; then - EGIT_REPO_URI="https://sourceware.org/git/glibc.git" inherit git-r3 else KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" SRC_URI="mirror://gnu/glibc/${P}.tar.xz" + SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" + SRC_URI+=" riscv? ( https://dev.gentoo.org/~dilfridge/distfiles/backport-rv32.txz )" fi RELEASE_VER=${PV} GCC_BOOTSTRAP_VER=20180511 -# Gentoo patchset -PATCH_VER=10 -PATCH_DEV=dilfridge +LOCALE_GEN_VER=2.10 -SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" +SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${LOCALE_GEN_VER}.tar.gz" SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" -IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib nscd profile selinux +ssp +static-libs suid systemtap test vanilla" +IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib nscd profile selinux +ssp +static-libs static-pie suid systemtap test vanilla" # Minimum kernel version that glibc requires MIN_KERN_VER="3.2.0" @@ -84,12 +87,21 @@ fi # We need a new-enough binutils/gcc to match upstream baseline. # Also we need to make sure our binutils/gcc supports TLS, # and that gcc already contains the hardened patches. +# Lastly, let's avoid some openssh nastiness, bug 708224, as +# convenience to our users. + +# gzip, grep, awk are needed by locale-gen, bug 740750 + BDEPEND=" ${PYTHON_DEPS} >=app-misc/pax-utils-0.1.10 sys-devel/bison - !<sys-devel/bison-2.7 doc? ( sys-apps/texinfo ) + !compile-locales? ( + app-arch/gzip + sys-apps/grep + virtual/awk + ) " COMMON_DEPEND=" gd? ( media-libs/gd:2= ) @@ -100,11 +112,20 @@ COMMON_DEPEND=" suid? ( caps? ( sys-libs/libcap ) ) selinux? ( sys-libs/libselinux ) systemtap? ( dev-util/systemtap ) + !<net-misc/openssh-8.1_p1-r2 " DEPEND="${COMMON_DEPEND} + compile-locales? ( + app-arch/gzip + sys-apps/grep + virtual/awk + ) test? ( >=net-dns/libidn2-2.3.0 ) " RDEPEND="${COMMON_DEPEND} + app-arch/gzip + sys-apps/grep + virtual/awk sys-apps/gentoo-functions " @@ -135,18 +156,18 @@ GENTOO_GLIBC_XFAIL_TESTS="${GENTOO_GLIBC_XFAIL_TESTS:-yes}" # The following tests fail due to the Gentoo build system and are thus # executed but ignored: XFAIL_TEST_LIST=( - # 1) Sandbox - tst-ldconfig-bad-aux-cache - tst-pldd - tst-mallocfork2 - tst-nss-db-endgrent - tst-nss-db-endpwent - tst-nss-files-hosts-long - tst-nss-test3 - # 2) Namespaces and cgroup - tst-locale-locpath # 9) Failures of unknown origin tst-latepthread + + # buggy test, assumes /dev/ and /dev/null on a single filesystem + # 'mount --bind /dev/null /chroot/dev/null' breaks it. + # https://sourceware.org/PR25909 + tst-support_descriptors + + # Flaky test, known to fail occasionally: + # https://sourceware.org/PR19329 + # https://bugs.gentoo.org/719674#c12 + tst-stack4 ) # @@ -219,7 +240,8 @@ do_compile_test() { rm -f glibc-test* printf '%b' "$*" > glibc-test.c - nonfatal emake glibc-test + # Most of the time CC is already set, but not in early sanity checks. + nonfatal emake glibc-test CC="${CC-$(tc-getCC ${CTARGET})}" ret=$? popd >/dev/null @@ -296,6 +318,14 @@ setup_target_flags() { # The mips abi cannot support the GNU style hashes. #233233 filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both ;; + ppc|ppc64) + # Many arch-specific implementations do not work on ppc with + # cache-block not equal to 128 bytes. This breaks memset: + # https://sourceware.org/PR26522 + # https://bugs.gentoo.org/737996 + # Use default -mcpu=. For ppc it means non-multiarch setup. + filter-flags '-mcpu=*' + ;; sparc) # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. filter-flags "-fcall-used-g7" @@ -503,27 +533,6 @@ glibc_banner() { echo "${b}" } -check_devpts() { - # Make sure devpts is mounted correctly for use w/out setuid pt_chown. - - # If merely building the binary package, then there's nothing to verify. - [[ ${MERGE_TYPE} == "buildonly" ]] && return - - # Only sanity check when installing the native glibc. - [[ -n ${ROOT} ]] && return - - # If they're opting in to the old suid code, then no need to check. - use suid && return - - if awk '$3 == "devpts" && $4 ~ /[, ]gid=5[, ]/ { exit 1 }' /proc/mounts ; then - eerror "In order to use glibc with USE=-suid, you must make sure that" - eerror "you have devpts mounted at /dev/pts with the gid=5 option." - eerror "Openrc should do this for you, so you should check /etc/fstab" - eerror "and make sure you do not have any invalid settings there." - die "mount & fix your /dev/pts settings" - fi -} - # The following Kernel version handling functions are mostly copied from portage # source. It's better not to use linux-info.eclass here since a) it adds too # much magic, see bug 326693 for some of the arguments, and b) some of the @@ -593,9 +602,6 @@ get_kheader_version() { # pkg_ and src_ phases, so we call this function both in pkg_pretend and in # src_unpack. sanity_prechecks() { - # Make sure devpts is mounted correctly for use w/out setuid pt_chown - check_devpts - # Prevent native builds from downgrading if [[ ${MERGE_TYPE} != "buildonly" ]] && \ [[ -z ${ROOT} ]] && \ @@ -741,21 +747,44 @@ src_unpack() { setup_env - if [[ -n ${EGIT_REPO_URI} ]] ; then + if [[ ${PV} == 9999* ]] ; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git + git-r3_src_unpack + mv patches-git/9999 patches || die + + EGIT_REPO_URI="https://sourceware.org/git/glibc.git" + EGIT_CHECKOUT_DIR=${S} git-r3_src_unpack else unpack ${P}.tar.xz + + cd "${WORKDIR}" || die + unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz fi cd "${WORKDIR}" || die - unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz + unpack locale-gen-${LOCALE_GEN_VER}.tar.gz + use riscv && unpack backport-rv32.txz } src_prepare() { + local patchsetname if ! use vanilla ; then - elog "Applying Gentoo Glibc Patchset ${RELEASE_VER}-${PATCH_VER}" + if [[ ${PV} == 9999* ]] ; then + patchsetname="from git master" + else + patchsetname="${RELEASE_VER}-${PATCH_VER}" + fi + elog "Applying Gentoo Glibc Patchset ${patchsetname}" eapply "${WORKDIR}"/patches einfo "Done." + + if use riscv ; then + elog "Adding rv32 backport patchset for glibc-2.32 (experimental)" + eapply "${WORKDIR}"/backport-rv32 + einfo "Done." + fi fi default @@ -765,6 +794,10 @@ src_prepare() { cd "${WORKDIR}" find . -name configure -exec touch {} + + # move the external locale-gen to its old place + mkdir extra || die + mv locale-gen-${LOCALE_GEN_VER} extra/locale || die + eprefixify extra/locale/locale-gen # Fix permissions on some of the scripts. @@ -790,7 +823,7 @@ glibc_do_configure() { fi local v - for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO ; do + for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO NM READELF; do einfo " $(printf '%15s' ${v}:) ${!v}" done @@ -819,6 +852,14 @@ glibc_do_configure() { fi einfo " $(printf '%15s' 'Manual CXX:') ${CXX}" + # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure + # can't detect them automatically due to ${CHOST} mismatch and fallbacks + # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup(). + export NM="$(tc-getNM ${CTARGET})" + export READELF="$(tc-getREADELF ${CTARGET})" + einfo " $(printf '%15s' 'Manual NM:') ${NM}" + einfo " $(printf '%15s' 'Manual READELF:') ${READELF}" + echo local myconf=() @@ -914,8 +955,14 @@ glibc_do_configure() { --with-pkgversion="$(glibc_banner)" $(use_enable crypt) $(use_multiarch || echo --disable-multi-arch) + $(use_enable static-pie) $(use_enable systemtap) $(use_enable nscd) + + # locale data is arch-independent + # https://bugs.gentoo.org/753740 + libc_cv_complocaledir='${exec_prefix}/lib/locale' + ${EXTRA_ECONF} ) @@ -1116,7 +1163,10 @@ glibc_src_test() { done fi - emake ${myxfailparams} check + # sandbox does not understand unshare() and prevents + # writes to /proc/, which makes many tests fail + + SANDBOX_ON=0 LD_PRELOAD= emake ${myxfailparams} check } do_src_test() { @@ -1158,8 +1208,10 @@ run_locale_gen() { locale_list="${root}/usr/share/i18n/SUPPORTED" fi - locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \ + set -- locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \ --destdir "${root}" + echo "$@" + "$@" popd >/dev/null } @@ -1220,6 +1272,8 @@ glibc_do_src_install() { ppc /lib/ld.so.1 ppc64 /lib64/ld64.so.1 # riscv + ilp32d /lib/ld-linux-riscv32-ilp32d.so.1 + ilp32 /lib/ld-linux-riscv32-ilp32.so.1 lp64d /lib/ld-linux-riscv64-lp64d.so.1 lp64 /lib/ld-linux-riscv64-lp64.so.1 # s390 @@ -1294,36 +1348,21 @@ glibc_do_src_install() { insinto /etc doins locale.gen - # Make sure all the ABI's can find the locales and so we only - # have to generate one set - local a - keepdir /usr/$(get_libdir)/locale - for a in $(get_install_abis) ; do - if [[ ! -e ${ED}/usr/$(get_abi_LIBDIR ${a})/locale ]] ; then - dosym ../$(get_libdir)/locale /usr/$(get_abi_LIBDIR ${a})/locale - fi - done - - # HACK: If we're building for riscv, we need to additionally make sure that - # we can find the locale archive afterwards - case ${CTARGET} in - riscv*) - if [[ ! -e ${ED}/usr/lib/locale ]] ; then - dosym ../$(get_libdir)/locale /usr/lib/locale - fi - ;; - *) ;; - esac + keepdir /usr/lib/locale cd "${S}" # Install misc network config files insinto /etc - doins nscd/nscd.conf posix/gai.conf nss/nsswitch.conf - doins "${WORKDIR}"/extra/etc/*.conf + doins posix/gai.conf nss/nsswitch.conf + + # Gentoo-specific + newins "${FILESDIR}"/host.conf-1 host.conf if use nscd ; then - doinitd "$(prefixify_ro "${WORKDIR}"/extra/etc/nscd)" + doins nscd/nscd.conf + + newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd local nscd_args=( -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):" @@ -1333,9 +1372,6 @@ glibc_do_src_install() { systemd_dounit nscd/nscd.service systemd_newtmpfilesd nscd/nscd.tmpfiles nscd.conf - else - # Do this since extra/etc/*.conf above might have nscd.conf. - rm -f "${ED}"/etc/nscd.conf fi echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc @@ -1439,6 +1475,12 @@ pkg_preinst() { [[ -n ${ROOT} ]] && return 0 [[ -d ${ED}/$(get_libdir) ]] || return 0 [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check + + if [[ -L ${EROOT}/usr/lib/locale ]]; then + # Help portage migrate this to a directory + # https://bugs.gentoo.org/753740 + rm "${EROOT}"/usr/lib/locale || die + fi } pkg_postinst() { |