diff options
Diffstat (limited to 'sys-devel')
241 files changed, 7946 insertions, 4944 deletions
diff --git a/sys-devel/autoconf-archive/Manifest b/sys-devel/autoconf-archive/Manifest index b50af912fbc..0b98e128913 100644 --- a/sys-devel/autoconf-archive/Manifest +++ b/sys-devel/autoconf-archive/Manifest @@ -1 +1,2 @@ DIST autoconf-archive-2021.02.19.tar.xz 667304 BLAKE2B bc99cfd2b507a0c7fc37a001cc9e090fa037cc3626f5f5201c9a62ef06ee8ca4532ca8f21e1422f9dff9f67f64409ae560117c3161809f2d3bc3a39469910485 SHA512 a968c355c3cf66d74dc5b452141afbdf763e84a6c43b12c25da9a08482910d6d57ba3952aaf270d8cd5fd8b9d2dadf2d7d943ae2e1b067d68b71d2738d881aa0 +DIST autoconf-archive-2022.02.11.tar.xz 675264 BLAKE2B b9ff928186312969ffd09fd0523367857e7072e867f6b43689a4a5130db9f5fe19a8337875f5186409e7b0bd200491e3d1f612739499c89547a47862c59ba07f SHA512 243e06a356ea2c0fddc527febd4241da49fe4c11fb64b548873744a54e079860739d7a1da842833b99540acde3f6a2ebfddc41897306cc2e61e2c6037a7d22ff diff --git a/sys-devel/autoconf-archive/autoconf-archive-2022.02.11.ebuild b/sys-devel/autoconf-archive/autoconf-archive-2022.02.11.ebuild new file mode 100644 index 00000000000..bce68764f86 --- /dev/null +++ b/sys-devel/autoconf-archive/autoconf-archive-2022.02.11.ebuild @@ -0,0 +1,20 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +DESCRIPTION="GNU Autoconf Macro Archive" +HOMEPAGE="https://www.gnu.org/software/autoconf-archive/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +# File collisions. #540246 +RDEPEND="!=gnome-base/gnome-common-3.14.0-r0 + !>=gnome-base/gnome-common-3.14.0-r1[-autoconf-archive(+)]" + +PATCHES=( + "${FILESDIR}"/${PN}-2021.02.19-python310.patch +) diff --git a/sys-devel/autoconf-wrapper/Manifest b/sys-devel/autoconf-wrapper/Manifest new file mode 100644 index 00000000000..72082a2b2d4 --- /dev/null +++ b/sys-devel/autoconf-wrapper/Manifest @@ -0,0 +1 @@ +DIST autotools-wrappers-at-20220130.tar.gz 3625 BLAKE2B c587d778a0c3331d14498308ae720dabdbcf27349ef0a3a2d5db56bb0ef597a5b1ab43388f1456e7888b40f043d68b0d89b420ac7404008f9a813ef78ae7e96f SHA512 700204b6024636dc808339aac15fb19bb645b654d4777ba8bf0febded5eb6af98659d04ed23819a8a638b6ee905e62292995bf2f838c30dedacb1a6bc0d04f1a diff --git a/sys-devel/autoconf-wrapper/autoconf-wrapper-15.ebuild b/sys-devel/autoconf-wrapper/autoconf-wrapper-15.ebuild deleted file mode 100644 index d960af4fa66..00000000000 --- a/sys-devel/autoconf-wrapper/autoconf-wrapper-15.ebuild +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DESCRIPTION="wrapper for autoconf to manage multiple autoconf versions" -HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" - -LICENSE="GPL-2" -SLOT="0" -[[ "${PV}" == *_pre* ]] || \ -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - -S="${WORKDIR}" - -src_install() { - exeinto /usr/$(get_libdir)/misc - newexe "${FILESDIR}"/ac-wrapper-${PV}.sh ac-wrapper.sh - - dodir /usr/bin - local x= - for x in auto{conf,header,m4te,reconf,scan,update} ifnames ; do - dosym ../$(get_libdir)/misc/ac-wrapper.sh /usr/bin/${x} - done -} diff --git a/sys-devel/autoconf-wrapper/autoconf-wrapper-20220130.ebuild b/sys-devel/autoconf-wrapper/autoconf-wrapper-20220130.ebuild new file mode 100644 index 00000000000..7b58c31e8bd --- /dev/null +++ b/sys-devel/autoconf-wrapper/autoconf-wrapper-20220130.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +MY_P="autotools-wrappers-at-${PV}" + +DESCRIPTION="wrapper for autoconf to manage multiple autoconf versions" +HOMEPAGE="https://gitweb.gentoo.org/proj/autotools-wrappers.git" +#SRC_URI="https://gitweb.gentoo.org/proj/autotools-wrappers.git/snapshot/${MY_P}.tar.gz" +SRC_URI="https://dev.gentoo.org/~vapier/dist/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +S="${WORKDIR}/${MY_P}" + +src_install() { + exeinto /usr/$(get_libdir)/misc + newexe ac-wrapper.sh ac-wrapper.sh + + dodir /usr/bin + local x= + for x in auto{conf,header,m4te,reconf,scan,update} ifnames ; do + dosym ../$(get_libdir)/misc/ac-wrapper.sh /usr/bin/${x} + done +} diff --git a/sys-devel/autoconf-wrapper/files/ac-wrapper-15.sh b/sys-devel/autoconf-wrapper/files/ac-wrapper-15.sh deleted file mode 100644 index e5eda0e53f1..00000000000 --- a/sys-devel/autoconf-wrapper/files/ac-wrapper-15.sh +++ /dev/null @@ -1,203 +0,0 @@ -#!/bin/sh -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# Based on the ac-wrapper.pl script provided by MandrakeSoft -# Rewritten in bash by Gregorio Guidi -# -# Executes the correct autoconf version. -# -# - defaults to newest version available (hopefully autoconf-2.60) -# - runs autoconf 2.13 if: -# - envvar WANT_AUTOCONF is set to `2.1' -# -or- -# - `ac{local,include}.m4' or `configure.{in,ac}' have AC_PREREQ(2.1) (not higher) -# -or- -# - `configure' is already present and was generated by autoconf 2.13 - -warn() { printf "ac-wrapper: $*\n" 1>&2; } -err() { warn "$@"; exit 1; } -unset IFS -which() { - local p - IFS=: # we don't use IFS anywhere, so don't bother saving/restoring - for p in ${PATH} ; do - p="${p}/$1" - [ -e "${p}" ] && echo "${p}" && return 0 - done - unset IFS - return 1 -} - -# -# Sanitize argv[0] since it isn't always a full path #385201 -# -argv0=${0##*/} -case ${0} in - ${argv0}) - # find it in PATH - if ! full_argv0=$(which "${argv0}") ; then - err "could not locate ${argv0}; file a bug" - fi - ;; - *) - # re-use full/relative paths - full_argv0=$0 - ;; -esac - -if [ "${argv0}" = "ac-wrapper.sh" ] ; then - err "Don't call this script directly" -fi - -if [ "${WANT_AUTOCONF}" = "2.1" ] && [ "${argv0}" = "autom4te" ] ; then - err "Autoconf 2.13 doesn't contain autom4te.\n" \ - " Either unset WANT_AUTOCONF or don't execute anything\n" \ - " that would use autom4te." -fi - -if ! seq 0 0 2>/dev/null 1>&2 ; then #338518 - seq() { - local f l i - case $# in - 1) f=1 i=1 l=$1;; - 2) f=$1 i=1 l=$2;; - 3) f=$1 i=$2 l=$3;; - esac - while :; do - [ $l -lt $f -a $i -gt 0 ] && break - [ $f -lt $l -a $i -lt 0 ] && break - echo $f - : $(( f += i )) - done - return 0 - } -fi - -# -# Set up bindings between actual version and WANT_AUTOCONF; -# Start at last known unstable/stable versions to speed up lookup process. -# -if [ -z "${KNOWN_AUTOCONF}" ] ; then - KNOWN_AUTOCONF="2.71:2.5 2.70:2.5 2.69:2.5" -fi -vers="${KNOWN_AUTOCONF} 9999:2.5 $(printf '2.%s:2.5 ' `seq 99 -1 59`) 2.13:2.1" - -binary="" -for v in ${vers} ; do - auto_ver=${v%:*} - if [ -z "${binary}" ] && [ -x "${full_argv0}-${auto_ver}" ] ; then - binary="${full_argv0}-${auto_ver}" - break - fi -done -if [ -z "${binary}" ] ; then - err "Unable to locate any usuable version of autoconf.\n" \ - "\tI tried these versions: ${vers}\n" \ - "\tWith a base name of '${full_argv0}'." -fi - -# -# Check the WANT_AUTOCONF setting. We accept a whitespace delimited -# list of autoconf versions. -# -if [ -n "${WANT_AUTOCONF}" ] ; then - for v in ${vers} x ; do - if [ "${v}" = "x" ] ; then - warn "warning: invalid WANT_AUTOCONF '${WANT_AUTOCONF}'; ignoring." - unset WANT_AUTOCONF - break - fi - - auto_ver=${v%:*} - want_ver=${v#*:} - for wx in ${WANT_AUTOCONF} ; do - if [ -x "${full_argv0}-${wx}" ] ; then - binary="${full_argv0}-${wx}" - v="x" - elif [ "${wx}" = "${want_ver}" ] && [ -x "${full_argv0}-${auto_ver}" ] ; then - binary="${full_argv0}-${auto_ver}" - v="x" - fi - done - [ "${v}" = "x" ] && break - done -fi - -# -# autodetect helpers -# -acprereq_version() { - sed -n -r \ - -e '/^\s*(#|dnl)/d' \ - -e '/AC_PREREQ/s:.*AC_PREREQ\s*\(\[?\s*([0-9.]+)\s*\]?\):\1:p' \ - "$@" | - LC_ALL=C sort -n -t . | - tail -1 -} - -generated_version() { - local re='^# Generated (by (GNU )?Autoconf|automatically using autoconf version) ([0-9.]+).*' - sed -n -r "/${re}/{s:${re}:\3:;p;q}" "$@" -} - -# -# autodetect routine -# -if [ "${WANT_AUTOCONF}" = "2.1" ] && [ -f "configure.ac" ] ; then - err "Since configure.ac is present, aclocal always use\n" \ - "\tautoconf 2.59+, which conflicts with your choice and\n" \ - "\tcauses error. You have two options:\n" \ - "\t1. Try execute command again after removing configure.ac\n" \ - "\t2. Don't set WANT_AUTOCONF" -fi - -if [ "${WANT_AUTOCONF:-2.1}" = "2.1" ] && [ -n "${WANT_AUTOMAKE}" ] ; then - # Automake-1.7 and better require autoconf-2.5x so if WANT_AUTOMAKE - # is set to an older version, let's do some sanity checks. - case "${WANT_AUTOMAKE}" in - 1.[456]) - acfiles=$(ls aclocal.m4 acinclude.m4 configure.in configure.ac 2>/dev/null) - [ -n "${acfiles}" ] && confversion=$(acprereq_version ${acfiles}) - - [ -z "${confversion}" ] && [ -r "configure" ] \ - && confversion=$(generated_version configure) - - if [ "${confversion}" = "2.1" ] && [ ! -f "configure.ac" ] ; then - binary="${full_argv0}-2.13" - fi - esac -fi - -if [ -n "${WANT_ACWRAPPER_DEBUG}" ] ; then - if [ -n "${WANT_AUTOCONF}" ] ; then - warn "DEBUG: WANT_AUTOCONF is set to ${WANT_AUTOCONF}" - fi - warn "DEBUG: will execute <${binary}>" -fi - -# -# for further consistency -# -if [ -z "${WANT_AUTOCONF}" ] ; then - for v in ${vers} ; do - auto_ver=${v%:*} - want_ver=${v#*:} - if [ "${binary}" = "${full_argv0}-${auto_ver}" ] ; then - export WANT_AUTOCONF="${want_ver}" - break - fi - done -fi - -# -# Now try to run the binary -# -if [ ! -x "${binary}" ] ; then - # this shouldn't happen - err "${binary} is missing or not executable.\n" \ - "\tPlease try emerging the correct version of autoconf." -fi - -exec "${binary}" "$@" -# The shell will error out if `exec` failed. diff --git a/sys-devel/autoconf/Manifest b/sys-devel/autoconf/Manifest index 4d729262f26..e7e8a8d234f 100644 --- a/sys-devel/autoconf/Manifest +++ b/sys-devel/autoconf/Manifest @@ -1,5 +1,4 @@ DIST autoconf-2.13.tar.gz 443844 BLAKE2B ade10f9d4a0b1a0e8b752eee817cfe100d77b074192b9892330402ddc5b62dda1a3485ce0c36e72191daa9fd49382b99851cb6aa3a13aca8cf2ae6e884638fb6 SHA512 602584f4c77b7a554aaa068eda5409b68eb0b3229e9c224bffb91c83c4314d25de15bd560a323626ff78f6df339c79e1ef8938c54b78ecadf4dc75c5241290ad -DIST autoconf-2.64.tar.xz 1113892 BLAKE2B 598873209a67725150cd4cf09c4b78b26b3d1782f259846da48dc8106a1d32ae2b24f3a864c3be0e9e8dc7d6b6ca8781b83ff33a691c88e68391d1ea861ccf23 SHA512 ee4b504447c14a59b849d0915e55a90522cfb071d1583af2bd3575e5a05d7bd290e55e0e9d0760c8f36043f926199fc2d962b559d27d2f95c70d0e147b4ad0a3 DIST autoconf-2.69-runstatedir_patches.tar.xz 257096 BLAKE2B ae765e0ca7fe8261117f6f6b75611c232fc3d4016c22c86346afa72f2b7e6c3b7ccc1f9dfe134b2443f8bde6d578b503d79cf88472f76ce75b6c2e843ef55b8e SHA512 55f93299fe5243151f6bb782986a7935270f06d5065929f4d365a37aba05703e3ce66ecf7981d30413db50ee6b4f77d81d10a71b539c8a366c5c5a156c5443da DIST autoconf-2.69.tar.xz 1214744 BLAKE2B 71d33d72a06e9a05fbed0eda73bc9d8a3805c7c90bf082959862f93f3c5f01192114176e84d84ecb58fa99512eafbc0ab21ad1407be18c8c63bb3dc1117c482d SHA512 995d3e5a8eb1eb37e2b7fae53c6ec7a9b4df997286b7d643344818f94636756b1bf5ff5ea9155e755cb9461149a853dfbf2886fc6bd7132e5afa9c168e306e9b DIST autoconf-2.71.tar.xz 1292296 BLAKE2B 7fd4b98b4cfff10720e8da6ee91045637991643b50fcb3e47a0ecfcc01600f7b7b36fd1c0a5f08b68a418f1bdbd8d5a98de1008157595dd37cc3a31facb61416 SHA512 73d32b4adcbe24e3bafa9f43f59ed3b6efbd3de0f194e5ec90375f35da1199c583f5d3e89139b7edbad35171403709270e339ffa56a2ecb9b3123e9285021ff0 diff --git a/sys-devel/autoconf/autoconf-2.13-r1.ebuild b/sys-devel/autoconf/autoconf-2.13-r2.ebuild index 64ebbe28019..e84a401dd1b 100644 --- a/sys-devel/autoconf/autoconf-2.13-r1.ebuild +++ b/sys-devel/autoconf/autoconf-2.13-r2.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 inherit toolchain-autoconf @@ -11,12 +11,13 @@ SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" LICENSE="GPL-2" SLOT="${PV:0:3}" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris" -DEPEND=">=sys-apps/texinfo-4.3 - =sys-devel/m4-1.4* +BDEPEND=" + sys-devel/m4 dev-lang/perl" -RDEPEND="${DEPEND} +RDEPEND="${BDEPEND} + sys-apps/texinfo >=sys-devel/autoconf-wrapper-13" PATCHES=( diff --git a/sys-devel/autoconf/autoconf-2.64-r1.ebuild b/sys-devel/autoconf/autoconf-2.64-r1.ebuild deleted file mode 100644 index efed7086f51..00000000000 --- a/sys-devel/autoconf/autoconf-2.64-r1.ebuild +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit toolchain-autoconf - -DESCRIPTION="Used to create autoconfiguration files" -HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html" -SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" - -LICENSE="GPL-2" -SLOT="${PV}" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" -IUSE="" - -DEPEND=">=sys-devel/m4-1.4.6 - dev-lang/perl" -RDEPEND="${DEPEND} - !~sys-devel/${P}:2.5 - >=sys-devel/autoconf-wrapper-13" - -PATCHES=( - "${FILESDIR}"/${PN}-2.69-perl-5.26.patch - "${FILESDIR}"/${PN}-2.69-perl-5.26-2.patch -) diff --git a/sys-devel/autoconf/autoconf-2.71-r1.ebuild b/sys-devel/autoconf/autoconf-2.71-r1.ebuild index 2421cf85b36..21a979c791b 100644 --- a/sys-devel/autoconf/autoconf-2.71-r1.ebuild +++ b/sys-devel/autoconf/autoconf-2.71-r1.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -if [[ ${PV} == "9999" ]] ; then +if [[ ${PV} == 9999 ]] ; then EGIT_REPO_URI="https://git.savannah.gnu.org/git/autoconf.git" inherit git-r3 else @@ -11,12 +11,14 @@ else MY_PV="${PV}" MY_P="${PN}-${MY_PV}" #PATCH_TARBALL_NAME="${PN}-2.70-patches-01" - SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz -> ${P}.tar.xz - https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz -> ${P}.tar.xz" + SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz + https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz" #SRC_URI+=" https://dev.gentoo.org/~polynomial-c/${PATCH_TARBALL_NAME}.tar.xz" - [[ "${PV}" == *_beta* ]] || \ - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - S="${WORKDIR}/${MY_P}" + + if ! [[ ${PV} == *_beta* ]] ; then + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + fi + S="${WORKDIR}"/${MY_P} fi inherit toolchain-autoconf @@ -34,7 +36,7 @@ RDEPEND="${BDEPEND} >=sys-devel/autoconf-wrapper-15 sys-devel/gnuconfig !~sys-devel/${P}:2.5" -[[ ${PV} == "9999" ]] && BDEPEND+=" >=sys-apps/texinfo-4.3" +[[ ${PV} == 9999 ]] && BDEPEND+=" >=sys-apps/texinfo-4.3" PDEPEND="emacs? ( app-emacs/autoconf-mode )" PATCHES=( "${FILESDIR}/${P}-time.patch" ) diff --git a/sys-devel/autogen/autogen-5.18.16-r1.ebuild b/sys-devel/autogen/autogen-5.18.16-r1.ebuild index a9abb0ce918..e6ca874bac9 100644 --- a/sys-devel/autogen/autogen-5.18.16-r1.ebuild +++ b/sys-devel/autogen/autogen-5.18.16-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -12,7 +12,7 @@ SRC_URI="mirror://gnu/${PN}/rel${PV}/${P}.tar.xz LICENSE="GPL-2" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" IUSE="libopts static-libs" RDEPEND=">=dev-scheme/guile-2.0:= diff --git a/sys-devel/automake-wrapper/automake-wrapper-11-r1.ebuild b/sys-devel/automake-wrapper/automake-wrapper-11-r1.ebuild new file mode 100644 index 00000000000..e65eb87b26c --- /dev/null +++ b/sys-devel/automake-wrapper/automake-wrapper-11-r1.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="wrapper for automake to manage multiple automake versions" +HOMEPAGE="https://gitweb.gentoo.org/proj/autotools-wrappers.git" +S="${WORKDIR}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +src_unpack() { + cp "${FILESDIR}"/am-wrapper-${PV}.sh "${S}"/ || die +} + +src_prepare() { + default + + # usr/bin/aclocal: bad substitution -> /bin/sh != POSIX shell + if use prefix ; then + sed -i -e '1c\#!'"${EPREFIX}"'/bin/sh' am-wrapper-${PV}.sh || die + fi +} + +src_install() { + newbin am-wrapper-${PV}.sh automake + dosym automake /usr/bin/aclocal + + keepdir /usr/share/aclocal +} diff --git a/sys-devel/automake-wrapper/automake-wrapper-11.ebuild b/sys-devel/automake-wrapper/automake-wrapper-11.ebuild deleted file mode 100644 index 1516e27afb7..00000000000 --- a/sys-devel/automake-wrapper/automake-wrapper-11.ebuild +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -DESCRIPTION="wrapper for automake to manage multiple automake versions" -HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" -SRC_URI="" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="" - -S=${WORKDIR} - -src_unpack() { - cp "${FILESDIR}"/am-wrapper-${PV}.sh "${S}"/ || die -} - -src_prepare() { - default - - # usr/bin/aclocal: bad substitution -> /bin/sh != POSIX shell - if use prefix ; then - sed -i -e '1c\#!'"${EPREFIX}"'/bin/sh' \ - "${S}"/am-wrapper-${PV}.sh || die - fi -} - -src_install() { - newbin "${S}"/am-wrapper-${PV}.sh automake - dosym automake /usr/bin/aclocal - - keepdir /usr/share/aclocal -} diff --git a/sys-devel/automake/Manifest b/sys-devel/automake/Manifest index e5df40b3adb..e73efe27858 100644 --- a/sys-devel/automake/Manifest +++ b/sys-devel/automake/Manifest @@ -1,6 +1,4 @@ DIST automake-1.11.6.tar.xz 1092908 BLAKE2B 17254d81d6920c32aa877b6c892025de8e4060b8bcbe50fff841ada513dd462ddde8fc6838b4976098a812f8fda047e7186cb62cea8175df615dde75a9959144 SHA512 6e4cdf69f07734954f770fd4a7211a8c9dc69fe25a7746bd3c1e01d3139c94cab2900399e87371548833e99687e0d2b59c5e746ab2fdfbc7d47f2c1d439137ba DIST automake-1.13.4.tar.xz 1449608 BLAKE2B 03dee42d65362a6f36e81c83d516c85faba1aac59bdc0d941077fde9be7742da0f57b48d678169e7a0e8b652c3ef46c314cdd3efb0fc489c389852fed1c39a02 SHA512 c9b145c1b822a4d83f2899f4280a76ccae932301b273f4c9718dc7f53161aa03dc1be2c1fb1a61083c54186e1908ae2c8284250aa1d8f6dea484767aca1344d3 DIST automake-1.15.1.tar.xz 1509496 BLAKE2B e6ade31089f969140472004cd9854318470228c64e4f8e829d48c5379f62d2c5f8ef9509131c577653e81868d94544ecf6520f86b5d582ebb6ed65c832039f30 SHA512 02f661b2676f1d44334ce1c7188f9913a6874bf46ba487708ad8090ad57905f14aead80fefed815e21effacfbb925e23b944ea7dd32563dca39c1a4174eda688 -DIST automake-1.16.3.tar.xz 1590708 BLAKE2B ab6001a1b09e171ec83bac07155a77ab0fc29f5185116616aa3080b27e8bbf759472cd0dfb75630b26f7ad8d0741e668662d00b370ef79cf5ef6c62e945c94da SHA512 7265aeb7f82a8a205761d76e6ade7b7e97831c283349fd80f86e511f4b0b3e17f429d1506fca84c76079f63781e5dbf5ca81455d6bf6cda27d2e5c3d23b0d1aa -DIST automake-1.16.4.tar.xz 1599336 BLAKE2B a74bb444e7074e7dd7cf920a94a86756a5e6dec24a9eeb669ee629a1d3ab667efef0005d488fe6d9d8b33a680ada54f098ca334b63da4a739b0fec7c630a65aa SHA512 5a8883657e73b75bfa1ee59ab04af6bf4d43f390ab62fb7a9e8e2ac66159dfe4947b2ac7bc1028afffe6a09d88f388339500e03f6cdfa1226985be45ec033246 DIST automake-1.16.5.tar.xz 1601740 BLAKE2B 87408abc57e1d4317a2b518fb3606d0f6d156522e7333016dd84747cd8922f27ef7fcc93220b11f794ce52bf8fd9a788d0166a4d1964d7c283905f269977ac7c SHA512 3084ae543aa3fb5a05104ffb2e66cfa9a53080f2343c44809707fd648516869511500dba50dae67ff10f92a1bf3b5a92b2a0fa01cda30adb69b9da03994d9d88 diff --git a/sys-devel/automake/automake-1.16.3-r1.ebuild b/sys-devel/automake/automake-1.16.3-r1.ebuild deleted file mode 100644 index 6908170eb07..00000000000 --- a/sys-devel/automake/automake-1.16.3-r1.ebuild +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -PYTHON_COMPAT=( python3_{8,9,10} ) - -inherit python-any-r1 - -if [[ ${PV} == 9999 ]] ; then - EGIT_REPO_URI="https://git.savannah.gnu.org/r/${PN}.git" - - inherit git-r3 -else - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - if [[ ${PV/_beta} == ${PV} ]]; then - MY_P="${P}" - SRC_URI="mirror://gnu/${PN}/${P}.tar.xz - https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz" - else - MY_PV="$(ver_cut 1).$(($(ver_cut 2)-1))b" - MY_P="${PN}-${MY_PV}" - - # Alpha/beta releases are not distributed on the usual mirrors. - SRC_URI="https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz" - fi - S="${WORKDIR}/${MY_P}" -fi - -DESCRIPTION="Used to generate Makefile.in from Makefile.am" -HOMEPAGE="https://www.gnu.org/software/automake/" - -LICENSE="GPL-2" -# Use Gentoo versioning for slotting. -SLOT="${PV:0:4}" -IUSE="test" -RESTRICT="!test? ( test )" - -RDEPEND="dev-lang/perl - >=sys-devel/automake-wrapper-11 - >=sys-devel/autoconf-2.69:* - sys-devel/gnuconfig" -DEPEND="${RDEPEND}" -BDEPEND=" - app-arch/gzip - sys-apps/help2man - test? ( ${PYTHON_DEPS} ) -" - -PATCHES=( - "${FILESDIR}"/automake-1.16.2-py3-compile.patch - "${FILESDIR}"/automake-1.16.2-fix-instmany-python.sh-test.patch - "${FILESDIR}"/automake-1.16.2-fix-py-compile-basedir.sh-test.patch -) - -pkg_setup() { - # Avoid python-any-r1_pkg_setup - : -} - -src_prepare() { - default - export WANT_AUTOCONF=2.5 - # Don't try wrapping the autotools this thing runs as it tends - # to be a bit esoteric, and the script does `set -e` itself. - ./bootstrap || die - sed -i -e "/APIVERSION=/s:=.*:=${SLOT}:" configure || die - - # Bug 628912 - if ! has_version sys-apps/texinfo ; then - touch doc/{stamp-vti,version.texi,automake.info} || die - fi -} - -src_configure() { - use test && python_setup - default -} - -# slot the info pages. do this w/out munging the source so we don't have -# to depend on texinfo to regen things. #464146 (among others) -slot_info_pages() { - pushd "${ED}"/usr/share/info >/dev/null || die - rm -f dir - - # Rewrite all the references to other pages. - # before: * aclocal-invocation: (automake)aclocal Invocation. Generating aclocal.m4. - # after: * aclocal-invocation v1.13: (automake-1.13)aclocal Invocation. Generating aclocal.m4. - local p pages=( *.info ) args=() - for p in "${pages[@]/%.info}" ; do - args+=( - -e "/START-INFO-DIR-ENTRY/,/END-INFO-DIR-ENTRY/s|: (${p})| v${SLOT}&|" - -e "s:(${p}):(${p}-${SLOT}):g" - ) - done - sed -i "${args[@]}" * || die - - # Rewrite all the file references, and rename them in the process. - local f d - for f in * ; do - d=${f/.info/-${SLOT}.info} - mv "${f}" "${d}" || die - sed -i -e "s:${f}:${d}:g" * || die - done - - popd >/dev/null || die -} - -src_install() { - default - - slot_info_pages - rm "${ED}"/usr/share/aclocal/README || die - rmdir "${ED}"/usr/share/aclocal || die - rm \ - "${ED}"/usr/bin/{aclocal,automake} \ - "${ED}"/usr/share/man/man1/{aclocal,automake}.1 || die - - # remove all config.guess and config.sub files replacing them - # w/a symlink to a specific gnuconfig version - local x - for x in guess sub ; do - dosym ../gnuconfig/config.${x} \ - /usr/share/${PN}-${SLOT}/config.${x} - done - - # Avoid QA message about pre-compressed file in docs - local tarfile="${ED}/usr/share/doc/${PF}/amhello-1.0.tar.gz" - if [[ -f "${tarfile}" ]] ; then - gunzip "${tarfile}" || die - fi -} diff --git a/sys-devel/automake/automake-1.16.4.ebuild b/sys-devel/automake/automake-1.16.4.ebuild deleted file mode 100644 index 6908170eb07..00000000000 --- a/sys-devel/automake/automake-1.16.4.ebuild +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -PYTHON_COMPAT=( python3_{8,9,10} ) - -inherit python-any-r1 - -if [[ ${PV} == 9999 ]] ; then - EGIT_REPO_URI="https://git.savannah.gnu.org/r/${PN}.git" - - inherit git-r3 -else - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - if [[ ${PV/_beta} == ${PV} ]]; then - MY_P="${P}" - SRC_URI="mirror://gnu/${PN}/${P}.tar.xz - https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz" - else - MY_PV="$(ver_cut 1).$(($(ver_cut 2)-1))b" - MY_P="${PN}-${MY_PV}" - - # Alpha/beta releases are not distributed on the usual mirrors. - SRC_URI="https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz" - fi - S="${WORKDIR}/${MY_P}" -fi - -DESCRIPTION="Used to generate Makefile.in from Makefile.am" -HOMEPAGE="https://www.gnu.org/software/automake/" - -LICENSE="GPL-2" -# Use Gentoo versioning for slotting. -SLOT="${PV:0:4}" -IUSE="test" -RESTRICT="!test? ( test )" - -RDEPEND="dev-lang/perl - >=sys-devel/automake-wrapper-11 - >=sys-devel/autoconf-2.69:* - sys-devel/gnuconfig" -DEPEND="${RDEPEND}" -BDEPEND=" - app-arch/gzip - sys-apps/help2man - test? ( ${PYTHON_DEPS} ) -" - -PATCHES=( - "${FILESDIR}"/automake-1.16.2-py3-compile.patch - "${FILESDIR}"/automake-1.16.2-fix-instmany-python.sh-test.patch - "${FILESDIR}"/automake-1.16.2-fix-py-compile-basedir.sh-test.patch -) - -pkg_setup() { - # Avoid python-any-r1_pkg_setup - : -} - -src_prepare() { - default - export WANT_AUTOCONF=2.5 - # Don't try wrapping the autotools this thing runs as it tends - # to be a bit esoteric, and the script does `set -e` itself. - ./bootstrap || die - sed -i -e "/APIVERSION=/s:=.*:=${SLOT}:" configure || die - - # Bug 628912 - if ! has_version sys-apps/texinfo ; then - touch doc/{stamp-vti,version.texi,automake.info} || die - fi -} - -src_configure() { - use test && python_setup - default -} - -# slot the info pages. do this w/out munging the source so we don't have -# to depend on texinfo to regen things. #464146 (among others) -slot_info_pages() { - pushd "${ED}"/usr/share/info >/dev/null || die - rm -f dir - - # Rewrite all the references to other pages. - # before: * aclocal-invocation: (automake)aclocal Invocation. Generating aclocal.m4. - # after: * aclocal-invocation v1.13: (automake-1.13)aclocal Invocation. Generating aclocal.m4. - local p pages=( *.info ) args=() - for p in "${pages[@]/%.info}" ; do - args+=( - -e "/START-INFO-DIR-ENTRY/,/END-INFO-DIR-ENTRY/s|: (${p})| v${SLOT}&|" - -e "s:(${p}):(${p}-${SLOT}):g" - ) - done - sed -i "${args[@]}" * || die - - # Rewrite all the file references, and rename them in the process. - local f d - for f in * ; do - d=${f/.info/-${SLOT}.info} - mv "${f}" "${d}" || die - sed -i -e "s:${f}:${d}:g" * || die - done - - popd >/dev/null || die -} - -src_install() { - default - - slot_info_pages - rm "${ED}"/usr/share/aclocal/README || die - rmdir "${ED}"/usr/share/aclocal || die - rm \ - "${ED}"/usr/bin/{aclocal,automake} \ - "${ED}"/usr/share/man/man1/{aclocal,automake}.1 || die - - # remove all config.guess and config.sub files replacing them - # w/a symlink to a specific gnuconfig version - local x - for x in guess sub ; do - dosym ../gnuconfig/config.${x} \ - /usr/share/${PN}-${SLOT}/config.${x} - done - - # Avoid QA message about pre-compressed file in docs - local tarfile="${ED}/usr/share/doc/${PF}/amhello-1.0.tar.gz" - if [[ -f "${tarfile}" ]] ; then - gunzip "${tarfile}" || die - fi -} diff --git a/sys-devel/automake/automake-1.16.5.ebuild b/sys-devel/automake/automake-1.16.5.ebuild index a9dc19ef2b0..df393e3b107 100644 --- a/sys-devel/automake/automake-1.16.5.ebuild +++ b/sys-devel/automake/automake-1.16.5.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -11,7 +11,7 @@ if [[ ${PV} == 9999 ]] ; then inherit git-r3 else - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" if [[ ${PV/_beta} == ${PV} ]]; then MY_P="${P}" SRC_URI="mirror://gnu/${PN}/${P}.tar.xz diff --git a/sys-devel/bc/bc-1.07.1-r3.ebuild b/sys-devel/bc/bc-1.07.1-r4.ebuild index 84f22cd7fd2..b0ba700abde 100644 --- a/sys-devel/bc/bc-1.07.1-r3.ebuild +++ b/sys-devel/bc/bc-1.07.1-r4.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="6" +EAPI=7 inherit flag-o-matic toolchain-funcs @@ -11,31 +11,27 @@ SRC_URI="mirror://gnu/bc/${P}.tar.gz" LICENSE="GPL-2 LGPL-2.1" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" IUSE="libedit readline static" RDEPEND=" !readline? ( libedit? ( dev-libs/libedit:= ) ) readline? ( - >=sys-libs/readline-4.1:0= - >=sys-libs/ncurses-5.2:= - ) -" -DEPEND=" - ${RDEPEND} + sys-libs/readline:= + sys-libs/ncurses:= + )" +DEPEND="${RDEPEND}" +BDEPEND=" sys-devel/flex - virtual/yacc -" + virtual/yacc" -PATCHES=( - "${FILESDIR}/${PN}-1.07.1-no-ed-its-sed.patch" -) +PATCHES=( "${FILESDIR}"/${PN}-1.07.1-no-ed-its-sed.patch ) src_prepare() { default - # Avoid bad build tool usage when cross-compiling. #627126 - tc-is-cross-compiler && eapply "${FILESDIR}/${PN}-1.07.1-use-system-bc.patch" + # Avoid bad build tool usage when cross-compiling. Bug #627126 + tc-is-cross-compiler && eapply "${FILESDIR}"/${PN}-1.07.1-use-system-bc.patch } src_configure() { @@ -52,8 +48,8 @@ src_configure() { econf "${myconf[@]}" # Do not regen docs -- configure produces a small fragment that includes - # the version info which causes all pages to regen (newer file). #554774 - touch -r doc doc/* + # the version info which causes all pages to regen (newer file). Bug #554774 + touch -r doc doc/* || die } src_compile() { diff --git a/sys-devel/bc/metadata.xml b/sys-devel/bc/metadata.xml index 73dda144f9a..b0d83aa2e48 100644 --- a/sys-devel/bc/metadata.xml +++ b/sys-devel/bc/metadata.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<maintainer type="project"> - <email>base-system@gentoo.org</email> - <name>Gentoo Base System</name> -</maintainer> + <maintainer type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> + </maintainer> </pkgmetadata> diff --git a/sys-devel/bin86/bin86-0.16.21-r1.ebuild b/sys-devel/bin86/bin86-0.16.21-r1.ebuild index c8aa201710f..cdbd313b337 100644 --- a/sys-devel/bin86/bin86-0.16.21-r1.ebuild +++ b/sys-devel/bin86/bin86-0.16.21-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="8" @@ -11,7 +11,7 @@ SRC_URI="http://v3.sk/~lkundrak/dev86/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" +KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86" PATCHES="${FILESDIR}"/${PN}-0.16.21-amd64-build.patch diff --git a/sys-devel/bin86/bin86-0.16.21.ebuild b/sys-devel/bin86/bin86-0.16.21.ebuild deleted file mode 100644 index b21fcec3bf4..00000000000 --- a/sys-devel/bin86/bin86-0.16.21.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit toolchain-funcs epatch - -DESCRIPTION="Assembler and loader used to create kernel bootsector" -HOMEPAGE="http://v3.sk/~lkundrak/dev86/" -SRC_URI="http://v3.sk/~lkundrak/dev86/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86" -IUSE="" - -src_prepare() { - use elibc_musl && CPPFLAGS="${CPPFLAGS} -U__linux__" - sed -i \ - -e '/^PREFIX/s|=.*|=$(DESTDIR)/usr|' \ - -e '/^MANDIR/s|)/man/man1|)/share/man/man1|' \ - -e '/^INSTALL_OPTS/s|-s||' \ - -e "/^CFLAGS/s|=.*|=${CFLAGS} -D_POSIX_SOURCE ${CPPFLAGS}|" \ - -e "/^LDFLAGS/s|=.*|=${LDFLAGS}|" \ - Makefile || die - epatch "${FILESDIR}"/${PN}-0.16.17-amd64-build.patch - eapply_user - tc-export CC -} - -src_install() { - dodir /usr/bin /usr/share/man/man1 - default -} diff --git a/sys-devel/bin86/files/bin86-0.16.17-amd64-build.patch b/sys-devel/bin86/files/bin86-0.16.17-amd64-build.patch deleted file mode 100644 index b494a8b724d..00000000000 --- a/sys-devel/bin86/files/bin86-0.16.17-amd64-build.patch +++ /dev/null @@ -1,17 +0,0 @@ -This should make it built on other archictectures as well - -https://bugs.gentoo.org/428228 - ---- ld/x86_aout.h -+++ ld/x86_aout.h -@@ -13,7 +13,9 @@ - typedef long Long; - #define __OUT_OK 1 - #else --typedef char Long[4]; -+#define __OUT_OK 1 -+#include <inttypes.h> -+typedef int32_t Long; - #endif - - struct exec { /* a.out header */ diff --git a/sys-devel/binutils-apple/Manifest b/sys-devel/binutils-apple/Manifest index a6468db7cc6..718995f313c 100644 --- a/sys-devel/binutils-apple/Manifest +++ b/sys-devel/binutils-apple/Manifest @@ -1,4 +1,3 @@ -DIST binutils-apple-patches-11.3-r1.tar.bz2 9041 BLAKE2B c881117e19e119173dd8c126859f8ebab5ff4024697c9650b8ba145c021aa6e251086d3678d80fec2672e78637a5beca795b71ae871692e832ba4e69a7a8e04c SHA512 eda63cd89f67674556dc75de719cd318f534544db50165d4faac454f67c557c9944e7e024c4443e640f987ed8c8826ccd578427743a86d7220c2ba90ed2206d4 DIST binutils-apple-patches-3.2.6-r0.tar.bz2 3500 BLAKE2B f10dcf71400ea5d4bf7efb8ad906240765cfb56743274b3e1684eeb4273a35171aa4202d475920cff2c5c39e89f9bd1d7e5b0d38ba6c2b4705b0a592ba47e063 SHA512 4ccb8ebd49ac8eac4dbd0c1f24ee1836f216efd2e9e15b13072cbc76d8f83fbf4f1f6b3b60736bf5d5482af3e49ec1eaedfce8dd0ce1e949f915faf9c92ee0ea DIST binutils-apple-patches-4.3-r1.tar.bz2 37363 BLAKE2B a5ad04d4bf746a864f03a25d052197ed9a6ecada1f34460f4e38bea8cd87dfe2cb6c7f99f2096acac2231cd1e0c13c53757854b07f729a7a0c5a162a908fbe83 SHA512 f5d64ad182891c3af971e6aabd3c0c1b717b6a1cb471632339cba61b41a998d15880d18de09aafa1c3d059e528c888d6e8b914025c79bc21897d90a6d0e2ebf5 DIST binutils-apple-patches-5.1-r2.tar.bz2 51642 BLAKE2B 1b44020a05e0a91cfe569273f1e3dc65afaeac4bcdb80a626bdcc1f30cf8fbba6cc7bb522ece93126d4035b2d309defefd17fe0cee5bcaadcc58c4fa0feb4827 SHA512 37ba0dcae6c10b54a07c6208f6893ab80b0de1bd1c2f677902f707c8290629f7671a481e256b57a18bf304b95e41e4d59519bc1c88f15de488c0ef7e142f5cd8 @@ -6,12 +5,9 @@ DIST binutils-apple-patches-7.3-r2.tar.bz2 44551 BLAKE2B 036cd2a2e4a66b046467f29 DIST binutils-apple-patches-8.2-r1.tar.bz2 10830 BLAKE2B 345db8619873e9e91b79c3fdc0685fc46f82366df0b6153c1a59fbe5c122622e799754397e980e8752ef01ef25bbac81bb8f0339e92168790211b1d9c03bef2d SHA512 e7ca8cbac75671846c044abcd5415cfcf5832ff71acd5a2799b643369b02f2f7148990398c51913a3758e589f9fbff875e333aadf568e2a8a2defeafaa2aca95 DIST cctools-795.tar.gz 1993795 BLAKE2B dc0915f8647eecba5352e34dfc5752b679df39ead9a4734c49955a824d2cc127308eed46a614665dfe08a9d3036eb37f587e1b765a7df727facc42a33befacb0 SHA512 5a34a73dc71d3574a357f6b0f26a48a99dd0995d62695b309cdfe85c4960934b410455b1ba6bdbc9a4e32106bb45b35555604975d2a80ad1be21f5d4eac69254 DIST cctools-895.tar.gz 1716126 BLAKE2B 9706a6b243518693888e5e21dfe8d83b217380b47db621a7f1b35105eb72fb8997353ff85133224b0856f6b6ec710f54a4fe79076d9e228f89c98b6f517de309 SHA512 4ef9db870385cc2c4263bcbe42ff0de80386771f5acbc7082a1818ecd6b8d7bb1bfa02a7fcfecd3e7281481aeaaac4c331359aca3564bfe7a4c7dea1e0d06126 -DIST cctools-949.0.1.tar.gz 1968671 BLAKE2B b38fbae5d2ec011a94c2e4ec299c1ecd173f2c2516664cf925b06aaa078e234b59068158ea29dfcbf763ca98c73bc1806a507fbbe49a8d4d0a2fd4e602f401ce SHA512 13c493a48852c980d2829d28616c18640ad5ebfe6acd55143c4c948665e0b65377a459560667074fdac5e69bb6360fea13d988303c49fd3dd4a58e9b5c54ebcb DIST darwin-xtools-8.2.1-r101.tar.gz 3105898 BLAKE2B 3516cd252d4880b1e80c76365efef6f96830578bb5512befe33f86decdeb026fbad17fd3b27e9c3cf20d100897002e86ec08822041baa0291bb53e0b0ecf4d10 SHA512 f84cbde0853c14f03af40a124133d71d3e1710da021a593336eb4351c60edbca5753af0780f269ed4716cd194973f5437d428c5ff9615d9ce025dba3b7daef77 DIST dyld-132.13.tar.gz 342690 BLAKE2B 011418ba5b91a28bb7c5f8188af2fac5478bad53581396b7c1c4623a854a8f0d5ecb92d023246157830ed2db83bbf28e23225a255188e2d07eeb6c933814bda6 SHA512 2c9d50fc32868b696d88730eb6ea6afa9bb9f56883cc2ea4f1d41f370f311b7487a29ce0eff6761e1eeb086a18e2513953989d8d5d3ef1043bb662e86baadd3f DIST dyld-421.2.tar.gz 625173 BLAKE2B 8f8325314861ae2ea10fbe78c74c7199b547973ac61a8e9cb76fb874a0e53395ea31c04e489f85ac7cfdb5715ae5051679453de75eb195e313113e7bbbc70340 SHA512 75f2fb840da980d44649aa3e045f50c4e37d4403fbdb1e2e5f1a85bf6d8859e1130053c3806f7ef992fdfc6573f7f18146263c690144bdd3df31452c6bdd8bd8 -DIST dyld-551.4.tar.gz 832297 BLAKE2B e65c5b2ed90af6ec94f1295efc984404af99f0e5dc666bfc854379f13fd2e98b8048fae84b7bc8864fe27112abf12f741a33cc404b18ae7c88b7abd6a1d9e3c6 SHA512 896281c4b2330c92ed538af58f1b60906ed0a9ffa3099a5e8ef9a15b7ed974259bf546fd2ab7562739f2c8cf1fdfb44ea0ea7567092c77f2ea2cab377da064b0 DIST ld64-274.2.tar.gz 671652 BLAKE2B f45bb65bbe65c7baff54dec633a49b8ea472a59a7978aa050b329132963b26e4a2b3ef3dd034b04247531a11a07de5135b3726a429165cbfcae50e06c09531f4 SHA512 7b4e17f199909450b697bf719564c6841d46f5116c48dd47ff483ae7ddfe2965db1b7c024ed8ebeeaf90cd983ed353b95f7f23c93c8971536977dc892e6d6a9d -DIST ld64-530.tar.gz 744871 BLAKE2B 8117160ffe55c02b463559a52fcbd109629d6e2b4707f36391ec2151785cc1ab5be911129397af7bea05f06b2c718bc345a1e3b6b0838dae943f4083612af38f SHA512 0197ec05f9fbaf9e1902bb6e0819d0562573a433e0445809f1020e76126d3af57222a8e9e187fce793a5b581f825b48bfb5ec5cca9ae3eb77758cbc7f20e9e20 DIST ld64-97.17.tar.gz 421947 BLAKE2B 56820ef28490f2e0181d6e36b87506c6f00ae5759afe304a063fb6bd1904ace566ef4aa69ff0d235d65968af547a1a5735cb23bcefa990f418740188d399b637 SHA512 841774a1a7c0e2f661ac7e66703f7578d8f11274897ffa15f8c49daf290a23465763f264a4dae99f15754891f44c425c0d327652112007b499bc8f755a7fc9d6 DIST libunwind-30.tar.gz 82811 BLAKE2B 26993d6afa6930931c01b579326964a66832ed7a6ffa26eff10016c8d6d175d3b671753cf8700dcdbae7f0a9c01b16e9cbd3c9fe86697608f1f08a8eceb64782 SHA512 57106eafa1516791b4e0db2de6c6336bc0c1cbd8bf098a6d3a809fafa457802c95a7aeae9137f4ca5922a3018dfd8f597907ea4187b0afbbf267500eae00041f diff --git a/sys-devel/binutils-apple/binutils-apple-11.3.1-r1.ebuild b/sys-devel/binutils-apple/binutils-apple-11.3.1-r1.ebuild deleted file mode 100644 index 42f2f2808cb..00000000000 --- a/sys-devel/binutils-apple/binutils-apple-11.3.1-r1.ebuild +++ /dev/null @@ -1,378 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit eutils flag-o-matic toolchain-funcs llvm prefix - -# versions: -# XCode-11.3.1 ld64-530 cctools-949.0.1 -# XCode-11.2.1 ld64-520 cctools-949.0.1 -# XCode-11.0 ld64-512.4 cctools-949.0.1 -# XCode-8.2.1 ld64-274.2 cctools-895 <== binutils-apple-8.2.1-r1 (2019) - -# macOS-10.15.6 dyld-750.6 Causes build failures with Xcode-11 tools -# macOS-10.14.4-10.14.6 dyld-655.1.1 Causes build failures with Xcode-11 tools -# macOS-10.13.6 dyld-551.4 -# macOS-10.12.1-10.12.3 dyld-421.2 <== binutils-apple-8.2.1-r1,8.1 - -LD64=ld64-530 -CCTOOLS_VERSION=949.0.1 -CCTOOLS=cctools-${CCTOOLS_VERSION} -DYLD=dyld-551.4 - -DESCRIPTION="Darwin assembler as(1) and static linker ld(1), Xcode Tools ${PV}" -HOMEPAGE="http://www.opensource.apple.com/" -SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz - http://www.opensource.apple.com/tarballs/cctools/${CCTOOLS}.tar.gz - http://www.opensource.apple.com/tarballs/dyld/${DYLD}.tar.gz - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-4.3-r1.tar.bz2 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-5.1-r2.tar.bz2 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-7.3-r2.tar.bz2 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-8.2-r1.tar.bz2 - https://dev.gentoo.org/~grobian/distfiles/${PN}-patches-11.3-r1.tar.bz2" - -LICENSE="APSL-2" -KEYWORDS="~x64-macos" -IUSE="lto classic test" # tapi is now required -RESTRICT="!test? ( test )" - -# ld64 can now only be compiled using llvm and libc++ since it massively uses -# C++11 language features. *But additionally* the as driver now defaults to -# calling clang as the assembler on many platforms. This can be disabled using -# -Wa,-Q but since it's default we make llvm a static runtime dependency. -RDEPEND="sys-devel/binutils-config - lto? ( app-arch/xar ) - sys-libs/tapi - sys-devel/llvm:* - sys-libs/libcxx" -DEPEND="${RDEPEND} - test? ( >=dev-lang/perl-5.8.8 )" - -SLOT="11" - -S=${WORKDIR} - -is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } - -llvm_pkg_setup() { - # eclass version will die if no LLVM can be found which will break prefix - # bootstrap - : -} - -src_prepare() { - cd "${S}"/${LD64}/src - cp "${S}"/ld64-136-compile_stubs.h ld/compile_stubs.h - cp "${S}"/ld64-530-Makefile Makefile - - epatch "${S}"/ld64-530-nolto.patch - epatch "${S}"/ld64-236.3-crashreporter.patch - - # workound llvm-3.9.{0,1} issue - # https://bugs.gentoo.org/show_bug.cgi?id=603580 - # https://groups.google.com/forum/#!topic/llvm-dev/JY6nuKE__sU - # http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160829/169553.html - sed -i -e '/COMPILE_TIME_ASSERT/d' ld/parsers/libunwind/*.hpp || die - - # provide missing headers dyld - mkdir -p include/mach-o || die - # never present because it's private - cp ../../${DYLD}/include/mach-o/dyld_priv.h include/mach-o || die - # TARGET_OS_BRIDGE is undefined in TargetConditionals.h of newer MacOSX.sdk. - # We don't target BridgeOS. Disable it to avoid errors when clang adds: - # -Werror,-Wundef-prefix=TARGET_OS_ - sed -i -e 's/#if TARGET_OS_BRIDGE/#if 0/' include/mach-o/dyld_priv.h - - local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\"" - echo "char ldVersionString[] = ${VER_STR};" > version.cpp - - cd "${S}"/${CCTOOLS} - epatch "${S}"/${PN}-4.5-as.patch - epatch "${S}"/${PN}-5.1-as-dir.patch - epatch "${S}"/${PN}-5.1-ranlib.patch - epatch "${S}"/${PN}-3.1.1-libtool-ranlib.patch - epatch "${S}"/${PN}-3.1.1-no-headers.patch - epatch "${S}"/${PN}-4.0-no-oss-dir.patch - epatch "${S}"/cctools-839-intel-retf.patch - epatch "${S}"/${PN}-5.1-extraneous-includes.patch - epatch "${S}"/${PN}-5.1-strnlen.patch - epatch "${S}"/${PN}-7.3-make-j.patch - epatch "${S}"/${PN}-11.3.1-no-developertools-dir.patch - epatch "${S}"/${PN}-11.3.1-llvm-prefix.patch - epatch "${S}"/${PN}-11.3.1-llvm-shim.patch - epatch "${S}"/${PN}-11.3.1-nolto-fix.patch # bugfix - epatch "${S}"/${PN}-11.3.1-segaddrtable-fix.patch # bugfix - eprefixify libstuff/execute.c - cp ../${LD64}/src/other/prune_trie.h include/mach-o/ || die - - # do not build profileable libstuff to save compile time - sed -i -e "/^all:/s, profile , ," libstuff/Makefile - - # bugfix. args.c not built but args_expand_at is used in misc/libtool.c - sed -i -e "/^CFILES = /s, errors.c , errors.c args.c ," libstuff/Makefile - - # cctools version is provided to make via RC_ProjectSourceVersion which - # generates and compiles it as apple_version[] into libstuff. From - # there it's picked up by the individual tools. Since - # RC_ProjectSourceVersion is also used as library version, we can't - # just append our local version info. So we hack the libstuff Makefile - # to include our Gentoo version. - sed -i -e "/cctools-.*(RC_ProjectSourceVersion).*OFILE_DIR/s,Version),Version) (Gentoo ${PN}-${PVR})," \ - libstuff/Makefile - - eapply_user - - # clean up test suite - cd "${S}"/${LD64}/unit-tests/test-cases - local c - - # we don't have llvm - ((++c)); rm -rf llvm-integration; - - # we don't have dtrace - ((++c)); rm -rf dtrace-static-probes-coalescing; - ((++c)); rm -rf dtrace-static-probes; - - # a file is missing - ((++c)); rm -rf eh-coalescing-r - - # we don't do universal binaries - ((++c)); rm -rf blank-stubs; - - # looks like a problem with apple's result-filter.pl - ((++c)); rm -rf implicit-common3; - ((++c)); rm -rf order_file-ans; - - # TODO no idea what goes wrong here - ((++c)); rm -rf dwarf-debug-notes; - - einfo "Deleted $c tests that were bound to fail" - - cd "${S}" - ebegin "cleaning Makefiles from unwanted CFLAGS" - find . -name "Makefile" -print0 | xargs -0 sed \ - -i \ - -e 's/ -g / /g' \ - -e 's/"-g /"/g' \ - -e 's/^G =.*$/G =/' \ - -e 's/^OFLAG =.*$/OFLAG =/' \ - -e 's/install -c -s/install/g' - eend $? -} - -src_configure() { - ENABLE_LTO=0 - if use lto ; then - ENABLE_LTO=1 - - LLVM_INCDIR=$(get_llvm_prefix)/include - LLVM_LIBDIR=$(get_llvm_prefix)/lib - - [ -n "${LLVM_INCDIR}" -a -n "${LLVM_LIBDIR}" ] || \ - die "LLVM not found - LTO support can not be enabled" - - # LTO and LLVM support currently both depend only on libLTO being - # present. So we can enable both. - CCTOOLS_LTO_CFLAGS="-DLTO_SUPPORT -I${LLVM_INCDIR}" - CCTOOLS_LLVM_CFLAGS="-DLLVM_SUPPORT -I${LLVM_INCDIR}" - fi - - export CTARGET=${CTARGET:-${CHOST}} - if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY} == cross-* ]] ; then - export CTARGET=${CATEGORY#cross-} - fi - fi - - LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} - DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} - if is_cross ; then - BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${PV} - else - BINPATH=/usr/${CTARGET}/binutils-bin/${PV} - fi - - export CCTOOLS_CPPFLAGS="${CPPFLAGS}" - # CPPFLAGS only affects ld64, cctools don't use 'em (which currently is - # what we want). Removed in compile_cctools. - append-cppflags -DNDEBUG - - # Create configure.h for ld64 with SUPPORT_ARCH_<arch> defines in it. - DERIVED_FILE_DIR=${LD64}/src \ - ${LD64}/src/create_configure -} - -compile_ld64() { - einfo "building ${LD64}" - cd "${S}"/${LD64}/src - emake \ - LTO=${ENABLE_LTO} \ - LTO_INCDIR=${LLVM_INCDIR} \ - LTO_LIBDIR=${LLVM_LIBDIR} \ - TAPI=1 \ - TAPI_LIBDIR="${EPREFIX}"/usr/lib - - use test && emake build_test -} - -compile_cctools() { - einfo "building ${CCTOOLS}" - filter-flags -DNDEBUG - - cd "${S}"/${CCTOOLS} - # Suppress running dsymutil because it will warn about missing debug - # info which is expected when compiling without -g as we normally do. - # This might need some more thought if anyone ever wanted to build us - # for debugging with Apple's tools. - emake \ - LIB_PRUNETRIE="-L../../${LD64}/src -lprunetrie" \ - EFITOOLS= \ - LTO="${CCTOOLS_LTO_CFLAGS} ${CCTOOLS_LLVM_CFLAGS}" \ - COMMON_SUBDIRS='libstuff ar misc otool' \ - SUBDIRS_32= \ - LEGACY= \ - RC_ProjectSourceVersion=${CCTOOLS_VERSION} \ - RC_CFLAGS="${CFLAGS}" \ - OFLAG="${CCTOOLS_OFLAG}" \ - DSYMUTIL=": disabled: dsymutil" - - cd "${S}"/${CCTOOLS}/as - emake \ - BUILD_OBSOLETE_ARCH= \ - RC_ProjectSourceVersion=${CCTOOLS_VERSION} \ - RC_CFLAGS="-DASLIBEXECDIR=\"\\\"${EPREFIX}${LIBPATH}/\\\"\" ${CFLAGS}" \ - OFLAG="${CCTOOLS_OFLAG}" \ - DSYMUTIL=": disabled: dsymutil" -} - -src_compile() { - compile_ld64 - compile_cctools -} - -install_ld64() { - exeinto ${BINPATH} - doexe "${S}"/${LD64}/src/{ld64,dyldinfo,unwinddump,ObjectDump,objcimageinfo,machocheck} - dosym ld64 ${BINPATH}/ld - insinto ${DATAPATH}/man/man1 - doins "${S}"/${LD64}/doc/man/man1/{ld,ld64,dyldinfo,unwinddump}.1 -} - -install_cctools() { - cd "${S}"/${CCTOOLS} - emake install_all_but_headers \ - EFITOOLS= \ - COMMON_SUBDIRS='ar misc otool' \ - SUBDIRS_32= \ - DSTROOT=\"${D}\" \ - BINDIR=\"${EPREFIX}\"${BINPATH} \ - LOCBINDIR=\"${EPREFIX}\"${BINPATH} \ - USRBINDIR=\"${EPREFIX}\"${BINPATH} \ - LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \ - MANDIR=\"${EPREFIX}\"${DATAPATH}/man/ - cd "${S}"/${CCTOOLS}/as - emake install \ - BUILD_OBSOLETE_ARCH= \ - DSTROOT=\"${D}\" \ - USRBINDIR=\"${EPREFIX}\"${BINPATH} \ - LIBDIR=\"${EPREFIX}\"${LIBPATH} \ - LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} - - # upstream is starting to replace classic binutils with llvm-integrated - # ones. In Xcode, nm and size are now symlinks to llvm-{nm,size} while the - # classic version is preserved as {nm,size}-classic. When asked to do so - # by use classic we statically link to the classic version. - # binutils-bin/<version>/<tool> - # -> binutils-bin/<version>/<tool>-classic - # - # Otherwise we try to find and use the llvm version of the tool. Since our - # binutils do not live in the same directory as the llvm installation and - # llvm tends to move around, we use a shim that tries to find the llvm - # version of the tool in prefix. It will fall back to the classic tool if - # it fails. - # binutils-bin/<version>/<tool> - # -> binutils-bin/<version>/llvm-<tool> - # -> $EPREFIX/usr/lib/llvm/<major/bin/llvm-<tool> - # -> $EPREFIX/usr/bin/llvm-<tool> - # -> binutils-bin/<version>/<tool>-classic - budir=${D}/${EPREFIX}/${BINPATH} - for tool in nm size ; do - use classic && \ - ln -sfn ${tool}-classic "${budir}/${tool}" || \ - ln -sfn llvm-shim "${budir}/${tool}" - done - - # Also, otool is now based on llvm-objdump. But a small wrapper installed - # as llvm-otool remains, providing command line compatibility. - use classic && \ - ln -sfn otool-classic "${budir}/otool" || \ - ln -sfn llvm-otool "${budir}/otool" - - # And finally, although our cctools don't actually contain dsymutil and - # objdump, we provide access to the llvm versions of them via the shim to - # be in line with Xcode. - for tool in objdump dsymutil ; do - ln -sfn llvm-shim "${budir}/${tool}" - done - - cd "${ED}"${BINPATH} - insinto ${DATAPATH}/man/man1 - local skips manpage - # ar brings an up-to-date manpage with it - skips=( ar ) - for bin in *; do - for skip in ${skips[@]}; do - if [[ ${bin} == ${skip} ]]; then - continue 2; - fi - done - manpage=${S}/${CCTOOLS}/man/${bin}.1 - if [[ -f "${manpage}" ]]; then - doins "${manpage}" - fi - done - insinto ${DATAPATH}/man/man5 - doins "${S}"/${CCTOOLS}/man/*.5 -} - -src_test() { - if ! [ "${EPREFIX}"/usr/bin/clang ] ; then - einfo "Test suite only works properly with clang - please install" - return - fi - - einfo "Running unit tests" - cd "${S}"/${LD64}/unit-tests/test-cases - # provide the new ld as a symlink to clang so that -ccc-install-dir - # will pick it up - ln -sfn ../../src/ld64 ld - # use our arch command because the System's will report i386 even for an - # x86_64 prefix - perl ../bin/make-recursive.pl \ - BUILT_PRODUCTS_DIR="${S}"/${LD64}/src \ - ARCH="$(arch)" \ - LD="${S}"/${LD64}/src/ld64 \ - CC="${CC} -ccc-install-dir $PWD" \ - CXX="${CXX} -ccc-install-dir $PWD" \ - OTOOL="${S}"/${CCTOOLS}/otool/otool.NEW \ - | perl ../bin/result-filter.pl -} - -src_install() { - install_ld64 - install_cctools - - cd "${S}" - insinto /etc/env.d/binutils - cat <<-EOF > env.d - TARGET="${CHOST}" - VER="${PV}" - FAKE_TARGETS="${CHOST}" - EOF - newins env.d ${CHOST}-${PV} -} - -pkg_postinst() { - binutils-config ${CHOST}-${PV} -} diff --git a/sys-devel/binutils-apple/binutils-apple-8.2.1-r1.ebuild b/sys-devel/binutils-apple/binutils-apple-8.2.1-r1.ebuild index 3d5c7e8105d..b38e12eebe3 100644 --- a/sys-devel/binutils-apple/binutils-apple-8.2.1-r1.ebuild +++ b/sys-devel/binutils-apple/binutils-apple-8.2.1-r1.ebuild @@ -1,10 +1,21 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="6" inherit eutils flag-o-matic toolchain-funcs llvm prefix +# versions: +# XCode-11.3.1 ld64-530 cctools-949.0.1 +# XCode-11.2.1 ld64-520 cctools-949.0.1 +# XCode-11.0 ld64-512.4 cctools-949.0.1 +# XCode-8.2.1 ld64-274.2 cctools-895 <== binutils-apple-8.2.1-r1 (2019) + +# macOS-10.15.6 dyld-750.6 Causes build failures with Xcode-11 tools +# macOS-10.14.4-10.14.6 dyld-655.1.1 Causes build failures with Xcode-11 tools +# macOS-10.13.6 dyld-551.4 +# macOS-10.12.1-10.12.3 dyld-421.2 <== binutils-apple-8.2.1-r1,8.1 + LD64=ld64-274.2 CCTOOLS_VERSION=895 CCTOOLS=cctools-${CCTOOLS_VERSION} @@ -22,7 +33,7 @@ SRC_URI="http://www.opensource.apple.com/tarballs/ld64/${LD64}.tar.gz LICENSE="APSL-2" KEYWORDS="~x64-macos" -IUSE="lto tapi classic test" +IUSE="lto classic test" RESTRICT="!test? ( test )" # ld64 can now only be compiled using llvm and libc++ since it massively uses @@ -31,7 +42,6 @@ RESTRICT="!test? ( test )" # -Wa,-Q but since it's default we make llvm a static runtime dependency. RDEPEND="sys-devel/binutils-config lto? ( app-arch/xar ) - tapi? ( sys-libs/tapi ) sys-devel/llvm:* sys-libs/libcxx" DEPEND="${RDEPEND} @@ -200,7 +210,7 @@ compile_ld64() { LTO=${ENABLE_LTO} \ LTO_INCDIR=${LLVM_INCDIR} \ LTO_LIBDIR=${LLVM_LIBDIR} \ - TAPI=$(use tapi && echo 1 || echo 0) \ + TAPI=0 \ TAPI_LIBDIR="${EPREFIX}"/usr/lib use test && emake build_test @@ -325,7 +335,7 @@ install_cctools() { } src_test() { - if ! [ "${EPREFIX}"/usr/bin/clang ] ; then + if ! [[ -x "${EPREFIX}"/usr/bin/clang ]] ; then einfo "Test suite only works properly with clang - please install" return fi diff --git a/sys-devel/binutils-apple/binutils-apple-8.2.1-r101.ebuild b/sys-devel/binutils-apple/binutils-apple-8.2.1-r101.ebuild index 091e4e5990b..da5d72becad 100644 --- a/sys-devel/binutils-apple/binutils-apple-8.2.1-r101.ebuild +++ b/sys-devel/binutils-apple/binutils-apple-8.2.1-r101.ebuild @@ -1,4 +1,4 @@ -# Copyright 2020-2021 Gentoo Authors +# Copyright 2020-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -14,14 +14,12 @@ SRC_URI="https://github.com/grobian/darwin-xtools/archive/gentoo-${PVR}.tar.gz - LICENSE="APSL-2" SLOT="8" KEYWORDS="~ppc-macos ~x64-macos" -IUSE="tapi" # xtools uses c++11 features, not available in gcc-apple, hence gcc/clang dep DEPEND="sys-devel/binutils-config || ( sys-devel/gcc:* sys-devel/clang:* ) app-arch/xar - tapi? ( sys-libs/tapi ) - !tapi? ( dev-libs/libyaml )" + dev-libs/libyaml" RDEPEND="${DEPEND}" BDEPEND="" @@ -65,7 +63,7 @@ src_configure() { -DXTOOLS_LTO_SUPPORT=NO -DXTOOLS_HAS_LIBPRUNETRIE=YES -DXTOOLS_TAPI_SUPPORT=ON - -DXTOOLS_USE_TAPILITE=$(use tapi && echo OFF || echo ON) + -DXTOOLS_USE_TAPILITE=ON -DXTOOLS_HOST_IS_64B=$(is-host-64bit) -DXTOOLS_BUGURL="https://bugs.gentoo.org/" ) diff --git a/sys-devel/binutils-apple/metadata.xml b/sys-devel/binutils-apple/metadata.xml index e43e477505d..481c99bd5bd 100644 --- a/sys-devel/binutils-apple/metadata.xml +++ b/sys-devel/binutils-apple/metadata.xml @@ -9,6 +9,5 @@ <flag name="lto">Add support for Link-Time Optimization with LLVM</flag> <flag name="classic">Use nm, otool, etc. from this ebuild instead of llvm-based tools</flag> - <flag name="tapi">Build against <pkg>sys-libs/tapi</pkg></flag> </use> </pkgmetadata> diff --git a/sys-devel/binutils-config/Manifest b/sys-devel/binutils-config/Manifest index fd54bdc21c2..ec46795d11a 100644 --- a/sys-devel/binutils-config/Manifest +++ b/sys-devel/binutils-config/Manifest @@ -1 +1,2 @@ +DIST binutils-config-5.4.1.tar.xz 7328 BLAKE2B 51f0ca625abfd964cc1b6c902017edc9790da1d33a44b3da64e3b2c68ed245fc1c0eb8b3fb999f6acb88e614f47e2f53e19b456b03c069bb61cd0f39e85d786d SHA512 af12644d591152f45d573bee0499b21c293b68a9b81626e9e1d46d5a7dc40e9a24642364bdb2bce52d61cbe3d2e045f4ab6e50a9827648a820bac885f20239cd DIST binutils-config-5.4.tar.xz 7332 BLAKE2B 1dd0fdebf028e9d95caa395948037d51ac1e627f370921b56fc99a6fe2e2100ddb202c8027ad1e67330306de8b4cbc6a03753105d401198e515b22fca94f760f SHA512 79411afcbec3a6cce960be1b06e4a6efdf55081992f6a92157737f7ef41fc61eaec0005078a4ce0cd78ad6af14583ab85f4f2b7b43808238088d521e1aa31af1 diff --git a/sys-devel/binutils-config/binutils-config-5.4.1.ebuild b/sys-devel/binutils-config/binutils-config-5.4.1.ebuild new file mode 100644 index 00000000000..eafb482fa18 --- /dev/null +++ b/sys-devel/binutils-config/binutils-config-5.4.1.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit prefix + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/binutils-config.git" + inherit git-r3 +else + SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +fi + +DESCRIPTION="Utility to change the binutils version being used" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Toolchain" + +LICENSE="GPL-2" +SLOT="0" +IUSE="+native-symlinks" + +# We also RDEPEND on sys-apps/findutils which is in base @system +RDEPEND="sys-apps/gentoo-functions" + +src_compile() { + emake PV="${PV}" USE_NATIVE_LINKS="$(usex native-symlinks)" +} + +src_install() { + emake DESTDIR="${D}" PV="${PV}" install + + use prefix && eprefixify "${ED}"/usr/bin/${PN} +} + +pkg_postinst() { + # Re-register all targets. USE flags or new versions can change + # installed symlinks. + local x + for x in $(binutils-config -C -l 2>/dev/null | awk '$NF == "*" { print $2 }') ; do + binutils-config ${x} + done +} diff --git a/sys-devel/binutils-config/binutils-config-9999.ebuild b/sys-devel/binutils-config/binutils-config-9999.ebuild index 17daaedfeda..0282c67448a 100644 --- a/sys-devel/binutils-config/binutils-config-9999.ebuild +++ b/sys-devel/binutils-config/binutils-config-9999.ebuild @@ -7,7 +7,7 @@ if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/binutils-config.git" inherit git-r3 else - SRC_URI="https://dev.gentoo.org/~sam/distfiles/${P}.tar.xz" + SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" fi diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest index 3d82c09d70c..e7d9c044043 100644 --- a/sys-devel/binutils-hppa64/Manifest +++ b/sys-devel/binutils-hppa64/Manifest @@ -2,7 +2,8 @@ DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7e DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348 DIST binutils-2.36.1-patches-5.tar.xz 44388 BLAKE2B 1dadb012fe35ec5fb0c5a15d348ab535bc5e3765375c97a3768c6b9f7126e0fda15d35163c9f9c33a4be98662dd120d7c1b21930a20c18dbb5345f56ecd9ecc1 SHA512 a2ce3388f1f1a77ff865481ff4b625121fd55f5234fed0a885312744f2f9c504717de1499b68252c6de64fa45866db7692df91c5838b43fbeb178938811cbe84 DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9 -DIST binutils-2.37_p1-patches-0.tar.xz 1392 BLAKE2B 128930a381022fea5d1fcb0695953e8dada2513b088b8540fe08d4e0da93ec18b6bf9c78acad6ec5a8982ae2c115d143462ef0bb7bfd63cfeb06c10ad472c2f8 SHA512 44666821f96349e96685ffcfd53a80a94659e38fc63eeeb980d0eed13aab03ae3e2d5059b4932cd9018f2f7698cdb5e15b443d60c01b2bd1385eeb0c698e0e24 -DIST binutils-2.37_p1-patches-1.tar.xz 28956 BLAKE2B 3bc14fcc52a6d11992ad9ed88fa3347ca3d5facd59de094a178a5f720d0eed6297dadf9a8fea7189076eb81274612c0b71c01f15a8f58deeaed8c8f6135ef50d SHA512 f6b2a09bfc692cf90f6cd56be81f424a68831db48054dc150eb6ec28bfa18d35933203c2d3b502f0c80e38771353c373446aec2488469fe2df20d8066033f59e DIST binutils-2.37_p1-patches-2.tar.xz 31956 BLAKE2B 39c48628d0e2d7f3a8cf11be391b51dc64c7a534a3e64950fd992907c34fa36bebdf95cc5a184dd5b35e134e0c20376b5883abbf96ae57403c55377e615a6790 SHA512 c927aafa8c87e3b68ad28da5a17edf5647591ec26feeb56c743bc6637ffb10832b50ec6fd8442e80e40628b624e31b2f0f0b5f1193e77dc7e5442df0cb8cc8f1 DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28 +DIST binutils-2.38-patches-3.tar.xz 189068 BLAKE2B 5b14c90ab7dba253e92ad57b3a702fcbf48739dd0121ce8f739d88331da820ce44c35e16ac4bee394525c3a46bce980e9e1bbf4cbc9ce8a14fc324bc8fa059e7 SHA512 099266a8ef4272fd7f7552071e1892d114ed564a38b700df32e058ed691c6bfcd6f2454f649461f9c36594ea819a35d1e4cd2418609a2407be2a4f8885e500e3 +DIST binutils-2.38-patches-4.tar.xz 193852 BLAKE2B 5a83e20008e58464ed563a6817a367e50684c59d08c47345cc546054269c42463d1651441720f865851e4e182e917df1a095c68e64226e0351b64e975d524096 SHA512 6657e547bb02898632cc45a8f1894be098aa7472b6725b65f95393e621abb127e468b4e50310720bf03f7e8d0a68bc2c47af76fc43aaa8f32b2e4a149c0c6290 +DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild index 5b7776c9348..d3f797079c9 100644 --- a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild +++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild @@ -34,7 +34,7 @@ else [[ -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) - KEYWORDS="-* ~hppa" + KEYWORDS="-* hppa" fi # diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r1.ebuild index 1e073a1a806..6d45ceecaca 100644 --- a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r1.ebuild +++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r1.ebuild @@ -5,12 +5,12 @@ EAPI=7 export CTARGET=hppa64-${CHOST#*-} -inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs +inherit libtool flag-o-matic gnuconfig multilib toolchain-funcs DESCRIPTION="Tools necessary to build programs" HOMEPAGE="https://sourceware.org/binutils/" LICENSE="GPL-3+" -IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test vanilla" +IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla" REQUIRED_USE="default-gold? ( gold )" # Variables that can be set here (ignored for live ebuilds) @@ -21,7 +21,7 @@ REQUIRED_USE="default-gold? ( gold )" # PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/... # for the patchsets -PATCH_VER=1 +PATCH_VER=3 PATCH_DEV=dilfridge if [[ ${PV} == 9999* ]]; then @@ -34,7 +34,6 @@ else [[ -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="-* ~hppa" fi @@ -109,7 +108,7 @@ src_prepare() { patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}" fi - if [[ ! -z ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then + if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then if ! use vanilla; then einfo "Applying binutils patchset ${patchsetname}" eapply "${WORKDIR}/patch" @@ -174,6 +173,8 @@ src_configure() { # Keep things sane strip-flags + use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + local x echo for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do @@ -274,7 +275,15 @@ src_configure() { # Ideally we would like automagic-or-disabled here. # But the check does not quite work on i686: bug #760926. $(use_enable cet) + + # No LTO for HPPA64 right now as we don't build kgcc64 with LTO support. + $(use_enable pgo pgo-build) ) + + if use pgo ; then + export BUILD_CFLAGS="${CFLAGS}" + fi + echo ./configure "${myconf[@]}" "${S}"/configure "${myconf[@]}" || die diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild new file mode 100644 index 00000000000..b6e72448d38 --- /dev/null +++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild @@ -0,0 +1,479 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +export CTARGET=hppa64-${CHOST#*-} + +inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs + +DESCRIPTION="Tools necessary to build programs" +HOMEPAGE="https://sourceware.org/binutils/" + +LICENSE="GPL-3+" +IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla" +REQUIRED_USE="default-gold? ( gold )" + +# 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 +# - Default: PV +# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/... +# for the patchsets + +PATCH_VER=4 +PATCH_DEV=dilfridge + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 + SLOT=${PV} +else + PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}} + PATCH_DEV=${PATCH_DEV:-dilfridge} + SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/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) + KEYWORDS="-* ~hppa" +fi + +# +# The cross-compile logic +# +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi +is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } + +# +# The dependencies +# +RDEPEND=" + >=sys-devel/binutils-config-3 + sys-libs/zlib +" +DEPEND="${RDEPEND}" +BDEPEND=" + doc? ( sys-apps/texinfo ) + test? ( + dev-util/dejagnu + sys-devel/bc + ) + nls? ( sys-devel/gettext ) + sys-devel/flex + virtual/yacc +" + +RESTRICT="!test? ( test )" + +MY_BUILDDIR="${WORKDIR}"/build +S="${WORKDIR}"/${P/-hppa64/} + +src_unpack() { + 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 + + S="${WORKDIR}"/binutils + EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" + EGIT_CHECKOUT_DIR="${S}" + git-r3_src_unpack + else + unpack ${P/-hppa64/}.tar.xz + + cd "${WORKDIR}" || die + unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz + + # _p patch versions are Gentoo specific tarballs ... + local dir=${P%_p?} + dir=${dir/-hppa64/} + + S="${WORKDIR}"/${dir} + fi + + cd "${WORKDIR}" || die + mkdir -p "${MY_BUILDDIR}" || die +} + +src_prepare() { + local patchsetname + if [[ ${PV} == 9999* ]] ; then + patchsetname="from git master" + else + patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}" + fi + + if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then + if ! use vanilla; then + einfo "Applying binutils patchset ${patchsetname}" + eapply "${WORKDIR}/patch" + einfo "Done." + fi + fi + + # Make sure our explicit libdir paths don't get clobbered, bug #562460 + sed -i \ + -e 's:@bfdlibdir@:@libdir@:g' \ + -e 's:@bfdincludedir@:@includedir@:g' \ + {bfd,opcodes}/Makefile.in || die + + # Fix locale issues if possible, bug #122216 + if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then + einfo "Fixing misc issues in configure files" + for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do + ebegin " Updating ${f/${S}\/}" + patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \ + || eerror "Please file a bug about this" + eend $? + done + fi + + # Apply things from PATCHES and user dirs + default + + # Run misc portage update scripts + gnuconfig_update + elibtoolize --portage --no-uclibc +} + +toolchain-binutils_bugurl() { + printf "https://bugs.gentoo.org/" +} +toolchain-binutils_pkgversion() { + printf "Gentoo ${PV}" + [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}" +} + +src_configure() { + # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html + # Avoid really confusing logs from subconfigure spam, makes logs far + # more legible. + MAKEOPTS="--output-sync=line ${MAKEOPTS}" + + # Setup some paths + LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} + INCPATH=${LIBPATH}/include + DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} + if is_cross ; then + TOOLPATH=/usr/${CHOST}/${CTARGET} + else + TOOLPATH=/usr/${CTARGET} + fi + BINPATH=${TOOLPATH}/binutils-bin/${PV} + + # Make sure we filter $LINGUAS so that only ones that + # actually work make it through, bug #42033 + strip-linguas -u */po + + # Keep things sane + strip-flags + + use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + + local x + echo + for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do + einfo "$(printf '%10s' ${x}:) ${!x}" + done + echo + + cd "${MY_BUILDDIR}" || die + local myconf=() + + if use plugins ; then + myconf+=( --enable-plugins ) + fi + # enable gold (installed as ld.gold) and ld's plugin architecture + if use gold ; then + myconf+=( --enable-gold ) + if use default-gold; then + myconf+=( --enable-gold=default ) + fi + fi + + if use nls ; then + myconf+=( --without-included-gettext ) + else + myconf+=( --disable-nls ) + fi + + myconf+=( --with-system-zlib ) + + # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch + # logic in toolchain.eclass. bug #446946 + # + # We used to do it for everyone, but it's slow on 32bit arches. bug #438522 + case $(tc-arch) in + ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;; + esac + + use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd ) + + [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} ) + + is_cross && myconf+=( + --with-sysroot="${EPREFIX}"/usr/${CTARGET} + --enable-poison-system-directories + ) + + myconf+=( --enable-secureplt ) + + # mips can't do hash-style=gnu ... + if [[ $(tc-arch) != mips ]] ; then + myconf+=( --enable-default-hash-style=gnu ) + fi + + myconf+=( + --prefix="${EPREFIX}"/usr + --host=${CHOST} + --target=${CTARGET} + --datadir="${EPREFIX}"${DATAPATH} + --datarootdir="${EPREFIX}"${DATAPATH} + --infodir="${EPREFIX}"${DATAPATH}/info + --mandir="${EPREFIX}"${DATAPATH}/man + --bindir="${EPREFIX}"${BINPATH} + --libdir="${EPREFIX}"${LIBPATH} + --libexecdir="${EPREFIX}"${LIBPATH} + --includedir="${EPREFIX}"${INCPATH} + --enable-obsolete + --enable-shared + --enable-threads + # Newer versions (>=2.27) offer a configure flag now. + --enable-relro + # Newer versions (>=2.24) make this an explicit option, bug #497268 + --enable-install-libiberty + # Available from 2.35 on + --enable-textrel-check=warning + # Works better than vapier's patch., bug #808787 + --enable-new-dtags + --disable-werror + --with-bugurl="$(toolchain-binutils_bugurl)" + --with-pkgversion="$(toolchain-binutils_pkgversion)" + $(use_enable static-libs static) + # Disable modules that are in a combined binutils/gdb tree. bug #490566 + --disable-{gdb,libdecnumber,readline,sim} + # Strip out broken static link flags. + # https://gcc.gnu.org/PR56750 + --without-stage1-ldflags + # Change SONAME to avoid conflict across + # {native,cross}/binutils, binutils-libs. bug #666100 + --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st) + + # avoid automagic dependency on (currently prefix) systems + # systems with debuginfod library, bug #754753 + --without-debuginfod + + # Allow user to opt into CET for host libraries. + # Ideally we would like automagic-or-disabled here. + # But the check does not quite work on i686: bug #760926. + $(use_enable cet) + + ) + + if ! is_cross ; then + # No LTO for HPPA64 right now as we don't build kgcc64 with LTO support. + myconf+=( $(use_enable pgo pgo-build) ) + + if use pgo ; then + export BUILD_CFLAGS="${CFLAGS}" + fi + fi + + ECONF_SOURCE="${S}" econf "${myconf[@]}" || die + + # Prevent makeinfo from running if doc is unset. + if ! use doc ; then + sed -i \ + -e '/^MAKEINFO/s:=.*:= true:' \ + Makefile || die + fi +} + +src_compile() { + cd "${MY_BUILDDIR}" || die + + # see Note [tooldir hack for ldscripts] + emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all + + # only build info pages if the user wants them + if use doc ; then + emake V=1 info + fi + + # we nuke the manpages when we're left with junk + # (like when we bootstrap, no perl -> no manpages) + find . -name '*.1' -a -size 0 -delete +} + +src_test() { + cd "${MY_BUILDDIR}" || die + + # bug #637066 + filter-flags -Wall -Wreturn-type + + emake -k V=1 check +} + +src_install() { + local x d + + cd "${MY_BUILDDIR}" || die + + # see Note [tooldir hack for ldscripts] + emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install + rm -rf "${ED}"/${LIBPATH}/bin || die + use static-libs || find "${ED}" -name '*.la' -delete + + # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905 + cd "${ED}"/${LIBPATH} || die + for d in ../* ; do + [[ ${d} == ../${PV} ]] && continue + mv ${d}/* . || die + rmdir ${d} || die + done + + # Now we collect everything intp the proper SLOT-ed dirs + # When something is built to cross-compile, it installs into + # /usr/$CHOST/ by default ... we have to 'fix' that :) + if is_cross ; then + cd "${ED}"/${BINPATH} || die + for x in * ; do + mv ${x} ${x/${CTARGET}-} || die + done + + if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then + # No die for now, dies on hppa? + mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH} + mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/ + rm -r "${ED}"/usr/${CHOST}/{include,lib} + fi + fi + + insinto ${INCPATH} + local libiberty_headers=( + # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir. + demangle.h + dyn-string.h + fibheap.h + hashtab.h + libiberty.h + objalloc.h + splay-tree.h + ) + doins "${libiberty_headers[@]/#/${S}/include/}" + if [[ -d ${ED}/${LIBPATH}/lib ]] ; then + # TODO: add || die here, fails on hppa? + mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ + rm -r "${ED}"/${LIBPATH}/lib + fi + + # Generate an env.d entry for this binutils + insinto /etc/env.d/binutils + cat <<-EOF > "${T}"/env.d + TARGET="${CTARGET}" + VER="${PV}" + LIBPATH="${EPREFIX}${LIBPATH}" + EOF + newins "${T}"/env.d ${CTARGET}-${PV} + + # Handle documentation + if ! is_cross ; then + cd "${S}" || die + dodoc README + + docinto bfd + dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO + + docinto binutils + dodoc binutils/ChangeLog binutils/NEWS binutils/README + + docinto gas + dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README* + + docinto gprof + dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl + + docinto ld + dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO + + docinto libiberty + dodoc libiberty/ChangeLog* libiberty/README + + docinto opcodes + dodoc opcodes/ChangeLog* + fi + + # Remove shared info pages + rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die + + # Trim all empty dirs + find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null + + # the hppa64 hack; this should go into 9999 as a PN-conditional + # tweak the default fake list a little bit + cd "${D}"/etc/env.d/binutils + sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die +} + +pkg_postinst() { + # Make sure this ${CTARGET} has a binutils version selected + [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0 + binutils-config ${CTARGET}-${PV} +} + +pkg_postrm() { + local current_profile=$(binutils-config -c ${CTARGET}) + + # If no other versions exist, then uninstall for this + # target ... otherwise, switch to the newest version + # Note: only do this if this version is unmerged. We + # rerun binutils-config if this is a remerge, as + # we want the mtimes on the symlinks updated (if + # it is the same as the current selected profile) + if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then + local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}') + choice=${choice//$'\n'/ } + choice=${choice/* } + if [[ -z ${choice} ]] ; then + binutils-config -u ${CTARGET} + else + binutils-config ${choice} + fi + elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then + binutils-config ${CTARGET}-${PV} + fi +} + +# Note [slotting support] +# ----------------------- +# Gentoo's layout for binutils files is non-standard as Gentoo +# supports slotted installation for binutils. Many tools +# still expect binutils to reside in known locations. +# binutils-config package restores symlinks into known locations, +# like: +# /usr/bin/${CTARGET}-<tool> +# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips +# /usr/include/ +# +# Note [tooldir hack for ldscripts] +# --------------------------------- +# Build system does not allow ./configure to tweak every location +# we need for slotting binutils hence all the shuffling in +# src_install(). This note is about SCRIPTDIR define handling. +# +# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value +# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib' +# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time. +# Thus we can't just move files around after compilation finished. +# +# Our goal is the following: +# - at build-time set scriptdir to point to symlinked location: +# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case) +# - at install-time set scriptdir to point to slotted location: +# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV} diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest index 6e23e4923e4..db3df3d2e7c 100644 --- a/sys-devel/binutils/Manifest +++ b/sys-devel/binutils/Manifest @@ -8,7 +8,8 @@ DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7e DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348 DIST binutils-2.36.1-patches-5.tar.xz 44388 BLAKE2B 1dadb012fe35ec5fb0c5a15d348ab535bc5e3765375c97a3768c6b9f7126e0fda15d35163c9f9c33a4be98662dd120d7c1b21930a20c18dbb5345f56ecd9ecc1 SHA512 a2ce3388f1f1a77ff865481ff4b625121fd55f5234fed0a885312744f2f9c504717de1499b68252c6de64fa45866db7692df91c5838b43fbeb178938811cbe84 DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9 -DIST binutils-2.37_p1-patches-0.tar.xz 1392 BLAKE2B 128930a381022fea5d1fcb0695953e8dada2513b088b8540fe08d4e0da93ec18b6bf9c78acad6ec5a8982ae2c115d143462ef0bb7bfd63cfeb06c10ad472c2f8 SHA512 44666821f96349e96685ffcfd53a80a94659e38fc63eeeb980d0eed13aab03ae3e2d5059b4932cd9018f2f7698cdb5e15b443d60c01b2bd1385eeb0c698e0e24 -DIST binutils-2.37_p1-patches-1.tar.xz 28956 BLAKE2B 3bc14fcc52a6d11992ad9ed88fa3347ca3d5facd59de094a178a5f720d0eed6297dadf9a8fea7189076eb81274612c0b71c01f15a8f58deeaed8c8f6135ef50d SHA512 f6b2a09bfc692cf90f6cd56be81f424a68831db48054dc150eb6ec28bfa18d35933203c2d3b502f0c80e38771353c373446aec2488469fe2df20d8066033f59e DIST binutils-2.37_p1-patches-2.tar.xz 31956 BLAKE2B 39c48628d0e2d7f3a8cf11be391b51dc64c7a534a3e64950fd992907c34fa36bebdf95cc5a184dd5b35e134e0c20376b5883abbf96ae57403c55377e615a6790 SHA512 c927aafa8c87e3b68ad28da5a17edf5647591ec26feeb56c743bc6637ffb10832b50ec6fd8442e80e40628b624e31b2f0f0b5f1193e77dc7e5442df0cb8cc8f1 DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28 +DIST binutils-2.38-patches-3.tar.xz 189068 BLAKE2B 5b14c90ab7dba253e92ad57b3a702fcbf48739dd0121ce8f739d88331da820ce44c35e16ac4bee394525c3a46bce980e9e1bbf4cbc9ce8a14fc324bc8fa059e7 SHA512 099266a8ef4272fd7f7552071e1892d114ed564a38b700df32e058ed691c6bfcd6f2454f649461f9c36594ea819a35d1e4cd2418609a2407be2a4f8885e500e3 +DIST binutils-2.38-patches-4.tar.xz 193852 BLAKE2B 5a83e20008e58464ed563a6817a367e50684c59d08c47345cc546054269c42463d1651441720f865851e4e182e917df1a095c68e64226e0351b64e975d524096 SHA512 6657e547bb02898632cc45a8f1894be098aa7472b6725b65f95393e621abb127e468b4e50310720bf03f7e8d0a68bc2c47af76fc43aaa8f32b2e4a149c0c6290 +DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d diff --git a/sys-devel/binutils/binutils-2.37_p1-r2.ebuild b/sys-devel/binutils/binutils-2.37_p1-r2.ebuild index 5a01301054e..6ade635ea8f 100644 --- a/sys-devel/binutils/binutils-2.37_p1-r2.ebuild +++ b/sys-devel/binutils/binutils-2.37_p1-r2.ebuild @@ -32,7 +32,7 @@ else [[ -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) - 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" fi # @@ -272,12 +272,14 @@ src_configure() { # Ideally we would like automagic-or-disabled here. # But the check does not quite work on i686: bug #760926. $(use_enable cet) - - $(use_enable pgo pgo-build lto) ) - if use pgo ; then - export BUILD_CFLAGS="${CFLAGS}" + if ! is_cross ; then + myconf+=( $(use_enable pgo pgo-build lto) ) + + if use pgo ; then + export BUILD_CFLAGS="${CFLAGS}" + fi fi echo ./configure "${myconf[@]}" diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild b/sys-devel/binutils/binutils-2.37_p1-r3.ebuild index 7607479c80a..b6100c1d6a2 100644 --- a/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1.ebuild +++ b/sys-devel/binutils/binutils-2.37_p1-r3.ebuild @@ -3,14 +3,12 @@ EAPI=7 -export CTARGET=hppa64-${CHOST#*-} - -inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs +inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs DESCRIPTION="Tools necessary to build programs" HOMEPAGE="https://sourceware.org/binutils/" LICENSE="GPL-3+" -IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test vanilla" +IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla" REQUIRED_USE="default-gold? ( gold )" # Variables that can be set here (ignored for live ebuilds) @@ -21,7 +19,7 @@ REQUIRED_USE="default-gold? ( gold )" # PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/... # for the patchsets -PATCH_VER=0 +PATCH_VER=2 PATCH_DEV=dilfridge if [[ ${PV} == 9999* ]]; then @@ -34,8 +32,7 @@ else [[ -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="-* hppa" + #KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" fi # @@ -71,7 +68,6 @@ BDEPEND=" RESTRICT="!test? ( test )" MY_BUILDDIR=${WORKDIR}/build -S=${WORKDIR}/${P/-hppa64/} src_unpack() { if [[ ${PV} == 9999* ]] ; then @@ -109,7 +105,7 @@ src_prepare() { patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}" fi - if [[ ! -z ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then + if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then if ! use vanilla; then einfo "Applying binutils patchset ${patchsetname}" eapply "${WORKDIR}/patch" @@ -160,12 +156,14 @@ src_configure() { LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} INCPATH=${LIBPATH}/include DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} + + # see Note [tooldir hack for ldscripts] if is_cross ; then TOOLPATH=/usr/${CHOST}/${CTARGET} + BINPATH=${TOOLPATH}/binutils-bin/${PV} else - TOOLPATH=/usr/${CTARGET} + BINPATH=/usr/${CTARGET}/binutils-bin/${PV} fi - BINPATH=${TOOLPATH}/binutils-bin/${PV} # Make sure we filter $LINGUAS so that only ones that # actually work make it through #42033 @@ -174,6 +172,8 @@ src_configure() { # Keep things sane strip-flags + use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + local x echo for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do @@ -275,6 +275,15 @@ src_configure() { # But the check does not quite work on i686: bug #760926. $(use_enable cet) ) + + if ! is_cross ; then + myconf+=( $(use_enable pgo pgo-build lto) ) + + if use pgo ; then + export BUILD_CFLAGS="${CFLAGS}" + fi + fi + echo ./configure "${myconf[@]}" "${S}"/configure "${myconf[@]}" || die @@ -289,7 +298,11 @@ src_configure() { src_compile() { cd "${MY_BUILDDIR}" # see Note [tooldir hack for ldscripts] - emake tooldir="${EPREFIX}${TOOLPATH}" all + if is_cross ; then + emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all + else + emake V=1 all + fi # only build info pages if the user wants them if use doc ; then @@ -314,8 +327,10 @@ src_install() { local x d cd "${MY_BUILDDIR}" + # see Note [tooldir hack for ldscripts] - emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install + emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install + rm -rf "${ED}"/${LIBPATH}/bin use static-libs || find "${ED}" -name '*.la' -delete @@ -393,11 +408,6 @@ src_install() { # Trim all empty dirs find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null - - # the hppa64 hack; this should go into 9999 as a PN-conditional - # tweak the default fake list a little bit - cd "${D}"/etc/env.d/binutils - sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die } pkg_postinst() { @@ -456,3 +466,11 @@ pkg_postrm() { # ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case) # - at install-time set scriptdir to point to slotted location: # ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV} +# +# Now, this would all be very nice except for the fact that the changed +# directory makes libtool re-link libraries during the install phase. +# It uses libraries from the system installation to do that (bad) +# and fails if it cant handle these (e.g. newer LTO version than in +# current gcc, see bugs 834720 and 838925). +# +# So, we apply this whole hack only for cross builds. diff --git a/sys-devel/binutils/binutils-2.37_p1-r1.ebuild b/sys-devel/binutils/binutils-2.38-r1.ebuild index 2333d6b11de..0041aec7eb5 100644 --- a/sys-devel/binutils/binutils-2.37_p1-r1.ebuild +++ b/sys-devel/binutils/binutils-2.38-r1.ebuild @@ -8,7 +8,7 @@ inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs DESCRIPTION="Tools necessary to build programs" HOMEPAGE="https://sourceware.org/binutils/" LICENSE="GPL-3+" -IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test vanilla" +IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla" REQUIRED_USE="default-gold? ( gold )" # Variables that can be set here (ignored for live ebuilds) @@ -19,7 +19,7 @@ REQUIRED_USE="default-gold? ( gold )" # PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/... # for the patchsets -PATCH_VER=1 +PATCH_VER=3 PATCH_DEV=dilfridge if [[ ${PV} == 9999* ]]; then @@ -273,6 +273,15 @@ src_configure() { # But the check does not quite work on i686: bug #760926. $(use_enable cet) ) + + if ! is_cross ; then + myconf+=( $(use_enable pgo pgo-build lto) ) + + if use pgo ; then + export BUILD_CFLAGS="${CFLAGS}" + fi + fi + echo ./configure "${myconf[@]}" "${S}"/configure "${myconf[@]}" || die diff --git a/sys-devel/binutils/binutils-2.37_p1.ebuild b/sys-devel/binutils/binutils-2.38-r2.ebuild index 7bac92e076f..dcf30dbb65a 100644 --- a/sys-devel/binutils/binutils-2.37_p1.ebuild +++ b/sys-devel/binutils/binutils-2.38-r2.ebuild @@ -8,7 +8,7 @@ inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs DESCRIPTION="Tools necessary to build programs" HOMEPAGE="https://sourceware.org/binutils/" LICENSE="GPL-3+" -IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test vanilla" +IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla" REQUIRED_USE="default-gold? ( gold )" # Variables that can be set here (ignored for live ebuilds) @@ -19,7 +19,7 @@ REQUIRED_USE="default-gold? ( gold )" # PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/... # for the patchsets -PATCH_VER=0 +PATCH_VER=4 PATCH_DEV=dilfridge if [[ ${PV} == 9999* ]]; then @@ -32,8 +32,7 @@ else [[ -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" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" fi # @@ -153,6 +152,11 @@ toolchain-binutils_pkgversion() { } src_configure() { + # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html + # Avoid really confusing logs from subconfigure spam, makes logs far + # more legible. + MAKEOPTS="--output-sync=line ${MAKEOPTS}" + # Setup some paths LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} INCPATH=${LIBPATH}/include @@ -171,6 +175,8 @@ src_configure() { # Keep things sane strip-flags + use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + local x echo for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do @@ -227,6 +233,9 @@ src_configure() { fi myconf+=( + # (--disable-silent-rules should get passed automatically w/ econf which we use + # in >= 2.39, so can drop it then.) + --disable-silent-rules --prefix="${EPREFIX}"/usr --host=${CHOST} --target=${CTARGET} @@ -272,6 +281,15 @@ src_configure() { # But the check does not quite work on i686: bug #760926. $(use_enable cet) ) + + if ! is_cross ; then + myconf+=( $(use_enable pgo pgo-build lto) ) + + if use pgo ; then + export BUILD_CFLAGS="${CFLAGS}" + fi + fi + echo ./configure "${myconf[@]}" "${S}"/configure "${myconf[@]}" || die @@ -286,11 +304,11 @@ src_configure() { src_compile() { cd "${MY_BUILDDIR}" # see Note [tooldir hack for ldscripts] - emake tooldir="${EPREFIX}${TOOLPATH}" all + emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all # only build info pages if the user wants them if use doc ; then - emake info + emake V=1 info fi # we nuke the manpages when we're left with junk @@ -304,7 +322,7 @@ src_test() { # bug 637066 filter-flags -Wall -Wreturn-type - emake -k check + emake -k V=1 check } src_install() { @@ -312,7 +330,7 @@ src_install() { cd "${MY_BUILDDIR}" # see Note [tooldir hack for ldscripts] - emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install + emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install rm -rf "${ED}"/${LIBPATH}/bin use static-libs || find "${ED}" -name '*.la' -delete diff --git a/sys-devel/binutils/binutils-2.38-r3.ebuild b/sys-devel/binutils/binutils-2.38-r3.ebuild new file mode 100644 index 00000000000..3fd587616c3 --- /dev/null +++ b/sys-devel/binutils/binutils-2.38-r3.ebuild @@ -0,0 +1,484 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs + +DESCRIPTION="Tools necessary to build programs" +HOMEPAGE="https://sourceware.org/binutils/" +LICENSE="GPL-3+" +IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla" +REQUIRED_USE="default-gold? ( gold )" + +# 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 +# - Default: PV +# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/... +# for the patchsets + +PATCH_VER=4 +PATCH_DEV=dilfridge + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 + SLOT=${PV} +else + PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}} + PATCH_DEV=${PATCH_DEV:-dilfridge} + SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/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) + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +# +# The cross-compile logic +# +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi +is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } + +# +# The dependencies +# +RDEPEND=" + >=sys-devel/binutils-config-3 + sys-libs/zlib +" +DEPEND="${RDEPEND}" +BDEPEND=" + doc? ( sys-apps/texinfo ) + test? ( + dev-util/dejagnu + sys-devel/bc + ) + nls? ( sys-devel/gettext ) + sys-devel/flex + virtual/yacc +" + +RESTRICT="!test? ( test )" + +MY_BUILDDIR=${WORKDIR}/build + +src_unpack() { + 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/-hppa64/}.tar.xz + + cd "${WORKDIR}" || die + unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz + + # _p patch versions are Gentoo specific tarballs ... + local dir=${P%_p?} + dir=${dir/-hppa64/} + + S=${WORKDIR}/${dir} + fi + + cd "${WORKDIR}" || die + mkdir -p "${MY_BUILDDIR}" || die +} + +src_prepare() { + local patchsetname + if [[ ${PV} == 9999* ]] ; then + patchsetname="from git master" + else + patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}" + fi + + if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then + if ! use vanilla; then + einfo "Applying binutils patchset ${patchsetname}" + eapply "${WORKDIR}/patch" + einfo "Done." + fi + fi + + # Make sure our explicit libdir paths don't get clobbered. #562460 + sed -i \ + -e 's:@bfdlibdir@:@libdir@:g' \ + -e 's:@bfdincludedir@:@includedir@:g' \ + {bfd,opcodes}/Makefile.in || die + + # Fix locale issues if possible #122216 + if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then + einfo "Fixing misc issues in configure files" + for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do + ebegin " Updating ${f/${S}\/}" + patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \ + || eerror "Please file a bug about this" + eend $? + done + fi + + # Fix conflicts with newer glibc #272594 + if [[ -e libiberty/testsuite/test-demangle.c ]] ; then + sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c + fi + + # Apply things from PATCHES and user dirs + default + + # Run misc portage update scripts + gnuconfig_update + elibtoolize --portage --no-uclibc +} + +toolchain-binutils_bugurl() { + printf "https://bugs.gentoo.org/" +} +toolchain-binutils_pkgversion() { + printf "Gentoo ${PV}" + [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}" +} + +src_configure() { + # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html + # Avoid really confusing logs from subconfigure spam, makes logs far + # more legible. + MAKEOPTS="--output-sync=line ${MAKEOPTS}" + + # Setup some paths + LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} + INCPATH=${LIBPATH}/include + DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} + + # see Note [tooldir hack for ldscripts] + if is_cross ; then + TOOLPATH=/usr/${CHOST}/${CTARGET} + BINPATH=${TOOLPATH}/binutils-bin/${PV} + else + BINPATH=/usr/${CTARGET}/binutils-bin/${PV} + fi + + # Make sure we filter $LINGUAS so that only ones that + # actually work make it through #42033 + strip-linguas -u */po + + # Keep things sane + strip-flags + + use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + + local x + echo + for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do + einfo "$(printf '%10s' ${x}:) ${!x}" + done + echo + + cd "${MY_BUILDDIR}" + local myconf=() + + if use plugins ; then + myconf+=( --enable-plugins ) + fi + # enable gold (installed as ld.gold) and ld's plugin architecture + if use gold ; then + myconf+=( --enable-gold ) + if use default-gold; then + myconf+=( --enable-gold=default ) + fi + fi + + if use nls ; then + myconf+=( --without-included-gettext ) + else + myconf+=( --disable-nls ) + fi + + myconf+=( --with-system-zlib ) + + # For bi-arch systems, enable a 64bit bfd. This matches + # the bi-arch logic in toolchain.eclass. #446946 + # We used to do it for everyone, but it's slow on 32bit arches. #438522 + case $(tc-arch) in + ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;; + esac + + use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd ) + + [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} ) + + is_cross && myconf+=( + --with-sysroot="${EPREFIX}"/usr/${CTARGET} + --enable-poison-system-directories + ) + + # glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+ + # on everyone in alpha (for now), we'll just enable it when possible + has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt ) + has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt ) + + # mips can't do hash-style=gnu ... + if [[ $(tc-arch) != mips ]] ; then + myconf+=( --enable-default-hash-style=gnu ) + fi + + myconf+=( + # (--disable-silent-rules should get passed automatically w/ econf which we use + # in >= 2.39, so can drop it then.) + --disable-silent-rules + --prefix="${EPREFIX}"/usr + --host=${CHOST} + --target=${CTARGET} + --datadir="${EPREFIX}"${DATAPATH} + --datarootdir="${EPREFIX}"${DATAPATH} + --infodir="${EPREFIX}"${DATAPATH}/info + --mandir="${EPREFIX}"${DATAPATH}/man + --bindir="${EPREFIX}"${BINPATH} + --libdir="${EPREFIX}"${LIBPATH} + --libexecdir="${EPREFIX}"${LIBPATH} + --includedir="${EPREFIX}"${INCPATH} + --enable-obsolete + --enable-shared + --enable-threads + # Newer versions (>=2.27) offer a configure flag now. + --enable-relro + # Newer versions (>=2.24) make this an explicit option. #497268 + --enable-install-libiberty + # Available from 2.35 on + --enable-textrel-check=warning + # Works better than vapier's patch... #808787 + --enable-new-dtags + --disable-werror + --with-bugurl="$(toolchain-binutils_bugurl)" + --with-pkgversion="$(toolchain-binutils_pkgversion)" + $(use_enable static-libs static) + ${EXTRA_ECONF} + # Disable modules that are in a combined binutils/gdb tree. #490566 + --disable-{gdb,libdecnumber,readline,sim} + # Strip out broken static link flags. + # https://gcc.gnu.org/PR56750 + --without-stage1-ldflags + # Change SONAME to avoid conflict across + # {native,cross}/binutils, binutils-libs. #666100 + --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st) + + # avoid automagic dependency on (currently prefix) systems + # systems with debuginfod library, bug #754753 + --without-debuginfod + + # Allow user to opt into CET for host libraries. + # Ideally we would like automagic-or-disabled here. + # But the check does not quite work on i686: bug #760926. + $(use_enable cet) + ) + + if ! is_cross ; then + myconf+=( $(use_enable pgo pgo-build lto) ) + + if use pgo ; then + export BUILD_CFLAGS="${CFLAGS}" + fi + fi + + echo ./configure "${myconf[@]}" + "${S}"/configure "${myconf[@]}" || die + + # Prevent makeinfo from running if doc is unset. + if ! use doc ; then + sed -i \ + -e '/^MAKEINFO/s:=.*:= true:' \ + Makefile || die + fi +} + +src_compile() { + cd "${MY_BUILDDIR}" + # see Note [tooldir hack for ldscripts] + if is_cross ; then + emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all + else + emake V=1 all + fi + + # only build info pages if the user wants them + if use doc ; then + emake V=1 info + fi + + # we nuke the manpages when we're left with junk + # (like when we bootstrap, no perl -> no manpages) + find . -name '*.1' -a -size 0 -delete +} + +src_test() { + cd "${MY_BUILDDIR}" + + # bug 637066 + filter-flags -Wall -Wreturn-type + + emake -k V=1 check +} + +src_install() { + local x d + + cd "${MY_BUILDDIR}" + + # see Note [tooldir hack for ldscripts] + emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install + + rm -rf "${ED}"/${LIBPATH}/bin + use static-libs || find "${ED}" -name '*.la' -delete + + # Newer versions of binutils get fancy with ${LIBPATH} #171905 + cd "${ED}"/${LIBPATH} + for d in ../* ; do + [[ ${d} == ../${PV} ]] && continue + mv ${d}/* . || die + rmdir ${d} || die + done + + # Now we collect everything intp the proper SLOT-ed dirs + # When something is built to cross-compile, it installs into + # /usr/$CHOST/ by default ... we have to 'fix' that :) + if is_cross ; then + cd "${ED}"/${BINPATH} + for x in * ; do + mv ${x} ${x/${CTARGET}-} + done + + if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then + mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH} + mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/ + rm -r "${ED}"/usr/${CHOST}/{include,lib} + fi + fi + insinto ${INCPATH} + local libiberty_headers=( + # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir. + demangle.h + dyn-string.h + fibheap.h + hashtab.h + libiberty.h + objalloc.h + splay-tree.h + ) + doins "${libiberty_headers[@]/#/${S}/include/}" + if [[ -d ${ED}/${LIBPATH}/lib ]] ; then + mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ + rm -r "${ED}"/${LIBPATH}/lib + fi + + # Generate an env.d entry for this binutils + insinto /etc/env.d/binutils + cat <<-EOF > "${T}"/env.d + TARGET="${CTARGET}" + VER="${PV}" + LIBPATH="${EPREFIX}${LIBPATH}" + EOF + newins "${T}"/env.d ${CTARGET}-${PV} + + # Handle documentation + if ! is_cross ; then + cd "${S}" + dodoc README + docinto bfd + dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO + docinto binutils + dodoc binutils/ChangeLog binutils/NEWS binutils/README + docinto gas + dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README* + docinto gprof + dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl + docinto ld + dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO + docinto libiberty + dodoc libiberty/ChangeLog* libiberty/README + docinto opcodes + dodoc opcodes/ChangeLog* + fi + + # Remove shared info pages + rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} + + # Trim all empty dirs + find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null +} + +pkg_postinst() { + # Make sure this ${CTARGET} has a binutils version selected + [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0 + binutils-config ${CTARGET}-${PV} +} + +pkg_postrm() { + local current_profile=$(binutils-config -c ${CTARGET}) + + # If no other versions exist, then uninstall for this + # target ... otherwise, switch to the newest version + # Note: only do this if this version is unmerged. We + # rerun binutils-config if this is a remerge, as + # we want the mtimes on the symlinks updated (if + # it is the same as the current selected profile) + if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then + local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}') + choice=${choice//$'\n'/ } + choice=${choice/* } + if [[ -z ${choice} ]] ; then + binutils-config -u ${CTARGET} + else + binutils-config ${choice} + fi + elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then + binutils-config ${CTARGET}-${PV} + fi +} + +# Note [slotting support] +# ----------------------- +# Gentoo's layout for binutils files is non-standard as Gentoo +# supports slotted installation for binutils. Many tools +# still expect binutils to reside in known locations. +# binutils-config package restores symlinks into known locations, +# like: +# /usr/bin/${CTARGET}-<tool> +# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips +# /usr/include/ +# +# Note [tooldir hack for ldscripts] +# --------------------------------- +# Build system does not allow ./configure to tweak every location +# we need for slotting binutils hence all the shuffling in +# src_install(). This note is about SCRIPTDIR define handling. +# +# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value +# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib' +# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time. +# Thus we can't just move files around after compilation finished. +# +# Our goal is the following: +# - at build-time set scriptdir to point to symlinked location: +# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case) +# - at install-time set scriptdir to point to slotted location: +# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV} +# +# Now, this would all be very nice except for the fact that the changed +# directory makes libtool re-link libraries during the install phase. +# It uses libraries from the system installation to do that (bad) +# and fails if it cant handle these (e.g. newer LTO version than in +# current gcc, see bugs 834720 and 838925). +# +# So, we apply this whole hack only for cross builds. diff --git a/sys-devel/binutils/binutils-9999.ebuild b/sys-devel/binutils/binutils-9999.ebuild index d79e91c3cff..ae887224952 100644 --- a/sys-devel/binutils/binutils-9999.ebuild +++ b/sys-devel/binutils/binutils-9999.ebuild @@ -114,13 +114,13 @@ src_prepare() { fi fi - # Make sure our explicit libdir paths don't get clobbered. #562460 + # Make sure our explicit libdir paths don't get clobbered, bug #562460 sed -i \ -e 's:@bfdlibdir@:@libdir@:g' \ -e 's:@bfdincludedir@:@includedir@:g' \ {bfd,opcodes}/Makefile.in || die - # Fix locale issues if possible #122216 + # Fix locale issues if possible, bug #122216 if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then einfo "Fixing misc issues in configure files" for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do @@ -131,11 +131,6 @@ src_prepare() { done fi - # Fix conflicts with newer glibc #272594 - if [[ -e libiberty/testsuite/test-demangle.c ]] ; then - sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c - fi - # Apply things from PATCHES and user dirs default @@ -153,19 +148,26 @@ toolchain-binutils_pkgversion() { } src_configure() { + # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html + # Avoid really confusing logs from subconfigure spam, makes logs far + # more legible. + MAKEOPTS="--output-sync=line ${MAKEOPTS}" + # Setup some paths LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} INCPATH=${LIBPATH}/include DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} + + # see Note [tooldir hack for ldscripts] if is_cross ; then TOOLPATH=/usr/${CHOST}/${CTARGET} + BINPATH=${TOOLPATH}/binutils-bin/${PV} else - TOOLPATH=/usr/${CTARGET} + BINPATH=/usr/${CTARGET}/binutils-bin/${PV} fi - BINPATH=${TOOLPATH}/binutils-bin/${PV} # Make sure we filter $LINGUAS so that only ones that - # actually work make it through #42033 + # actually work make it through, bug #42033 strip-linguas -u */po # Keep things sane @@ -180,7 +182,7 @@ src_configure() { done echo - cd "${MY_BUILDDIR}" + cd "${MY_BUILDDIR}" || die local myconf=() if use plugins ; then @@ -202,9 +204,10 @@ src_configure() { myconf+=( --with-system-zlib ) - # For bi-arch systems, enable a 64bit bfd. This matches - # the bi-arch logic in toolchain.eclass. #446946 - # We used to do it for everyone, but it's slow on 32bit arches. #438522 + # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch + # logic in toolchain.eclass. bug #446946 + # + # We used to do it for everyone, but it's slow on 32bit arches. bug #438522 case $(tc-arch) in ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;; esac @@ -218,10 +221,7 @@ src_configure() { --enable-poison-system-directories ) - # glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+ - # on everyone in alpha (for now), we'll just enable it when possible - has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt ) - has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt ) + myconf+=( --enable-secureplt ) # mips can't do hash-style=gnu ... if [[ $(tc-arch) != mips ]] ; then @@ -245,24 +245,37 @@ src_configure() { --enable-threads # Newer versions (>=2.27) offer a configure flag now. --enable-relro - # Newer versions (>=2.24) make this an explicit option. #497268 + # Newer versions (>=2.24) make this an explicit option, bug #497268 --enable-install-libiberty # Available from 2.35 on --enable-textrel-check=warning - # Works better than vapier's patch... #808787 + + # Available from 2.39 on + --enable-warn-execstack + --enable-warn-rwx-segments + # TODO: Available from 2.39+ on but let's try the warning on for a bit + # first... (--enable-warn-execstack) + # Could put it under USE=hardened? + #--enable-default-execstack + + # Things to think about + #--enable-deterministic-archives + + # Works better than vapier's patch, bug #808787 --enable-new-dtags + + --disable-jansson --disable-werror --with-bugurl="$(toolchain-binutils_bugurl)" --with-pkgversion="$(toolchain-binutils_pkgversion)" $(use_enable static-libs static) - ${EXTRA_ECONF} - # Disable modules that are in a combined binutils/gdb tree. #490566 + # Disable modules that are in a combined binutils/gdb tree, bug #490566 --disable-{gdb,libdecnumber,readline,sim} # Strip out broken static link flags. # https://gcc.gnu.org/PR56750 --without-stage1-ldflags # Change SONAME to avoid conflict across - # {native,cross}/binutils, binutils-libs. #666100 + # {native,cross}/binutils, binutils-libs. bug #666100 --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st) # avoid automagic dependency on (currently prefix) systems @@ -273,16 +286,17 @@ src_configure() { # Ideally we would like automagic-or-disabled here. # But the check does not quite work on i686: bug #760926. $(use_enable cet) - - $(use_enable pgo pgo-build lto) ) - if use pgo ; then - export BUILD_CFLAGS="${CFLAGS}" + if ! is_cross ; then + myconf+=( $(use_enable pgo pgo-build lto) ) + + if use pgo ; then + export BUILD_CFLAGS="${CFLAGS}" + fi fi - echo ./configure "${myconf[@]}" - "${S}"/configure "${myconf[@]}" || die + ECONF_SOURCE="${S}" econf "${myconf[@]}" || die # Prevent makeinfo from running if doc is unset. if ! use doc ; then @@ -293,13 +307,18 @@ src_configure() { } src_compile() { - cd "${MY_BUILDDIR}" + cd "${MY_BUILDDIR}" || die + # see Note [tooldir hack for ldscripts] - emake tooldir="${EPREFIX}${TOOLPATH}" all + if is_cross ; then + emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all + else + emake V=1 all + fi # only build info pages if the user wants them if use doc ; then - emake info + emake V=1 info fi # we nuke the manpages when we're left with junk @@ -308,25 +327,27 @@ src_compile() { } src_test() { - cd "${MY_BUILDDIR}" + cd "${MY_BUILDDIR}" || die - # bug 637066 + # bug #637066 filter-flags -Wall -Wreturn-type - emake -k check + emake -k V=1 check } src_install() { local x d - cd "${MY_BUILDDIR}" + cd "${MY_BUILDDIR}" || die + # see Note [tooldir hack for ldscripts] - emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install - rm -rf "${ED}"/${LIBPATH}/bin + emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install + + rm -rf "${ED}"/${LIBPATH}/bin || die use static-libs || find "${ED}" -name '*.la' -delete - # Newer versions of binutils get fancy with ${LIBPATH} #171905 - cd "${ED}"/${LIBPATH} + # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905 + cd "${ED}"/${LIBPATH} || die for d in ../* ; do [[ ${d} == ../${PV} ]] && continue mv ${d}/* . || die @@ -337,9 +358,9 @@ src_install() { # When something is built to cross-compile, it installs into # /usr/$CHOST/ by default ... we have to 'fix' that :) if is_cross ; then - cd "${ED}"/${BINPATH} + cd "${ED}"/${BINPATH} || die for x in * ; do - mv ${x} ${x/${CTARGET}-} + mv ${x} ${x/${CTARGET}-} || die done if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then @@ -348,6 +369,7 @@ src_install() { rm -r "${ED}"/usr/${CHOST}/{include,lib} fi fi + insinto ${INCPATH} local libiberty_headers=( # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir. @@ -361,8 +383,8 @@ src_install() { ) doins "${libiberty_headers[@]/#/${S}/include/}" if [[ -d ${ED}/${LIBPATH}/lib ]] ; then - mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ - rm -r "${ED}"/${LIBPATH}/lib + mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ || die + rm -r "${ED}"/${LIBPATH}/lib || die fi # Generate an env.d entry for this binutils @@ -376,29 +398,36 @@ src_install() { # Handle documentation if ! is_cross ; then - cd "${S}" + cd "${S}" || die dodoc README + docinto bfd dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO + docinto binutils dodoc binutils/ChangeLog binutils/NEWS binutils/README + docinto gas dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README* + docinto gprof dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl + docinto ld dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO + docinto libiberty dodoc libiberty/ChangeLog* libiberty/README + docinto opcodes dodoc opcodes/ChangeLog* fi # Remove shared info pages - rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} + rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die # Trim all empty dirs - find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null + find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null || die } pkg_postinst() { @@ -457,3 +486,11 @@ pkg_postrm() { # ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case) # - at install-time set scriptdir to point to slotted location: # ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV} +# +# Now, this would all be very nice except for the fact that the changed +# directory makes libtool re-link libraries during the install phase. +# It uses libraries from the system installation to do that (bad) +# and fails if it cant handle these (e.g. newer LTO version than in +# current gcc, see bugs 834720 and 838925). +# +# So, we apply this whole hack only for cross builds. diff --git a/sys-devel/bison/Manifest b/sys-devel/bison/Manifest index 60fc54129fe..580d3f2c84a 100644 --- a/sys-devel/bison/Manifest +++ b/sys-devel/bison/Manifest @@ -1,4 +1,4 @@ DIST bison-3.7.6-patches-01.tar.xz 10600 BLAKE2B c7907a327c2bbb82a2e575a864e71400f91cd4349a84f95b187ecaadefc1bfd595a91bce6c8c47e42423cace9cf78a4041fde3fdc489a4824aa3c10ca73be7cb SHA512 8f2ddee79b9678b9fd9a7a34f26d44f7c4472d0fc55c9fef8b418d27949b6a27309b7aa5ac3f4a5ad27c90ad7d92d824ffe767c77b0ed81de6b2897c91cd7560 DIST bison-3.7.6.tar.xz 2627180 BLAKE2B 2f1015b517e46ff0870378b4d0dd489c8c737f31b2b69146bd7fbbae1e3adcdff0e4837cfdf1d238e8660ecc2b310ce87ec8940ed4989278b3df6cbb2d464e54 SHA512 6c1c9b825fbd2c94b8903f03a7e68e6832599f7bbd8d3c49864537c11b038c45a15de02fd36128d662af314334c83515bbc132df84e9acc6c651e98649c65bad -DIST bison-3.8.1.tar.xz 2800372 BLAKE2B 0b70ee1b3ab8075540d9254cffdc1dfc9a9fb354d8b9b79dd3b097bf9a2235f892e120736e4195ad21ce8fbf3831c63b2d1a267a20a7abf85f0d72cdcdac1820 SHA512 f87978c41eca4db22de4f64feb3be92e44862d412f75dd84980045faf0f9e7f5a41b25bef8d4acd90743638eab61a7ac111444969d958fef5fe3535bac416921 DIST bison-3.8.2.tar.xz 2817324 BLAKE2B e211b61494c911f55b72a8b70b5a48cdf4000ce9e675a1f1f52735bb8f57d93a3f8075341451263af9c9c531004907ae2b62b1873e7e4664c2cd26fa3b12271c SHA512 d4d23af6671406e97257892f90651b67f2ab95219831372be032190b7156c10a3435d457857e677445df8b2327aacccc15344acbbc3808a6f332a93cce23b444 +DIST bison-3.8.2.tar.xz.sig 195 BLAKE2B b9bd21adb5115d3d3174c94223fbc9cd33afa0e9c1805008e49f77ff154fc2b656d8a9e9503dc5290658ae2948a2ca7c0dbc812f62aec268d8f8bfafb6349096 SHA512 8bb7743ca326e81a6c091b1413e3c09bd43c7eabbb80bac0638ccd52bdf7e3395cce300a86acd95f4637a9ec8a1b0e9a4d3d25d95ab0a8f03e57fd82eb87a7ac diff --git a/sys-devel/bison/bison-3.8.1.ebuild b/sys-devel/bison/bison-3.8.1.ebuild deleted file mode 100644 index 21002c007b8..00000000000 --- a/sys-devel/bison/bison-3.8.1.ebuild +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit flag-o-matic - -DESCRIPTION="A general-purpose (yacc-compatible) parser generator" -HOMEPAGE="https://www.gnu.org/software/bison/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="examples nls static test" -RESTRICT="!test? ( test )" - -# gettext _IS_ required in RDEPEND because >=bison-3.7 links against -# libtextstyle.so!!! (see bug #740754) -DEPEND=" - >=sys-devel/m4-1.4.16 - >=sys-devel/gettext-0.21 -" -RDEPEND="${DEPEND}" -BDEPEND=" - sys-devel/flex - test? ( dev-lang/perl ) -" - -DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) # ChangeLog-2012 ChangeLog-1998 PACKAGING README-alpha README-release - -src_prepare() { - # Old logic when we needed to patch configure.ac - # Keeping in case it's useful for future - - # Record date to avoid 'config.status --recheck' & regen of 'tests/package.m4' - #touch -r configure.ac old.configure.ac || die - #touch -r configure old.configure || die - - #eapply "${WORKDIR}"/patches - #default - - # Restore date after patching - #touch -r old.configure.ac configure.ac || die - #touch -r old.configure configure || die - - # The makefiles make the man page depend on the configure script - # which we patched above. Touch it to prevent regeneration. - #touch doc/bison.1 || die #548778 #538300#9 - - default - - # Avoid regenerating the info page when the timezone is diff. #574492 - sed -i '2iexport TZ=UTC' build-aux/mdate-sh || die -} - -src_configure() { - use static && append-ldflags -static - - local myeconfargs=( - $(use_enable nls) - ) - - econf "${myeconfargs[@]}" -} - -src_install() { - default - - # This one is installed by dev-util/yacc - mv "${ED}"/usr/bin/yacc{,.bison} || die - mv "${ED}"/usr/share/man/man1/yacc{,.bison}.1 || die - - # We do not need liby.a - rm -r "${ED}"/usr/lib* || die - - # Examples are about 200K, so let's make them optional still for now. - if ! use examples ; then - rm -r "${ED}"/usr/share/doc/${PF}/examples/ || die - fi -} - -pkg_postinst() { - local f="${EROOT}/usr/bin/yacc" - if [[ ! -e ${f} ]] ; then - ln -s yacc.bison "${f}" - fi -} - -pkg_postrm() { - # clean up the dead symlink when we get unmerged #377469 - local f="${EROOT}/usr/bin/yacc" - if [[ -L ${f} && ! -e ${f} ]] ; then - rm -f "${f}" - fi -} diff --git a/sys-devel/bison/bison-3.8.2.ebuild b/sys-devel/bison/bison-3.8.2.ebuild index 0815391c170..8d135411443 100644 --- a/sys-devel/bison/bison-3.8.2.ebuild +++ b/sys-devel/bison/bison-3.8.2.ebuild @@ -1,17 +1,19 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit flag-o-matic +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/bison.asc +inherit flag-o-matic verify-sig DESCRIPTION="A general-purpose (yacc-compatible) parser generator" HOMEPAGE="https://www.gnu.org/software/bison/" SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" +SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )" LICENSE="GPL-2" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" IUSE="examples nls static test" RESTRICT="!test? ( test )" @@ -25,6 +27,7 @@ RDEPEND="${DEPEND}" BDEPEND=" sys-devel/flex test? ( dev-lang/perl ) + verify-sig? ( sec-keys/openpgp-keys-bison ) " DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) # ChangeLog-2012 ChangeLog-1998 PACKAGING README-alpha README-release diff --git a/sys-devel/bmake/Manifest b/sys-devel/bmake/Manifest index 67e6ece4a7b..306140daa77 100644 --- a/sys-devel/bmake/Manifest +++ b/sys-devel/bmake/Manifest @@ -1,3 +1,3 @@ -DIST bmake-20211212.tar.gz 780800 BLAKE2B 4a69f4881c70319d9548a688284036732ca541c0abc3082dc126ff743e550e6ccd1dee5c0909029e35f7e2329866e806615c2e4f8cd3bd4d7739e9b03f677326 SHA512 210065d90e1d4ec68df78d9c19d7f685d2a3f8dbd837ca1f6e40f250ae94b9e03f8ca07d15d3e9f34f27229b3e410ca9aef633fcc5f7661967a2553846524eb3 -DIST bmake-20220116.tar.gz 785312 BLAKE2B 260ee10b5d295482477a9be92303c946139785f3c2a17cdb8a215322ac8876b708235af83f2c86f21c50da9a4b55b00300f08da40fc0d06ca2eda6caf1aafc50 SHA512 27e400f200afdb0ebc978bbd6a7422e570ab0a79ce609cffddbebb281d59ef752d840be14e08e989c83c14f2955f98d9549c8ae452450c75d03c59c61593fb5c +DIST bmake-20220418.tar.gz 805986 BLAKE2B 6569956d81a9c67cc95756831ec086b392af69cb2b068f11d3beb237ca3f62059b9102695f28aa4093b589af52c512545bd86d91a410d681f3835a99b8270f6f SHA512 89fa5cb6e35ee1cd6a32acf291bda33b3a7272c4ef25d38412b8caa7e092210c8fa04a11d19d3c19b7e60dee2cf0a5049cf393be6e25b6e28bab2eea50e03204 +DIST bmake-20220612.tar.gz 810914 BLAKE2B afb7691bdffe799e629f856ba61226cd93217890ef10e2803d6dda28e16439f2a3583d98964700858dfabdf38d62a1ad06eefaa49570e45fccb9bcddac3fb68b SHA512 c7b352ca44c30c107bcae544125989dcea9cb32ea296f875ed84313bb72633366191b86f30c38fe733fb27bf91a040a063059070efefa774089af5694af2bc3f DIST mk-20210330.tar.gz 107380 BLAKE2B 9ac30a117d9ba31635cf8d8d29fdba76f148611f47628403ca8f807081c32509f10498d3c30fd24985e5420af4710fe59fc6315d71f2d0c1cfed93263a06553a SHA512 6acd3ee911442934082f4f877d795b07c5e23022eaa9c0874799d97e92a2f5a663cb45f94b7f9745c49cbbce6b7e755a29e381ccfb9e68a0be1eedbd22fd5d3b diff --git a/sys-devel/bmake/bmake-20211212.ebuild b/sys-devel/bmake/bmake-20220418.ebuild index a69c0ea95fc..7e0fdf7ced7 100644 --- a/sys-devel/bmake/bmake-20211212.ebuild +++ b/sys-devel/bmake/bmake-20220418.ebuild @@ -17,7 +17,10 @@ SLOT="0" KEYWORDS="amd64 ~ppc ~x86" # Skip failing test (sandbox and csh) -PATCHES=( "${FILESDIR}"/${PN}-20210206-tests.patch ) +PATCHES=( + "${FILESDIR}"/${PN}-20210206-tests.patch + "${FILESDIR}"/${PN}-20220418-warnings.patch +) src_prepare() { default diff --git a/sys-devel/bmake/bmake-20220116.ebuild b/sys-devel/bmake/bmake-20220612.ebuild index 7b11aa7cebf..5505e007c65 100644 --- a/sys-devel/bmake/bmake-20220116.ebuild +++ b/sys-devel/bmake/bmake-20220612.ebuild @@ -17,7 +17,10 @@ SLOT="0" KEYWORDS="~amd64 ~ppc ~x86" # Skip failing test (sandbox and csh) -PATCHES=( "${FILESDIR}"/${PN}-20210206-tests.patch ) +PATCHES=( + "${FILESDIR}"/${PN}-20210206-tests.patch + "${FILESDIR}"/${PN}-20220418-warnings.patch +) src_prepare() { default diff --git a/sys-devel/bmake/files/bmake-20220418-warnings.patch b/sys-devel/bmake/files/bmake-20220418-warnings.patch new file mode 100644 index 00000000000..1fccb91e95a --- /dev/null +++ b/sys-devel/bmake/files/bmake-20220418-warnings.patch @@ -0,0 +1,38 @@ +# https://bugs.gentoo.org/841362 +# +# Fix -Wimplicit-function-declaration and -Wunused-result warnings +# +# meta.c: In function ‘meta_name’: +# meta.c:262:21: warning: implicit declaration of function ‘strlcpy’; did you mean ‘strncpy’? [-Wimplicit-function-declaration] +# 262 | strlcpy(rp, tname_base, sizeof buf - (size_t)(rp - buf)); +# | ^~~~~~~ +# | strncpy +# +# meta.c: In function ‘meta_job_error’: +# meta.c:774:5: warning: ignoring return value of ‘getcwd’ declared with attribute ‘warn_unused_result’ [-Wunused-result] +# 774 | getcwd(cwd, sizeof cwd); +# | ^~~~~~~~~~~~~~~~~~~~~~~ + +--- a/meta.c ++++ b/meta.c +@@ -106,6 +106,10 @@ + char * stresep(char **, const char *, int); + #endif + ++#if !defined(HAVE_STRLCPY) ++size_t strlcpy(char *, const char *, size_t); ++#endif ++ + /* + * Filemon is a kernel module which snoops certain syscalls. + * +@@ -769,7 +773,8 @@ + } + if (gn != NULL) + Global_Set(".ERROR_TARGET", GNode_Path(gn)); +- getcwd(cwd, sizeof cwd); ++ if (getcwd(cwd, sizeof cwd) == NULL) ++ err(1, "Could not get current working directory"); + Global_Set(".ERROR_CWD", cwd); + if (pbm->meta_fname[0] != '\0') { + Global_Set(".ERROR_META_FILE", pbm->meta_fname); diff --git a/sys-devel/clang-common/Manifest b/sys-devel/clang-common/Manifest index dd7644d6298..fed0786bf22 100644 --- a/sys-devel/clang-common/Manifest +++ b/sys-devel/clang-common/Manifest @@ -1,4 +1,9 @@ -DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81 +DIST llvm-project-14.0.5.src.tar.xz 105617748 BLAKE2B a68a6eb58302702f560d1204eb97d34b695eb5df417ccefb50117dbd641ba3c3dda9e64c04506e646dd40c1151eb60b12843e206996ef74b35b2841b8dabafda SHA512 db5a7ea1149988c2aab4ed634f14e00bb9a8042089350b811f875e295ced7b5add80a11b91cad80ba0ba9801261502644a720021506483c14dfb1bc24a7f54d5 +DIST llvm-project-14.0.5.src.tar.xz.sig 566 BLAKE2B ecf66df5d0acb382c9d441aee053404254fa4087d57130b04bb496af9cbb71c59e82f0938f44953d7fd777524781d13d1327b6c64065cf45b177bc3ea0e5c3f2 SHA512 a785e38f11863a46de8766ff4495a73173479cdbd95dc539804b0381a7a834a409713dbaf441272a9cc2963a3c7015c95dc6f0dcfa745e8d6047b1ad5feacff7 +DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f15e428f22a536a17e5f4e3eb29a003b8a8ec0abe0fa3e072591161d5f30ef7d8867c1ce34d1b341ad858e93c00263499941a99 SHA512 6fc6eeb60fac698702d1aac495fc0161eb7216a1f8db2020af8fccec5837831f7cc20dc2a169bf4f0b5f520748280b4a86621f3697d622aa58faaa45dbfaad13 +DIST llvm-project-14.0.6.src.tar.xz.sig 566 BLAKE2B cb658ad43d8ab6c43a5773aedadf0569c97b5ee4b1bd58eceb10e1879a30880c741c3d66bedd462c892309b688fb7b2673115a62d1f74d71ee375a578de9547f SHA512 b4a7b368532a7a4a24376cfa7db8f6d3478f6d4446474342fc00b474ecf466330cd0f16783209263c4c72d5fc7ddedfb11b95578842e700cfb7ee0bb34cc95d6 DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1 -DIST llvmorg-13.0.0.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2 -DIST llvmorg-13.0.1-rc3.tar.gz 147302323 BLAKE2B 9ac2f97568062d7dd618295a68d6e14898fcd69e2bb66290b999ceb8c12132371f4e9b59d8ba2b252e5e5cb249045676b24fc50c117b2afae20abab98f426582 SHA512 88a04ad02af2d41ec21c7a62bad21ee0e627b7276a16795875afd062ed29ac7fb4aadec5b5e48785a6502c9fd797a4b67d648a21f193c9f7602112870b10a3d1 +DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f +DIST llvmorg-14.0.1.tar.gz 158074615 BLAKE2B bf80366461580058494eb101646efcd1a8b55a66818a710c2eb8c649bf88c02fe4552cecf4c1c8637a64e7cee8d644bca31aafc804765ed18f2b5e2975dd6c92 SHA512 0a15aa9cfc978a7b03a1659a2affad65ede66d280f5c12bf0beaaf194cd7bdd57ff438b5f40e64c1e1b88f368de99be349e9d30b544d2bbe4a50f0ebed3307f2 +DIST llvmorg-14.0.3.tar.gz 158092596 BLAKE2B ef901df510ec6bc1242595ec330e9c9ee76e696b077d67a8d62b53608c3d18b2f2d7ea3150864e13d9b37a8ce899ebca946ebe72cbc4538700176e20859ddec2 SHA512 511e93fd9b1c414c38fe9e2649679ac0b16cb04f7f7838569d187b04c542a185e364d6db73e96465026e3b2533649eb75ac95507d12514af32b28bdfb66f2646 +DIST llvmorg-14.0.4.tar.gz 158088617 BLAKE2B 7fb894548dce72593a8639b4d0220d2499577f80d38b97600749c91a498c69dfbbe818cee35e4a76370795e55da7037543ea341ad7567a6f548893c67dce9e64 SHA512 e14e6c3a1915a96e9ddc609f16ca3a398ca6f7fd0a691dadaa24490078a661340e845cb2d18f3679de4f47300bb822c33ae69548af6a0370d55737831a28b959 diff --git a/sys-devel/clang-common/clang-common-13.0.0.ebuild b/sys-devel/clang-common/clang-common-13.0.1.ebuild index 70896015ab6..89948f1aa15 100644 --- a/sys-devel/clang-common/clang-common-13.0.0.ebuild +++ b/sys-devel/clang-common/clang-common-13.0.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 diff --git a/sys-devel/clang-common/clang-common-13.0.1_rc3.ebuild b/sys-devel/clang-common/clang-common-14.0.1.ebuild index 71768ae561e..a422bd9111c 100644 --- a/sys-devel/clang-common/clang-common-13.0.1_rc3.ebuild +++ b/sys-devel/clang-common/clang-common-14.0.1.ebuild @@ -10,7 +10,7 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" -KEYWORDS="" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos" IUSE="" PDEPEND="sys-devel/clang:*" diff --git a/sys-devel/clang-common/clang-common-11.1.0.ebuild b/sys-devel/clang-common/clang-common-14.0.3.ebuild index 8d21c79346d..798f9e9fb85 100644 --- a/sys-devel/clang-common/clang-common-11.1.0.ebuild +++ b/sys-devel/clang-common/clang-common-14.0.3.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit bash-completion-r1 llvm.org @@ -10,14 +10,14 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" -KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86 ~amd64-linux ~ppc-macos ~x64-macos" -IUSE="" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos" -PDEPEND="sys-devel/clang:*" +PDEPEND=" + sys-devel/clang:* +" -LLVM_COMPONENTS=( clang/utils/bash-autocomplete.sh ) +LLVM_COMPONENTS=( clang/utils ) llvm.org_set_globals -S=${WORKDIR}/clang/utils src_install() { newbashcomp bash-autocomplete.sh clang diff --git a/sys-devel/clang-common/clang-common-14.0.0.9999.ebuild b/sys-devel/clang-common/clang-common-14.0.4.ebuild index 03e4441b91b..188f4f88ad9 100644 --- a/sys-devel/clang-common/clang-common-14.0.0.9999.ebuild +++ b/sys-devel/clang-common/clang-common-14.0.4.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit bash-completion-r1 llvm.org @@ -10,14 +10,14 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" -KEYWORDS="" -IUSE="" +KEYWORDS="amd64 ~arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos" -PDEPEND="sys-devel/clang:*" +PDEPEND=" + sys-devel/clang:* +" -LLVM_COMPONENTS=( clang/utils/bash-autocomplete.sh ) +LLVM_COMPONENTS=( clang/utils ) llvm.org_set_globals -S=${WORKDIR}/clang/utils src_install() { newbashcomp bash-autocomplete.sh clang diff --git a/sys-devel/clang-common/clang-common-14.0.5.ebuild b/sys-devel/clang-common/clang-common-14.0.5.ebuild new file mode 100644 index 00000000000..798f9e9fb85 --- /dev/null +++ b/sys-devel/clang-common/clang-common-14.0.5.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit bash-completion-r1 llvm.org + +DESCRIPTION="Common files shared between multiple slots of clang" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos" + +PDEPEND=" + sys-devel/clang:* +" + +LLVM_COMPONENTS=( clang/utils ) +llvm.org_set_globals + +src_install() { + newbashcomp bash-autocomplete.sh clang +} diff --git a/sys-devel/clang-common/clang-common-14.0.6.ebuild b/sys-devel/clang-common/clang-common-14.0.6.ebuild new file mode 100644 index 00000000000..798f9e9fb85 --- /dev/null +++ b/sys-devel/clang-common/clang-common-14.0.6.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit bash-completion-r1 llvm.org + +DESCRIPTION="Common files shared between multiple slots of clang" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos" + +PDEPEND=" + sys-devel/clang:* +" + +LLVM_COMPONENTS=( clang/utils ) +llvm.org_set_globals + +src_install() { + newbashcomp bash-autocomplete.sh clang +} diff --git a/sys-devel/clang-common/clang-common-13.0.1.9999.ebuild b/sys-devel/clang-common/clang-common-15.0.0.9999.ebuild index 03e4441b91b..1285500128b 100644 --- a/sys-devel/clang-common/clang-common-13.0.1.9999.ebuild +++ b/sys-devel/clang-common/clang-common-15.0.0.9999.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit bash-completion-r1 llvm.org @@ -11,13 +11,13 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" KEYWORDS="" -IUSE="" -PDEPEND="sys-devel/clang:*" +PDEPEND=" + sys-devel/clang:* +" -LLVM_COMPONENTS=( clang/utils/bash-autocomplete.sh ) +LLVM_COMPONENTS=( clang/utils ) llvm.org_set_globals -S=${WORKDIR}/clang/utils src_install() { newbashcomp bash-autocomplete.sh clang diff --git a/sys-devel/clang-runtime/clang-runtime-13.0.0.ebuild b/sys-devel/clang-runtime/clang-runtime-13.0.1.ebuild index 1b29ce1a433..a81ecc3327a 100644 --- a/sys-devel/clang-runtime/clang-runtime-13.0.0.ebuild +++ b/sys-devel/clang-runtime/clang-runtime-13.0.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 diff --git a/sys-devel/clang-runtime/clang-runtime-14.0.0.9999.ebuild b/sys-devel/clang-runtime/clang-runtime-14.0.0.9999.ebuild deleted file mode 100644 index 218cdb1426f..00000000000 --- a/sys-devel/clang-runtime/clang-runtime-14.0.0.9999.ebuild +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit multilib-build - -DESCRIPTION="Meta-ebuild for clang runtime libraries" -HOMEPAGE="https://clang.llvm.org/" -SRC_URI="" - -LICENSE="metapackage" -SLOT="$(ver_cut 1-3)" -KEYWORDS="" -IUSE="+compiler-rt libcxx openmp +sanitize" -REQUIRED_USE="sanitize? ( compiler-rt )" -PROPERTIES="live" - -RDEPEND=" - compiler-rt? ( - ~sys-libs/compiler-rt-${PV}:${SLOT} - sanitize? ( ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT} ) - ) - libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] ) - openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] )" diff --git a/sys-devel/clang-runtime/clang-runtime-11.1.0.ebuild b/sys-devel/clang-runtime/clang-runtime-14.0.1.ebuild index c7b7ec0ae63..18c271cc01b 100644 --- a/sys-devel/clang-runtime/clang-runtime-11.1.0.ebuild +++ b/sys-devel/clang-runtime/clang-runtime-14.0.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -11,14 +11,16 @@ SRC_URI="" LICENSE="metapackage" SLOT="$(ver_cut 1-3)" -KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86 ~amd64-linux ~ppc-macos ~x64-macos" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos" IUSE="+compiler-rt libcxx openmp +sanitize" REQUIRED_USE="sanitize? ( compiler-rt )" RDEPEND=" compiler-rt? ( - ~sys-libs/compiler-rt-${PV}:${SLOT} - sanitize? ( ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT} ) + ~sys-libs/compiler-rt-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?] + sanitize? ( + ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?] + ) ) libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] ) openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] )" diff --git a/sys-devel/clang-runtime/clang-runtime-14.0.3.ebuild b/sys-devel/clang-runtime/clang-runtime-14.0.3.ebuild new file mode 100644 index 00000000000..f0ec9851054 --- /dev/null +++ b/sys-devel/clang-runtime/clang-runtime-14.0.3.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-build + +DESCRIPTION="Meta-ebuild for clang runtime libraries" +HOMEPAGE="https://clang.llvm.org/" + +LICENSE="metapackage" +SLOT="$(ver_cut 1-3)" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos" +IUSE="+compiler-rt libcxx openmp +sanitize" +REQUIRED_USE="sanitize? ( compiler-rt )" + +RDEPEND=" + compiler-rt? ( + ~sys-libs/compiler-rt-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?] + sanitize? ( + ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?] + ) + ) + libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] ) + openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] ) +" diff --git a/sys-devel/clang-runtime/clang-runtime-13.0.1.9999.ebuild b/sys-devel/clang-runtime/clang-runtime-14.0.4.ebuild index 218cdb1426f..0bd1a498f6d 100644 --- a/sys-devel/clang-runtime/clang-runtime-13.0.1.9999.ebuild +++ b/sys-devel/clang-runtime/clang-runtime-14.0.4.ebuild @@ -1,25 +1,26 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit multilib-build DESCRIPTION="Meta-ebuild for clang runtime libraries" HOMEPAGE="https://clang.llvm.org/" -SRC_URI="" LICENSE="metapackage" SLOT="$(ver_cut 1-3)" -KEYWORDS="" +KEYWORDS="amd64 ~arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos" IUSE="+compiler-rt libcxx openmp +sanitize" REQUIRED_USE="sanitize? ( compiler-rt )" -PROPERTIES="live" RDEPEND=" compiler-rt? ( - ~sys-libs/compiler-rt-${PV}:${SLOT} - sanitize? ( ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT} ) + ~sys-libs/compiler-rt-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?] + sanitize? ( + ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?] + ) ) libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] ) - openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] )" + openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] ) +" diff --git a/sys-devel/clang-runtime/clang-runtime-14.0.5.ebuild b/sys-devel/clang-runtime/clang-runtime-14.0.5.ebuild new file mode 100644 index 00000000000..f0ec9851054 --- /dev/null +++ b/sys-devel/clang-runtime/clang-runtime-14.0.5.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-build + +DESCRIPTION="Meta-ebuild for clang runtime libraries" +HOMEPAGE="https://clang.llvm.org/" + +LICENSE="metapackage" +SLOT="$(ver_cut 1-3)" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos" +IUSE="+compiler-rt libcxx openmp +sanitize" +REQUIRED_USE="sanitize? ( compiler-rt )" + +RDEPEND=" + compiler-rt? ( + ~sys-libs/compiler-rt-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?] + sanitize? ( + ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?] + ) + ) + libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] ) + openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] ) +" diff --git a/sys-devel/clang-runtime/clang-runtime-14.0.6.ebuild b/sys-devel/clang-runtime/clang-runtime-14.0.6.ebuild new file mode 100644 index 00000000000..f0ec9851054 --- /dev/null +++ b/sys-devel/clang-runtime/clang-runtime-14.0.6.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-build + +DESCRIPTION="Meta-ebuild for clang runtime libraries" +HOMEPAGE="https://clang.llvm.org/" + +LICENSE="metapackage" +SLOT="$(ver_cut 1-3)" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos" +IUSE="+compiler-rt libcxx openmp +sanitize" +REQUIRED_USE="sanitize? ( compiler-rt )" + +RDEPEND=" + compiler-rt? ( + ~sys-libs/compiler-rt-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?] + sanitize? ( + ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?] + ) + ) + libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] ) + openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] ) +" diff --git a/sys-devel/clang-runtime/clang-runtime-13.0.1_rc3.ebuild b/sys-devel/clang-runtime/clang-runtime-15.0.0.9999.ebuild index 23ad83f3671..e4ff9326ddc 100644 --- a/sys-devel/clang-runtime/clang-runtime-13.0.1_rc3.ebuild +++ b/sys-devel/clang-runtime/clang-runtime-15.0.0.9999.ebuild @@ -1,13 +1,12 @@ # Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit multilib-build DESCRIPTION="Meta-ebuild for clang runtime libraries" HOMEPAGE="https://clang.llvm.org/" -SRC_URI="" LICENSE="metapackage" SLOT="$(ver_cut 1-3)" @@ -18,8 +17,11 @@ PROPERTIES="live" RDEPEND=" compiler-rt? ( - ~sys-libs/compiler-rt-${PV}:${SLOT} - sanitize? ( ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT} ) + ~sys-libs/compiler-rt-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?] + sanitize? ( + ~sys-libs/compiler-rt-sanitizers-${PV}:${SLOT}[abi_x86_32(+)?,abi_x86_64(+)?] + ) ) libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] ) - openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] )" + openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] ) +" diff --git a/sys-devel/clang/Manifest b/sys-devel/clang/Manifest index 09988893d7e..a3098c8a1b7 100644 --- a/sys-devel/clang/Manifest +++ b/sys-devel/clang/Manifest @@ -1,12 +1,24 @@ -DIST llvm-11.1.0-manpages.tar.bz2 191571 BLAKE2B d6f8e1390dd3e6e8bbcd66c0079ef89f2ff3479743499c36ab32f8bc8281631a96113df9a87f6284058365950f4df3c75dacfcc11920fc5ea7ef0233ba842b77 SHA512 2543e519f51cc7ecb51a732c658ec5d35c5225e30a677f24ead75e81fb1ab793a030e79f21d0b702a2cf6ab6da1a2cba839b49a98e1b0a36384e98076ed5c4b1 DIST llvm-12.0.1-manpages.tar.bz2 191582 BLAKE2B a049cd305c257875d47e92d703c51aee8225854f999eddbd530c7a978704a981b05bc0819ba31a2f2a218d3569b078f0deb01b0eeb385966253b54a0fdc090d1 SHA512 9931a57f843709aed59193524fe980af695e4e23c8f53ec3cff308677ba4fc520ca58032b50b68440c7762305855317d9a705fe5ccbb543fb104f4deb5d10ea5 -DIST llvm-13.0.0-manpages.tar.bz2 202595 BLAKE2B 1a3a389e8c544675f7ba2692f92bb82a83beabd6c595211806ef7f473e1741ea633a773edf623011d3d011ef2ee7a1611fc9620fe921eeebe1b99c3b8b3a0652 SHA512 344139f3123169776e0fd603e605bbf537d15d80ff56ad60e66ed1639a9dec53a8ac5cd088c8e14c8b7a799b563268445562293ba1d4efeb8db438cbd9cb5fb0 -DIST llvm-gentoo-patchset-11.1.0-1.tar.xz 4032 BLAKE2B e69138a422e315b31a3d9c11faa4ae1ddf1bf9092cee2db0de4d2adef81fd802973488293aab48b764402b51996893b17ca03249ef4620848a576d1f6cdb9698 SHA512 e1c5504dab6c5db9fdf4addfeb12316f22d0258717ba551a9b7b3ba37919491fb6011ac5cca1e793b7509d5c1c186bc6bc4213f7d6155d190612492b216f979b +DIST llvm-13.0.1-manpages.tar.bz2 202187 BLAKE2B 32a761426dbe4c3c355d30660254305cd88b6d513faee04c78e370cea9d38761108a9be4c4b4ac39b6a74400af1f9d37ffd11ab05acd7340175c8d66845ae7d9 SHA512 9495e1daf588540fdb8b9ee905a9b6be4693bd70b7f42c8e8a0d667242fc24dc853c45918d3bc09d02f0761ad61541bc9749c1498e312da129abdab638a0d572 +DIST llvm-14.0.1-manpages.tar.bz2 86273 BLAKE2B 174b412568565bdd4c3db34b1b2f2482a18ca45a0a6269ca381fe5c77da21b85dafabad29551b262d593006e9b68e6f7fdf43c2ec626204970d1280dd87a5f3d SHA512 49c58094eebecfadff97d62b4e6b0129e07c52ad7fe3ea4ce5c955e6fc9c73ac443b6a6e0f8322cf25e1d88b059c4231c4798d8da04340a46f6f84fb1b386f29 +DIST llvm-14.0.3-manpages.tar.bz2 217443 BLAKE2B ebea48d9015bb0b53e8b799d8d79ac7a8d03f55440e5d3a08a9ce6c8f106c3f37e597c46aaf824dfee87c222775630299a5c277b4b29d43e831116c12932675a SHA512 db762ff7bfde28147276cacb5c5753a1bb4dd08dc8840423d6fc073629cd97bc3c7f54402cb17aa00cfc06f9f775f7ac9478c2661cacf86d5517a968d290beb3 +DIST llvm-14.0.4-manpages.tar.bz2 214161 BLAKE2B 9e8a0a78cce26b0e5235750a2af99542a496d34726046fbfa3274a22a55a75b3210c4af49e768130515c636ae3d6350f909ccb601888c276ce8cbd6b029b7172 SHA512 793dcbac320d26d26c637f2d38de0a55f5a91d13c93fa1aa2753103a07720248ffc16e8f1914ce81e8c291f02797360c052c23b027d773ac05a5563744313828 +DIST llvm-14.0.5-manpages.tar.bz2 217258 BLAKE2B 617f454e8d05f644ba1314d0bf72446e00058a547858469442017fffdd4c629f9240b96fb2107bee0aae7e5e85cfa35a21c072378bb2d0bc8260d1c021751f9d SHA512 051f154e3498dca3da420cafedd4ea4e43bbdb1eaf95f5c15107b05cedbaea4bf2d6b4c9567a95f0b8e513173c975e637391055bcd4802dcd0339b88b23da648 +DIST llvm-14.0.6-manpages.tar.bz2 214038 BLAKE2B c1ec35a5eeb35b720bf9a3a5ea9820eceaa26d9030a876772aca25dd47f8848500b94309ae9e6f3e9bc16e083d91747664e16b01dec06897e294e55fbf6f5cb3 SHA512 ea22af2f6cbfd3183f4e9ba5638e2667ca48562519bd679744d86778fed8da97173a25f57671aa67bcb45a7e4c8fd6cbbf461589a8611e1c8eb1b9eda7cc430f DIST llvm-gentoo-patchset-12.0.1.tar.xz 5280 BLAKE2B 963d005bc7b636570be90eb841ac5bcaeb927538cc7de27683167111a17d6496677c7517de2ecfaf14b5d8ac22bad357be490b8a2ed9aba502fd5f447ecc99e9 SHA512 fc7c38e671555751650299c3a8bee44d5c7f26e11b68d5538c507fb7fe9ff2d349bdcd43bce90a448a747f082d523b3849d6bcda5e3ae2e998edcb926d6aa249 -DIST llvm-gentoo-patchset-13.0.0.tar.xz 5012 BLAKE2B 6760c78c086aaf6629143fd920b0a2c68cad9278628fbea8164dfeb59db95984a5b5d6b3505b510c697e8c95bf8d2be782c6b73c01622d52f2da9b07ecff39e0 SHA512 7764d49343b795b6bebae64f646ba27e3e6cc2a20b8a1aee645ce0d8474633c34acfbb73c08546fee415755dd4ea5a98c1d84db5e394cf5f4fc802eb61148ab6 -DIST llvm-gentoo-patchset-13.0.1-rc3.tar.xz 4808 BLAKE2B d8ed3ae424914437413e2e8c029880072e93d79ca79b842ad59451df46594c9b0d73ee5d49d3b65c4c7a40c86b2e0d43501ef106aea7c481f22425a5245a3411 SHA512 10430a720b120a340a681fa435a7f050741c75270607e3f5214bf829313d274c11f019f1ac072857dc5d7f868e6eb013932d1c94446e8cb2e151ac818a081914 -DIST llvm-gentoo-patchset-9999-2.tar.xz 4064 BLAKE2B 4b29234f10ea4ab2609e83c71bcd5f968cd93abd275c13366146ca899bbc576d55a3364432cc7db353739f5da5762529436689b848857e839e230425d551265b SHA512 c0d40a81bd11dc6018d7b3789e4ca7e1cd784992d44fab8d750b8b5281db39ad9092d320d125cae93164d2dddc42177a173b6d5e4158e4b62d7507db877acb9e -DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81 +DIST llvm-gentoo-patchset-13.0.1.tar.xz 6288 BLAKE2B 899222b962486e924e4f8a2b574d285531a3f87af9385ff68c81db92aa224a0cde6d4ee049b5405056bedb4b232b50e1d5840024071a4a215f6311853304c92d SHA512 b2805337f1deca626768a44c5e7ac9ed16e0c31bead1647d44a493a8123c1b8e8f1c8ceee3536bcc6fa87fdd3fcec408229f701adf30eff07e7ef9889b847b01 +DIST llvm-gentoo-patchset-14.0.1-r1.tar.xz 6132 BLAKE2B c99f57a09f214361f2728938ec587e3ef0b473363919058e39fb75c012cc94771b9116b1820f1bd001151eb5f49cc6beaa7572e60e4095811fffb12717a8c5a8 SHA512 af9eca93c9ba91429b0bb07290dce1c9742338dd0635423bc59ebead91a7493a49b66bd36a7ce4cf715fa660678218f64e0ba85824a0869b8e31b81be9f0bb3d +DIST llvm-gentoo-patchset-14.0.3.tar.xz 5492 BLAKE2B 48a46d50a81c5572d1573c6923bc404b198f74ee8587a928e0858553dac37f7fa39cc969d72b938ef3d2f04f6872f9e2e2478821ab90c657ecbbacb3f7d99d7a SHA512 b917b549de6d46cd7aab3e59b888b5e5ffb955435b33d6538be2f31dc30217a24740a673cb6bb661087c245121edb079052b179badaf70b86b985ca69b3652a6 +DIST llvm-gentoo-patchset-14.0.4.tar.xz 4072 BLAKE2B cbd8804e33069ca2709503931545a57cfd33c06f28696d876d499285e9add9487a069495b756bbb94d29a162c39ece651defddd302e3ac523c5484c09fb3d2ea SHA512 db00268d01e7ec99b907321384c02468a53020386ee4fc819fabfc1cd0784323044931dac42437968d5fd37190da1b9f8f847af553a65a0595c33cecfd82c293 +DIST llvm-gentoo-patchset-14.0.5.tar.xz 4072 BLAKE2B c35072f70831d5e3c9f7236f8473b098e6b8da4f27ce6a382ff4d3cd235837b25b9a1bc1e406ce0d3feb05e4d1e1c8bf141ff8f218568d5a5339fd1092f86b62 SHA512 646e0515a6cf1aae86f05db4797d7af6e3c9b8a6070f41cbd36535944029e0e5888128e33d8c44af22b5bb9ccba392b9dfeabc7708e5eab11858edefced6b68d +DIST llvm-gentoo-patchset-14.0.6.tar.xz 4544 BLAKE2B b613582fa048837303168a2d62835688128621236022ca6c232293cb2e4549174ef256e7dcd8303bfef6d5456d0459ddb2cbda4a4d323b82901da4c16f15dcc4 SHA512 fb89a3186c5bffdc6245ed103d79fe6802a86986bd43891b7e128955bd546dffcb5b4083ac9e7966f67ce8dd82322756a11428ab4c62d21f012d614062adab35 +DIST llvm-gentoo-patchset-9999-r3.tar.xz 4076 BLAKE2B 30bdf740606a1718ae45d850803385d425b656fbbe0250f587cad54f55272e3617d5ee0d04f534a58f87408b0a2dea322ebf1bb8cd653a2beba21d0bc5778c62 SHA512 2c7080ffd09d7dcf4c72a97044a5c63ab895250721d60270bc51c2095aef5f9039781892b4c0d14e942611686153f874a1f52a1c854bb8ca093383c08bdc005a +DIST llvm-project-14.0.5.src.tar.xz 105617748 BLAKE2B a68a6eb58302702f560d1204eb97d34b695eb5df417ccefb50117dbd641ba3c3dda9e64c04506e646dd40c1151eb60b12843e206996ef74b35b2841b8dabafda SHA512 db5a7ea1149988c2aab4ed634f14e00bb9a8042089350b811f875e295ced7b5add80a11b91cad80ba0ba9801261502644a720021506483c14dfb1bc24a7f54d5 +DIST llvm-project-14.0.5.src.tar.xz.sig 566 BLAKE2B ecf66df5d0acb382c9d441aee053404254fa4087d57130b04bb496af9cbb71c59e82f0938f44953d7fd777524781d13d1327b6c64065cf45b177bc3ea0e5c3f2 SHA512 a785e38f11863a46de8766ff4495a73173479cdbd95dc539804b0381a7a834a409713dbaf441272a9cc2963a3c7015c95dc6f0dcfa745e8d6047b1ad5feacff7 +DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f15e428f22a536a17e5f4e3eb29a003b8a8ec0abe0fa3e072591161d5f30ef7d8867c1ce34d1b341ad858e93c00263499941a99 SHA512 6fc6eeb60fac698702d1aac495fc0161eb7216a1f8db2020af8fccec5837831f7cc20dc2a169bf4f0b5f520748280b4a86621f3697d622aa58faaa45dbfaad13 +DIST llvm-project-14.0.6.src.tar.xz.sig 566 BLAKE2B cb658ad43d8ab6c43a5773aedadf0569c97b5ee4b1bd58eceb10e1879a30880c741c3d66bedd462c892309b688fb7b2673115a62d1f74d71ee375a578de9547f SHA512 b4a7b368532a7a4a24376cfa7db8f6d3478f6d4446474342fc00b474ecf466330cd0f16783209263c4c72d5fc7ddedfb11b95578842e700cfb7ee0bb34cc95d6 DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1 -DIST llvmorg-13.0.0.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2 -DIST llvmorg-13.0.1-rc3.tar.gz 147302323 BLAKE2B 9ac2f97568062d7dd618295a68d6e14898fcd69e2bb66290b999ceb8c12132371f4e9b59d8ba2b252e5e5cb249045676b24fc50c117b2afae20abab98f426582 SHA512 88a04ad02af2d41ec21c7a62bad21ee0e627b7276a16795875afd062ed29ac7fb4aadec5b5e48785a6502c9fd797a4b67d648a21f193c9f7602112870b10a3d1 +DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f +DIST llvmorg-14.0.1.tar.gz 158074615 BLAKE2B bf80366461580058494eb101646efcd1a8b55a66818a710c2eb8c649bf88c02fe4552cecf4c1c8637a64e7cee8d644bca31aafc804765ed18f2b5e2975dd6c92 SHA512 0a15aa9cfc978a7b03a1659a2affad65ede66d280f5c12bf0beaaf194cd7bdd57ff438b5f40e64c1e1b88f368de99be349e9d30b544d2bbe4a50f0ebed3307f2 +DIST llvmorg-14.0.3.tar.gz 158092596 BLAKE2B ef901df510ec6bc1242595ec330e9c9ee76e696b077d67a8d62b53608c3d18b2f2d7ea3150864e13d9b37a8ce899ebca946ebe72cbc4538700176e20859ddec2 SHA512 511e93fd9b1c414c38fe9e2649679ac0b16cb04f7f7838569d187b04c542a185e364d6db73e96465026e3b2533649eb75ac95507d12514af32b28bdfb66f2646 +DIST llvmorg-14.0.4.tar.gz 158088617 BLAKE2B 7fb894548dce72593a8639b4d0220d2499577f80d38b97600749c91a498c69dfbbe818cee35e4a76370795e55da7037543ea341ad7567a6f548893c67dce9e64 SHA512 e14e6c3a1915a96e9ddc609f16ca3a398ca6f7fd0a691dadaa24490078a661340e845cb2d18f3679de4f47300bb822c33ae69548af6a0370d55737831a28b959 diff --git a/sys-devel/clang/clang-11.1.0.ebuild b/sys-devel/clang/clang-11.1.0.ebuild deleted file mode 100644 index 70f90cdc03e..00000000000 --- a/sys-devel/clang/clang-11.1.0.ebuild +++ /dev/null @@ -1,428 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7..9} ) -inherit cmake llvm llvm.org multilib multilib-minimal \ - prefix python-single-r1 toolchain-funcs - -DESCRIPTION="C language family frontend for LLVM" -HOMEPAGE="https://llvm.org/" - -# Keep in sync with sys-devel/llvm -ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC VE ) -ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430 - NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore - "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}" ) -ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) - -# MSVCSetupApi.h: MIT -# sorttable.js: MIT - -LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT" -SLOT="$(ver_cut 1)/$(ver_cut 1-2)" -KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86 ~amd64-linux ~x64-macos" -IUSE="debug default-compiler-rt default-libcxx default-lld - doc +static-analyzer test xml ${ALL_LLVM_TARGETS[*]}" -REQUIRED_USE="${PYTHON_REQUIRED_USE} - || ( ${ALL_LLVM_TARGETS[*]} )" -RESTRICT="!test? ( test )" - -RDEPEND=" - ~sys-devel/llvm-${PV}:${SLOT%/*}=[debug=,${MULTILIB_USEDEP}] - static-analyzer? ( dev-lang/perl:* ) - xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) - ${PYTHON_DEPS}" -for x in "${ALL_LLVM_TARGETS[@]}"; do - RDEPEND+=" - ${x}? ( ~sys-devel/llvm-${PV}:${SLOT%/*}[${x}] )" -done -unset x - -DEPEND="${RDEPEND}" -BDEPEND=" - >=dev-util/cmake-3.16 - doc? ( dev-python/sphinx ) - xml? ( virtual/pkgconfig ) - ${PYTHON_DEPS}" -PDEPEND=" - sys-devel/clang-common - ~sys-devel/clang-runtime-${PV} - default-compiler-rt? ( =sys-libs/compiler-rt-${PV%_*}* ) - default-libcxx? ( >=sys-libs/libcxx-${PV} ) - default-lld? ( sys-devel/lld )" - -LLVM_COMPONENTS=( clang clang-tools-extra ) -LLVM_MANPAGES=pregenerated -LLVM_TEST_COMPONENTS=( - llvm/lib/Testing/Support - llvm/utils/{lit,llvm-lit,unittest} - llvm/utils/{UpdateTestChecks,update_cc_test_checks.py} -) -LLVM_PATCHSET=11.1.0-1 -llvm.org_set_globals - -# Multilib notes: -# 1. ABI_* flags control ABIs libclang* is built for only. -# 2. clang is always capable of compiling code for all ABIs for enabled -# target. However, you will need appropriate crt* files (installed -# e.g. by sys-devel/gcc and sys-libs/glibc). -# 3. ${CHOST}-clang wrappers are always installed for all ABIs included -# in the current profile (i.e. alike supported by sys-devel/gcc). -# -# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need -# multilib clang* libraries (not runtime, not wrappers). - -pkg_setup() { - LLVM_MAX_SLOT=${SLOT%/*} llvm_pkg_setup - python-single-r1_pkg_setup -} - -src_prepare() { - # create extra parent dir for relative CLANG_RESOURCE_DIR access - mkdir -p x/y || die - BUILD_DIR=${WORKDIR}/x/y/clang - - llvm.org_src_prepare - - mv ../clang-tools-extra tools/extra || die - - # add Gentoo Portage Prefix for Darwin (see prefix-dirs.patch) - eprefixify \ - lib/Frontend/InitHeaderSearch.cpp \ - lib/Driver/ToolChains/Darwin.cpp || die -} - -check_distribution_components() { - if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then - local all_targets=() my_targets=() l - cd "${BUILD_DIR}" || die - - while read -r l; do - if [[ ${l} == install-*-stripped:* ]]; then - l=${l#install-} - l=${l%%-stripped*} - - case ${l} in - # meta-targets - clang-libraries|distribution) - continue - ;; - # headers for clang-tidy static library - clang-tidy-headers) - continue - ;; - # tools - clang|clangd|clang-*) - ;; - # static libraries - clang*|findAllSymbols) - continue - ;; - # conditional to USE=doc - docs-clang-html|docs-clang-tools-html) - use doc || continue - ;; - esac - - all_targets+=( "${l}" ) - fi - done < <(ninja -t targets all) - - while read -r l; do - my_targets+=( "${l}" ) - done < <(get_distribution_components $"\n") - - local add=() remove=() - for l in "${all_targets[@]}"; do - if ! has "${l}" "${my_targets[@]}"; then - add+=( "${l}" ) - fi - done - for l in "${my_targets[@]}"; do - if ! has "${l}" "${all_targets[@]}"; then - remove+=( "${l}" ) - fi - done - - if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then - eqawarn "get_distribution_components() is outdated!" - eqawarn " Add: ${add[*]}" - eqawarn "Remove: ${remove[*]}" - fi - cd - >/dev/null || die - fi -} - -get_distribution_components() { - local sep=${1-;} - - local out=( - # common stuff - clang-cmake-exports - clang-headers - clang-resource-headers - libclang-headers - - # libs - clang-cpp - libclang - ) - - if multilib_is_native_abi; then - out+=( - # common stuff - bash-autocomplete - libclang-python-bindings - - # tools - c-index-test - clang - clang-format - clang-offload-bundler - clang-offload-wrapper - clang-refactor - clang-rename - clang-scan-deps - diagtool - hmaptool - - # extra tools - clang-apply-replacements - clang-change-namespace - clang-doc - clang-include-fixer - clang-move - clang-query - clang-reorder-fields - clang-tidy - clangd - find-all-symbols - modularize - pp-trace - ) - - if llvm_are_manpages_built; then - out+=( - # manpages - docs-clang-man - docs-clang-tools-man - ) - fi - - use doc && out+=( - docs-clang-html - docs-clang-tools-html - ) - - use static-analyzer && out+=( - clang-check - clang-extdef-mapping - scan-build - scan-view - ) - fi - - printf "%s${sep}" "${out[@]}" -} - -multilib_src_configure() { - local llvm_version=$(llvm-config --version) || die - local clang_version=$(ver_cut 1-3 "${llvm_version}") - - local mycmakeargs=( - -DLLVM_CMAKE_PATH="${EPREFIX}/usr/lib/llvm/${SLOT%/*}/$(get_libdir)/cmake/llvm" - -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT%/*}" - -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT%/*}/share/man" - # relative to bindir - -DCLANG_RESOURCE_DIR="../../../../lib/clang/${clang_version}" - - -DBUILD_SHARED_LIBS=OFF - -DCLANG_LINK_CLANG_DYLIB=ON - -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components) - - -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" - -DLLVM_BUILD_TESTS=$(usex test) - - # these are not propagated reliably, so redefine them - -DLLVM_ENABLE_EH=ON - -DLLVM_ENABLE_RTTI=ON - - -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml) - # libgomp support fails to find headers without explicit -I - # furthermore, it provides only syntax checking - -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp - - # override default stdlib and rtlib - -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "") - -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "") - -DCLANG_DEFAULT_LINKER=$(usex default-lld lld "") - - -DCLANG_ENABLE_ARCMT=$(usex static-analyzer) - -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) - - -DPython3_EXECUTABLE="${PYTHON}" - ) - use test && mycmakeargs+=( - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" - -DLLVM_LIT_ARGS="$(get_lit_flags)" - ) - - if multilib_is_native_abi; then - local build_docs=OFF - if llvm_are_manpages_built; then - build_docs=ON - mycmakeargs+=( - -DLLVM_BUILD_DOCS=ON - -DLLVM_ENABLE_SPHINX=ON - -DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" - -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra" - -DSPHINX_WARNINGS_AS_ERRORS=OFF - ) - fi - - mycmakeargs+=( - # normally copied from LLVM_INCLUDE_DOCS but the latter - # is lacking value in stand-alone builds - -DCLANG_INCLUDE_DOCS=${build_docs} - -DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs} - ) - else - mycmakeargs+=( - -DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=OFF - ) - fi - - if [[ -n ${EPREFIX} ]]; then - mycmakeargs+=( - -DGCC_INSTALL_PREFIX="${EPREFIX}/usr" - ) - fi - - if tc-is-cross-compiler; then - [[ -x "/usr/bin/clang-tblgen" ]] \ - || die "/usr/bin/clang-tblgen not found or usable" - mycmakeargs+=( - -DCMAKE_CROSSCOMPILING=ON - -DCLANG_TABLEGEN=/usr/bin/clang-tblgen - ) - fi - - # LLVM can have very high memory consumption while linking, - # exhausting the limit on 32-bit linker executable - use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" - - # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 - use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" - cmake_src_configure - - multilib_is_native_abi && check_distribution_components -} - -multilib_src_compile() { - cmake_build distribution - - # provide a symlink for tests - if [[ ! -L ${WORKDIR}/lib/clang ]]; then - mkdir -p "${WORKDIR}"/lib || die - ln -s "${BUILD_DIR}/$(get_libdir)/clang" "${WORKDIR}"/lib/clang || die - fi -} - -multilib_src_test() { - # respect TMPDIR! - local -x LIT_PRESERVES_TMP=1 - cmake_build check-clang - multilib_is_native_abi && - cmake_build check-clang-tools check-clangd -} - -src_install() { - MULTILIB_WRAPPED_HEADERS=( - /usr/include/clang/Config/config.h - ) - - multilib-minimal_src_install - - # Move runtime headers to /usr/lib/clang, where they belong - mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die - # move (remaining) wrapped headers back - mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT%/*}/include || die - - # Apply CHOST and version suffix to clang tools - # note: we use two version components here (vs 3 in runtime path) - local llvm_version=$(llvm-config --version) || die - local clang_version=$(ver_cut 1 "${llvm_version}") - local clang_full_version=$(ver_cut 1-3 "${llvm_version}") - local clang_tools=( clang clang++ clang-cl clang-cpp ) - local abi i - - # cmake gives us: - # - clang-X - # - clang -> clang-X - # - clang++, clang-cl, clang-cpp -> clang - # we want to have: - # - clang-X - # - clang++-X, clang-cl-X, clang-cpp-X -> clang-X - # - clang, clang++, clang-cl, clang-cpp -> clang*-X - # also in CHOST variant - for i in "${clang_tools[@]:1}"; do - rm "${ED}/usr/lib/llvm/${SLOT%/*}/bin/${i}" || die - dosym "clang-${clang_version}" "/usr/lib/llvm/${SLOT%/*}/bin/${i}-${clang_version}" - dosym "${i}-${clang_version}" "/usr/lib/llvm/${SLOT%/*}/bin/${i}" - done - - # now create target symlinks for all supported ABIs - for abi in $(get_all_abis); do - local abi_chost=$(get_abi_CHOST "${abi}") - for i in "${clang_tools[@]}"; do - dosym "${i}-${clang_version}" \ - "/usr/lib/llvm/${SLOT%/*}/bin/${abi_chost}-${i}-${clang_version}" - dosym "${abi_chost}-${i}-${clang_version}" \ - "/usr/lib/llvm/${SLOT%/*}/bin/${abi_chost}-${i}" - done - done -} - -multilib_src_install() { - DESTDIR=${D} cmake_build install-distribution - - # move headers to /usr/include for wrapping & ABI mismatch checks - # (also drop the version suffix from runtime headers) - rm -rf "${ED}"/usr/include || die - mv "${ED}"/usr/lib/llvm/${SLOT%/*}/include "${ED}"/usr/include || die - mv "${ED}"/usr/lib/llvm/${SLOT%/*}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die -} - -multilib_src_install_all() { - python_fix_shebang "${ED}" - if use static-analyzer; then - python_optimize "${ED}"/usr/lib/llvm/${SLOT%/*}/share/scan-view - fi - - docompress "/usr/lib/llvm/${SLOT%/*}/share/man" - llvm_install_manpages - # match 'html' non-compression - use doc && docompress -x "/usr/share/doc/${PF}/tools-extra" - # +x for some reason; TODO: investigate - use static-analyzer && fperms a-x "/usr/lib/llvm/${SLOT%/*}/share/man/man1/scan-build.1" -} - -pkg_postinst() { - if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then - eselect compiler-shadow update all - fi - - elog "You can find additional utility scripts in:" - elog " ${EROOT}/usr/lib/llvm/${SLOT%/*}/share/clang" - elog "Some of them are vim integration scripts (with instructions inside)." - elog "The run-clang-tidy.py script requires the following additional package:" - elog " dev-python/pyyaml" -} - -pkg_postrm() { - if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then - eselect compiler-shadow clean all - fi -} diff --git a/sys-devel/clang/clang-12.0.1.ebuild b/sys-devel/clang/clang-12.0.1.ebuild index e4b38d29477..fde58c87f65 100644 --- a/sys-devel/clang/clang-12.0.1.ebuild +++ b/sys-devel/clang/clang-12.0.1.ebuild @@ -58,7 +58,7 @@ PDEPEND=" default-lld? ( sys-devel/lld )" LLVM_COMPONENTS=( clang clang-tools-extra ) -LLVM_MANPAGES=pregenerated +LLVM_MANPAGES=1 LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/{lit,llvm-lit,unittest} @@ -130,7 +130,7 @@ check_distribution_components() { all_targets+=( "${l}" ) fi - done < <(ninja -t targets all) + done < <(${NINJA} -t targets all) while read -r l; do my_targets+=( "${l}" ) diff --git a/sys-devel/clang/clang-13.0.0.ebuild b/sys-devel/clang/clang-13.0.1.ebuild index 5aeac025e36..ad43beaccb8 100644 --- a/sys-devel/clang/clang-13.0.0.ebuild +++ b/sys-devel/clang/clang-13.0.1.ebuild @@ -45,7 +45,7 @@ PDEPEND=" default-lld? ( sys-devel/lld )" LLVM_COMPONENTS=( clang clang-tools-extra ) -LLVM_MANPAGES=pregenerated +LLVM_MANPAGES=1 LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/{lit,llvm-lit,unittest} @@ -118,7 +118,7 @@ check_distribution_components() { all_targets+=( "${l}" ) fi - done < <(ninja -t targets all) + done < <(${NINJA} -t targets all) while read -r l; do my_targets+=( "${l}" ) @@ -173,6 +173,7 @@ get_distribution_components() { clang-offload-bundler clang-offload-wrapper clang-refactor + clang-repl clang-rename clang-scan-deps diagtool diff --git a/sys-devel/clang/clang-14.0.0.9999.ebuild b/sys-devel/clang/clang-14.0.1-r1.ebuild index 1de9a1a3a54..56d63fbd72f 100644 --- a/sys-devel/clang/clang-14.0.0.9999.ebuild +++ b/sys-devel/clang/clang-14.0.1-r1.ebuild @@ -15,9 +15,9 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT" SLOT="$(ver_cut 1)" -KEYWORDS="" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x64-macos" IUSE="debug default-compiler-rt default-libcxx default-lld - doc llvm-libunwind +static-analyzer test xml" + doc llvm-libunwind +pie +static-analyzer test xml" REQUIRED_USE="${PYTHON_REQUIRED_USE}" RESTRICT="!test? ( test )" @@ -30,7 +30,10 @@ RDEPEND=" DEPEND="${RDEPEND}" BDEPEND=" >=dev-util/cmake-3.16 - doc? ( dev-python/sphinx ) + doc? ( $(python_gen_cond_dep ' + dev-python/recommonmark[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') ) xml? ( virtual/pkgconfig ) ${PYTHON_DEPS}" PDEPEND=" @@ -44,14 +47,17 @@ PDEPEND=" default-libcxx? ( >=sys-libs/libcxx-${PV} ) default-lld? ( sys-devel/lld )" -LLVM_COMPONENTS=( clang clang-tools-extra ) -LLVM_MANPAGES=build +LLVM_COMPONENTS=( + clang clang-tools-extra cmake + llvm/lib/Transforms/Hello +) +LLVM_MANPAGES=1 LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/{lit,llvm-lit,unittest} llvm/utils/{UpdateTestChecks,update_cc_test_checks.py} ) -LLVM_PATCHSET=9999-2 +LLVM_PATCHSET=14.0.1-r1 LLVM_USE_TARGETS=llvm llvm.org_set_globals @@ -80,7 +86,7 @@ src_prepare() { # add Gentoo Portage Prefix for Darwin (see prefix-dirs.patch) eprefixify \ - lib/Frontend/InitHeaderSearch.cpp \ + lib/Lex/InitHeaderSearch.cpp \ lib/Driver/ToolChains/Darwin.cpp || die } @@ -99,10 +105,6 @@ check_distribution_components() { clang-libraries|distribution) continue ;; - # headers for clang-tidy static library - clang-tidy-headers) - continue - ;; # tools clang|clangd|clang-*) ;; @@ -118,7 +120,7 @@ check_distribution_components() { all_targets+=( "${l}" ) fi - done < <(ninja -t targets all) + done < <(${NINJA} -t targets all) while read -r l; do my_targets+=( "${l}" ) @@ -188,6 +190,7 @@ get_distribution_components() { clang-query clang-reorder-fields clang-tidy + clang-tidy-headers clangd find-all-symbols modularize @@ -253,6 +256,7 @@ multilib_src_configure() { -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "") -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "") -DCLANG_DEFAULT_LINKER=$(usex default-lld lld "") + -DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie) -DCLANG_DEFAULT_UNWINDLIB=$(usex default-compiler-rt libunwind "") -DCLANG_ENABLE_ARCMT=$(usex static-analyzer) @@ -343,6 +347,7 @@ src_install() { # Move runtime headers to /usr/lib/clang, where they belong mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die # move (remaining) wrapped headers back + mv "${T}"/clang-tidy "${ED}"/usr/include/ || die mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die # Apply CHOST and version suffix to clang tools @@ -388,6 +393,11 @@ multilib_src_install() { rm -rf "${ED}"/usr/include || die mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die mv "${ED}"/usr/lib/llvm/${SLOT}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die + if multilib_is_native_abi; then + # don't wrap clang-tidy headers, the list is too long + # (they're fine for non-native ABI but enabling the targets is problematic) + mv "${ED}"/usr/include/clang-tidy "${T}/" || die + fi } multilib_src_install_all() { diff --git a/sys-devel/clang/clang-14.0.3.ebuild b/sys-devel/clang/clang-14.0.3.ebuild new file mode 100644 index 00000000000..ed84f3755fa --- /dev/null +++ b/sys-devel/clang/clang-14.0.3.ebuild @@ -0,0 +1,440 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +inherit cmake llvm llvm.org multilib multilib-minimal \ + prefix python-single-r1 toolchain-funcs + +DESCRIPTION="C language family frontend for LLVM" +HOMEPAGE="https://llvm.org/" + +# MSVCSetupApi.h: MIT +# sorttable.js: MIT + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT" +SLOT="$(ver_cut 1)" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x64-macos" +IUSE=" + debug default-compiler-rt default-libcxx default-lld doc + llvm-libunwind +pie +static-analyzer test xml +" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +DEPEND=" + ~sys-devel/llvm-${PV}:${SLOT}=[debug=,${MULTILIB_USEDEP}] + static-analyzer? ( dev-lang/perl:* ) + xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) +" + +RDEPEND=" + ${PYTHON_DEPS} + ${DEPEND} +" +BDEPEND=" + ${PYTHON_DEPS} + >=dev-util/cmake-3.16 + doc? ( $(python_gen_cond_dep ' + dev-python/recommonmark[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') ) + xml? ( virtual/pkgconfig ) +" +PDEPEND=" + sys-devel/clang-common + ~sys-devel/clang-runtime-${PV} + default-compiler-rt? ( + =sys-libs/compiler-rt-${PV%_*}* + llvm-libunwind? ( sys-libs/llvm-libunwind ) + !llvm-libunwind? ( sys-libs/libunwind ) + ) + default-libcxx? ( >=sys-libs/libcxx-${PV} ) + default-lld? ( sys-devel/lld ) +" + +LLVM_COMPONENTS=( + clang clang-tools-extra cmake + llvm/lib/Transforms/Hello +) +LLVM_MANPAGES=1 +LLVM_TEST_COMPONENTS=( + llvm/lib/Testing/Support + llvm/utils/{lit,llvm-lit,unittest} + llvm/utils/{UpdateTestChecks,update_cc_test_checks.py} +) +LLVM_PATCHSET=${PV} +LLVM_USE_TARGETS=llvm +llvm.org_set_globals + +# Multilib notes: +# 1. ABI_* flags control ABIs libclang* is built for only. +# 2. clang is always capable of compiling code for all ABIs for enabled +# target. However, you will need appropriate crt* files (installed +# e.g. by sys-devel/gcc and sys-libs/glibc). +# 3. ${CHOST}-clang wrappers are always installed for all ABIs included +# in the current profile (i.e. alike supported by sys-devel/gcc). +# +# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need +# multilib clang* libraries (not runtime, not wrappers). + +pkg_setup() { + LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup + python-single-r1_pkg_setup +} + +src_prepare() { + # create extra parent dir for relative CLANG_RESOURCE_DIR access + mkdir -p x/y || die + BUILD_DIR=${WORKDIR}/x/y/clang + + llvm.org_src_prepare + + # add Gentoo Portage Prefix for Darwin (see prefix-dirs.patch) + eprefixify \ + lib/Lex/InitHeaderSearch.cpp \ + lib/Driver/ToolChains/Darwin.cpp || die +} + +check_distribution_components() { + if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then + local all_targets=() my_targets=() l + cd "${BUILD_DIR}" || die + + while read -r l; do + if [[ ${l} == install-*-stripped:* ]]; then + l=${l#install-} + l=${l%%-stripped*} + + case ${l} in + # meta-targets + clang-libraries|distribution) + continue + ;; + # tools + clang|clangd|clang-*) + ;; + # static libraries + clang*|findAllSymbols) + continue + ;; + # conditional to USE=doc + docs-clang-html|docs-clang-tools-html) + use doc || continue + ;; + esac + + all_targets+=( "${l}" ) + fi + done < <(${NINJA} -t targets all) + + while read -r l; do + my_targets+=( "${l}" ) + done < <(get_distribution_components $"\n") + + local add=() remove=() + for l in "${all_targets[@]}"; do + if ! has "${l}" "${my_targets[@]}"; then + add+=( "${l}" ) + fi + done + for l in "${my_targets[@]}"; do + if ! has "${l}" "${all_targets[@]}"; then + remove+=( "${l}" ) + fi + done + + if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then + eqawarn "get_distribution_components() is outdated!" + eqawarn " Add: ${add[*]}" + eqawarn "Remove: ${remove[*]}" + fi + cd - >/dev/null || die + fi +} + +get_distribution_components() { + local sep=${1-;} + + local out=( + # common stuff + clang-cmake-exports + clang-headers + clang-resource-headers + libclang-headers + + # libs + clang-cpp + libclang + ) + + if multilib_is_native_abi; then + out+=( + # common stuff + bash-autocomplete + libclang-python-bindings + + # tools + c-index-test + clang + clang-format + clang-offload-bundler + clang-offload-wrapper + clang-refactor + clang-repl + clang-rename + clang-scan-deps + diagtool + hmaptool + + # extra tools + clang-apply-replacements + clang-change-namespace + clang-doc + clang-include-fixer + clang-move + clang-query + clang-reorder-fields + clang-tidy + clang-tidy-headers + clangd + find-all-symbols + modularize + pp-trace + ) + + if llvm_are_manpages_built; then + out+=( + # manpages + docs-clang-man + docs-clang-tools-man + ) + fi + + use doc && out+=( + docs-clang-html + docs-clang-tools-html + ) + + use static-analyzer && out+=( + clang-check + clang-extdef-mapping + scan-build + scan-build-py + scan-view + ) + fi + + printf "%s${sep}" "${out[@]}" +} + +multilib_src_configure() { + local llvm_version=$(llvm-config --version) || die + local clang_version=$(ver_cut 1-3 "${llvm_version}") + + local mycmakeargs=( + -DLLVM_CMAKE_PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)/cmake/llvm" + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}" + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" + # relative to bindir + -DCLANG_RESOURCE_DIR="../../../../lib/clang/${clang_version}" + + -DBUILD_SHARED_LIBS=OFF + -DCLANG_LINK_CLANG_DYLIB=ON + -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components) + + -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" + -DLLVM_BUILD_TESTS=$(usex test) + + # these are not propagated reliably, so redefine them + -DLLVM_ENABLE_EH=ON + -DLLVM_ENABLE_RTTI=ON + + -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml) + # libgomp support fails to find headers without explicit -I + # furthermore, it provides only syntax checking + -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp + + # disable using CUDA to autodetect GPU, just build for all + -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON + + # override default stdlib and rtlib + -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "") + -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "") + -DCLANG_DEFAULT_LINKER=$(usex default-lld lld "") + -DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie) + -DCLANG_DEFAULT_UNWINDLIB=$(usex default-compiler-rt libunwind "") + + -DCLANG_ENABLE_ARCMT=$(usex static-analyzer) + -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) + + -DPython3_EXECUTABLE="${PYTHON}" + ) + use test && mycmakeargs+=( + -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" + -DLLVM_EXTERNAL_LIT="${BUILD_DIR}/bin/llvm-lit" + -DLLVM_LIT_ARGS="$(get_lit_flags)" + ) + + if multilib_is_native_abi; then + local build_docs=OFF + if llvm_are_manpages_built; then + build_docs=ON + mycmakeargs+=( + -DLLVM_BUILD_DOCS=ON + -DLLVM_ENABLE_SPHINX=ON + -DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" + -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra" + -DSPHINX_WARNINGS_AS_ERRORS=OFF + ) + fi + mycmakeargs+=( + -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra + -DCLANG_INCLUDE_DOCS=${build_docs} + -DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs} + ) + else + mycmakeargs+=( + -DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=OFF + ) + fi + + if [[ -n ${EPREFIX} ]]; then + mycmakeargs+=( + -DGCC_INSTALL_PREFIX="${EPREFIX}/usr" + ) + fi + + if tc-is-cross-compiler; then + [[ -x "/usr/bin/clang-tblgen" ]] \ + || die "/usr/bin/clang-tblgen not found or usable" + mycmakeargs+=( + -DCMAKE_CROSSCOMPILING=ON + -DCLANG_TABLEGEN=/usr/bin/clang-tblgen + ) + fi + + # LLVM can have very high memory consumption while linking, + # exhausting the limit on 32-bit linker executable + use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" + + # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + cmake_src_configure + + multilib_is_native_abi && check_distribution_components +} + +multilib_src_compile() { + cmake_build distribution + + # provide a symlink for tests + if [[ ! -L ${WORKDIR}/lib/clang ]]; then + mkdir -p "${WORKDIR}"/lib || die + ln -s "${BUILD_DIR}/$(get_libdir)/clang" "${WORKDIR}"/lib/clang || die + fi +} + +multilib_src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + cmake_build check-clang + multilib_is_native_abi && + cmake_build check-clang-tools check-clangd +} + +src_install() { + MULTILIB_WRAPPED_HEADERS=( + /usr/include/clang/Config/config.h + ) + + multilib-minimal_src_install + + # Move runtime headers to /usr/lib/clang, where they belong + mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die + # move (remaining) wrapped headers back + mv "${T}"/clang-tidy "${ED}"/usr/include/ || die + mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die + + # Apply CHOST and version suffix to clang tools + # note: we use two version components here (vs 3 in runtime path) + local llvm_version=$(llvm-config --version) || die + local clang_version=$(ver_cut 1 "${llvm_version}") + local clang_full_version=$(ver_cut 1-3 "${llvm_version}") + local clang_tools=( clang clang++ clang-cl clang-cpp ) + local abi i + + # cmake gives us: + # - clang-X + # - clang -> clang-X + # - clang++, clang-cl, clang-cpp -> clang + # we want to have: + # - clang-X + # - clang++-X, clang-cl-X, clang-cpp-X -> clang-X + # - clang, clang++, clang-cl, clang-cpp -> clang*-X + # also in CHOST variant + for i in "${clang_tools[@]:1}"; do + rm "${ED}/usr/lib/llvm/${SLOT}/bin/${i}" || die + dosym "clang-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}-${clang_version}" + dosym "${i}-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}" + done + + # now create target symlinks for all supported ABIs + for abi in $(get_all_abis); do + local abi_chost=$(get_abi_CHOST "${abi}") + for i in "${clang_tools[@]}"; do + dosym "${i}-${clang_version}" \ + "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}-${clang_version}" + dosym "${abi_chost}-${i}-${clang_version}" \ + "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}" + done + done +} + +multilib_src_install() { + DESTDIR=${D} cmake_build install-distribution + + # move headers to /usr/include for wrapping & ABI mismatch checks + # (also drop the version suffix from runtime headers) + rm -rf "${ED}"/usr/include || die + mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die + mv "${ED}"/usr/lib/llvm/${SLOT}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die + if multilib_is_native_abi; then + # don't wrap clang-tidy headers, the list is too long + # (they're fine for non-native ABI but enabling the targets is problematic) + mv "${ED}"/usr/include/clang-tidy "${T}/" || die + fi +} + +multilib_src_install_all() { + python_fix_shebang "${ED}" + if use static-analyzer; then + python_optimize "${ED}"/usr/lib/llvm/${SLOT}/share/scan-view + fi + + docompress "/usr/lib/llvm/${SLOT}/share/man" + llvm_install_manpages + # match 'html' non-compression + use doc && docompress -x "/usr/share/doc/${PF}/tools-extra" + # +x for some reason; TODO: investigate + use static-analyzer && fperms a-x "/usr/lib/llvm/${SLOT}/share/man/man1/scan-build.1" +} + +pkg_postinst() { + if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then + eselect compiler-shadow update all + fi + + elog "You can find additional utility scripts in:" + elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/clang" + elog "Some of them are vim integration scripts (with instructions inside)." + elog "The run-clang-tidy.py script requires the following additional package:" + elog " dev-python/pyyaml" +} + +pkg_postrm() { + if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then + eselect compiler-shadow clean all + fi +} diff --git a/sys-devel/clang/clang-13.0.1.9999.ebuild b/sys-devel/clang/clang-14.0.4.ebuild index c9cdf6cd226..d48c4267822 100644 --- a/sys-devel/clang/clang-13.0.1.9999.ebuild +++ b/sys-devel/clang/clang-14.0.4.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 PYTHON_COMPAT=( python3_{8..10} ) inherit cmake llvm llvm.org multilib multilib-minimal \ @@ -15,24 +15,33 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT" SLOT="$(ver_cut 1)" -KEYWORDS="" -IUSE="debug default-compiler-rt default-libcxx default-lld - doc llvm-libunwind +static-analyzer test xml" +KEYWORDS="amd64 ~arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~x64-macos" +IUSE=" + debug default-compiler-rt default-libcxx default-lld doc + llvm-libunwind +pie +static-analyzer test xml +" REQUIRED_USE="${PYTHON_REQUIRED_USE}" RESTRICT="!test? ( test )" -RDEPEND=" +DEPEND=" ~sys-devel/llvm-${PV}:${SLOT}=[debug=,${MULTILIB_USEDEP}] static-analyzer? ( dev-lang/perl:* ) xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) - ${PYTHON_DEPS}" +" -DEPEND="${RDEPEND}" +RDEPEND=" + ${PYTHON_DEPS} + ${DEPEND} +" BDEPEND=" + ${PYTHON_DEPS} >=dev-util/cmake-3.16 - doc? ( dev-python/sphinx ) + doc? ( $(python_gen_cond_dep ' + dev-python/recommonmark[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') ) xml? ( virtual/pkgconfig ) - ${PYTHON_DEPS}" +" PDEPEND=" sys-devel/clang-common ~sys-devel/clang-runtime-${PV} @@ -42,16 +51,20 @@ PDEPEND=" !llvm-libunwind? ( sys-libs/libunwind ) ) default-libcxx? ( >=sys-libs/libcxx-${PV} ) - default-lld? ( sys-devel/lld )" + default-lld? ( sys-devel/lld ) +" -LLVM_COMPONENTS=( clang clang-tools-extra ) -LLVM_MANPAGES=build +LLVM_COMPONENTS=( + clang clang-tools-extra cmake + llvm/lib/Transforms/Hello +) +LLVM_MANPAGES=1 LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/{lit,llvm-lit,unittest} llvm/utils/{UpdateTestChecks,update_cc_test_checks.py} ) -LLVM_PATCHSET=9999-2 +LLVM_PATCHSET=${PV} LLVM_USE_TARGETS=llvm llvm.org_set_globals @@ -80,7 +93,7 @@ src_prepare() { # add Gentoo Portage Prefix for Darwin (see prefix-dirs.patch) eprefixify \ - lib/Frontend/InitHeaderSearch.cpp \ + lib/Lex/InitHeaderSearch.cpp \ lib/Driver/ToolChains/Darwin.cpp || die } @@ -99,10 +112,6 @@ check_distribution_components() { clang-libraries|distribution) continue ;; - # headers for clang-tidy static library - clang-tidy-headers) - continue - ;; # tools clang|clangd|clang-*) ;; @@ -118,7 +127,7 @@ check_distribution_components() { all_targets+=( "${l}" ) fi - done < <(ninja -t targets all) + done < <(${NINJA} -t targets all) while read -r l; do my_targets+=( "${l}" ) @@ -188,6 +197,7 @@ get_distribution_components() { clang-query clang-reorder-fields clang-tidy + clang-tidy-headers clangd find-all-symbols modularize @@ -253,6 +263,7 @@ multilib_src_configure() { -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "") -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "") -DCLANG_DEFAULT_LINKER=$(usex default-lld lld "") + -DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie) -DCLANG_DEFAULT_UNWINDLIB=$(usex default-compiler-rt libunwind "") -DCLANG_ENABLE_ARCMT=$(usex static-analyzer) @@ -262,6 +273,7 @@ multilib_src_configure() { ) use test && mycmakeargs+=( -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" + -DLLVM_EXTERNAL_LIT="${BUILD_DIR}/bin/llvm-lit" -DLLVM_LIT_ARGS="$(get_lit_flags)" ) @@ -342,6 +354,7 @@ src_install() { # Move runtime headers to /usr/lib/clang, where they belong mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die # move (remaining) wrapped headers back + mv "${T}"/clang-tidy "${ED}"/usr/include/ || die mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die # Apply CHOST and version suffix to clang tools @@ -387,6 +400,11 @@ multilib_src_install() { rm -rf "${ED}"/usr/include || die mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die mv "${ED}"/usr/lib/llvm/${SLOT}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die + if multilib_is_native_abi; then + # don't wrap clang-tidy headers, the list is too long + # (they're fine for non-native ABI but enabling the targets is problematic) + mv "${ED}"/usr/include/clang-tidy "${T}/" || die + fi } multilib_src_install_all() { diff --git a/sys-devel/clang/clang-14.0.5.ebuild b/sys-devel/clang/clang-14.0.5.ebuild new file mode 100644 index 00000000000..ed84f3755fa --- /dev/null +++ b/sys-devel/clang/clang-14.0.5.ebuild @@ -0,0 +1,440 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +inherit cmake llvm llvm.org multilib multilib-minimal \ + prefix python-single-r1 toolchain-funcs + +DESCRIPTION="C language family frontend for LLVM" +HOMEPAGE="https://llvm.org/" + +# MSVCSetupApi.h: MIT +# sorttable.js: MIT + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT" +SLOT="$(ver_cut 1)" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x64-macos" +IUSE=" + debug default-compiler-rt default-libcxx default-lld doc + llvm-libunwind +pie +static-analyzer test xml +" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +DEPEND=" + ~sys-devel/llvm-${PV}:${SLOT}=[debug=,${MULTILIB_USEDEP}] + static-analyzer? ( dev-lang/perl:* ) + xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) +" + +RDEPEND=" + ${PYTHON_DEPS} + ${DEPEND} +" +BDEPEND=" + ${PYTHON_DEPS} + >=dev-util/cmake-3.16 + doc? ( $(python_gen_cond_dep ' + dev-python/recommonmark[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') ) + xml? ( virtual/pkgconfig ) +" +PDEPEND=" + sys-devel/clang-common + ~sys-devel/clang-runtime-${PV} + default-compiler-rt? ( + =sys-libs/compiler-rt-${PV%_*}* + llvm-libunwind? ( sys-libs/llvm-libunwind ) + !llvm-libunwind? ( sys-libs/libunwind ) + ) + default-libcxx? ( >=sys-libs/libcxx-${PV} ) + default-lld? ( sys-devel/lld ) +" + +LLVM_COMPONENTS=( + clang clang-tools-extra cmake + llvm/lib/Transforms/Hello +) +LLVM_MANPAGES=1 +LLVM_TEST_COMPONENTS=( + llvm/lib/Testing/Support + llvm/utils/{lit,llvm-lit,unittest} + llvm/utils/{UpdateTestChecks,update_cc_test_checks.py} +) +LLVM_PATCHSET=${PV} +LLVM_USE_TARGETS=llvm +llvm.org_set_globals + +# Multilib notes: +# 1. ABI_* flags control ABIs libclang* is built for only. +# 2. clang is always capable of compiling code for all ABIs for enabled +# target. However, you will need appropriate crt* files (installed +# e.g. by sys-devel/gcc and sys-libs/glibc). +# 3. ${CHOST}-clang wrappers are always installed for all ABIs included +# in the current profile (i.e. alike supported by sys-devel/gcc). +# +# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need +# multilib clang* libraries (not runtime, not wrappers). + +pkg_setup() { + LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup + python-single-r1_pkg_setup +} + +src_prepare() { + # create extra parent dir for relative CLANG_RESOURCE_DIR access + mkdir -p x/y || die + BUILD_DIR=${WORKDIR}/x/y/clang + + llvm.org_src_prepare + + # add Gentoo Portage Prefix for Darwin (see prefix-dirs.patch) + eprefixify \ + lib/Lex/InitHeaderSearch.cpp \ + lib/Driver/ToolChains/Darwin.cpp || die +} + +check_distribution_components() { + if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then + local all_targets=() my_targets=() l + cd "${BUILD_DIR}" || die + + while read -r l; do + if [[ ${l} == install-*-stripped:* ]]; then + l=${l#install-} + l=${l%%-stripped*} + + case ${l} in + # meta-targets + clang-libraries|distribution) + continue + ;; + # tools + clang|clangd|clang-*) + ;; + # static libraries + clang*|findAllSymbols) + continue + ;; + # conditional to USE=doc + docs-clang-html|docs-clang-tools-html) + use doc || continue + ;; + esac + + all_targets+=( "${l}" ) + fi + done < <(${NINJA} -t targets all) + + while read -r l; do + my_targets+=( "${l}" ) + done < <(get_distribution_components $"\n") + + local add=() remove=() + for l in "${all_targets[@]}"; do + if ! has "${l}" "${my_targets[@]}"; then + add+=( "${l}" ) + fi + done + for l in "${my_targets[@]}"; do + if ! has "${l}" "${all_targets[@]}"; then + remove+=( "${l}" ) + fi + done + + if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then + eqawarn "get_distribution_components() is outdated!" + eqawarn " Add: ${add[*]}" + eqawarn "Remove: ${remove[*]}" + fi + cd - >/dev/null || die + fi +} + +get_distribution_components() { + local sep=${1-;} + + local out=( + # common stuff + clang-cmake-exports + clang-headers + clang-resource-headers + libclang-headers + + # libs + clang-cpp + libclang + ) + + if multilib_is_native_abi; then + out+=( + # common stuff + bash-autocomplete + libclang-python-bindings + + # tools + c-index-test + clang + clang-format + clang-offload-bundler + clang-offload-wrapper + clang-refactor + clang-repl + clang-rename + clang-scan-deps + diagtool + hmaptool + + # extra tools + clang-apply-replacements + clang-change-namespace + clang-doc + clang-include-fixer + clang-move + clang-query + clang-reorder-fields + clang-tidy + clang-tidy-headers + clangd + find-all-symbols + modularize + pp-trace + ) + + if llvm_are_manpages_built; then + out+=( + # manpages + docs-clang-man + docs-clang-tools-man + ) + fi + + use doc && out+=( + docs-clang-html + docs-clang-tools-html + ) + + use static-analyzer && out+=( + clang-check + clang-extdef-mapping + scan-build + scan-build-py + scan-view + ) + fi + + printf "%s${sep}" "${out[@]}" +} + +multilib_src_configure() { + local llvm_version=$(llvm-config --version) || die + local clang_version=$(ver_cut 1-3 "${llvm_version}") + + local mycmakeargs=( + -DLLVM_CMAKE_PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)/cmake/llvm" + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}" + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" + # relative to bindir + -DCLANG_RESOURCE_DIR="../../../../lib/clang/${clang_version}" + + -DBUILD_SHARED_LIBS=OFF + -DCLANG_LINK_CLANG_DYLIB=ON + -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components) + + -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" + -DLLVM_BUILD_TESTS=$(usex test) + + # these are not propagated reliably, so redefine them + -DLLVM_ENABLE_EH=ON + -DLLVM_ENABLE_RTTI=ON + + -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml) + # libgomp support fails to find headers without explicit -I + # furthermore, it provides only syntax checking + -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp + + # disable using CUDA to autodetect GPU, just build for all + -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON + + # override default stdlib and rtlib + -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "") + -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "") + -DCLANG_DEFAULT_LINKER=$(usex default-lld lld "") + -DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie) + -DCLANG_DEFAULT_UNWINDLIB=$(usex default-compiler-rt libunwind "") + + -DCLANG_ENABLE_ARCMT=$(usex static-analyzer) + -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) + + -DPython3_EXECUTABLE="${PYTHON}" + ) + use test && mycmakeargs+=( + -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" + -DLLVM_EXTERNAL_LIT="${BUILD_DIR}/bin/llvm-lit" + -DLLVM_LIT_ARGS="$(get_lit_flags)" + ) + + if multilib_is_native_abi; then + local build_docs=OFF + if llvm_are_manpages_built; then + build_docs=ON + mycmakeargs+=( + -DLLVM_BUILD_DOCS=ON + -DLLVM_ENABLE_SPHINX=ON + -DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" + -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra" + -DSPHINX_WARNINGS_AS_ERRORS=OFF + ) + fi + mycmakeargs+=( + -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra + -DCLANG_INCLUDE_DOCS=${build_docs} + -DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs} + ) + else + mycmakeargs+=( + -DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=OFF + ) + fi + + if [[ -n ${EPREFIX} ]]; then + mycmakeargs+=( + -DGCC_INSTALL_PREFIX="${EPREFIX}/usr" + ) + fi + + if tc-is-cross-compiler; then + [[ -x "/usr/bin/clang-tblgen" ]] \ + || die "/usr/bin/clang-tblgen not found or usable" + mycmakeargs+=( + -DCMAKE_CROSSCOMPILING=ON + -DCLANG_TABLEGEN=/usr/bin/clang-tblgen + ) + fi + + # LLVM can have very high memory consumption while linking, + # exhausting the limit on 32-bit linker executable + use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" + + # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + cmake_src_configure + + multilib_is_native_abi && check_distribution_components +} + +multilib_src_compile() { + cmake_build distribution + + # provide a symlink for tests + if [[ ! -L ${WORKDIR}/lib/clang ]]; then + mkdir -p "${WORKDIR}"/lib || die + ln -s "${BUILD_DIR}/$(get_libdir)/clang" "${WORKDIR}"/lib/clang || die + fi +} + +multilib_src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + cmake_build check-clang + multilib_is_native_abi && + cmake_build check-clang-tools check-clangd +} + +src_install() { + MULTILIB_WRAPPED_HEADERS=( + /usr/include/clang/Config/config.h + ) + + multilib-minimal_src_install + + # Move runtime headers to /usr/lib/clang, where they belong + mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die + # move (remaining) wrapped headers back + mv "${T}"/clang-tidy "${ED}"/usr/include/ || die + mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die + + # Apply CHOST and version suffix to clang tools + # note: we use two version components here (vs 3 in runtime path) + local llvm_version=$(llvm-config --version) || die + local clang_version=$(ver_cut 1 "${llvm_version}") + local clang_full_version=$(ver_cut 1-3 "${llvm_version}") + local clang_tools=( clang clang++ clang-cl clang-cpp ) + local abi i + + # cmake gives us: + # - clang-X + # - clang -> clang-X + # - clang++, clang-cl, clang-cpp -> clang + # we want to have: + # - clang-X + # - clang++-X, clang-cl-X, clang-cpp-X -> clang-X + # - clang, clang++, clang-cl, clang-cpp -> clang*-X + # also in CHOST variant + for i in "${clang_tools[@]:1}"; do + rm "${ED}/usr/lib/llvm/${SLOT}/bin/${i}" || die + dosym "clang-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}-${clang_version}" + dosym "${i}-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}" + done + + # now create target symlinks for all supported ABIs + for abi in $(get_all_abis); do + local abi_chost=$(get_abi_CHOST "${abi}") + for i in "${clang_tools[@]}"; do + dosym "${i}-${clang_version}" \ + "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}-${clang_version}" + dosym "${abi_chost}-${i}-${clang_version}" \ + "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}" + done + done +} + +multilib_src_install() { + DESTDIR=${D} cmake_build install-distribution + + # move headers to /usr/include for wrapping & ABI mismatch checks + # (also drop the version suffix from runtime headers) + rm -rf "${ED}"/usr/include || die + mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die + mv "${ED}"/usr/lib/llvm/${SLOT}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die + if multilib_is_native_abi; then + # don't wrap clang-tidy headers, the list is too long + # (they're fine for non-native ABI but enabling the targets is problematic) + mv "${ED}"/usr/include/clang-tidy "${T}/" || die + fi +} + +multilib_src_install_all() { + python_fix_shebang "${ED}" + if use static-analyzer; then + python_optimize "${ED}"/usr/lib/llvm/${SLOT}/share/scan-view + fi + + docompress "/usr/lib/llvm/${SLOT}/share/man" + llvm_install_manpages + # match 'html' non-compression + use doc && docompress -x "/usr/share/doc/${PF}/tools-extra" + # +x for some reason; TODO: investigate + use static-analyzer && fperms a-x "/usr/lib/llvm/${SLOT}/share/man/man1/scan-build.1" +} + +pkg_postinst() { + if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then + eselect compiler-shadow update all + fi + + elog "You can find additional utility scripts in:" + elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/clang" + elog "Some of them are vim integration scripts (with instructions inside)." + elog "The run-clang-tidy.py script requires the following additional package:" + elog " dev-python/pyyaml" +} + +pkg_postrm() { + if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then + eselect compiler-shadow clean all + fi +} diff --git a/sys-devel/clang/clang-14.0.6.ebuild b/sys-devel/clang/clang-14.0.6.ebuild new file mode 100644 index 00000000000..ed84f3755fa --- /dev/null +++ b/sys-devel/clang/clang-14.0.6.ebuild @@ -0,0 +1,440 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +inherit cmake llvm llvm.org multilib multilib-minimal \ + prefix python-single-r1 toolchain-funcs + +DESCRIPTION="C language family frontend for LLVM" +HOMEPAGE="https://llvm.org/" + +# MSVCSetupApi.h: MIT +# sorttable.js: MIT + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT" +SLOT="$(ver_cut 1)" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x64-macos" +IUSE=" + debug default-compiler-rt default-libcxx default-lld doc + llvm-libunwind +pie +static-analyzer test xml +" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +DEPEND=" + ~sys-devel/llvm-${PV}:${SLOT}=[debug=,${MULTILIB_USEDEP}] + static-analyzer? ( dev-lang/perl:* ) + xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) +" + +RDEPEND=" + ${PYTHON_DEPS} + ${DEPEND} +" +BDEPEND=" + ${PYTHON_DEPS} + >=dev-util/cmake-3.16 + doc? ( $(python_gen_cond_dep ' + dev-python/recommonmark[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') ) + xml? ( virtual/pkgconfig ) +" +PDEPEND=" + sys-devel/clang-common + ~sys-devel/clang-runtime-${PV} + default-compiler-rt? ( + =sys-libs/compiler-rt-${PV%_*}* + llvm-libunwind? ( sys-libs/llvm-libunwind ) + !llvm-libunwind? ( sys-libs/libunwind ) + ) + default-libcxx? ( >=sys-libs/libcxx-${PV} ) + default-lld? ( sys-devel/lld ) +" + +LLVM_COMPONENTS=( + clang clang-tools-extra cmake + llvm/lib/Transforms/Hello +) +LLVM_MANPAGES=1 +LLVM_TEST_COMPONENTS=( + llvm/lib/Testing/Support + llvm/utils/{lit,llvm-lit,unittest} + llvm/utils/{UpdateTestChecks,update_cc_test_checks.py} +) +LLVM_PATCHSET=${PV} +LLVM_USE_TARGETS=llvm +llvm.org_set_globals + +# Multilib notes: +# 1. ABI_* flags control ABIs libclang* is built for only. +# 2. clang is always capable of compiling code for all ABIs for enabled +# target. However, you will need appropriate crt* files (installed +# e.g. by sys-devel/gcc and sys-libs/glibc). +# 3. ${CHOST}-clang wrappers are always installed for all ABIs included +# in the current profile (i.e. alike supported by sys-devel/gcc). +# +# Therefore: use sys-devel/clang[${MULTILIB_USEDEP}] only if you need +# multilib clang* libraries (not runtime, not wrappers). + +pkg_setup() { + LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup + python-single-r1_pkg_setup +} + +src_prepare() { + # create extra parent dir for relative CLANG_RESOURCE_DIR access + mkdir -p x/y || die + BUILD_DIR=${WORKDIR}/x/y/clang + + llvm.org_src_prepare + + # add Gentoo Portage Prefix for Darwin (see prefix-dirs.patch) + eprefixify \ + lib/Lex/InitHeaderSearch.cpp \ + lib/Driver/ToolChains/Darwin.cpp || die +} + +check_distribution_components() { + if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then + local all_targets=() my_targets=() l + cd "${BUILD_DIR}" || die + + while read -r l; do + if [[ ${l} == install-*-stripped:* ]]; then + l=${l#install-} + l=${l%%-stripped*} + + case ${l} in + # meta-targets + clang-libraries|distribution) + continue + ;; + # tools + clang|clangd|clang-*) + ;; + # static libraries + clang*|findAllSymbols) + continue + ;; + # conditional to USE=doc + docs-clang-html|docs-clang-tools-html) + use doc || continue + ;; + esac + + all_targets+=( "${l}" ) + fi + done < <(${NINJA} -t targets all) + + while read -r l; do + my_targets+=( "${l}" ) + done < <(get_distribution_components $"\n") + + local add=() remove=() + for l in "${all_targets[@]}"; do + if ! has "${l}" "${my_targets[@]}"; then + add+=( "${l}" ) + fi + done + for l in "${my_targets[@]}"; do + if ! has "${l}" "${all_targets[@]}"; then + remove+=( "${l}" ) + fi + done + + if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then + eqawarn "get_distribution_components() is outdated!" + eqawarn " Add: ${add[*]}" + eqawarn "Remove: ${remove[*]}" + fi + cd - >/dev/null || die + fi +} + +get_distribution_components() { + local sep=${1-;} + + local out=( + # common stuff + clang-cmake-exports + clang-headers + clang-resource-headers + libclang-headers + + # libs + clang-cpp + libclang + ) + + if multilib_is_native_abi; then + out+=( + # common stuff + bash-autocomplete + libclang-python-bindings + + # tools + c-index-test + clang + clang-format + clang-offload-bundler + clang-offload-wrapper + clang-refactor + clang-repl + clang-rename + clang-scan-deps + diagtool + hmaptool + + # extra tools + clang-apply-replacements + clang-change-namespace + clang-doc + clang-include-fixer + clang-move + clang-query + clang-reorder-fields + clang-tidy + clang-tidy-headers + clangd + find-all-symbols + modularize + pp-trace + ) + + if llvm_are_manpages_built; then + out+=( + # manpages + docs-clang-man + docs-clang-tools-man + ) + fi + + use doc && out+=( + docs-clang-html + docs-clang-tools-html + ) + + use static-analyzer && out+=( + clang-check + clang-extdef-mapping + scan-build + scan-build-py + scan-view + ) + fi + + printf "%s${sep}" "${out[@]}" +} + +multilib_src_configure() { + local llvm_version=$(llvm-config --version) || die + local clang_version=$(ver_cut 1-3 "${llvm_version}") + + local mycmakeargs=( + -DLLVM_CMAKE_PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)/cmake/llvm" + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}" + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" + # relative to bindir + -DCLANG_RESOURCE_DIR="../../../../lib/clang/${clang_version}" + + -DBUILD_SHARED_LIBS=OFF + -DCLANG_LINK_CLANG_DYLIB=ON + -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components) + + -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" + -DLLVM_BUILD_TESTS=$(usex test) + + # these are not propagated reliably, so redefine them + -DLLVM_ENABLE_EH=ON + -DLLVM_ENABLE_RTTI=ON + + -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=$(usex !xml) + # libgomp support fails to find headers without explicit -I + # furthermore, it provides only syntax checking + -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp + + # disable using CUDA to autodetect GPU, just build for all + -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON + + # override default stdlib and rtlib + -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "") + -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "") + -DCLANG_DEFAULT_LINKER=$(usex default-lld lld "") + -DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie) + -DCLANG_DEFAULT_UNWINDLIB=$(usex default-compiler-rt libunwind "") + + -DCLANG_ENABLE_ARCMT=$(usex static-analyzer) + -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) + + -DPython3_EXECUTABLE="${PYTHON}" + ) + use test && mycmakeargs+=( + -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" + -DLLVM_EXTERNAL_LIT="${BUILD_DIR}/bin/llvm-lit" + -DLLVM_LIT_ARGS="$(get_lit_flags)" + ) + + if multilib_is_native_abi; then + local build_docs=OFF + if llvm_are_manpages_built; then + build_docs=ON + mycmakeargs+=( + -DLLVM_BUILD_DOCS=ON + -DLLVM_ENABLE_SPHINX=ON + -DCLANG_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" + -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra" + -DSPHINX_WARNINGS_AS_ERRORS=OFF + ) + fi + mycmakeargs+=( + -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra + -DCLANG_INCLUDE_DOCS=${build_docs} + -DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs} + ) + else + mycmakeargs+=( + -DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=OFF + ) + fi + + if [[ -n ${EPREFIX} ]]; then + mycmakeargs+=( + -DGCC_INSTALL_PREFIX="${EPREFIX}/usr" + ) + fi + + if tc-is-cross-compiler; then + [[ -x "/usr/bin/clang-tblgen" ]] \ + || die "/usr/bin/clang-tblgen not found or usable" + mycmakeargs+=( + -DCMAKE_CROSSCOMPILING=ON + -DCLANG_TABLEGEN=/usr/bin/clang-tblgen + ) + fi + + # LLVM can have very high memory consumption while linking, + # exhausting the limit on 32-bit linker executable + use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" + + # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + cmake_src_configure + + multilib_is_native_abi && check_distribution_components +} + +multilib_src_compile() { + cmake_build distribution + + # provide a symlink for tests + if [[ ! -L ${WORKDIR}/lib/clang ]]; then + mkdir -p "${WORKDIR}"/lib || die + ln -s "${BUILD_DIR}/$(get_libdir)/clang" "${WORKDIR}"/lib/clang || die + fi +} + +multilib_src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + cmake_build check-clang + multilib_is_native_abi && + cmake_build check-clang-tools check-clangd +} + +src_install() { + MULTILIB_WRAPPED_HEADERS=( + /usr/include/clang/Config/config.h + ) + + multilib-minimal_src_install + + # Move runtime headers to /usr/lib/clang, where they belong + mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die + # move (remaining) wrapped headers back + mv "${T}"/clang-tidy "${ED}"/usr/include/ || die + mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die + + # Apply CHOST and version suffix to clang tools + # note: we use two version components here (vs 3 in runtime path) + local llvm_version=$(llvm-config --version) || die + local clang_version=$(ver_cut 1 "${llvm_version}") + local clang_full_version=$(ver_cut 1-3 "${llvm_version}") + local clang_tools=( clang clang++ clang-cl clang-cpp ) + local abi i + + # cmake gives us: + # - clang-X + # - clang -> clang-X + # - clang++, clang-cl, clang-cpp -> clang + # we want to have: + # - clang-X + # - clang++-X, clang-cl-X, clang-cpp-X -> clang-X + # - clang, clang++, clang-cl, clang-cpp -> clang*-X + # also in CHOST variant + for i in "${clang_tools[@]:1}"; do + rm "${ED}/usr/lib/llvm/${SLOT}/bin/${i}" || die + dosym "clang-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}-${clang_version}" + dosym "${i}-${clang_version}" "/usr/lib/llvm/${SLOT}/bin/${i}" + done + + # now create target symlinks for all supported ABIs + for abi in $(get_all_abis); do + local abi_chost=$(get_abi_CHOST "${abi}") + for i in "${clang_tools[@]}"; do + dosym "${i}-${clang_version}" \ + "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}-${clang_version}" + dosym "${abi_chost}-${i}-${clang_version}" \ + "/usr/lib/llvm/${SLOT}/bin/${abi_chost}-${i}" + done + done +} + +multilib_src_install() { + DESTDIR=${D} cmake_build install-distribution + + # move headers to /usr/include for wrapping & ABI mismatch checks + # (also drop the version suffix from runtime headers) + rm -rf "${ED}"/usr/include || die + mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die + mv "${ED}"/usr/lib/llvm/${SLOT}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die + if multilib_is_native_abi; then + # don't wrap clang-tidy headers, the list is too long + # (they're fine for non-native ABI but enabling the targets is problematic) + mv "${ED}"/usr/include/clang-tidy "${T}/" || die + fi +} + +multilib_src_install_all() { + python_fix_shebang "${ED}" + if use static-analyzer; then + python_optimize "${ED}"/usr/lib/llvm/${SLOT}/share/scan-view + fi + + docompress "/usr/lib/llvm/${SLOT}/share/man" + llvm_install_manpages + # match 'html' non-compression + use doc && docompress -x "/usr/share/doc/${PF}/tools-extra" + # +x for some reason; TODO: investigate + use static-analyzer && fperms a-x "/usr/lib/llvm/${SLOT}/share/man/man1/scan-build.1" +} + +pkg_postinst() { + if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then + eselect compiler-shadow update all + fi + + elog "You can find additional utility scripts in:" + elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/clang" + elog "Some of them are vim integration scripts (with instructions inside)." + elog "The run-clang-tidy.py script requires the following additional package:" + elog " dev-python/pyyaml" +} + +pkg_postrm() { + if [[ -z ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then + eselect compiler-shadow clean all + fi +} diff --git a/sys-devel/clang/clang-13.0.1_rc3.ebuild b/sys-devel/clang/clang-15.0.0.9999.ebuild index ae93802425a..e1960cb92f1 100644 --- a/sys-devel/clang/clang-13.0.1_rc3.ebuild +++ b/sys-devel/clang/clang-15.0.0.9999.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 PYTHON_COMPAT=( python3_{8..10} ) inherit cmake llvm llvm.org multilib multilib-minimal \ @@ -16,23 +16,32 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT" SLOT="$(ver_cut 1)" KEYWORDS="" -IUSE="debug default-compiler-rt default-libcxx default-lld - doc llvm-libunwind +static-analyzer test xml" +IUSE=" + debug default-compiler-rt default-libcxx default-lld doc + llvm-libunwind +pie +static-analyzer test xml +" REQUIRED_USE="${PYTHON_REQUIRED_USE}" RESTRICT="!test? ( test )" -RDEPEND=" +DEPEND=" ~sys-devel/llvm-${PV}:${SLOT}=[debug=,${MULTILIB_USEDEP}] static-analyzer? ( dev-lang/perl:* ) xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) - ${PYTHON_DEPS}" +" -DEPEND="${RDEPEND}" +RDEPEND=" + ${PYTHON_DEPS} + ${DEPEND} +" BDEPEND=" + ${PYTHON_DEPS} >=dev-util/cmake-3.16 - doc? ( dev-python/sphinx ) + doc? ( $(python_gen_cond_dep ' + dev-python/recommonmark[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') ) xml? ( virtual/pkgconfig ) - ${PYTHON_DEPS}" +" PDEPEND=" sys-devel/clang-common ~sys-devel/clang-runtime-${PV} @@ -42,16 +51,20 @@ PDEPEND=" !llvm-libunwind? ( sys-libs/libunwind ) ) default-libcxx? ( >=sys-libs/libcxx-${PV} ) - default-lld? ( sys-devel/lld )" + default-lld? ( sys-devel/lld ) +" -LLVM_COMPONENTS=( clang clang-tools-extra ) -LLVM_MANPAGES=build +LLVM_COMPONENTS=( + clang clang-tools-extra cmake + llvm/lib/Transforms/Hello +) +LLVM_MANPAGES=1 LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/{lit,llvm-lit,unittest} llvm/utils/{UpdateTestChecks,update_cc_test_checks.py} ) -LLVM_PATCHSET=${PV/_/-} +LLVM_PATCHSET=9999-r3 LLVM_USE_TARGETS=llvm llvm.org_set_globals @@ -80,7 +93,7 @@ src_prepare() { # add Gentoo Portage Prefix for Darwin (see prefix-dirs.patch) eprefixify \ - lib/Frontend/InitHeaderSearch.cpp \ + lib/Lex/InitHeaderSearch.cpp \ lib/Driver/ToolChains/Darwin.cpp || die } @@ -99,10 +112,6 @@ check_distribution_components() { clang-libraries|distribution) continue ;; - # headers for clang-tidy static library - clang-tidy-headers) - continue - ;; # tools clang|clangd|clang-*) ;; @@ -118,7 +127,7 @@ check_distribution_components() { all_targets+=( "${l}" ) fi - done < <(ninja -t targets all) + done < <(${NINJA} -t targets all) while read -r l; do my_targets+=( "${l}" ) @@ -188,6 +197,7 @@ get_distribution_components() { clang-query clang-reorder-fields clang-tidy + clang-tidy-headers clangd find-all-symbols modularize @@ -253,6 +263,7 @@ multilib_src_configure() { -DCLANG_DEFAULT_CXX_STDLIB=$(usex default-libcxx libc++ "") -DCLANG_DEFAULT_RTLIB=$(usex default-compiler-rt compiler-rt "") -DCLANG_DEFAULT_LINKER=$(usex default-lld lld "") + -DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie) -DCLANG_DEFAULT_UNWINDLIB=$(usex default-compiler-rt libunwind "") -DCLANG_ENABLE_ARCMT=$(usex static-analyzer) @@ -262,6 +273,7 @@ multilib_src_configure() { ) use test && mycmakeargs+=( -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" + -DLLVM_EXTERNAL_LIT="${BUILD_DIR}/bin/llvm-lit" -DLLVM_LIT_ARGS="$(get_lit_flags)" ) @@ -342,6 +354,7 @@ src_install() { # Move runtime headers to /usr/lib/clang, where they belong mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die # move (remaining) wrapped headers back + mv "${T}"/clang-tidy "${ED}"/usr/include/ || die mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die # Apply CHOST and version suffix to clang tools @@ -387,6 +400,11 @@ multilib_src_install() { rm -rf "${ED}"/usr/include || die mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die mv "${ED}"/usr/lib/llvm/${SLOT}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die + if multilib_is_native_abi; then + # don't wrap clang-tidy headers, the list is too long + # (they're fine for non-native ABI but enabling the targets is problematic) + mv "${ED}"/usr/include/clang-tidy "${T}/" || die + fi } multilib_src_install_all() { diff --git a/sys-devel/cons/cons-2.3.0.ebuild b/sys-devel/cons/cons-2.3.0-r1.ebuild index 717660db880..8d49a63d1d8 100644 --- a/sys-devel/cons/cons-2.3.0.ebuild +++ b/sys-devel/cons/cons-2.3.0-r1.ebuild @@ -1,29 +1,31 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 DESCRIPTION="Extensible perl-based build utility" HOMEPAGE="https://www.gnu.org/software/cons/" SRC_URI="https://www.gnu.org/software/${PN}/stable/${P}.tgz https://www.gnu.org/software/${PN}/dev/${P}.tgz" -SLOT="2.2" LICENSE="GPL-2" -KEYWORDS="~alpha ~amd64 ppc ~sparc x86" -IUSE="" - -DEPEND=" - dev-lang/perl - virtual/perl-Digest-MD5" -RDEPEND=" - ${DEPEND} +SLOT="2.2" +KEYWORDS="~alpha ~amd64 ~ppc ~sparc x86" + +RDEPEND="dev-lang/perl + virtual/perl-Digest-MD5 !sci-biology/emboss" +BDEPEND="${RDEPEND} + app-arch/gzip" + +DOCS=( CHANGES INSTALL MANIFEST README RELEASE TODO ) src_install() { dobin cons - dodoc CHANGES INSTALL MANIFEST README RELEASE TODO + docinto html dodoc *.html - doman cons.1.gz + + gunzip cons.1.gz || die + doman cons.1 } diff --git a/sys-devel/cons/metadata.xml b/sys-devel/cons/metadata.xml index 73dda144f9a..b0d83aa2e48 100644 --- a/sys-devel/cons/metadata.xml +++ b/sys-devel/cons/metadata.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<maintainer type="project"> - <email>base-system@gentoo.org</email> - <name>Gentoo Base System</name> -</maintainer> + <maintainer type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> + </maintainer> </pkgmetadata> diff --git a/sys-devel/crossdev/Manifest b/sys-devel/crossdev/Manifest index a855b5bb440..f6fab852162 100644 --- a/sys-devel/crossdev/Manifest +++ b/sys-devel/crossdev/Manifest @@ -1,4 +1,4 @@ -DIST crossdev-20210621.tar.xz 28588 BLAKE2B 33ff6069c85cbcff6bf34bf5f6dd8050bd5f9d34e3478c0200965dffd4cee46e71acf4210f533c9b22fd6fe979fa5f447d30b5aaa3a6fc0845b201a80dcb28d8 SHA512 8f8bed6ce53503fa4c2bbce4327d8e1d5ce8edab5ff698f11f312007912a2d73be56242269f798bb633ad3648f6cf936e00e019c05e5781b523059befc26f42c -DIST crossdev-20210718.tar.xz 28640 BLAKE2B 1e9b9313a5c9a1cb4d82f00e4979794d61b9eaa0035c575ac55092c6c015d820a590c5816d212a4ffad95b96a3dd99a9b94ca7c20b78a7d7b062f16dec6ed329 SHA512 e1a37aebf759abaa30f071f43a528f9059b83456e71fd86fc8202a7eff5c506c1f34fdd260c7b91a03f491b9f2a107ce6a65c2314845a352176fcc5a27a766e2 -DIST crossdev-20211027.tar.xz 28752 BLAKE2B 058d6254c702709c18cc426fe15d7a11cb856336236837a15c0b2cb0c2389198f8b0ea9893e7cdadd6ecdabb3e75c05b64c22448324ce2ea86032cb57e92a5d9 SHA512 6c15d71fb551dcb5cb8e95d7e3b1ecb52b34e47335842408da5acc9d258c1a5fa7e4699681b9b414b1b444df98601aa8b99b2000700485ec6028c076abeafd03 DIST crossdev-20211121.tar.xz 28700 BLAKE2B bfe637dcd3c5b6d45e289d6298de18cab4b70b5d21a817a9207b91360b489457b9ee10266a1c2641f8dfac09dffb166bf1565a7e519ba41f84c6d5c2000f5158 SHA512 5189fa7639b819dfffc8f994bb557d8d83f115b82cd61d938db77fdcf16a33cc9d0147f9708b3bed22fdc4ace27ac863436813ebad94876ae767172ac0cbb9ce +DIST crossdev-20220205.tar.xz 29088 BLAKE2B 46e90557f0a6df49e4f6ab7be6495514a188c4366868290d3b6b879ad1e5741e1600bca237735290f7e9278d441534569853b582cd85b96581c6ae0517cb4c54 SHA512 72e7cf690d49a87b32f6fdad2462fd4156e4e35a3f0b5f30911012a2b7936bb999575f757547a7a805c0cfdd1fd0caa8b23bf61e72c4333096314043ed565f40 +DIST crossdev-20220424.tar.xz 29316 BLAKE2B 8b026c165b643262ef934fb2daec5484bc2a2e8c2cafbaca08ecb81c2870a6306dd834c9f72bca8cbe219d1b24274fef0b83a88e301e66d98a1eb0825bb2e161 SHA512 3c2ac2d9c79140c6e0aa7ac9fa7838499f003c6c9c1260abf4b0b7883d2179ef1ded5ab0ba14ca48d471edde5090e22a50fffbf25fd86a32d354a9541e4fd567 +DIST crossdev-20220617.tar.xz 29396 BLAKE2B e3b39edfb4cbd5808851b56d86646bc879ea875b5e320802d86073236474e3aa80c5dbefc42ef4799528334bfb5a2a0abb5c0b344ebdce39ec01aac59306eb84 SHA512 bdc5ea519e4cd6275e8171ff7cd35c8ae45b6240fefd278997e247c8b0758bff6563f7e2613072e179ec4735155f05236f32385fe13579c5e955f761e0859e43 diff --git a/sys-devel/crossdev/crossdev-20211121.ebuild b/sys-devel/crossdev/crossdev-20211121.ebuild index 864061acd24..fe3c418c309 100644 --- a/sys-devel/crossdev/crossdev-20211121.ebuild +++ b/sys-devel/crossdev/crossdev-20211121.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="8" @@ -10,7 +10,7 @@ else SRC_URI="mirror://gentoo/${P}.tar.xz https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz https://dev.gentoo.org/~vapier/dist/${P}.tar.xz" - 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" fi DESCRIPTION="Gentoo Cross-toolchain generator" diff --git a/sys-devel/crossdev/crossdev-20210621.ebuild b/sys-devel/crossdev/crossdev-20220205.ebuild index 59140a11c27..fe3c418c309 100644 --- a/sys-devel/crossdev/crossdev-20210621.ebuild +++ b/sys-devel/crossdev/crossdev-20220205.ebuild @@ -1,14 +1,15 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI="8" if [[ ${PV} == "99999999" ]] ; then inherit git-r3 - EGIT_REPO_URI="git://anongit.gentoo.org/proj/crossdev.git" + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/crossdev.git" else SRC_URI="mirror://gentoo/${P}.tar.xz - https://dev.gentoo.org/~sam/distfiles/${P}.tar.xz" + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz + https://dev.gentoo.org/~vapier/dist/${P}.tar.xz" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" fi diff --git a/sys-devel/crossdev/crossdev-20211027.ebuild b/sys-devel/crossdev/crossdev-20220424.ebuild index 0c2fe30139d..8c680c914ad 100644 --- a/sys-devel/crossdev/crossdev-20211027.ebuild +++ b/sys-devel/crossdev/crossdev-20220424.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="8" @@ -7,8 +7,7 @@ if [[ ${PV} == "99999999" ]] ; then inherit git-r3 EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/crossdev.git" else - SRC_URI="mirror://gentoo/${P}.tar.xz - https://dev.gentoo.org/~sam/distfiles/${P}.tar.xz + SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz https://dev.gentoo.org/~vapier/dist/${P}.tar.xz" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" fi diff --git a/sys-devel/crossdev/crossdev-20210718.ebuild b/sys-devel/crossdev/crossdev-20220617.ebuild index b7f11a2c01d..1701b22179d 100644 --- a/sys-devel/crossdev/crossdev-20210718.ebuild +++ b/sys-devel/crossdev/crossdev-20220617.ebuild @@ -1,14 +1,14 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=8 +EAPI="8" if [[ ${PV} == "99999999" ]] ; then inherit git-r3 - EGIT_REPO_URI="git://anongit.gentoo.org/proj/crossdev.git" + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/crossdev.git" else - SRC_URI="mirror://gentoo/${P}.tar.xz - https://dev.gentoo.org/~sam/distfiles/${P}.tar.xz" + SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz + https://dev.gentoo.org/~vapier/dist/${P}.tar.xz" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" fi @@ -29,7 +29,7 @@ BDEPEND="app-arch/xz-utils" src_install() { default - if [[ "${PV}" == "99999999" ]] ; then + if [[ ${PV} == "99999999" ]] ; then sed -i "s:@CDEVPV@:${EGIT_VERSION}:" "${ED}"/usr/bin/crossdev || die fi } diff --git a/sys-devel/crossdev/crossdev-99999999.ebuild b/sys-devel/crossdev/crossdev-99999999.ebuild index 864061acd24..1701b22179d 100644 --- a/sys-devel/crossdev/crossdev-99999999.ebuild +++ b/sys-devel/crossdev/crossdev-99999999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="8" @@ -7,8 +7,7 @@ if [[ ${PV} == "99999999" ]] ; then inherit git-r3 EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/crossdev.git" else - SRC_URI="mirror://gentoo/${P}.tar.xz - https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz + SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz https://dev.gentoo.org/~vapier/dist/${P}.tar.xz" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" fi @@ -30,7 +29,7 @@ BDEPEND="app-arch/xz-utils" src_install() { default - if [[ "${PV}" == "99999999" ]] ; then + if [[ ${PV} == "99999999" ]] ; then sed -i "s:@CDEVPV@:${EGIT_VERSION}:" "${ED}"/usr/bin/crossdev || die fi } diff --git a/sys-devel/crossdev/metadata.xml b/sys-devel/crossdev/metadata.xml index 00b311f5513..a4be5df4dfc 100644 --- a/sys-devel/crossdev/metadata.xml +++ b/sys-devel/crossdev/metadata.xml @@ -1,12 +1,16 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="project"> - <email>crossdev@gentoo.org</email> - <name>Gentoo Crossdev Team</name> - </maintainer> - <maintainer type="project"> - <email>embedded@gentoo.org</email> - <name>Embedded Gentoo</name> - </maintainer> + <maintainer type="project"> + <email>crossdev@gentoo.org</email> + <name>Gentoo Crossdev Team</name> + </maintainer> + <maintainer type="project"> + <email>toolchain@gentoo.org</email> + <name>Gentoo Toolchain Project</name> + </maintainer> + <maintainer type="project"> + <email>embedded@gentoo.org</email> + <name>Embedded Gentoo</name> + </maintainer> </pkgmetadata> diff --git a/sys-devel/dev86/dev86-0.16.21-r3.ebuild b/sys-devel/dev86/dev86-0.16.21-r3.ebuild index 2af636abe3e..e3784e658bf 100644 --- a/sys-devel/dev86/dev86-0.16.21-r3.ebuild +++ b/sys-devel/dev86/dev86-0.16.21-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -22,6 +22,7 @@ PATCHES=( "${FILESDIR}/${PN}-0.16.19-fortify.patch" "${FILESDIR}/${P}-non-void-return-clang.patch" "${FILESDIR}/${PN}-0.16.21-make.patch" + "${FILESDIR}/${P}-void-return-check-msdos-clang-fix.patch" ) src_prepare() { diff --git a/sys-devel/dev86/files/dev86-0.16.21-void-return-check-msdos-clang-fix.patch b/sys-devel/dev86/files/dev86-0.16.21-void-return-check-msdos-clang-fix.patch new file mode 100644 index 00000000000..39e3a1296c2 --- /dev/null +++ b/sys-devel/dev86/files/dev86-0.16.21-void-return-check-msdos-clang-fix.patch @@ -0,0 +1,20 @@ +--- a/bootblocks/makeboot.c 2020-11-30 00:28:40.383078094 +0300 ++++ b/bootblocks/makeboot.c 2020-11-30 00:28:26.969025659 +0300 +@@ -183,6 +183,8 @@ + unsigned char bpb_flags[100]; + int has_bpb_overrides = 0; + ++static void check_msdos(); ++ + main(argc, argv) + int argc; + char ** argv; +@@ -1122,7 +1124,7 @@ + + /**************************************************************************/ + +-check_msdos() ++static void check_msdos() + { + decode_super(buffer); + if( dosflds[DOS_CLUST].value == 0 ) /* MSDOS v1.0 */ diff --git a/sys-devel/distcc/distcc-3.4-r1.ebuild b/sys-devel/distcc/distcc-3.4-r1.ebuild new file mode 100644 index 00000000000..1bee4f2f642 --- /dev/null +++ b/sys-devel/distcc/distcc-3.4-r1.ebuild @@ -0,0 +1,181 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) + +inherit autotools flag-o-matic prefix python-single-r1 systemd + +DESCRIPTION="Distribute compilation of C code across several machines on a network" +HOMEPAGE="https://github.com/distcc/distcc" +SRC_URI="https://github.com/distcc/distcc/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +IUSE="gssapi gtk hardened ipv6 selinux xinetd zeroconf" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="${PYTHON_DEPS} + dev-libs/popt + gssapi? ( net-libs/libgssglue ) + gtk? ( x11-libs/gtk+:3 ) + zeroconf? ( >=net-dns/avahi-0.6[dbus] ) +" +DEPEND="${RDEPEND} + sys-libs/binutils-libs" +BDEPEND=" + sys-devel/autoconf-archive + virtual/pkgconfig" +RDEPEND+=" + acct-user/distcc + dev-util/shadowman + >=sys-devel/gcc-config-1.4.1 + selinux? ( sec-policy/selinux-distcc ) + xinetd? ( sys-apps/xinetd )" + +src_prepare() { + eapply "${FILESDIR}/${PN}-3.0-xinetd.patch" + # SOCKSv5 support needed for Portage, bug #537616 + eapply "${FILESDIR}/${PN}-3.2_rc1-socks5.patch" + eapply "${FILESDIR}/${PN}-3.4-pump-tests.patch" + eapply_user + + # Bugs #120001, #167844 and probably more. See patch for description. + use hardened && eapply "${FILESDIR}/distcc-hardened.patch" + + sed -i \ + -e "/PATH/s:\$distcc_location:${EPREFIX}/usr/lib/distcc/bin:" \ + -e "s:@PYTHON@:${EPYTHON}:" \ + pump.in || die "sed failed" + + sed \ + -e "s:@EPREFIX@:${EPREFIX:-/}:" \ + -e "s:@libdir@:/usr/lib:" \ + "${FILESDIR}/distcc-config" > "${T}/distcc-config" || die + + # TODO: gdb tests fail due to gdb failing to find .c file + sed -i -e '/Gdb.*Case,/d' test/testdistcc.py || die + + hprefixify update-distcc-symlinks.py src/{serve,daemon}.c + python_fix_shebang update-distcc-symlinks.py "${T}/distcc-config" + eautoreconf +} + +src_configure() { + # https://github.com/distcc/distcc/issues/454 + append-cppflags -DPY_SSIZE_T_CLEAN + + local myconf=( + --disable-Werror + --libdir="${EPREFIX}"/usr/lib + $(use_enable ipv6 rfc2553) + $(use_with gtk) + --without-gnome + $(use_with gssapi auth) + $(use_with zeroconf avahi) + ) + + econf "${myconf[@]}" +} + +src_test() { + # sandbox breaks some tests, and hangs some too + # retest once #590084 is fixed + local -x SANDBOX_ON=0 + emake -j1 check +} + +src_install() { + # override GZIP_BIN to stop it from compressing manpages + emake -j1 DESTDIR="${D}" GZIP_BIN=false install + python_optimize + + newinitd "${FILESDIR}/distccd.initd" distccd + systemd_newunit "${FILESDIR}/distccd.service-1" distccd.service + systemd_install_serviced "${FILESDIR}/distccd.service.conf" + + cp "${FILESDIR}/distccd.confd" "${T}/distccd" || die + if use zeroconf; then + cat >> "${T}/distccd" <<-EOF || die + + # Enable zeroconf support in distccd + DISTCCD_OPTS="\${DISTCCD_OPTS} --zeroconf" + EOF + + sed -i '/ExecStart/ s|$| --zeroconf|' "${D}$(systemd_get_systemunitdir)"/distccd.service || die + fi + doconfd "${T}/distccd" + + newenvd - 02distcc <<-EOF || die + # This file is managed by distcc-config; use it to change these settings. + # DISTCC_LOG and DISTCC_DIR should not be set. + DISTCC_VERBOSE="${DISTCC_VERBOSE:-0}" + DISTCC_FALLBACK="${DISTCC_FALLBACK:-1}" + DISTCC_SAVE_TEMPS="${DISTCC_SAVE_TEMPS:-0}" + DISTCC_TCP_CORK="${DISTCC_TCP_CORK}" + DISTCC_SSH="${DISTCC_SSH}" + UNCACHED_ERR_FD="${UNCACHED_ERR_FD}" + DISTCC_ENABLE_DISCREPANCY_EMAIL="${DISTCC_ENABLE_DISCREPANCY_EMAIL}" + DCC_EMAILLOG_WHOM_TO_BLAME="${DCC_EMAILLOG_WHOM_TO_BLAME}" + EOF + + keepdir /usr/lib/distcc + + dobin "${T}/distcc-config" + + if use gtk; then + einfo "Renaming /usr/bin/distccmon-gnome to /usr/bin/distccmon-gui" + einfo "This is to have a little sensability in naming schemes between distccmon programs" + mv "${ED}/usr/bin/distccmon-gnome" "${ED}/usr/bin/distccmon-gui" || die + dosym distccmon-gui /usr/bin/distccmon-gnome + fi + + if use xinetd; then + insinto /etc/xinetd.d + newins "doc/example/xinetd" distcc + fi + + insinto /usr/share/shadowman/tools + newins - distcc <<<"${EPREFIX}/usr/lib/distcc/bin" + newins - distccd <<<"${EPREFIX}/usr/lib/distcc" + + rm -r "${ED}/etc/default" || die + rm "${ED}/etc/distcc/clients.allow" || die + rm "${ED}/etc/distcc/commands.allow.sh" || die +} + +pkg_postinst() { + # remove the old paths when switching from libXX to lib + if [[ $(get_libdir) != lib && ${SYMLINK_LIB} != yes && \ + -d ${EROOT}/usr/$(get_libdir)/distcc ]]; then + rm -r -f "${EROOT}/usr/$(get_libdir)/distcc" || die + fi + + if [[ -z ${ROOT} ]]; then + eselect compiler-shadow update distcc + eselect compiler-shadow update distccd + fi + + elog + elog "Tips on using distcc with Gentoo can be found at" + elog "https://wiki.gentoo.org/wiki/Distcc" + elog + elog "distcc-pump is known to cause breakage with multiple packages." + elog "Do NOT enable it globally." + elog + elog "To use the distccmon programs with Gentoo you should use this command:" + elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-text 5" + + if use gtk; then + elog "Or:" + elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-gnome" + fi +} + +pkg_prerm() { + if [[ -z ${REPLACED_BY_VERSION} && -z ${ROOT} ]]; then + eselect compiler-shadow remove distcc + fi +} diff --git a/sys-devel/distcc/files/distcc-3.4-pump-tests.patch b/sys-devel/distcc/files/distcc-3.4-pump-tests.patch new file mode 100644 index 00000000000..db392b7f363 --- /dev/null +++ b/sys-devel/distcc/files/distcc-3.4-pump-tests.patch @@ -0,0 +1,153 @@ +https://github.com/distcc/distcc/pull/460 + +From 45d9c4a1ef66451ed45a6afdec7098ed02082390 Mon Sep 17 00:00:00 2001 +From: Rosen Matev <rosen.matev@cern.ch> +Date: Fri, 29 Apr 2022 15:42:28 +0200 +Subject: [PATCH] Fix tests in pump mode + +`make check` is also running tests for the pump mode +(`pump-maintainer-check` target) but they were all falling back to +the usual preprocessor mode as the include server was not started. + +This is solved by prepending `pump` to the distcc invocations and +also some trivially failing tests are fixed or disabled when they +make no sense in pump mode. +--- + Makefile.in | 2 +- + pump.in | 13 +++++++++++-- + test/testdistcc.py | 28 ++++++++++++++++++++++++---- + 3 files changed, 36 insertions(+), 7 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index f240ca6f..79e28380 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -583,7 +583,7 @@ distccmon-gnome@EXEEXT@: $(mon_obj) $(gnome_obj) + # the distcc version, the source location, the CPP flags (for location of the + # includes), and the build location. + include-server: +- if test -z "$(PYTHON)"; then \ ++ @if test -z "$(PYTHON)"; then \ + echo "Not building $@: No suitable python found"; \ + else \ + mkdir -p "$(include_server_builddir)" && \ +diff --git a/pump.in b/pump.in +index 8e46f458..08a32c0e 100755 +--- a/pump.in ++++ b/pump.in +@@ -218,7 +218,9 @@ PrintIncludeServerStatusMessage() { + } + + Announce() { +- echo "__________Using distcc-pump from $DISTCC_LOCATION" ++ if [ "$verbose" = 1 ]; then ++ echo "__________Using distcc-pump from $DISTCC_LOCATION" ++ fi + } + + # Starts up the include server. Sets $socket, $socket_dir, and +@@ -359,7 +361,9 @@ ShutDown() { + # Always -- at exit -- shut down include_server and remove $socket_dir + if [ -n "$include_server_pid" ] && \ + ps -p "$include_server_pid" > /dev/null; then +- echo '__________Shutting down distcc-pump include server' ++ if [ "$verbose" = 1 ]; then ++ echo '__________Shutting down distcc-pump include server' ++ fi + kill $include_server_pid + # Wait until it's really dead. We need to do this because the + # include server may produce output after receiving SIGTERM. +@@ -508,6 +512,11 @@ Main() { + + Initialize + ++ # Do not write on stdout if we're testing pump mode ++ if [ "0$DISTCC_TESTING_INCLUDE_SERVER" -ne "0" ]; then ++ verbose=0 ++ fi ++ + case "$*" in + --startup) + # Don't put ordinary progress messages on stdout, +diff --git a/test/testdistcc.py b/test/testdistcc.py +index dfdf2f13..6377d0b6 100755 +--- a/test/testdistcc.py ++++ b/test/testdistcc.py +@@ -258,7 +258,11 @@ def valgrind(self): + return _valgrind_command; + + def distcc(self): +- return self.valgrind() + "distcc " ++ if "cpp" not in _server_options: ++ return self.valgrind() + "distcc " ++ else: ++ return "DISTCC_TESTING_INCLUDE_SERVER=1 " + self.valgrind() + "pump distcc " ++ + + def distccd(self): + return self.valgrind() + "distccd " +@@ -422,6 +426,11 @@ class BogusOption_Case(SimpleDistCC_Case): + Now that we support implicit compilers, this is passed to gcc, + which returns a non-zero status.""" + def runtest(self): ++ # Disable the test in pump mode since the pump wrapper fails ++ # before we can run distcc. ++ if "cpp" in _server_options: ++ raise comfychair.NotRunError('pump wrapper expects DISTCC_HOSTS') ++ + error_rc, _, _ = self.runcmd_unchecked(self._cc + " --bogus-option") + assert error_rc != 0 + self.runcmd(self.distcc() + self._cc + " --bogus-option", error_rc) +@@ -432,7 +441,7 @@ def runtest(self): + class CompilerOptionsPassed_Case(SimpleDistCC_Case): + """Test that options following the compiler name are passed to the compiler.""" + def runtest(self): +- out, err = self.runcmd("DISTCC_HOSTS=localhost " ++ out, err = self.runcmd("DISTCC_HOSTS=localhost%s " % _server_options + + self.distcc() + + self._cc + " --help") + if re.search('distcc', out): +@@ -1422,7 +1431,8 @@ def source(self): + + def setupEnv(self): + Compilation_Case.setupEnv(self) +- os.environ['DISTCC_HOSTS'] = '127.0.0.1:%d,lzo' % self.server_port ++ os.environ['DISTCC_HOSTS'] = ( ++ '127.0.0.1:%d,lzo' % self.server_port + _server_options) + + class DashONoSpace_Case(CompileHello_Case): + def compileCmd(self): +@@ -1525,6 +1535,11 @@ def source(self): + """ + + def runtest(self): ++ # Disable the test in pump mode since the pump wrapper fails ++ # before we can run distcc. ++ if "cpp" in _server_options: ++ raise comfychair.NotRunError('pump wrapper expects DISTCC_HOSTS') ++ + # -P means not to emit linemarkers + self.runcmd(self.distcc() + + self._cc + " -E testtmp.c -o testtmp.out") +@@ -1828,7 +1843,7 @@ class NoServer_Case(CompileHello_Case): + """Invalid server name""" + def setup(self): + self.stripEnvironment() +- os.environ['DISTCC_HOSTS'] = 'no.such.host.here' ++ os.environ['DISTCC_HOSTS'] = 'no.such.host.here' + _server_options + self.distcc_log = 'distcc.log' + os.environ['DISTCC_LOG'] = self.distcc_log + self.createSource() +@@ -1874,6 +1889,11 @@ class NoHosts_Case(CompileHello_Case): + We expect compilation to succeed, but with a warning that it was + run locally.""" + def runtest(self): ++ # Disable the test in pump mode since the pump wrapper fails ++ # before we can run distcc. ++ if "cpp" in _server_options: ++ raise comfychair.NotRunError('pump wrapper expects DISTCC_HOSTS') ++ + # WithDaemon_Case sets this to point to the local host, but we + # don't want that. Note that you cannot delete environment + # keys in Python1.5, so we need to just set them to the empty + diff --git a/sys-devel/distcc/metadata.xml b/sys-devel/distcc/metadata.xml index 949da1a6e8d..b39e2f4ab89 100644 --- a/sys-devel/distcc/metadata.xml +++ b/sys-devel/distcc/metadata.xml @@ -1,10 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="person"> - <email>mgorny@gentoo.org</email> - <name>Michał Górny</name> - </maintainer> <maintainer type="project"> <email>cluster@gentoo.org</email> <name>Gentoo Cluster Project</name> diff --git a/sys-devel/flex/flex-2.6.4-r1.ebuild b/sys-devel/flex/flex-2.6.4-r1.ebuild index 592b017eec1..309967cc2b3 100644 --- a/sys-devel/flex/flex-2.6.4-r1.ebuild +++ b/sys-devel/flex/flex-2.6.4-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -11,7 +11,7 @@ SRC_URI="https://github.com/westes/${PN}/releases/download/v${PV}/${P}.tar.gz" LICENSE="FLEX" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" IUSE="nls static test" RESTRICT="!test? ( test )" diff --git a/sys-devel/flex/flex-2.6.4-r2.ebuild b/sys-devel/flex/flex-2.6.4-r2.ebuild new file mode 100644 index 00000000000..b1e13e873c6 --- /dev/null +++ b/sys-devel/flex/flex-2.6.4-r2.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic libtool multilib-minimal toolchain-funcs + +DESCRIPTION="The Fast Lexical Analyzer" +HOMEPAGE="https://github.com/westes/flex" +SRC_URI="https://github.com/westes/${PN}/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="FLEX" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="nls static test" +RESTRICT="!test? ( test )" + +# We want bison explicitly and not yacc in general, bug #381273 +RDEPEND="sys-devel/m4" +BDEPEND="${RDEPEND} + nls? ( sys-devel/gettext ) + test? ( sys-devel/bison )" + +PATCHES=( + "${FILESDIR}"/${PN}-2.6.4-libobjdir.patch + "${FILESDIR}"/${PN}-2.6.4-fix-build-with-glibc2.6+.patch +) + +src_prepare() { + default + + # Disable running in the tests/ subdir as it has a bunch of built sources + # that cannot be made conditional (automake limitation). bug #568842 + if ! use test ; then + sed -i \ + -e '/^SUBDIRS =/,/^$/{/tests/d}' \ + Makefile.in || die + fi + + # Prefix always needs this + elibtoolize +} + +src_configure() { + use static && append-ldflags -static + + multilib-minimal_src_configure +} + +multilib_src_configure() { + if tc-is-cross-compiler ; then + # Similar to workaround for procps: + # - bug #705800 + # - https://sourceforge.net/p/psmisc/bugs/71/ + # - https://lists.gnu.org/archive/html/autoconf/2011-04/msg00019.html + export ac_cv_func_malloc_0_nonnull=yes \ + ac_cv_func_realloc_0_nonnull=yes + fi + + # Do not install shared libs, #503522 + ECONF_SOURCE="${S}" econf \ + CC_FOR_BUILD="$(tc-getBUILD_CC)" \ + --disable-shared \ + $(use_enable nls) +} + +multilib_src_compile() { + if multilib_is_native_abi; then + default + else + emake -C src -f Makefile -f - lib <<< 'lib: $(lib_LTLIBRARIES)' + fi +} + +multilib_src_test() { + multilib_is_native_abi && emake check +} + +multilib_src_install() { + if multilib_is_native_abi; then + default + else + emake -C src DESTDIR="${D}" install-libLTLIBRARIES install-includeHEADERS + fi +} + +multilib_src_install_all() { + einstalldocs + dodoc ONEWS + find "${ED}" -name '*.la' -type f -delete || die + rm "${ED}"/usr/share/doc/${PF}/COPYING || die + + dosym flex /usr/bin/lex +} diff --git a/sys-devel/gcc-config/gcc-config-2.5-r1.ebuild b/sys-devel/gcc-config/gcc-config-2.5-r1.ebuild index 6d93f7de87f..d59534f90b0 100644 --- a/sys-devel/gcc-config/gcc-config-2.5-r1.ebuild +++ b/sys-devel/gcc-config/gcc-config-2.5-r1.ebuild @@ -8,7 +8,7 @@ if [[ ${PV} == 9999 ]]; then inherit git-r3 else SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz" - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" fi DESCRIPTION="Utility to manage compilers" diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest index 90656e8aade..74f6ad2c8b4 100644 --- a/sys-devel/gcc/Manifest +++ b/sys-devel/gcc/Manifest @@ -1,25 +1,41 @@ -DIST ecj-4.5.jar 1470676 BLAKE2B 793c10ba09fd8040c0e1181204141aea16780c9c9088e07126e00da2b510af2ad6f58d876357d7e98cbb02d783a3be434469d5de1df134ccb8cc508e45028d80 SHA512 d4e1bf7538ace56e3d69fa91da5bbd16c272923b4de0a9d8dee23ea2b75f9f38c603de72fc4061df49285c450b63f3df211cee5270e9fffc5447445d1a9c9e4e DIST gcc-10-20211126.tar.xz 71674848 BLAKE2B 81f4a572e973db7a3701601e66ea58c8e535a55d4d4ac164de00bdb06f7f265585f45d46171cf40d42ebcd3fb02ac81b643398c560912698eb6c008ac6e09518 SHA512 db887184c649ebeede5a1b9f13c00fe425012434cb93ec960c3ca50c0bcdeab04a1cc13b20de21b940e5d6a09c3b1c7fc415110a0e990ec1d938627bf97b9342 +DIST gcc-10-20220623.tar.xz 71747668 BLAKE2B 3849182a188f4a3b5f19e66008a23ab50ff5bf933d28254432d62ce880b7921124302658553c7bc1e8756c430d11b5d577685d1d70b9851b714d1e15b1d7b4ac SHA512 294093cdd0949238e903f91c4ed28b2fd063d25aa6aa7947acdb318350c582e43d15b98a78756da692d0625c6d190c67b62f215ac865594712d6f8efe298831b +DIST gcc-10-20220630.tar.xz 71753264 BLAKE2B 19179c6ff805dd280835176955995e6a402705d69120023e3b472b4290b29babc9184a07e35c0e780aed6f4b6505c9b8e9c0fd020d251755f73c8f802c65947d SHA512 8c5f9c3a8c8f9b0d3b8236b41fb6cc1facc01bd3c1b3882a68f61ed7e9bb84ac2a478f52ac17e4a7af488970aa5935faa0635158b51edffeb2784d1dbf0407cf DIST gcc-10.3.0-musl-patches-1.tar.bz2 2999 BLAKE2B 3e36bbf2f93fdce15e20f807fa262f7a7abbde85b6f6b4e1383f6eccd8a53d876687d56cde83a80cde8a50e15bec407a1212aa0c85520892563e3d5ef7aaca98 SHA512 21483912a7b152f27db82d837a4cf91f2552d5fe238702aeca0c0dd8c7d3695bc70d8794c94a19106df28e053baf14c38433ca8e38e849082b76273cb51f2384 -DIST gcc-10.3.0-patches-1.tar.bz2 15282 BLAKE2B ef283e8b108af9bfd3324fabb95c835374113c6ff2cf1430a5568b3d1b27183e6de6751367c1e5720c85ac4c45132848888d5510c63f95e88a1f623b6bcf4000 SHA512 6dc435c8619a1532000fae843b9964d0d1e28d3cc9cc1962ab7391570a0cf1135424ea5c0b0d3d5ec5ea863f02e963be2ec4c94822f217fc692a1d808325404e DIST gcc-10.3.0-patches-3.tar.bz2 18935 BLAKE2B 13eaf1e055b5b63069aed1575ed93f6bc822b5e3f2181ddfc88f4e7ff801f58997cd131b2efd79b90469b1f861db994feb2adcaecacf165442078f76e233fd9a SHA512 c3d6a6f32863cc0ff7c877314ff0c00a892e473f64d16b82d46b4a77aa97c3e7a575492d27f0d423acb2621c86c9a49bca0e26e45bda9e697495444fcac85084 DIST gcc-10.3.0.tar.xz 76692288 BLAKE2B ac7898f5eb8a7c5f151a526d1bb38913a68b50a65e4d010ac09fa20b6c801c671c790d780f23ccb8e4ecdfc686f4aa588082ccc9eb5c80c7b0e30788f824c1eb SHA512 2b2dd7453d48a398c29eaebd1422b70341001b8c90a62aee51e83344e7fdd8a8e45f82a4a9165bd7edc76dada912c932f4b6632c5636760fec4c5d7e402b3f86 +DIST gcc-10.4.0-musl-patches-1.tar.xz 3808 BLAKE2B 804d1fcc451dcd03be71240dd498ec2d179869571d44012967c48dccf5a478dd8c55000a964a80fdd5584d739a777dee1c83241cffce514ef002df2572854a67 SHA512 83e4a9c0f7062baf0c606a2bcc56a818494991403d7577dea65f04bbc25bdb786a5889b80d45d80e7f4be07c1aef786802cbfcfafd1a17ec255a2d4e93a77570 DIST gcc-10.4.0-patches-0.tar.bz2 15231 BLAKE2B f64a2e7f317acf9416da69c129ea869116be2780828f9d3cda59f7ea8d39634df7f0347f745275bb167f95aae2a3b8e97ec7c78f775d9002718dd67cb9429f68 SHA512 d1497930ccf4d6ee8700faeb676945e65b3aa2ba3a580a3564575fad1590ad076741f2ecad778ab48d0c4e8ed7723b84b0a660cb67cc4530495691702159a43a -DIST gcc-11-20211127.tar.xz 75659912 BLAKE2B 2de0883de6596457189da75977aa4628a45cadec6528e7b5c0043b891717d14805d8a65f87cd95e2033567c7f88e239063171690a3fbfda99cc687a9c691c965 SHA512 ba0dad9073cd16fdaad5cc05c8ee637fa89f20dca4b0cdf256487e54fa6b88a5a759ae851b946e2122c60f28d295a4ee47bcca3dbcaedcb53bd8a66edd0f5b45 +DIST gcc-10.4.0-patches-1.tar.xz 14392 BLAKE2B 76cc16bb611f1ac2020f0f430fc3f038e8ad29827e000b7aeca2a3143e91a674dee18b9530451fe37110c20dd3548ece387c323b460199e911e8195fc88eddf4 SHA512 f574ad66025eccb824e5901ef14f38268fc1fb26d9fc4fc9d04c8652c7bcee78ea196bdda88dbf891f167a6d7d75a74fb5776592dc25971c5902ba9d5d721266 +DIST gcc-10.4.0-patches-2.tar.xz 15000 BLAKE2B 59a61f7de4b6d2338a8b4fbc88a8e55838d5fdce1bd906b798540839a7efca9b97024779b515df6a7673ee6908540834bc1f58188ed9ef311c51e1f351ed003e SHA512 e1c8f0bf9d64db3f84a6eab0f41ee848643a67ba6ab57df7a8267139928f6e292d95c5b4ed865ff8d9a80028bb07cec714d56438b97004cd2a27f111f1f336da +DIST gcc-10.4.0.tar.xz 75018092 BLAKE2B ec1169025d3896b70ab80a4b8ce5040763a95529fc7e120c6bc3a3eb1db5cf938ebde347c1e595a8ff7d4081e79ded6252702d7a1a09648449b7a0783188e434 SHA512 440c08ca746da450d9a1b35e8fd2305cb27e7e6987cd9d0f7d375f3b1fc9e4b0bd7acb3cd7bf795e72fcbead59cdef5b6c152862f5d35cd9fbfe6902101ce648 DIST gcc-11-20220115.tar.xz 75676672 BLAKE2B 12171fd97731dbca67f13cc2a3a3a3989c22d628b289cbd3d46080f77a8d951f15c1e54e83a2e62ab41b69221f9784e970799a11a9ed5b224a77ba4b1b081f07 SHA512 7455b3b29d3c64df9123afef82faf922d97e08a3ea30fbc2d9286d4f6ed2fafbfc0f9d94ae1b9eee45329e95a27bd642b3aa679d83a0c27a3e30967d49e0728c +DIST gcc-11-20220624.tar.xz 75765436 BLAKE2B 642bbda212f31344822ec90bce1422146515b153ddb306c5fd1bcf25be25fea7ed5bc1aa6f5987755969e73af5de1484fb79a805e87428bcfa0b13257b9c35df SHA512 736a71de166851816914561bfbe7c00110b32f8b7e1666176babdfcfbdef4410ba07c8e2d912da2830fa14c6732f9ca555cae127481b07a85f7e689d87f9d509 +DIST gcc-11-20220701.tar.xz 75776176 BLAKE2B 958ba928ba6094e947990ef834f397d94a1f2bb0319aca77cab2d53c1eb12fce8b03d8e1b1fecc0be39f5154fb10126faf5667d6c345e65fb932a3680b55f8dd SHA512 ca378e8cb427c098099192aaa9441a2e85acc38f9a7309d56ef252e7434f7869df8f2af932f0ddc2d3c9e44341092ef05f284fed6a21b56c7c93faff68949709 DIST gcc-11.2.0-musl-patches-1.tar.bz2 2999 BLAKE2B 3e36bbf2f93fdce15e20f807fa262f7a7abbde85b6f6b4e1383f6eccd8a53d876687d56cde83a80cde8a50e15bec407a1212aa0c85520892563e3d5ef7aaca98 SHA512 21483912a7b152f27db82d837a4cf91f2552d5fe238702aeca0c0dd8c7d3695bc70d8794c94a19106df28e053baf14c38433ca8e38e849082b76273cb51f2384 DIST gcc-11.2.0-patches-1.tar.bz2 11537 BLAKE2B 9dd791ada244c9b70b8b99f9f305a688c248134715ed1b26d406e53b114983faae6873cdc521497164388d24d5f61c199e98df146bc02f5578e877295bcf5c82 SHA512 6539efc60c656d0798a5896dc1b944ed69914b815102c7a1c10bdba4ef935abd326b01309f38316e121f1ed90ceb2abcaf65df6af116892daad829ac2623cefc DIST gcc-11.2.0.tar.xz 80888824 BLAKE2B 69b61234ac436edfea2933df68c434a2ce7aa4454ef4da573e82587e1a42dc420189e949cfdadaf4cb37fc0de9674822210a95b77ff03aca0dbedfe67df19cc6 SHA512 d53a0a966230895c54f01aea38696f818817b505f1e2bfa65e508753fcd01b2aedb4a61434f41f3a2ddbbd9f41384b96153c684ded3f0fa97c82758d9de5c7cf DIST gcc-11.3.0-musl-patches-1.tar.bz2 3997 BLAKE2B 5ca064cc78b067f4a7822fa0341c37ae03c8024f871d2e274e481a583afa96c36e291be93fbdd633f203260ae2ea9ac1d45f666d134bac75bc9a715a369d7374 SHA512 0ab239c66cf62a737266377c19b8dda6af6df56380f6731c2c17f3e82778e7e023a68d31728490eea3ad946f4b71d4cab363a75548f74b4b7f653972469d9e91 -DIST gcc-11.3.0-patches-3.tar.bz2 13567 BLAKE2B dba270d74b7a598e0108be0be7ff8cf01899d044ca4be9938cd5324465dc00c9e5cac4ffb4b6c1bdcdb824d75a7577eed63ae724c7e2887a19708992aca10f26 SHA512 7919b37900bbc2493564bc70f7911cf03efb857ff09c2b13280018fb54c48d8be42e35b649e69594a3ce61d51de847a8d4f75f794ce1dc50db3a700831b6a1e7 DIST gcc-11.3.0-patches-4.tar.bz2 14030 BLAKE2B cdd555f329c7c0b993cd3527489681bfcc2162db0997611b66337e6b287356761c7deccd3b9f9bb8980a32df0574017a52c5e445e24db746757d87ffccb1ea89 SHA512 cb227599d01734ae9f9fc7ae2c8dd4cae1da80d6ab398ec6f112535239ac76ce8e91fbac88e19c2f75cb08ab75f966c1d1ad4af80ede67e953fbbafc7baefa58 -DIST gcc-12.0.0-patches-2.tar.bz2 11564 BLAKE2B 5954ee8dd5edb30ecde54275d9ffd4d2f5671de82fe7789688d1220b181fbcdeed3d5305858d8af1fd016e627687ca6f2ebc76bb6b49e9b903e8d63c3de2baea SHA512 6299a1f46fc3f29934db7af20651c0c3e1266bef89b222fc9e3bc6a7e7cd2869301c5b227a4105157456474ae8a626ec550c15971bceb2f844476a9f5bc56284 -DIST gcc-6.5.0-patches-6.tar.bz2 15320 BLAKE2B fe6b60cd45d00187e4e41e607af6a1137481a6d8f4421a0ead7da9fd86d0cd19bf428e5d150e1de4e0616606f8d6c31738da24be8151c58f7760aa92432ea3d0 SHA512 87c2a6726373999472cbd6211e486864266c833d5a07f8fb02dd3054b7dd3f86aa86ea47b17928045ef6e46d82f429f879d6f69d8adf3b6f2956f4ac6b3f80f1 -DIST gcc-6.5.0.tar.xz 74355588 BLAKE2B 538595d32000b15a53577f0dc6b164d75791a8ccdf90500d5f667ff78378ef4ab9bedb8a590848907caf863bf1165ebe108b5e81eb4b54e85ced4002affde693 SHA512 ce046f9a50050fd54b870aab764f7db187fe7ea92eb4aaffb7c3689ca623755604e231f2af97ef795f41c406bb80c797dd69957cfdd51dfa2ba60813f72b7eac -DIST gcc-7.5.0-patches-4.tar.bz2 13183 BLAKE2B 38a56910f01ef4172182d2145cef1df53b57eaa8f0655223cf54689e7ce12a264bfbb3735bde42b8a8594ab44031d9c48dc0d5303fab6537746f05e4d46b427a SHA512 28d3732d5351dabd1452ee0462865a0de00103d9ea66941e38499c532b34ee8beb150b0b32af58cde901e437b4c256593c29736a5e7df2575aa0d0c43b6cf6eb -DIST gcc-7.5.0.tar.xz 62783088 BLAKE2B 8a5efeef517a5da1634d063aaa83bf5e002f86acdf27419f1067f5c3d087333d9eea0c8db427b8bd895af646990bb00ee173069980ca49cec848434a4127256f SHA512 fe716cc19f2e3255d3a8b1b8290777bf769c6d98e6e0b07b81a3d6ad43f8af74cb170dfa18b1555dbfcd3f55ae582b91a286ccef496b9b65c1579902f96a1f60 +DIST gcc-11.3.0-patches-5.tar.bz2 14575 BLAKE2B 55ff9558f3ffe89d511663f12477e72ed1bc29d4fa8f1bc58b9c52d28838716ba9b8291ede7b86e28c3bee0633c34763f611779fe46531bd75d8aa7661b46118 SHA512 65bf4c0d1d43923298efd527a5f4da2a10d88a383d2eef72e6a25ce37964ddaf27c49545915228347e8320f905afcdfe1275d98e8458993a7229425f74ae41bd +DIST gcc-11.3.0.tar.xz 81141364 BLAKE2B 7e562d25446ca4ab9fe8cdb714866f66aba3744d78bf84f31bfb097c1a981e4c7f990cb1e6bcfec5ae6671836a4984e2b70eb8fed81dcef5e244f88da8623469 SHA512 f0be5ad705c73b84477128a69c047f57dd47002f375eb60e1e842e08cf2009a509e92152bca345823926d550b7395ae6d4de7db51d1ee371c2dc37313881fca7 +DIST gcc-11.4.0-musl-patches-0.tar.xz 3844 BLAKE2B f3f1be6718e3cf08e553a1a2319a85e13368279849f6f3ab89ad7abe505316afacf5084846c0cb133bdcb5c918244644242c194e6ce55455a26e67b3983d73ef SHA512 a81db52d21de364137461dcff7e1af696df4a02fa26452f90439ae4af14ccbffe68eb4ee93ae56257490ab8aa36b4bff37c4e1f2cf4dd4624b3a6fb4cb50b7ac +DIST gcc-11.4.0-patches-0.tar.xz 13404 BLAKE2B a384e6604befe306e6ee444b886c1aed1ef469299f5c7903da8314d73fd06463fb4f24be24d3d03df4883eaa8eb24beb477d881c5a1886d5913fee110b11a35c SHA512 f46f971f87deceaa8bc60eaa815aa1625f1cae01d2cccaeb6ff87f518198a756a1f7b496bd5bad004d713a4e8e6138f0b9a832e4df344fcb3009def840f9f6b9 +DIST gcc-11.4.0-patches-1.tar.xz 13956 BLAKE2B ff6ee1b81ad214e74a49c00b15767086c6b12b1566b42c4fb88778bfae3a8e319e42ffbcd8aa7f717b6f32bd966dc0da08be3a57a27992d9b90368622e7e2ff0 SHA512 3b9b641bb00b85fa88c87d8923ebcfb844125ff6149b998c565006173f4d68b0ccf8c1fec2c7bac0684584c61176346cee7373b165587a092bcd92ccb96c61db +DIST gcc-12-20220528.tar.xz 79096228 BLAKE2B 9c06ce85c6302bd43e06d35d5d5cc9e81268d368484bd60af707e6dbbe791d85ec2a177fe7deae1379d313269fcaea2ff5245e20e54ca667f452c27efb738c13 SHA512 498be61fcae7e4ec55e1f270e1d02fadfe9069692afab6442dac0b7ab480ad7112121f4728a9f99c7868e7373b2c770ad4833a3b4a1a8a43b3417e79f286c28c +DIST gcc-12-20220625.tar.xz 79092788 BLAKE2B 491da523abc0a63bbceaa6c76b251a5b6c224e1684b5db4e6155fdcab4b0d8d505376d30a13e1b0331f37558aac311477bbb3179b63da850acae436b642c9ee1 SHA512 0527c6d69cd53e8aba3464746b7989e3128af74818864a2e5b4be66313203d32a84201440a254da8de72842b0ebbbccf1ec14c6a121cb09f9454358b0a37b8f9 +DIST gcc-12-20220702.tar.xz 79091468 BLAKE2B a15363dbab5f331b2e5ee6362ef6701307513bca211cacdee2bf17cf50cf88a019110c2b2412939b614c3346b5ec3823ee5b1bca19db526693149a163e5b98fe SHA512 e5ab44e79f641ace6d9d77ffb176f3309d35e8f36b6bdd42f09e29fcc82766933e0fb8f86be84bf7419fe9918c554544d34c448b706ec0cb052e738e5594683c +DIST gcc-12.0.0-musl-patches-4.tar.xz 4456 BLAKE2B 80ae755b52c31d57eb737b3ec5e70d96e7e20f6720664cd94573b1c6cd079a0e29f73277c27b2f2570706da5239006dabd44f834824c515f6615ed5dc39c273f SHA512 cf917f40133d2b8090e98880e6c87d38129f44bcb454f4d707ef57967635a6fb571d7b85b7cb854421bc9aa88e48767a47aad99c767f9415899f97922d61c497 +DIST gcc-12.0.0-patches-5.tar.xz 9820 BLAKE2B cdebb6fa59e594f95cc4b028d329c0fed3ffa1731a4ca1a2954b7760f4a674e773cfe5888fb2c63a619d5d80ec464d98a94870bfe2e3ea34370afce7f67526bb SHA512 a9c27b0188fd842e88d6a831cdf1f9c6d0cada4ec260b5f7e67f3d8fe0f439fb0d2c82469de9fecebd657043babf3e63a24ee53776be2617bb90e1d3dd3f521e +DIST gcc-12.1.0-musl-patches-4.tar.xz 4448 BLAKE2B ddad7bccea7474a0552e069df25e66b4af68470da655aaf7669c2ceca7d0588cebb171e8a949c8935eeadff23af4d3de41d44245c06d48044cfc1d1fadc6540a SHA512 bb3b9e4a81efd2d0ceb405220a9c15453d780d8bc01ed5ebf4837a318e0f8ad8cc36d6ad3f2eed5051bb6dc82f223d8b61321b8f602890a770eefd69c0c144b9 +DIST gcc-12.1.0-musl-patches-5.tar.xz 4656 BLAKE2B b8dead8e796df2563cc7bfd4ad95f71f7cfbd51bc0d2bccb7479d2856cc3731b55f5e23b548c5f5f37790aae269815bbba6ee6596c5183847eed0bb1878bf340 SHA512 480e3e34e3f7e7ae27319fa9c51913125b2d4f41b0994c6df4c5c6f008d3ffdacbe059cd1ee643c2b9248a0c69db90867a076b0456c8d6649a1a7e9b62ff6800 +DIST gcc-12.1.0-musl-patches-6.tar.xz 3840 BLAKE2B 5d8ce4dcebd081fae485d3e1367c06c185e07c110b0cfe9598b71209c55adf96a26e198ab91fb3dfb33ddb2d8abd211a518dd74f5113cae1e3a4f90db32bb746 SHA512 b666ac0e9bef1b74dc5cc616ddb13dc40d9ecd1f5ae48b877cc1003356952a9afd800327d4210c732deb94554403d9b8730d2037bec380e413fc9a6cb59ecf23 +DIST gcc-12.1.0-patches-7.tar.xz 11584 BLAKE2B 4487726f8225d6bb2fde91fce8343c34ebece8cca08b258115a55b0f0c594e3a205efe26738c2b06cb8c6ea9d13b451514e073bb3a94d664a56120d9826515df SHA512 4882754d2f55c8144a5af4bcfbc1ee7802f08fc5acca96151cc6323a98e94b9246a69e067bcbf92dcdb8021499b8e1197cd7bd682876aca3e6f1f63a405c1dae +DIST gcc-12.1.0-patches-8.tar.xz 12020 BLAKE2B 6138ef4d76a682ecfd05ba7c80d8f5db791ea24420d944b7f55b8aa55e7a42d02c0d20d0c25ebba92cdf85fdeb3dad7c7e2676d4a39197862bb90cfc9151ce48 SHA512 d2784967ca580bdc9308bc4b2449eb23601aab46bfcca10f4e7db2267e04950e4d9ffe4d0091fb916149a4982786c80959a069e0da07638bfdcf9d5b8926627b +DIST gcc-12.1.0-patches-9.tar.xz 12536 BLAKE2B ceb045b2a5c5a2a3047d73296fa1057421ef58c7f793d1f031f43dbd1a6faf49bdf1956e96a4f8e34c4d3fde2c26fcc9b146c223d8b1b3e1f944c2ec8574b786 SHA512 b899ec2d6da65df0f32838be3c89dbb1dc6b423133aa5121635547a1aa18b5d52b920e62522143682c0818baf185ebacb75ab84383ef0ad9768ba567807da5f4 +DIST gcc-12.1.0.tar.xz 82701928 BLAKE2B dca5df8fea680dbeda721742cce5c97de7eb4be490a32a158e06b88e2b9dd092150b7cfe490bb69e48e2f75d8bba231c8a54cd46b48ddcdc01bf9553ab57019d SHA512 2121d295292814a6761edf1fba08c5f633ebe16f52b80e7b73a91050e71e1d2ed98bf17eebad263e191879561c02b48906c53faa4c4670c486a26fc75df23900 +DIST gcc-13-20220619.tar.xz 79328496 BLAKE2B 8c5104870593803b5cc0df02d671522f576bb56ad957e453d9f2bbc7995ccff2a4549ffef5f3beef15f2b9db6b1dc11b1993e2e5fa09feb9a5f6585be315f3f9 SHA512 69dfaf4a54a73b22127dd5167dd7d92e26e33e1bbf45507b05c97342db16264f96d78764745e41ac4ecade989789ac186364dcf9d13d765a5a5e7326469a9852 DIST gcc-8.5.0-patches-2.tar.bz2 16921 BLAKE2B 619a47f74edf05fa01c9de59d0ff7abb027a01cf0bdec91ac41046166192f4eae561684136c4a6a5e077f64754bb5b0710905129f31b0def21d88f92e6bba7fb SHA512 b6095d4570895e2c4dd58fed5756194aea27391b813e5e2de42b2749cb318c4bea2087eb0ff92c70e7f98ae4482c49d476db57be83d7beb19fd462aa61714ab2 DIST gcc-8.5.0.tar.xz 63841008 BLAKE2B aa81a1a730fd7371360f6abed6ba78b5843fd18c58d5de5687acc320741b9e430e85df3535a1ef7a26051409be8d2f0945f503e5968480d919103123a99d4b12 SHA512 92f599680e6b7fbce88bcdda810f468777d541e5fddfbb287f7977d51093de2a5178bd0e6a08dfe37090ea10a0508a43ccd00220041abbbec33f1179bfc174d8 -DIST gcc-9.4.0-musl-patches-1.tar.bz2 2337 BLAKE2B 7bddc631c9f0e68884acb2bb603e2867e1f65e44f3bd519844341984fa17f323a953bca21cfc05a0f84f7da943c83f2f5341899c917ab88891ac33ccafeb8f75 SHA512 b2cf463613011892b07d1a932f402d7606aa3fce4e059c342996c4ef6aa37f20159812a81fa82897b2caf658853644c5075d23c81d04c4c98e06a72bd9680488 DIST gcc-9.4.0-patches-1.tar.bz2 14012 BLAKE2B d5fbfd73d9c3a5b66be5b124d981fe5a7468363c83784989a50731f87931435f4b6302e4c20a64b20680581ed40005eff7bdd5855526a093f73a04c3c1ddab31 SHA512 b84884c7d2197cb14229d3321b98cd66c783cf9ebf7e5d1b1186e6cf32ee9e47d004ebad26118f9c848f9bc0a3783ceb23d9b65101d98c3bfa99874e66ee7cbc -DIST gcc-9.4.0.tar.xz 72411232 BLAKE2B 4bb000d33d6bd2d6cc91c040713f27f79dcf726ef8ab1542c711e0c25651507628510b1373bc73aef71ffb660afddb2eb8d8c8540f5f1498ee243cfff6c0be67 SHA512 dfd3500bf21784b8351a522d53463cf362ede66b0bc302edf350bb44e94418497a8b4b797b6af8ca9b2eeb746b3b115d9c3698381b989546e9151b4496415624 +DIST gcc-9.5.0.tar.xz 72462752 BLAKE2B 69e39314ee6bb46e3be491ba9c3cbc4914cb716f732c6d3f2b14d9382750b40c4f14b5d3051225b81f936ef8297b0ba8cb5439512e961dae5815d3bee2b0bfdb SHA512 cdd144ce4f747e051480410afc8506c90a57cb45da89071ddae377b1453bca3014422455ade9fe4563ebe51f4b6348cbc0c61905a9b8801cd597d51ad0ec62b3 diff --git a/sys-devel/gcc/gcc-10.3.0-r2.ebuild b/sys-devel/gcc/gcc-10.3.0-r2.ebuild index 0fc4ea78dc7..d62162f1a68 100644 --- a/sys-devel/gcc/gcc-10.3.0-r2.ebuild +++ b/sys-devel/gcc/gcc-10.3.0-r2.ebuild @@ -1,8 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="7" +TOOLCHAIN_PATCH_DEV="slyfox" PATCH_VER="3" MUSL_VER="1" diff --git a/sys-devel/gcc/gcc-10.3.1_p20211126.ebuild b/sys-devel/gcc/gcc-10.3.1_p20211126.ebuild index 911b768bcd3..e07e3b74876 100644 --- a/sys-devel/gcc/gcc-10.3.1_p20211126.ebuild +++ b/sys-devel/gcc/gcc-10.3.1_p20211126.ebuild @@ -1,8 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 +TOOLCHAIN_PATCH_DEV="sam" PATCH_VER="0" PATCH_GCC_VER="10.4.0" MUSL_VER="1" @@ -10,7 +11,7 @@ MUSL_GCC_VER="10.3.0" inherit toolchain -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" RDEPEND="" BDEPEND="${CATEGORY}/binutils" diff --git a/sys-devel/gcc/gcc-10.3.1_p20220623.ebuild b/sys-devel/gcc/gcc-10.3.1_p20220623.ebuild new file mode 100644 index 00000000000..3b0410d85b8 --- /dev/null +++ b/sys-devel/gcc/gcc-10.3.1_p20220623.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_SUFFIX="xz" +TOOLCHAIN_PATCH_DEV="sam" +#TOOLCHAIN_GCC_RC=1 +PATCH_GCC_VER="10.4.0" +PATCH_VER="1" +MUSL_VER="1" +MUSL_GCC_VER="10.4.0" + +if [[ $(ver_cut 3) == 9999 ]] ; then + MY_PV_2=$(ver_cut 2) + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + else + MY_PV_2=$(($(ver_cut 2) - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998)) +elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then + # Cheesy hack for RCs + MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5) + MY_P=${PN}-${MY_PV} + GCC_TARBALL_SRC_URI="https://gcc.gnu.org/pub/gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain +# Needs to be after inherit (for now?), bug #830908 +EGIT_BRANCH=releases/gcc-$(ver_cut 1) + +# Don't keyword live ebuilds +#if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then +# KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +#fi + +RDEPEND="" +BDEPEND="${CATEGORY}/binutils" + +src_prepare() { + local p upstreamed_patches=( + # add them here + ) + for p in "${upstreamed_patches[@]}"; do + rm -v "${WORKDIR}/patch/${p}" || die + done + + if has_version '>=sys-libs/glibc-2.32-r1'; then + rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch" || die + fi + + toolchain_src_prepare +} diff --git a/sys-devel/gcc/gcc-10.3.1_pre9999.ebuild b/sys-devel/gcc/gcc-10.3.1_pre9999.ebuild deleted file mode 100644 index b9f40e39b02..00000000000 --- a/sys-devel/gcc/gcc-10.3.1_pre9999.ebuild +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -PATCH_GCC_VER="10.3.0" -PATCH_VER="1" - -inherit toolchain - -# Don't keyword live ebuilds -#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86" - -RDEPEND="" -BDEPEND="${CATEGORY}/binutils" - -src_prepare() { - local p upstreamed_patches=( - # add them here - ) - for p in "${upstreamed_patches[@]}"; do - rm -v "${WORKDIR}/patch/${p}" || die - done - - if has_version '>=sys-libs/glibc-2.32-r1'; then - rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch" || die - fi - - toolchain_src_prepare -} diff --git a/sys-devel/gcc/gcc-10.4.0.ebuild b/sys-devel/gcc/gcc-10.4.0.ebuild new file mode 100644 index 00000000000..81fd79a887f --- /dev/null +++ b/sys-devel/gcc/gcc-10.4.0.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_SUFFIX="xz" +TOOLCHAIN_PATCH_DEV="sam" +#TOOLCHAIN_GCC_RC=1 +PATCH_GCC_VER="10.4.0" +PATCH_VER="2" +MUSL_VER="1" +MUSL_GCC_VER="10.4.0" + +if [[ $(ver_cut 3) == 9999 ]] ; then + MY_PV_2=$(ver_cut 2) + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + else + MY_PV_2=$(($(ver_cut 2) - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998)) +elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then + # Cheesy hack for RCs + MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5) + MY_P=${PN}-${MY_PV} + GCC_TARBALL_SRC_URI="https://gcc.gnu.org/pub/gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain +# Needs to be after inherit (for now?), bug #830908 +EGIT_BRANCH=releases/gcc-$(ver_cut 1) + +# Don't keyword live ebuilds +if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +RDEPEND="" +BDEPEND="${CATEGORY}/binutils" + +src_prepare() { + local p upstreamed_patches=( + # add them here + ) + for p in "${upstreamed_patches[@]}"; do + rm -v "${WORKDIR}/patch/${p}" || die + done + + if has_version '>=sys-libs/glibc-2.32-r1'; then + rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch" || die + fi + + toolchain_src_prepare +} diff --git a/sys-devel/gcc/gcc-10.4.1_p20220630.ebuild b/sys-devel/gcc/gcc-10.4.1_p20220630.ebuild new file mode 100644 index 00000000000..b2fac30d2ff --- /dev/null +++ b/sys-devel/gcc/gcc-10.4.1_p20220630.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_SUFFIX="xz" +TOOLCHAIN_PATCH_DEV="sam" +#TOOLCHAIN_GCC_RC=1 +PATCH_GCC_VER="10.4.0" +PATCH_VER="2" +MUSL_VER="1" +MUSL_GCC_VER="10.4.0" + +if [[ $(ver_cut 3) == 9999 ]] ; then + MY_PV_2=$(ver_cut 2) + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + else + MY_PV_2=$(($(ver_cut 2) - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998)) +elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then + # Cheesy hack for RCs + MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5) + MY_P=${PN}-${MY_PV} + GCC_TARBALL_SRC_URI="https://gcc.gnu.org/pub/gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain +# Needs to be after inherit (for now?), bug #830908 +EGIT_BRANCH=releases/gcc-$(ver_cut 1) + +# Don't keyword live ebuilds +#if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then +# KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +#fi + +RDEPEND="" +BDEPEND="${CATEGORY}/binutils" + +src_prepare() { + local p upstreamed_patches=( + # add them here + ) + for p in "${upstreamed_patches[@]}"; do + rm -v "${WORKDIR}/patch/${p}" || die + done + + if has_version '>=sys-libs/glibc-2.32-r1'; then + rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch" || die + fi + + toolchain_src_prepare +} diff --git a/sys-devel/gcc/gcc-10.5.9999.ebuild b/sys-devel/gcc/gcc-10.5.9999.ebuild new file mode 100644 index 00000000000..d43d8bf4fbb --- /dev/null +++ b/sys-devel/gcc/gcc-10.5.9999.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_SUFFIX="xz" +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="10.4.0" +MUSL_GCC_VER="10.4.0" + +if [[ $(ver_cut 3) == 9999 ]] ; then + MY_PV_2=$(ver_cut 2) + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + else + MY_PV_2=$(($(ver_cut 2) - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998)) +fi + +inherit toolchain +# Needs to be after inherit (for now?), bug #830908 +EGIT_BRANCH=releases/gcc-$(ver_cut 1) + +# Don't keyword live ebuilds +if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +RDEPEND="" +BDEPEND="${CATEGORY}/binutils" + +src_prepare() { + local p upstreamed_patches=( + # add them here + ) + for p in "${upstreamed_patches[@]}"; do + rm -v "${WORKDIR}/patch/${p}" || die + done + + if has_version '>=sys-libs/glibc-2.32-r1'; then + rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch" || die + fi + + toolchain_src_prepare +} diff --git a/sys-devel/gcc/gcc-11.2.0.ebuild b/sys-devel/gcc/gcc-11.2.0.ebuild index 92a4dc61b1f..9dc5d227629 100644 --- a/sys-devel/gcc/gcc-11.2.0.ebuild +++ b/sys-devel/gcc/gcc-11.2.0.ebuild @@ -1,8 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="7" +TOOLCHAIN_PATCH_DEV="slyfox" PATCH_VER="1" MUSL_VER="1" diff --git a/sys-devel/gcc/gcc-11.2.1_p20220115.ebuild b/sys-devel/gcc/gcc-11.2.1_p20220115.ebuild index 6d5f17550bd..4e44bafeab2 100644 --- a/sys-devel/gcc/gcc-11.2.1_p20220115.ebuild +++ b/sys-devel/gcc/gcc-11.2.1_p20220115.ebuild @@ -3,6 +3,7 @@ EAPI=7 +TOOLCHAIN_PATCH_DEV="sam" PATCH_VER="4" PATCH_GCC_VER="11.3.0" MUSL_VER="1" @@ -10,14 +11,14 @@ MUSL_GCC_VER="11.3.0" inherit toolchain -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" # Technically only if USE=hardened *too* right now, but no point in complicating it further. # If GCC is enabling CET by default, we need glibc to be built with support for it. # bug #830454 RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" DEPEND="${RDEPEND}" -BDEPEND="${CATEGORY}/binutils[cet(-)?]" +BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]" src_prepare() { toolchain_src_prepare diff --git a/sys-devel/gcc/gcc-11.2.1_pre9999.ebuild b/sys-devel/gcc/gcc-11.2.1_pre9999.ebuild deleted file mode 100644 index b17d87e21b4..00000000000 --- a/sys-devel/gcc/gcc-11.2.1_pre9999.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PATCH_VER="3" -PATCH_GCC_VER="11.3.0" -MUSL_VER="1" -MUSL_GCC_VER="11.2.0" - -inherit toolchain - -#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" - -# Technically only if USE=hardened *too* right now, but no point in complicating it further. -# If GCC is enabling CET by default, we need glibc to be built with support for it. -# bug #830454 -RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" -DEPEND="${RDEPEND}" -BDEPEND="${CATEGORY}/binutils[cet(-)?]" - -src_prepare() { - local p upstreamed_patches=( - # add them here - ) - for p in "${upstreamed_patches[@]}"; do - rm -v "${WORKDIR}/patch/${p}" || die - done - - toolchain_src_prepare - - if tc-is-cross-compiler ; then - # bug #803371 - eapply "${FILESDIR}"/gcc-11.2.0-cross-compile-include.patch - fi - - eapply_user -} diff --git a/sys-devel/gcc/gcc-11.2.1_p20211127.ebuild b/sys-devel/gcc/gcc-11.3.0.ebuild index cf332f7e6ce..b02633ee306 100644 --- a/sys-devel/gcc/gcc-11.2.1_p20211127.ebuild +++ b/sys-devel/gcc/gcc-11.3.0.ebuild @@ -3,29 +3,25 @@ EAPI=7 -PATCH_VER="3" +TOOLCHAIN_PATCH_DEV="sam" +PATCH_VER="5" PATCH_GCC_VER="11.3.0" MUSL_VER="1" -MUSL_GCC_VER="11.2.0" +MUSL_GCC_VER="11.3.0" inherit toolchain -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" # Technically only if USE=hardened *too* right now, but no point in complicating it further. # If GCC is enabling CET by default, we need glibc to be built with support for it. # bug #830454 RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" DEPEND="${RDEPEND}" -BDEPEND="${CATEGORY}/binutils[cet(-)?]" +BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]" src_prepare() { toolchain_src_prepare - if tc-is-cross-compiler ; then - # bug #803371 - eapply "${FILESDIR}"/gcc-11.2.0-cross-compile-include.patch - fi - eapply_user } diff --git a/sys-devel/gcc/gcc-11.3.1_p20220624.ebuild b/sys-devel/gcc/gcc-11.3.1_p20220624.ebuild new file mode 100644 index 00000000000..66746a359bd --- /dev/null +++ b/sys-devel/gcc/gcc-11.3.1_p20220624.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +TOOLCHAIN_PATCH_SUFFIX="xz" +TOOLCHAIN_PATCH_DEV="sam" +PATCH_VER="0" +PATCH_GCC_VER="11.4.0" +MUSL_VER="0" +MUSL_GCC_VER="11.4.0" + +if [[ $(ver_cut 3) == 9999 ]] ; then + MY_PV_2=$(ver_cut 2) + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + else + MY_PV_2=$(($(ver_cut 2) - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998)) +fi + +inherit toolchain +# Needs to be after inherit (for now?), bug #830908 +EGIT_BRANCH=releases/gcc-$(ver_cut 1) + +# Don't keyword live ebuilds +#if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then +# KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +#fi + +# Technically only if USE=hardened *too* right now, but no point in complicating it further. +# If GCC is enabling CET by default, we need glibc to be built with support for it. +# bug #830454 +RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" +DEPEND="${RDEPEND}" +BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]" + +src_prepare() { + local p upstreamed_patches=( + # add them here + ) + for p in "${upstreamed_patches[@]}"; do + rm -v "${WORKDIR}/patch/${p}" || die + done + + toolchain_src_prepare + + eapply_user +} diff --git a/sys-devel/gcc/gcc-11.3.1_p20220701.ebuild b/sys-devel/gcc/gcc-11.3.1_p20220701.ebuild new file mode 100644 index 00000000000..fec8a9f9652 --- /dev/null +++ b/sys-devel/gcc/gcc-11.3.1_p20220701.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_SUFFIX="xz" +TOOLCHAIN_PATCH_DEV="sam" +PATCH_VER="1" +PATCH_GCC_VER="11.4.0" +MUSL_VER="0" +MUSL_GCC_VER="11.4.0" + +if [[ $(ver_cut 3) == 9999 ]] ; then + MY_PV_2=$(ver_cut 2) + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + else + MY_PV_2=$(($(ver_cut 2) - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998)) +fi + +inherit toolchain +# Needs to be after inherit (for now?), bug #830908 +EGIT_BRANCH=releases/gcc-$(ver_cut 1) + +# Don't keyword live ebuilds +#if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then +# KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +#fi + +# Technically only if USE=hardened *too* right now, but no point in complicating it further. +# If GCC is enabling CET by default, we need glibc to be built with support for it. +# bug #830454 +RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" +DEPEND="${RDEPEND}" +BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]" + +src_prepare() { + local p upstreamed_patches=( + # add them here + ) + for p in "${upstreamed_patches[@]}"; do + rm -v "${WORKDIR}/patch/${p}" || die + done + + toolchain_src_prepare + + eapply_user +} diff --git a/sys-devel/gcc/gcc-11.4.9999.ebuild b/sys-devel/gcc/gcc-11.4.9999.ebuild new file mode 100644 index 00000000000..de29705ca37 --- /dev/null +++ b/sys-devel/gcc/gcc-11.4.9999.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +TOOLCHAIN_PATCH_SUFFIX="xz" +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="11.4.0" +MUSL_GCC_VER="11.4.0" + +if [[ $(ver_cut 3) == 9999 ]] ; then + MY_PV_2=$(ver_cut 2) + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + else + MY_PV_2=$(($(ver_cut 2) - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998)) +fi + +inherit toolchain +# Needs to be after inherit (for now?), bug #830908 +EGIT_BRANCH=releases/gcc-$(ver_cut 1) + +# Don't keyword live ebuilds +if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +# Technically only if USE=hardened *too* right now, but no point in complicating it further. +# If GCC is enabling CET by default, we need glibc to be built with support for it. +# bug #830454 +RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" +DEPEND="${RDEPEND}" +BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]" + +src_prepare() { + local p upstreamed_patches=( + # add them here + ) + for p in "${upstreamed_patches[@]}"; do + rm -v "${WORKDIR}/patch/${p}" || die + done + + toolchain_src_prepare + + eapply_user +} diff --git a/sys-devel/gcc/gcc-12.1.0.ebuild b/sys-devel/gcc/gcc-12.1.0.ebuild new file mode 100644 index 00000000000..d2fce9d3282 --- /dev/null +++ b/sys-devel/gcc/gcc-12.1.0.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_VER="5" +PATCH_GCC_VER="12.0.0" +MUSL_VER="4" +MUSL_GCC_VER="12.0.0" + +inherit toolchain + +# Don't keyword live ebuilds +if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + KEYWORDS="~loong" +fi + +# Technically only if USE=hardened *too* right now, but no point in complicating it further. +# If GCC is enabling CET by default, we need glibc to be built with support for it. +# bug #830454 +RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" +DEPEND="${RDEPEND}" +BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]" + +src_prepare() { + toolchain_src_prepare + + eapply_user +} diff --git a/sys-devel/gcc/gcc-12.1.1_p20220528-r1.ebuild b/sys-devel/gcc/gcc-12.1.1_p20220528-r1.ebuild new file mode 100644 index 00000000000..aa68dc8eaad --- /dev/null +++ b/sys-devel/gcc/gcc-12.1.1_p20220528-r1.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_VER="7" +PATCH_GCC_VER="12.1.0" +MUSL_VER="4" +MUSL_GCC_VER="12.1.0" + +inherit toolchain + +# Don't keyword live ebuilds +if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + KEYWORDS="~loong" +fi + +# Technically only if USE=hardened *too* right now, but no point in complicating it further. +# If GCC is enabling CET by default, we need glibc to be built with support for it. +# bug #830454 +RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" +DEPEND="${RDEPEND}" +BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]" + +src_prepare() { + toolchain_src_prepare + + eapply_user +} diff --git a/sys-devel/gcc/gcc-12.1.1_p20220625.ebuild b/sys-devel/gcc/gcc-12.1.1_p20220625.ebuild new file mode 100644 index 00000000000..51819ad5271 --- /dev/null +++ b/sys-devel/gcc/gcc-12.1.1_p20220625.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_VER="8" +PATCH_GCC_VER="12.1.0" +MUSL_VER="5" +MUSL_GCC_VER="12.1.0" + +inherit toolchain + +# Don't keyword live ebuilds +if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +# Technically only if USE=hardened *too* right now, but no point in complicating it further. +# If GCC is enabling CET by default, we need glibc to be built with support for it. +# bug #830454 +RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" +DEPEND="${RDEPEND}" +BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]" + +src_prepare() { + toolchain_src_prepare + + eapply_user +} diff --git a/sys-devel/gcc/gcc-12.1.1_p20220702.ebuild b/sys-devel/gcc/gcc-12.1.1_p20220702.ebuild new file mode 100644 index 00000000000..4ce888a6319 --- /dev/null +++ b/sys-devel/gcc/gcc-12.1.1_p20220702.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_VER="9" +PATCH_GCC_VER="12.1.0" +MUSL_VER="6" +MUSL_GCC_VER="12.1.0" + +inherit toolchain + +# Don't keyword live ebuilds +if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + KEYWORDS="~loong" +fi + +# Technically only if USE=hardened *too* right now, but no point in complicating it further. +# If GCC is enabling CET by default, we need glibc to be built with support for it. +# bug #830454 +RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" +DEPEND="${RDEPEND}" +BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]" + +src_prepare() { + toolchain_src_prepare + + eapply_user +} diff --git a/sys-devel/gcc/gcc-12.2.9999.ebuild b/sys-devel/gcc/gcc-12.2.9999.ebuild new file mode 100644 index 00000000000..d1a72887e79 --- /dev/null +++ b/sys-devel/gcc/gcc-12.2.9999.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="12.1.0" +MUSL_GCC_VER="12.1.0" + +if [[ $(ver_cut 3) == 9999 ]] ; then + MY_PV_2=$(ver_cut 2) + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + else + MY_PV_2=$(($(ver_cut 2) - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998)) +fi + +inherit toolchain +# Needs to be after inherit (for now?), bug #830908 +EGIT_BRANCH=releases/gcc-$(ver_cut 1) + +# Don't keyword live ebuilds +if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +# Technically only if USE=hardened *too* right now, but no point in complicating it further. +# If GCC is enabling CET by default, we need glibc to be built with support for it. +# bug #830454 +RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" +DEPEND="${RDEPEND}" +BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]" + +src_prepare() { + local p upstreamed_patches=( + # add them here + ) + for p in "${upstreamed_patches[@]}"; do + rm -v "${WORKDIR}/patch/${p}" || die + done + + toolchain_src_prepare + + eapply_user +} diff --git a/sys-devel/gcc/gcc-13.0.0_pre20220619.ebuild b/sys-devel/gcc/gcc-13.0.0_pre20220619.ebuild new file mode 100644 index 00000000000..0c062546388 --- /dev/null +++ b/sys-devel/gcc/gcc-13.0.0_pre20220619.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="13.1.0" +MUSL_GCC_VER="13.1.0" +TOOLCHAIN_USE_GIT_PATCHES=yes + +if [[ $(ver_cut 3) == 9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=$(($(ver_cut 3) - 9998)) + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$(($(ver_cut 2) - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +fi + +inherit toolchain +# Needs to be after inherit (for now?), bug #830908 +EGIT_BRANCH=master + +# Don't keyword live ebuilds +if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +# Technically only if USE=hardened *too* right now, but no point in complicating it further. +# If GCC is enabling CET by default, we need glibc to be built with support for it. +# bug #830454 +RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" +DEPEND="${RDEPEND}" +BDEPEND="${CATEGORY}/binutils[cet(-)?]" + +src_prepare() { + local p upstreamed_patches=( + # add them here + ) + for p in "${upstreamed_patches[@]}"; do + rm -v "${WORKDIR}/patch/${p}" || die + done + + toolchain_src_prepare + + eapply_user +} diff --git a/sys-devel/gcc/gcc-12.0.0_pre9999.ebuild b/sys-devel/gcc/gcc-13.0.9999.ebuild index 4dfdd34abfb..12107557325 100644 --- a/sys-devel/gcc/gcc-12.0.0_pre9999.ebuild +++ b/sys-devel/gcc/gcc-13.0.9999.ebuild @@ -1,21 +1,34 @@ # Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 - -TOOLCHAIN_GCC_PV=12.0.1 - -PATCH_VER="2" -PATCH_GCC_VER="12.0.0" -MUSL_VER="1" -MUSL_GCC_VER="11.2.0" +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="13.1.0" +MUSL_GCC_VER="13.1.0" + +if [[ $(ver_cut 3) == 9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=$(($(ver_cut 3) - 9998)) + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$(($(ver_cut 2) - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +fi inherit toolchain # Needs to be after inherit (for now?), bug #830908 EGIT_BRANCH=master # Don't keyword live ebuilds -#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86" +if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi # Technically only if USE=hardened *too* right now, but no point in complicating it further. # If GCC is enabling CET by default, we need glibc to be built with support for it. diff --git a/sys-devel/gcc/gcc-6.5.0-r4.ebuild b/sys-devel/gcc/gcc-6.5.0-r4.ebuild deleted file mode 100644 index 3136ac508c4..00000000000 --- a/sys-devel/gcc/gcc-6.5.0-r4.ebuild +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -PATCH_VER="6" - -inherit toolchain - -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" - -RDEPEND="" -DEPEND="${RDEPEND} - elibc_glibc? ( >=sys-libs/glibc-2.13 ) - >=${CATEGORY}/binutils-2.20" - -if [[ ${CATEGORY} != cross-* ]] ; then - PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.13 )" -fi diff --git a/sys-devel/gcc/gcc-7.5.0-r2.ebuild b/sys-devel/gcc/gcc-7.5.0-r2.ebuild deleted file mode 100644 index 63d0a121cf0..00000000000 --- a/sys-devel/gcc/gcc-7.5.0-r2.ebuild +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -PATCH_VER="4" - -inherit toolchain - -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-macos" - -RDEPEND="" -DEPEND="${RDEPEND} - elibc_glibc? ( >=sys-libs/glibc-2.13 ) - >=${CATEGORY}/binutils-2.20" - -if [[ ${CATEGORY} != cross-* ]] ; then - PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.13 )" -fi diff --git a/sys-devel/gcc/gcc-8.5.0-r1.ebuild b/sys-devel/gcc/gcc-8.5.0-r1.ebuild index e5b72b981c9..ff799268370 100644 --- a/sys-devel/gcc/gcc-8.5.0-r1.ebuild +++ b/sys-devel/gcc/gcc-8.5.0-r1.ebuild @@ -1,8 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="7" +TOOLCHAIN_PATCH_DEV="slyfox" PATCH_VER="2" inherit toolchain diff --git a/sys-devel/gcc/gcc-9.4.0.ebuild b/sys-devel/gcc/gcc-9.4.0.ebuild deleted file mode 100644 index 7c210388c01..00000000000 --- a/sys-devel/gcc/gcc-9.4.0.ebuild +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -PATCH_VER="1" -MUSL_VER="1" -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" - -if [[ ${CATEGORY} != cross-* ]] ; then - PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.13 )" -fi diff --git a/sys-devel/gcc/gcc-9.4.1_pre9999.ebuild b/sys-devel/gcc/gcc-9.4.1_pre9999.ebuild deleted file mode 100644 index 8c31f450a34..00000000000 --- a/sys-devel/gcc/gcc-9.4.1_pre9999.ebuild +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -PATCH_GCC_VER="9.4.0" -PATCH_VER="1" - -inherit toolchain - -# Don't keyword live ebuilds -#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86" - -RDEPEND="" -BDEPEND="${CATEGORY}/binutils" - -src_prepare() { - local p upstreamed_patches=( - # add them here - ) - for p in "${upstreamed_patches[@]}"; do - rm -v "${WORKDIR}/patch/${p}" || die - done - - toolchain_src_prepare -} diff --git a/sys-devel/gcc/gcc-9.5.0.ebuild b/sys-devel/gcc/gcc-9.5.0.ebuild new file mode 100644 index 00000000000..4a953b324d6 --- /dev/null +++ b/sys-devel/gcc/gcc-9.5.0.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +TOOLCHAIN_PATCH_DEV="slyfox" +PATCH_GCC_VER="9.4.0" +PATCH_VER="1" + +if [[ $(ver_cut 3) == 9999 ]] ; then + MY_PV_2=$(ver_cut 2) + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + else + MY_PV_2=$(($(ver_cut 2) - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998)) +fi + +inherit toolchain +# Needs to be after inherit (for now?), bug #830908 +EGIT_BRANCH=releases/gcc-$(ver_cut 1) + +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" + +RDEPEND="" +BDEPEND="${CATEGORY}/binutils" + +src_prepare() { + local p upstreamed_patches=( + # add them here + ) + for p in "${upstreamed_patches[@]}"; do + rm -v "${WORKDIR}/patch/${p}" || die + done + + toolchain_src_prepare +} diff --git a/sys-devel/gcc/metadata.xml b/sys-devel/gcc/metadata.xml index 8730f85e65d..b6eef667b03 100644 --- a/sys-devel/gcc/metadata.xml +++ b/sys-devel/gcc/metadata.xml @@ -1,43 +1,34 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="project"> - <email>toolchain@gentoo.org</email> - <name>Gentoo Toolchain Project</name> - </maintainer> - <use> - <flag name="ada">Build the ADA language (GNAT) frontend</flag> - <flag name="awt">Useful only when building GCJ, this enables Abstract Window Toolkit - (AWT) peer support on top of GTK+</flag> - <flag name="cet" restrict=">=sys-devel/gcc-10">Enable support for Intel Control Flow Enforcement Technology (CET)</flag> - <flag name="cilk">Support the Cilk Plus language (C/C++ based languages for parallel programming)</flag> - <flag name="d">Enable support for the D programming language</flag> - <flag name="fixed-point">Enable fixed-point arithmetic support for MIPS targets - in gcc (Warning: significantly increases compile time!)</flag> - <flag name="gcj">Build the GCJ Java language frontend.</flag> - <flag name="go">Build the GCC Go language frontend.</flag> - <flag name="graphite">Add support for the framework for loop - optimizations based on a polyhedral intermediate representation</flag> - <flag name="jit">Enable libgccjit so other applications can embed gcc for Just-In-Time compilation. - This will slow down the compiler a bit as it forces all of the toolchain to be shared libs.</flag> - <flag name="libssp">Build SSP support into a dedicated library rather than use the - code in the C library (DO NOT ENABLE THIS IF YOU DON'T KNOW WHAT IT DOES)</flag> - <flag name="lto">Build using Link Time Optimizations (LTO)</flag> - <flag name="mpx">Enable support for Intel Memory Protection Extensions (MPX)</flag> - <flag name="nptl">Enable support for Native POSIX Threads Library, the new threading module (requires linux-2.6 or better usually)</flag> - <flag name="objc">Build support for the Objective C code language</flag> - <flag name="objc++">Build support for the Objective C++ language</flag> - <flag name="objc-gc">Build support for the Objective C code language Garbage - Collector</flag> - <flag name="pgo">Build GCC using Profile Guided Optimization (PGO)</flag> - <flag name="sanitize">Build support for various sanitizer functions (ASAN/TSAN/etc...)</flag> - <flag name="ssp">Build packages with stack smashing protector on by default</flag> - <flag name="systemtap">enable systemtap static probe points</flag> - <flag name="valgrind">Enable valgrind annotations for gcc internals (useful for gcc debugging).</flag> - <flag name="vtv">Build support for virtual table verification (a C++ hardening feature)</flag> - </use> - <upstream> - <remote-id type="cpe">cpe:/a:gnu:gcc</remote-id> - <remote-id type="sourceforge">dgcc</remote-id> - </upstream> + <maintainer type="project"> + <email>toolchain@gentoo.org</email> + <name>Gentoo Toolchain Project</name> + </maintainer> + <use> + <flag name="ada">Build the ADA language (GNAT) frontend</flag> + <flag name="cet" restrict=">=sys-devel/gcc-10">Enable support for Intel Control Flow Enforcement Technology (CET)</flag> + <flag name="d">Enable support for the D programming language</flag> + <flag name="fixed-point">Enable fixed-point arithmetic support for MIPS targets in gcc (Warning: significantly increases compile time!)</flag> + <flag name="go">Build the GCC Go language frontend.</flag> + <flag name="graphite">Add support for the framework for loop optimizations based on a polyhedral intermediate representation</flag> + <flag name="jit">Enable libgccjit so other applications can embed gcc for Just-In-Time compilation. This will slow down the compiler a bit as it forces all of the toolchain to be shared libs.</flag> + <flag name="libssp">Build SSP support into a dedicated library rather than use the code in the C library (DO NOT ENABLE THIS IF YOU DON'T KNOW WHAT IT DOES)</flag> + <flag name="lto">Build using Link Time Optimizations (LTO)</flag> + <flag name="mpx">Enable support for Intel Memory Protection Extensions (MPX)</flag> + <flag name="nptl">Enable support for Native POSIX Threads Library, the new threading module (requires linux-2.6 or better usually)</flag> + <flag name="objc">Build support for the Objective C code language</flag> + <flag name="objc++">Build support for the Objective C++ language</flag> + <flag name="objc-gc">Build support for the Objective C code language Garbage Collector</flag> + <flag name="pgo">Build GCC using Profile Guided Optimization (PGO)</flag> + <flag name="sanitize">Build support for various sanitizer functions (ASAN/TSAN/etc...)</flag> + <flag name="ssp">Build packages with stack smashing protector on by default</flag> + <flag name="systemtap">enable systemtap static probe points</flag> + <flag name="valgrind">Enable valgrind annotations for gcc internals (useful for gcc debugging).</flag> + <flag name="vtv">Build support for virtual table verification (a C++ hardening feature)</flag> + </use> + <upstream> + <remote-id type="cpe">cpe:/a:gnu:gcc</remote-id> + <remote-id type="sourceforge">dgcc</remote-id> + </upstream> </pkgmetadata> diff --git a/sys-devel/gdb/Manifest b/sys-devel/gdb/Manifest index ed14c21d8f6..dbb57cec059 100644 --- a/sys-devel/gdb/Manifest +++ b/sys-devel/gdb/Manifest @@ -1,3 +1,2 @@ -DIST gdb-10.2.tar.xz 21518900 BLAKE2B c5d31d80d2b454767d6f844e8471b012ad437c3872391b618fd7b14c5cf251b78e55d28c12e81382fd600f67e2f618ff5dbe3a7b737a5d5161ceb3542afbb90b SHA512 3653762ac008e065c37cd641653184c9ff7ce51ee2222ade1122bec9d6cc64dffd4fb74888ef11ac1942064a08910e96b7865112ad37f4602eb0a16bed074caa -DIST gdb-11.1.tar.xz 22040696 BLAKE2B 6a639f6533f4008bfb469c23a26c4fcd039f1bc5dd33745f4876344451beb595d7a8843caeb5db70214924624c5b999f8831237d459bebf1cb2d2866f8b41ee2 SHA512 c40bf970e2f7c2107b29c5aa6a7150daa709d75ddadb73ac20742419d4637d158e3063a4c6ff6e47fae8ca8e1d36253973f85ea15445d004be6d5d7a2dd9bd46 DIST gdb-11.2.tar.xz 22039420 BLAKE2B 66ce7e12c99c33c8b4e6ababa673204aab525e72c90ba54cc34a5fd69948a09dc2a9ef2050764b2464544231b1d1a6431279c2877388551ca6fbf384a3f9b464 SHA512 07e9026423438049b11f4f784d57401ece4e940570f613bd6958b3714fe7fbc2c048470bcce3e7d7d9f93331cdf3881d30dcc964cb113a071143a02b28e5b127 +DIST gdb-12.1.tar.xz 22470332 BLAKE2B 7f6f853d1640908cf2c79932cdc1ba02549a07721c005d9c7ce2946a715761719cc164a4e68235a18664ec8a029afe3a2a0cfb57e1635f280076d6bed91317fd SHA512 425568d2e84672177d0fb87b1ad7daafdde097648d605e30cf0656970f66adc6a82ca2d83375ea4be583e9683a340e5bfdf5819668ddf66728200141ae50ff2d diff --git a/sys-devel/gdb/files/gdb-10.1-cet.patch b/sys-devel/gdb/files/gdb-10.1-cet.patch deleted file mode 100644 index 7477ff90ac9..00000000000 --- a/sys-devel/gdb/files/gdb-10.1-cet.patch +++ /dev/null @@ -1,103 +0,0 @@ -https://bugs.gentoo.org/771765 -https://sourceware.org/PR27397 - -On i586-like CPUs endbr32 added by -Wl,-z,ibt,-z,shstk -generates crashing binaries and causes ./configure failure. - -From 847e4b3207f97762dc641db8d3b188081c3370c3 Mon Sep 17 00:00:00 2001 -From: "H.J. Lu" <hjl.tools@gmail.com> -Date: Fri, 12 Feb 2021 16:30:23 -0800 -Subject: [PATCH] GCC_CET_HOST_FLAGS: Check if host supports multi-byte NOPs - ---- - config/cet.m4 | 19 ++++++++++++++++--- - libiberty/configure | 29 +++++++++++++++++++++++++++++ - 2 files changed, 45 insertions(+), 3 deletions(-) - -diff --git a/config/cet.m4 b/config/cet.m4 -index c67fb4f35b6..7718be1afe8 100644 ---- a/config/cet.m4 -+++ b/config/cet.m4 -@@ -130,6 +130,18 @@ fi - if test x$may_have_cet = xyes; then - if test x$cross_compiling = xno; then - AC_TRY_RUN([ -+int -+main () -+{ -+ asm ("endbr32"); -+ return 0; -+} -+ ], -+ [have_multi_byte_nop=yes], -+ [have_multi_byte_nop=no]) -+ have_cet=no -+ if test x$have_multi_byte_nop = xyes; then -+ AC_TRY_RUN([ - static void - foo (void) - { -@@ -155,9 +167,10 @@ main () - bar (); - return 0; - } -- ], -- [have_cet=no], -- [have_cet=yes]) -+ ], -+ [have_cet=no], -+ [have_cet=yes]) -+ fi - if test x$enable_cet = xno -a x$have_cet = xyes; then - AC_MSG_ERROR([Intel CET must be enabled on Intel CET enabled host]) - fi -diff --git a/libiberty/configure b/libiberty/configure -index 160b8c9e8b1..29a690d44fc 100755 ---- a/libiberty/configure -+++ b/libiberty/configure -@@ -5539,6 +5539,34 @@ else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -+int -+main () -+{ -+ asm ("endbr32"); -+ return 0; -+} -+ -+_ACEOF -+if ac_fn_c_try_run "$LINENO"; then : -+ have_multi_byte_nop=yes -+else -+ have_multi_byte_nop=no -+fi -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -+ conftest.$ac_objext conftest.beam conftest.$ac_ext -+fi -+ -+ have_cet=no -+ if test x$have_multi_byte_nop = xyes; then -+ if test "$cross_compiling" = yes; then : -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+as_fn_error $? "cannot run test program while cross compiling -+See \`config.log' for more details" "$LINENO" 5; } -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ - static void - foo (void) - { -@@ -5575,6 +5603,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext - fi - -+ fi - if test x$enable_cet = xno -a x$have_cet = xyes; then - as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5 - fi --- -2.29.2 - diff --git a/sys-devel/gdb/files/gdb-10.2-DW_LLE-riscv64.patch b/sys-devel/gdb/files/gdb-10.2-DW_LLE-riscv64.patch deleted file mode 100644 index 0d3e8c5cb94..00000000000 --- a/sys-devel/gdb/files/gdb-10.2-DW_LLE-riscv64.patch +++ /dev/null @@ -1,41 +0,0 @@ -https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=80d1206d7fea6eb756183e2825abdfd0f00cd976 -https://sourceware.org/PR27999 - -From 80d1206d7fea6eb756183e2825abdfd0f00cd976 Mon Sep 17 00:00:00 2001 -From: Andreas Schwab <schwab@suse.de> -Date: Mon, 21 Jun 2021 11:38:23 +0200 -Subject: [PATCH] gdb: Support DW_LLE_start_end - -Without that it is impossible to debug on riscv64. - ---- a/gdb/dwarf2/loc.c -+++ b/gdb/dwarf2/loc.c -@@ -255,9 +255,27 @@ decode_debug_loclists_addresses (dwarf2_per_cu_data *per_cu, - *new_ptr = loc_ptr; - return DEBUG_LOC_OFFSET_PAIR; - -+ case DW_LLE_start_end: -+ if (loc_ptr + 2 * addr_size > buf_end) -+ return DEBUG_LOC_BUFFER_OVERFLOW; -+ -+ if (signed_addr_p) -+ *low = extract_signed_integer (loc_ptr, addr_size, byte_order); -+ else -+ *low = extract_unsigned_integer (loc_ptr, addr_size, byte_order); -+ -+ loc_ptr += addr_size; -+ if (signed_addr_p) -+ *high = extract_signed_integer (loc_ptr, addr_size, byte_order); -+ else -+ *high = extract_unsigned_integer (loc_ptr, addr_size, byte_order); -+ -+ loc_ptr += addr_size; -+ *new_ptr = loc_ptr; -+ return DEBUG_LOC_START_END; -+ - /* Following cases are not supported yet. */ - case DW_LLE_startx_endx: -- case DW_LLE_start_end: - case DW_LLE_default_location: - default: - return DEBUG_LOC_INVALID_ENTRY; diff --git a/sys-devel/gdb/files/gdb-10.2-sparc-nat.patch b/sys-devel/gdb/files/gdb-10.2-sparc-nat.patch deleted file mode 100644 index 5e71efa0d33..00000000000 --- a/sys-devel/gdb/files/gdb-10.2-sparc-nat.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 288e3189fce8f466ca60411c27e8f1c0dac5d582 Mon Sep 17 00:00:00 2001 -From: Sergei Trofimovich <siarheit@google.com> -Date: Sun, 25 Apr 2021 20:50:38 +0100 -Subject: [PATCH] gdb: fix sparc build failure of linux-nat - -On sparc build failed as: - -``` -gdb/sparc-linux-nat.c: In member function - 'virtual void sparc_linux_nat_target::fetch_registers(regcache*, int)': -gdb/sparc-linux-nat.c:36:37: - error: cannot convert 'regcache*' to 'process_stratum_target*' - 36 | { sparc_fetch_inferior_registers (regcache, regnum); } - | ^~~~~~~~ - | | - | regcache* -``` - -The fix adopts gdb/sparc-nat.h API change in d1e93af64a6 -("gdb: set current thread in sparc_{fetch,collect}_inferior_registers"). - -gdb/ChangeLog: - - * sparc-linux-nat.c (sparc_linux_nat_target): fix sparc build - by passing `process_stratum_target*` parameter. ---- - gdb/sparc-linux-nat.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/gdb/sparc-linux-nat.c -+++ b/gdb/sparc-linux-nat.c -@@ -33,10 +33,10 @@ class sparc_linux_nat_target final : public linux_nat_target - public: - /* Add our register access methods. */ - void fetch_registers (struct regcache *regcache, int regnum) override -- { sparc_fetch_inferior_registers (regcache, regnum); } -+ { sparc_fetch_inferior_registers (this, regcache, regnum); } - - void store_registers (struct regcache *regcache, int regnum) override -- { sparc_store_inferior_registers (regcache, regnum); } -+ { sparc_store_inferior_registers (this, regcache, regnum); } - }; - - static sparc_linux_nat_target the_sparc_linux_nat_target; --- -2.31.1 - diff --git a/sys-devel/gdb/files/gdb-11.1-glibc-2.34-sim.patch b/sys-devel/gdb/files/gdb-11.1-glibc-2.34-sim.patch deleted file mode 100644 index 15ab45f278f..00000000000 --- a/sys-devel/gdb/files/gdb-11.1-glibc-2.34-sim.patch +++ /dev/null @@ -1,110 +0,0 @@ -https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=39d53d04357606a15efd400147fa7369d71baf2c;hp=46039d3632e32d9a404c1f18cf55f14c894e4627 -https://bugs.gentoo.org/813831 - -From 39d53d04357606a15efd400147fa7369d71baf2c Mon Sep 17 00:00:00 2001 -From: Mike Frysinger <vapier@gentoo.org> -Date: Sun, 3 Oct 2021 12:02:53 -0400 -Subject: [PATCH 1/1] sim: filter out SIGSTKSZ [PR sim/28302] - -We map target signals to host signals so we can propagate signals -between the host & simulated worlds. That means we need to know -the symbolic names & values of all signals that might be sent. - -The tools that generate that list use signal.h and include all -symbols that start with "SIG" so as to automatically include any -new symbols that the C library might add. Unfortunately, this -also picks up "SIGSTKSZ" which is not actually a signal itself, -but a signal related setting -- it's the size of the stack when -a signal is handled. - -By itself this doesn't super matter as we will never see a signal -with that same value (since the range of valid signals tend to be -way less than 1024, and the size of the default signal stack will -never be that small). But with recent glibc changes that make this -into a dynamic value instead of a compile-time constant, some users -see build failures when building the sim. - -As suggested by Adam Sampson, update our scripts to ignore this -symbol to simplify everything and avoid the build failure. - -Bug: https://sourceware.org/PR28302 ---- - sim/bfin/linux-targ-map.h | 5 +---- - sim/common/gennltvals.py | 6 ++++-- - sim/common/nltvals.def | 1 - - 3 files changed, 5 insertions(+), 7 deletions(-) - -diff --git a/sim/bfin/linux-targ-map.h b/sim/bfin/linux-targ-map.h -index e9c8c8f273b..0340ed54764 100644 ---- a/sim/bfin/linux-targ-map.h -+++ b/sim/bfin/linux-targ-map.h -@@ -30,6 +30,7 @@ echo - # XXX: nothing uses this ? - echo '#include <signal.h>' | \ - bfin-uclinux-gcc -E -dD -P - | \ -+grep -v SIGSTKSZ | \ - sed -r -n \ - -e '1istatic CB_TARGET_DEFS_MAP cb_linux_signal_map[] = {' \ - -e '$i\ \ { 0, -1, -1 }\n};' \ -@@ -1987,10 +1988,6 @@ static CB_TARGET_DEFS_MAP cb_linux_signal_map[] = - #ifdef SIG_SETMASK - # define TARGET_LINUX_SIG_SETMASK 2 - { "SIG_SETMASK", SIG_SETMASK, TARGET_LINUX_SIG_SETMASK }, --#endif --#ifdef SIGSTKSZ --# define TARGET_LINUX_SIGSTKSZ 8192 -- { "SIGSTKSZ", SIGSTKSZ, TARGET_LINUX_SIGSTKSZ }, - #endif - { 0, -1, -1 } - }; -diff --git a/sim/common/gennltvals.py b/sim/common/gennltvals.py -index db3ff641d40..955ace34311 100755 ---- a/sim/common/gennltvals.py -+++ b/sim/common/gennltvals.py -@@ -67,6 +67,7 @@ FILE_HEADER = f"""\ - def gentvals(output: TextIO, cpp: str, srctype: str, srcdir: Path, - headers: Iterable[str], - pattern: str, -+ filter: str = r'^$', - target: str = None): - """Extract constants from the specified files using a regular expression. - -@@ -94,12 +95,13 @@ def gentvals(output: TextIO, cpp: str, srctype: str, srcdir: Path, - srcfile = ''.join(f'#include <{x}>\n' for x in headers) - syms = set() - define_pattern = re.compile(r'^#\s*define\s+(' + pattern + ')') -+ filter_pattern = re.compile(filter) - for header in headers: - with open(srcdir / header, 'r', encoding='utf-8') as fp: - data = fp.read() - for line in data.splitlines(): - m = define_pattern.match(line) -- if m: -+ if m and not filter_pattern.search(line): - syms.add(m.group(1)) - for sym in sorted(syms): - srcfile += f'#ifdef {sym}\nDEFVAL {{ "{sym}", {sym} }},\n#endif\n' -@@ -129,7 +131,7 @@ def gen_common(output: TextIO, newlib: Path, cpp: str): - ('errno.h', 'sys/errno.h'), 'E[A-Z0-9]*') - - gentvals(output, cpp, 'signal', newlib / 'newlib/libc/include', -- ('signal.h', 'sys/signal.h'), r'SIG[A-Z0-9]*') -+ ('signal.h', 'sys/signal.h'), r'SIG[A-Z0-9]*', filter=r'SIGSTKSZ') - - gentvals(output, cpp, 'open', newlib / 'newlib/libc/include', - ('fcntl.h', 'sys/fcntl.h', 'sys/_default_fcntl.h'), r'O_[A-Z0-9]*') -diff --git a/sim/common/nltvals.def b/sim/common/nltvals.def -index 8ae88397249..8bc6ae59026 100644 ---- a/sim/common/nltvals.def -+++ b/sim/common/nltvals.def -@@ -116,7 +116,6 @@ - { "SIGPROF", 27 }, - { "SIGQUIT", 3 }, - { "SIGSEGV", 11 }, -- { "SIGSTKSZ", 8192 }, - { "SIGSTOP", 17 }, - { "SIGSYS", 12 }, - { "SIGTERM", 15 }, --- -2.27.0 - diff --git a/sys-devel/gdb/files/gdb-11.2-glibc-2.35-fsqrt.patch b/sys-devel/gdb/files/gdb-11.2-glibc-2.35-fsqrt.patch new file mode 100644 index 00000000000..5e0121f8502 --- /dev/null +++ b/sys-devel/gdb/files/gdb-11.2-glibc-2.35-fsqrt.patch @@ -0,0 +1,32 @@ +https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=a532eb7277ff64fb073e209d418b0a97f686c0e3 +https://bugs.gentoo.org/833590 + +From: Sergei Trofimovich <siarheit@google.com> +Date: Mon, 14 Feb 2022 17:12:41 +0000 +Subject: [PATCH] microblaze: fix fsqrt collicion to build on glibc-2.35 + + * microblaze-opcm.h: Renamed 'fsqrt' to 'microblaze_fsqrt'. + * microblaze-opc.h: Follow 'fsqrt' rename. +--- a/opcodes/microblaze-opc.h ++++ b/opcodes/microblaze-opc.h +@@ -268,7 +268,7 @@ const struct op_code_struct + {"fcmp.un", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000200, OPCODE_MASK_H4, fcmp_un, arithmetic_inst }, + {"flt", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000280, OPCODE_MASK_H4, flt, arithmetic_inst }, + {"fint", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000300, OPCODE_MASK_H4, fint, arithmetic_inst }, +- {"fsqrt", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000380, OPCODE_MASK_H4, fsqrt, arithmetic_inst }, ++ {"fsqrt", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000380, OPCODE_MASK_H4, microblaze_fsqrt, arithmetic_inst }, + {"tget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C001000, OPCODE_MASK_H32, tget, anyware_inst }, + {"tcget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C003000, OPCODE_MASK_H32, tcget, anyware_inst }, + {"tnget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C005000, OPCODE_MASK_H32, tnget, anyware_inst }, +--- a/opcodes/microblaze-opcm.h ++++ b/opcodes/microblaze-opcm.h +@@ -42,7 +42,8 @@ enum microblaze_instr + shr, sw, swr, swx, lbui, lhui, lwi, + sbi, shi, swi, msrset, msrclr, tuqula, mbi_fadd, frsub, mbi_fmul, mbi_fdiv, + fcmp_lt, fcmp_eq, fcmp_le, fcmp_gt, fcmp_ne, fcmp_ge, fcmp_un, flt, +- fint, fsqrt, ++ /* 'fsqrt' is a glibc:math.h symbol. */ ++ fint, microblaze_fsqrt, + tget, tcget, tnget, tncget, tput, tcput, tnput, tncput, + eget, ecget, neget, necget, eput, ecput, neput, necput, + teget, tecget, tneget, tnecget, teput, tecput, tneput, tnecput, diff --git a/sys-devel/gdb/files/gdb-12.1-readline-8.2-build.patch b/sys-devel/gdb/files/gdb-12.1-readline-8.2-build.patch new file mode 100644 index 00000000000..fad27ee4ca8 --- /dev/null +++ b/sys-devel/gdb/files/gdb-12.1-readline-8.2-build.patch @@ -0,0 +1,29 @@ +https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=1add37b567a7dee39d99f37b37802034c3fce9c4 +https://bugs.gentoo.org/842252 + +From: Andreas Schwab <schwab@linux-m68k.org> +Date: Sun, 20 Mar 2022 14:01:54 +0100 +Subject: [PATCH] Add support for readline 8.2 + +In readline 8.2 the type of rl_completer_word_break_characters changed to +include const. +--- a/gdb/completer.c ++++ b/gdb/completer.c +@@ -36,7 +36,7 @@ + calling a hook instead so we eliminate the CLI dependency. */ + #include "gdbcmd.h" + +-/* Needed for rl_completer_word_break_characters() and for ++/* Needed for rl_completer_word_break_characters and for + rl_filename_completion_function. */ + #include "readline/readline.h" + +@@ -2011,7 +2011,7 @@ gdb_completion_word_break_characters_throw () + rl_basic_quote_characters = NULL; + } + +- return rl_completer_word_break_characters; ++ return (char *) rl_completer_word_break_characters; + } + + char * diff --git a/sys-devel/gdb/gdb-11.2.ebuild b/sys-devel/gdb/gdb-11.2.ebuild index 71cd4a2dde3..a7deb851755 100644 --- a/sys-devel/gdb/gdb-11.2.ebuild +++ b/sys-devel/gdb/gdb-11.2.ebuild @@ -43,16 +43,19 @@ SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz} " -LICENSE="GPL-2 LGPL-2" +LICENSE="GPL-3+ LGPL-2.1+" SLOT="0" if [[ ${PV} != 9999* ]] ; then - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" fi IUSE="cet guile lzma multitarget nls +python +server source-highlight test vanilla xml xxhash" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +# In fact, gdb's test suite needs some work to get passing. +# See e.g. https://sourceware.org/gdb/wiki/TestingGDB. +# As of 11.2, on amd64: "# of unexpected failures 8600" # ia64 kernel crashes when gdb testsuite is running # in fact, gdb's test suite needs some work to get passing. # See e.g. https://sourceware.org/gdb/wiki/TestingGDB. @@ -92,6 +95,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-8.3.1-verbose-build.patch + "${FILESDIR}"/${P}-glibc-2.35-fsqrt.patch ) pkg_setup() { @@ -102,9 +106,8 @@ src_prepare() { default strip-linguas -u bfd/po opcodes/po - export CC_FOR_BUILD=$(tc-getBUILD_CC) - # avoid using ancient termcap from host on Prefix systems + # Avoid using ancient termcap from host on Prefix systems sed -i -e 's/termcap tinfow/tinfow/g' \ gdb/configure{.ac,} || die } @@ -124,6 +127,11 @@ gdb_branding() { src_configure() { strip-unsupported-flags + # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html + # Avoid really confusing logs from subconfigure spam, makes logs far + # more legible. + MAKEOPTS="--output-sync=line ${MAKEOPTS}" + local myconf=( # portage's econf() does not detect presence of --d-d-t # because it greps only top-level ./configure. But not @@ -133,13 +141,15 @@ src_configure() { --with-pkgversion="$(gdb_branding)" --with-bugurl='https://bugs.gentoo.org/' --disable-werror - # Disable modules that are in a combined binutils/gdb tree. #490566 + # Disable modules that are in a combined binutils/gdb tree. bug #490566 --disable-{binutils,etc,gas,gold,gprof,ld} # avoid automagic dependency on (currently prefix) systems # systems with debuginfod library, bug #754753 --without-debuginfod + $(use_enable test unit-tests) + # Allow user to opt into CET for host libraries. # Ideally we would like automagic-or-disabled here. # But the check does not quite work on i686: bug #760926. @@ -196,18 +206,24 @@ src_configure() { # source-highlight is detected with pkg-config: bug #716558 export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)" + export CC_FOR_BUILD="$(tc-getBUILD_CC)" + # ensure proper compiler is detected for Clang builds: bug #831202 export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}" econf "${myconf[@]}" } +src_compile() { + emake V=1 +} + src_install() { - default + emake V=1 DESTDIR="${D}" install find "${ED}"/usr -name libiberty.a -delete || die - # Delete translations that conflict with binutils-libs. #528088 + # Delete translations that conflict with binutils-libs. bug #528088 # Note: Should figure out how to store these in an internal gdb dir. if use nls ; then find "${ED}" \ @@ -251,7 +267,7 @@ src_install() { # Remove shared info pages rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,standards}.info* - if use python; then + if use python ; then python_optimize "${ED}"/usr/share/gdb/python/gdb fi } diff --git a/sys-devel/gdb/gdb-10.2-r1.ebuild b/sys-devel/gdb/gdb-12.1-r1.ebuild index 19f08197ce0..993eca47f83 100644 --- a/sys-devel/gdb/gdb-10.2-r1.ebuild +++ b/sys-devel/gdb/gdb-12.1-r1.ebuild @@ -2,34 +2,36 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=7 -PYTHON_COMPAT=( python3_{7,8,9,10} ) -inherit eutils flag-o-matic python-single-r1 toolchain-funcs +PYTHON_COMPAT=( python3_{8,9,10} ) +inherit flag-o-matic python-single-r1 strip-linguas toolchain-funcs export CTARGET=${CTARGET:-${CHOST}} + if [[ ${CTARGET} == ${CHOST} ]] ; then if [[ ${CATEGORY} == cross-* ]] ; then export CTARGET=${CATEGORY#cross-} fi fi + is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } case ${PV} in -9999*) - # live git tree - EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" - inherit git-r3 - SRC_URI="" - ;; -*.*.50.2???????) - # weekly snapshots - SRC_URI="ftp://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${PV}.tar.xz" - ;; -*) - # Normal upstream release - SRC_URI="mirror://gnu/gdb/${P}.tar.xz - ftp://sourceware.org/pub/gdb/releases/${P}.tar.xz" - ;; + 9999*) + # live git tree + EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" + inherit git-r3 + SRC_URI="" + ;; + *.*.50.2???????) + # weekly snapshots + SRC_URI="ftp://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${PV}.tar.xz" + ;; + *) + # Normal upstream release + SRC_URI="mirror://gnu/gdb/${P}.tar.xz + ftp://sourceware.org/pub/gdb/releases/${P}.tar.xz" + ;; esac PATCH_VER="" @@ -41,28 +43,36 @@ SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz} " -LICENSE="GPL-2 LGPL-2" +LICENSE="GPL-3+ LGPL-2.1+" SLOT="0" + if [[ ${PV} != 9999* ]] ; then - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" fi + IUSE="cet guile lzma multitarget nls +python +server source-highlight test vanilla xml xxhash" -REQUIRED_USE=" - python? ( ${PYTHON_REQUIRED_USE} ) -" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +# In fact, gdb's test suite needs some work to get passing. +# See e.g. https://sourceware.org/gdb/wiki/TestingGDB. +# As of 11.2, on amd64: "# of unexpected failures 8600" # ia64 kernel crashes when gdb testsuite is running +# in fact, gdb's test suite needs some work to get passing. +# See e.g. https://sourceware.org/gdb/wiki/TestingGDB. +# As of 11.2, on amd64: "# of unexpected failures 8600" RESTRICT=" ia64? ( test ) - !test? ( test ) + test " RDEPEND=" dev-libs/mpfr:0= + dev-libs/gmp:= >=sys-libs/ncurses-5.2-r2:0= >=sys-libs/readline-7:0= sys-libs/zlib + elibc_glibc? ( net-libs/libnsl:= ) lzma? ( app-arch/xz-utils ) python? ( ${PYTHON_DEPS} ) guile? ( >=dev-scheme/guile-2.0 ) @@ -86,9 +96,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-8.3.1-verbose-build.patch - "${FILESDIR}"/${PN}-10.1-cet.patch - "${FILESDIR}"/${PN}-10.2-sparc-nat.patch - "${FILESDIR}"/${PN}-10.2-DW_LLE-riscv64.patch + "${FILESDIR}"/${P}-readline-8.2-build.patch ) pkg_setup() { @@ -99,26 +107,32 @@ src_prepare() { default strip-linguas -u bfd/po opcodes/po - export CC_FOR_BUILD=$(tc-getBUILD_CC) - # avoid using ancient termcap from host on Prefix systems + # Avoid using ancient termcap from host on Prefix systems sed -i -e 's/termcap tinfow/tinfow/g' \ gdb/configure{.ac,} || die } gdb_branding() { printf "Gentoo ${PV} " + if ! use vanilla && [[ -n ${PATCH_VER} ]] ; then printf "p${PATCH_VER}" else printf "vanilla" fi + [[ -n ${EGIT_COMMIT} ]] && printf " ${EGIT_COMMIT}" } src_configure() { strip-unsupported-flags + # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html + # Avoid really confusing logs from subconfigure spam, makes logs far + # more legible. + MAKEOPTS="--output-sync=line ${MAKEOPTS}" + local myconf=( # portage's econf() does not detect presence of --d-d-t # because it greps only top-level ./configure. But not @@ -128,19 +142,32 @@ src_configure() { --with-pkgversion="$(gdb_branding)" --with-bugurl='https://bugs.gentoo.org/' --disable-werror - # Disable modules that are in a combined binutils/gdb tree. #490566 + # Disable modules that are in a combined binutils/gdb tree. bug #490566 --disable-{binutils,etc,gas,gold,gprof,ld} # avoid automagic dependency on (currently prefix) systems # systems with debuginfod library, bug #754753 --without-debuginfod + $(use_enable test unit-tests) + # Allow user to opt into CET for host libraries. # Ideally we would like automagic-or-disabled here. # But the check does not quite work on i686: bug #760926. $(use_enable cet) + + # We need to set both configure options, --with-sysroot and --libdir, + # to fix cross build issues that happen when configuring gmp. + # We explicitly need --libdir. Having only --with-sysroot without + # --libdir would not fix the build issues. + # For some reason, it is not enough to set only --with-sysroot, + # also not enough to pass --with-gmp-xxx options. + --with-sysroot="${ESYSROOT}" + --libdir="${ESYSROOT}/usr/$(get_libdir)" ) + local sysroot="${EPREFIX}/usr/${CTARGET}" + is_cross && myconf+=( --with-sysroot="${sysroot}" --includedir="${sysroot}/usr/include" @@ -179,8 +206,9 @@ src_configure() { $(use_with xxhash) $(use_with guile) ) + if use sparc-solaris || use x86-solaris ; then - # disable largefile support + # Disable largefile support # https://sourceware.org/ml/gdb-patches/2014-12/msg00058.html myconf+=( --disable-largefile ) fi @@ -188,17 +216,24 @@ src_configure() { # source-highlight is detected with pkg-config: bug #716558 export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)" + export CC_FOR_BUILD="$(tc-getBUILD_CC)" + # ensure proper compiler is detected for Clang builds: bug #831202 export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}" econf "${myconf[@]}" } +src_compile() { + emake V=1 +} + src_install() { - default + emake V=1 DESTDIR="${D}" install + find "${ED}"/usr -name libiberty.a -delete || die - # Delete translations that conflict with binutils-libs. #528088 + # Delete translations that conflict with binutils-libs. bug #528088 # Note: Should figure out how to store these in an internal gdb dir. if use nls ; then find "${ED}" \ @@ -217,6 +252,7 @@ src_install() { done return 0 fi + # Install it by hand for now: # https://sourceware.org/ml/gdb-patches/2011-12/msg00915.html # Only install if it exists due to the twisted behavior (see @@ -225,12 +261,13 @@ src_install() { docinto gdb dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \ - gdb/NEWS gdb/ChangeLog gdb/PROBLEMS + gdb/NEWS gdb/PROBLEMS docinto sim - dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING} + dodoc sim/{MAINTAINERS,README-HACKING} + if use server ; then docinto gdbserver - dodoc gdbserver/{ChangeLog,README} + dodoc gdbserver/README fi if [[ -n ${PATCH_VER} ]] ; then @@ -238,15 +275,15 @@ src_install() { fi # Remove shared info pages - rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,standards}.info* + rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,ctf-spec,standards}.info* - if use python; then + if use python ; then python_optimize "${ED}"/usr/share/gdb/python/gdb fi } pkg_postinst() { - # portage sucks and doesnt unmerge files in /etc + # Portage doesn't unmerge files in /etc rm -vf "${EROOT}"/etc/skel/.gdbinit if use prefix && [[ ${CHOST} == *-darwin* ]] ; then diff --git a/sys-devel/gdb/gdb-11.1.ebuild b/sys-devel/gdb/gdb-12.1.ebuild index 3933cc2776b..0accf1af301 100644 --- a/sys-devel/gdb/gdb-11.1.ebuild +++ b/sys-devel/gdb/gdb-12.1.ebuild @@ -43,20 +43,27 @@ SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz} " -LICENSE="GPL-2 LGPL-2" +LICENSE="GPL-3+ LGPL-2.1+" SLOT="0" if [[ ${PV} != 9999* ]] ; then - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" fi IUSE="cet guile lzma multitarget nls +python +server source-highlight test vanilla xml xxhash" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +# In fact, gdb's test suite needs some work to get passing. +# See e.g. https://sourceware.org/gdb/wiki/TestingGDB. +# As of 11.2, on amd64: "# of unexpected failures 8600" # ia64 kernel crashes when gdb testsuite is running +# in fact, gdb's test suite needs some work to get passing. +# See e.g. https://sourceware.org/gdb/wiki/TestingGDB. +# As of 11.2, on amd64: "# of unexpected failures 8600" RESTRICT=" ia64? ( test ) !test? ( test ) + test " RDEPEND=" @@ -65,6 +72,7 @@ RDEPEND=" >=sys-libs/ncurses-5.2-r2:0= >=sys-libs/readline-7:0= sys-libs/zlib + elibc_glibc? ( net-libs/libnsl:= ) lzma? ( app-arch/xz-utils ) python? ( ${PYTHON_DEPS} ) guile? ( >=dev-scheme/guile-2.0 ) @@ -88,7 +96,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-8.3.1-verbose-build.patch - "${FILESDIR}"/${P}-glibc-2.34-sim.patch + "${FILESDIR}"/${P}-readline-8.2-build.patch ) pkg_setup() { @@ -99,9 +107,8 @@ src_prepare() { default strip-linguas -u bfd/po opcodes/po - export CC_FOR_BUILD=$(tc-getBUILD_CC) - # avoid using ancient termcap from host on Prefix systems + # Avoid using ancient termcap from host on Prefix systems sed -i -e 's/termcap tinfow/tinfow/g' \ gdb/configure{.ac,} || die } @@ -121,6 +128,11 @@ gdb_branding() { src_configure() { strip-unsupported-flags + # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html + # Avoid really confusing logs from subconfigure spam, makes logs far + # more legible. + MAKEOPTS="--output-sync=line ${MAKEOPTS}" + local myconf=( # portage's econf() does not detect presence of --d-d-t # because it greps only top-level ./configure. But not @@ -130,7 +142,7 @@ src_configure() { --with-pkgversion="$(gdb_branding)" --with-bugurl='https://bugs.gentoo.org/' --disable-werror - # Disable modules that are in a combined binutils/gdb tree. #490566 + # Disable modules that are in a combined binutils/gdb tree. bug #490566 --disable-{binutils,etc,gas,gold,gprof,ld} # avoid automagic dependency on (currently prefix) systems @@ -193,18 +205,24 @@ src_configure() { # source-highlight is detected with pkg-config: bug #716558 export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)" + export CC_FOR_BUILD="$(tc-getBUILD_CC)" + # ensure proper compiler is detected for Clang builds: bug #831202 export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}" econf "${myconf[@]}" } +src_compile() { + emake V=1 +} + src_install() { - default + emake V=1 DESTDIR="${D}" install find "${ED}"/usr -name libiberty.a -delete || die - # Delete translations that conflict with binutils-libs. #528088 + # Delete translations that conflict with binutils-libs. bug #528088 # Note: Should figure out how to store these in an internal gdb dir. if use nls ; then find "${ED}" \ @@ -232,13 +250,13 @@ src_install() { docinto gdb dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \ - gdb/NEWS gdb/ChangeLog gdb/PROBLEMS + gdb/NEWS gdb/PROBLEMS docinto sim - dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING} + dodoc sim/{MAINTAINERS,README-HACKING} if use server ; then docinto gdbserver - dodoc gdbserver/{ChangeLog,README} + dodoc gdbserver/README fi if [[ -n ${PATCH_VER} ]] ; then @@ -246,9 +264,9 @@ src_install() { fi # Remove shared info pages - rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,standards}.info* + rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,ctf-spec,standards}.info* - if use python; then + if use python ; then python_optimize "${ED}"/usr/share/gdb/python/gdb fi } diff --git a/sys-devel/gdb/gdb-9999.ebuild b/sys-devel/gdb/gdb-9999.ebuild index 1725c16abda..a431465d7f6 100644 --- a/sys-devel/gdb/gdb-9999.ebuild +++ b/sys-devel/gdb/gdb-9999.ebuild @@ -43,7 +43,7 @@ SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz} " -LICENSE="GPL-2 LGPL-2" +LICENSE="GPL-3+ LGPL-2.1+" SLOT="0" if [[ ${PV} != 9999* ]] ; then @@ -53,10 +53,17 @@ fi IUSE="cet guile lzma multitarget nls +python +server source-highlight test vanilla xml xxhash" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +# In fact, gdb's test suite needs some work to get passing. +# See e.g. https://sourceware.org/gdb/wiki/TestingGDB. +# As of 11.2, on amd64: "# of unexpected failures 8600" # ia64 kernel crashes when gdb testsuite is running +# in fact, gdb's test suite needs some work to get passing. +# See e.g. https://sourceware.org/gdb/wiki/TestingGDB. +# As of 11.2, on amd64: "# of unexpected failures 8600" RESTRICT=" ia64? ( test ) !test? ( test ) + test " RDEPEND=" @@ -65,6 +72,7 @@ RDEPEND=" >=sys-libs/ncurses-5.2-r2:0= >=sys-libs/readline-7:0= sys-libs/zlib + elibc_glibc? ( net-libs/libnsl:= ) lzma? ( app-arch/xz-utils ) python? ( ${PYTHON_DEPS} ) guile? ( >=dev-scheme/guile-2.0 ) @@ -98,9 +106,8 @@ src_prepare() { default strip-linguas -u bfd/po opcodes/po - export CC_FOR_BUILD=$(tc-getBUILD_CC) - # avoid using ancient termcap from host on Prefix systems + # Avoid using ancient termcap from host on Prefix systems sed -i -e 's/termcap tinfow/tinfow/g' \ gdb/configure{.ac,} || die } @@ -120,6 +127,11 @@ gdb_branding() { src_configure() { strip-unsupported-flags + # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html + # Avoid really confusing logs from subconfigure spam, makes logs far + # more legible. + MAKEOPTS="--output-sync=line ${MAKEOPTS}" + local myconf=( # portage's econf() does not detect presence of --d-d-t # because it greps only top-level ./configure. But not @@ -129,17 +141,28 @@ src_configure() { --with-pkgversion="$(gdb_branding)" --with-bugurl='https://bugs.gentoo.org/' --disable-werror - # Disable modules that are in a combined binutils/gdb tree. #490566 + # Disable modules that are in a combined binutils/gdb tree. bug #490566 --disable-{binutils,etc,gas,gold,gprof,ld} # avoid automagic dependency on (currently prefix) systems # systems with debuginfod library, bug #754753 --without-debuginfod + $(use_enable test unit-tests) + # Allow user to opt into CET for host libraries. # Ideally we would like automagic-or-disabled here. # But the check does not quite work on i686: bug #760926. $(use_enable cet) + + # We need to set both configure options, --with-sysroot and --libdir, + # to fix cross build issues that happen when configuring gmp. + # We explicitly need --libdir. Having only --with-sysroot without + # --libdir would not fix the build issues. + # For some reason, it is not enough to set only --with-sysroot, + # also not enough to pass --with-gmp-xxx options. + --with-sysroot="${ESYSROOT}" + --libdir="${ESYSROOT}/usr/$(get_libdir)" ) local sysroot="${EPREFIX}/usr/${CTARGET}" @@ -192,18 +215,24 @@ src_configure() { # source-highlight is detected with pkg-config: bug #716558 export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)" + export CC_FOR_BUILD="$(tc-getBUILD_CC)" + # ensure proper compiler is detected for Clang builds: bug #831202 export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}" econf "${myconf[@]}" } +src_compile() { + emake V=1 +} + src_install() { - default + emake V=1 DESTDIR="${D}" install find "${ED}"/usr -name libiberty.a -delete || die - # Delete translations that conflict with binutils-libs. #528088 + # Delete translations that conflict with binutils-libs. bug #528088 # Note: Should figure out how to store these in an internal gdb dir. if use nls ; then find "${ED}" \ @@ -231,13 +260,13 @@ src_install() { docinto gdb dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \ - gdb/NEWS gdb/ChangeLog gdb/PROBLEMS + gdb/NEWS gdb/PROBLEMS docinto sim - dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING} + dodoc sim/{MAINTAINERS,README-HACKING} if use server ; then docinto gdbserver - dodoc gdbserver/{ChangeLog,README} + dodoc gdbserver/README fi if [[ -n ${PATCH_VER} ]] ; then @@ -245,9 +274,9 @@ src_install() { fi # Remove shared info pages - rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,standards}.info* + rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,ctf-spec,standards}.info* - if use python; then + if use python ; then python_optimize "${ED}"/usr/share/gdb/python/gdb fi } diff --git a/sys-devel/gettext/Manifest b/sys-devel/gettext/Manifest index 61bb66f324f..653a9cf0788 100644 --- a/sys-devel/gettext/Manifest +++ b/sys-devel/gettext/Manifest @@ -1 +1,2 @@ -DIST gettext-0.21.tar.gz 24181849 BLAKE2B 2eae99d0916b00b2af6fbc6bf7e309076519a10fea16cd49e7aa29fe8aec1ee7c784c6277281b764dc4abacf400cd3fe461129586303c8cd337db15c76cb4b87 SHA512 bbe590c5dd3580c75bf30ff768da99a88eb8d466ec1ac9eea20be4cab4357ecf72448e6b81b47425e39d50fa6320ba426632914d7898dfebb4f159abc39c31d1 +DIST gettext-0.21.tar.xz 9714352 BLAKE2B e36418323c79f582d13777083b455ae76ccb29e41a8259a2f4d6d9f5d8e2ac7c8ecc4df1b1fa2e9838c819cb27345fe254772398bdb88b3315410866048f755a SHA512 f7e2968651879f8444d43a176a149db9f9411f4a03132a7f3b37c2ed97e3978ae6888169c995c1953cb78943b6e3573811abcbb8661b6631edbbe067b2699ddf +DIST gettext-0.21.tar.xz.sig 819 BLAKE2B 22a6e5f6e8a6322e24db9c1f575754bccbf6c7cff7cd14cb51ae8f5cf17cd7b677d8ecfc6b876e1b6f8d62077d568cbf57930e1d8accc5306e6869d3c6560bf4 SHA512 67c9515ad5e11773a28599d517dd84131e4afd878d67e97f505cd024e290518ca9cffff7446c62f88b56aea2c7234d11811738e8e2a076b2159f24c2f6809703 diff --git a/sys-devel/gettext/gettext-0.21-r1.ebuild b/sys-devel/gettext/gettext-0.21-r3.ebuild index bab939d0ebc..0dc67c518d4 100644 --- a/sys-devel/gettext/gettext-0.21-r1.ebuild +++ b/sys-devel/gettext/gettext-0.21-r3.ebuild @@ -1,20 +1,23 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # Note: Keep version bumps in sync with dev-libs/libintl. EAPI=7 -inherit mono-env libtool java-pkg-opt-2 multilib-minimal +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/gettext.asc +inherit mono-env libtool java-pkg-opt-2 multilib-minimal verify-sig DESCRIPTION="GNU locale utilities" HOMEPAGE="https://www.gnu.org/software/gettext/" -if [[ "${PV}" == *_rc* ]] ; then - SRC_URI="https://alpha.gnu.org/gnu/${PN}/${P/_/-}.tar.bz2" +if [[ ${PV} == *_rc* ]] ; then + SRC_URI="https://alpha.gnu.org/gnu/${PN}/${P/_/-}.tar.xz" + SRC_URI+=" verify-sig? ( https://alpha.gnu.org/gnu/${PN}/${P/_/-}.tar.xz.sig )" S="${WORKDIR}/${P/_/-}" else - SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" + SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" + SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" fi # Only libasprintf is under the LGPL (and libintl is in a sep package), # so put that license behind USE=cxx. @@ -35,15 +38,15 @@ DEPEND=">=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] dev-libs/expat acl? ( virtual/acl ) ncurses? ( sys-libs/ncurses:0= ) - java? ( >=virtual/jdk-1.8:= )" + java? ( virtual/jdk:1.8 )" RDEPEND="${DEPEND} !git? ( cvs? ( dev-vcs/cvs ) ) git? ( dev-vcs/git ) - java? ( >=virtual/jre-1.8 )" + java? ( virtual/jre:1.8 )" BDEPEND=" !git? ( cvs? ( dev-vcs/cvs ) ) git? ( dev-vcs/git ) -" + verify-sig? ( sec-keys/openpgp-keys-gettext )" PDEPEND="emacs? ( app-emacs/po-mode )" MULTILIB_WRAPPED_HEADERS=( @@ -73,9 +76,7 @@ pkg_setup() { src_prepare() { java-pkg-opt-2_src_prepare - default - elibtoolize } @@ -105,7 +106,7 @@ multilib_src_configure() { $(use_enable cxx libasprintf) $(use_with git) $(usex git --without-cvs $(use_with cvs)) - $(use_enable java) + $(multilib_native_use_enable java) $(use_enable ncurses curses) $(use_enable nls) $(use_enable openmp) diff --git a/sys-devel/gnuconfig/Manifest b/sys-devel/gnuconfig/Manifest index 035f2b70bef..0625142aef2 100644 --- a/sys-devel/gnuconfig/Manifest +++ b/sys-devel/gnuconfig/Manifest @@ -1 +1,2 @@ DIST gnuconfig-20210107.tar.xz 65944 BLAKE2B 209952ca349c9859b695df5a4f8b49df689cba47b439e715108cb66ccef7ec3742162113a2ee4948a85a96b44c45d4d553f9e41c15823403f451fea6ea61bd36 SHA512 e1485b7b719994441f49b18a88f922405f74aff2ba1df16050802a311fb5438e598d989fdb7fa008734e5ec0e567e7e90486f8bc6655787bc053ad8a89650213 +DIST gnuconfig-20220508.tar.xz 87616 BLAKE2B 80b981cc85153af1cdf5ba8ca3f4e22843443ee062dacf0fa104749cebb4d25e28c83a1ba82ae326457b4cd58fe17e0f28423e9b1d0cbd3ff53b72dbc3e414b3 SHA512 c77363d30733b509d9e2a795189d0a7a556f87c6d2333ad5b376175bd8df34c48777d27e85b766c7b557f151ee2d877c6cf94940dedb4d85793427daeed5c7cd diff --git a/sys-devel/gnuconfig/gnuconfig-20210107.ebuild b/sys-devel/gnuconfig/gnuconfig-20210107.ebuild index 1ca02c2eb1f..f0894f34d09 100644 --- a/sys-devel/gnuconfig/gnuconfig-20210107.ebuild +++ b/sys-devel/gnuconfig/gnuconfig-20210107.ebuild @@ -9,7 +9,7 @@ if [[ ${PV} == "99999999" ]] ; then inherit git-r3 else SRC_URI="https://dev.gentoo.org/~polynomial-c/dist/${PN}/${P}.tar.xz" - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" S="${WORKDIR}" fi diff --git a/sys-devel/gnuconfig/gnuconfig-20220508.ebuild b/sys-devel/gnuconfig/gnuconfig-20220508.ebuild new file mode 100644 index 00000000000..1d1a7649fea --- /dev/null +++ b/sys-devel/gnuconfig/gnuconfig-20220508.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +if [[ ${PV} == 99999999 ]] ; then + EGIT_REPO_URI="https://git.savannah.gnu.org/r/config.git" + + inherit git-r3 +else + SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" + S="${WORKDIR}" +fi + +DESCRIPTION="Updated config.sub and config.guess file from GNU" +HOMEPAGE="https://savannah.gnu.org/projects/config" + +LICENSE="GPL-3+-with-autoconf-exception" +SLOT="0" + +maint_pkg_create() { + cd "${S}" || die + + emake ChangeLog + local ver=$(gawk '{ gsub(/-/, "", $1); print $1; exit }' ChangeLog) + [[ ${#ver} != 8 ]] && die "invalid version '${ver}'" + + cp "${FILESDIR}"/${PV}/*.patch . || die + + local tar="${T}/gnuconfig-${ver}.tar.xz" + tar -Jcf "${tar}" ./* || die "creating tar failed" + einfo "Packaged tar now available:" + einfo "$(du -b "${tar}")" +} + +src_unpack() { + if [[ ${PV} == 99999999 ]] ; then + git-r3_src_unpack + maint_pkg_create + else + unpack ${A} + fi +} + +src_prepare() { + default + + eapply "${S}"/*.patch +} + +src_test() { + emake check +} + +src_install() { + insinto /usr/share/${PN} + doins config.{sub,guess} + fperms +x /usr/share/${PN}/config.{sub,guess} + dodoc ChangeLog +} diff --git a/sys-devel/gnuconfig/gnuconfig-99999999.ebuild b/sys-devel/gnuconfig/gnuconfig-99999999.ebuild index e4c1ec17f5d..3c5c54ade82 100644 --- a/sys-devel/gnuconfig/gnuconfig-99999999.ebuild +++ b/sys-devel/gnuconfig/gnuconfig-99999999.ebuild @@ -3,13 +3,13 @@ EAPI="7" -if [[ ${PV} == "99999999" ]] ; then +if [[ ${PV} == 99999999 ]] ; then EGIT_REPO_URI="https://git.savannah.gnu.org/r/config.git" inherit git-r3 else - SRC_URI="https://dev.gentoo.org/~whissi/dist/${PN}/${P}.tar.xz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" + SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" S="${WORKDIR}" fi @@ -18,12 +18,11 @@ HOMEPAGE="https://savannah.gnu.org/projects/config" LICENSE="GPL-3+-with-autoconf-exception" SLOT="0" -IUSE="" maint_pkg_create() { - cd "${S}" + cd "${S}" || die - make ChangeLog || die + emake ChangeLog local ver=$(gawk '{ gsub(/-/, "", $1); print $1; exit }' ChangeLog) [[ ${#ver} != 8 ]] && die "invalid version '${ver}'" @@ -36,7 +35,7 @@ maint_pkg_create() { } src_unpack() { - if [[ ${PV} == "99999999" ]] ; then + if [[ ${PV} == 99999999 ]] ; then git-r3_src_unpack maint_pkg_create else @@ -46,11 +45,10 @@ src_unpack() { src_prepare() { default + eapply "${S}"/*.patch } -src_compile() { :;} - src_test() { emake check } diff --git a/sys-devel/icecream/Manifest b/sys-devel/icecream/Manifest index 1b0adc19c2e..7641b4101f3 100644 --- a/sys-devel/icecream/Manifest +++ b/sys-devel/icecream/Manifest @@ -1,2 +1,2 @@ -DIST icecc-1.0.0.tar.bz2 485534 BLAKE2B 31a978a4a461f20716a95277426e79d4c298c212d36361dbbd68c5affcbbbe2f0c71f743cc7b731d86fbb5f09ab556182482f56e1382be8572d019f80a004fc8 SHA512 4292ecef6232112c3f4531cb2290a55f70c5c24095fef0865af2526d49fc10a043ffb06d22552e161f671c18ff1ab62795c3a63e2c8cb26f869cf65d0938af2a DIST icecream-1.3.1.tar.gz 224068 BLAKE2B d7d66dadf27b0b88ab706bf217ce2b0d33b5db2ed95e48c4e9dcbd000931688ad6809ecbd4e14f0f3889bcebddc8543bd364c9dda09ba71e5dc04d0a5a2122d5 SHA512 d850394b4093defcf2c50bb3f9306348a45bf17d21f4730baeee7125998c2a548b7b3a7597785855d7e388e84830769bf0ec1c4136330a4c8e359cbdd111f5da +DIST icecream-1.4.tar.gz 232707 BLAKE2B 5fdebea4d0eba4a99e8c7c01acab46ec323a887d3fe9944da23ae7089403a9ebf7bf9870ca61af49578af6adf49679341f7070f9e3da3e8c7c2f50d9d4e7c3fe SHA512 b77dd630c51b7b6b4d7fa06cd14a580891b974fe2d50074f7a3b129adc558fc7ce19b3a3716a6798c2fd0f7d0d3a1bc295bbedee3ed6dafa015f309c7c2590f5 diff --git a/sys-devel/icecream/files/icecream-1.0.0-libcap-ng.patch b/sys-devel/icecream/files/icecream-1.0.0-libcap-ng.patch deleted file mode 100644 index 3dc0e3713b0..00000000000 --- a/sys-devel/icecream/files/icecream-1.0.0-libcap-ng.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- a/services/icecc.pc.in -+++ b/services/icecc.pc.in -@@ -11,4 +11,5 @@ Version: @VERSION@ - Requires: - Conflicts: - Libs: -L${libdir} -licecc -+Libs.private: @CAPNG_LDADD@ - Cflags: -I${includedir} diff --git a/sys-devel/icecream/files/icecream-r2 b/sys-devel/icecream/files/icecream-r2 deleted file mode 100644 index 21cfddeda8c..00000000000 --- a/sys-devel/icecream/files/icecream-r2 +++ /dev/null @@ -1,44 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -depend() { - need net -} - -start() { - local basedir=${ICECREAM_BASEDIR:-"/var/cache/icecream"} - local netname=${ICECREAM_NETNAME:+"-n ${ICECREAM_NETNAME}"} - local logfile=${ICECREAM_LOG_FILE:+"-l ${ICECREAM_LOG_FILE}"} - local nice=${ICECREAM_NICE_LEVEL:+"--nice ${ICECREAM_NICE_LEVEL}"} - local scheduler=${ICECREAM_SCHEDULER_HOST:+"-s ${ICECREAM_SCHEDULER_HOST}"} - local maxjobs=${ICECREAM_MAX_JOBS:+"-m ${ICECREAM_MAX_JOBS}"} - local verbosity=${ICECREAM_VERBOSITY:-"-v"} - - [[ ! -d /var/log/icecream/ ]] && mkdir -p /var/log/icecream/ && chown icecream:icecream /var/log/icecream/ - if [[ "${ICECREAM_RUN_SCHEDULER}" == "yes" ]]; then - local slogfile=${ICECREAM_SCHEDULER_LOG_FILE:-"/var/log/icecc_scheduler"} - touch ${slogfile} && chown icecream:icecream ${slogfile} - slogfile=${slogfile:+"-l ${slogfile}"} - ebegin "Starting Distributed Compiler Scheduler" - start-stop-daemon -u icecream --start --quiet --exec /usr/sbin/icecc-scheduler -- -d ${slogfile} ${netname} ${verbosity} - eend ${?} - fi - - [[ ! -d ${basedir} ]] && mkdir -p ${basedir} && chown icecream:icecream ${basedir} - ebegin "Starting Distributed Compiler Daemon" - start-stop-daemon --start --quiet --exec /usr/sbin/iceccd -- -d ${logfile} ${nice} ${scheduler} ${netname} -u icecream -b "${basedir}" ${maxjobs} ${verbosity} - eend ${?} -} - -stop() { - ebegin "Stopping Distributed Compiler Daemon" - start-stop-daemon --stop --quiet --name iceccd - eend ${?} - - if [[ "${ICECREAM_RUN_SCHEDULER}" == "yes" ]]; then - ebegin "Stopping Distributed Compiler Scheduler" - start-stop-daemon --stop --quiet --name icecc-scheduler - eend ${?} - fi -} diff --git a/sys-devel/icecream/icecream-1.0.0-r3.ebuild b/sys-devel/icecream/icecream-1.0.0-r3.ebuild deleted file mode 100644 index 53e06f4ae2b..00000000000 --- a/sys-devel/icecream/icecream-1.0.0-r3.ebuild +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -MY_P="${P/icecream/icecc}" - -DESCRIPTION="Distributed compiling of C(++) code across several machines; based on distcc" -HOMEPAGE="https://github.com/icecc/icecream" -SRC_URI="ftp://ftp.suse.com/pub/projects/${PN}/${MY_P}.tar.bz2" -S="${WORKDIR}/${MY_P}" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm ~hppa ~ppc ~sparc ~x86" - -DEPEND="sys-libs/libcap-ng" -RDEPEND=" - ${DEPEND} - acct-group/icecream - acct-user/icecream - dev-util/shadowman -" - -PATCHES=( "${FILESDIR}/${P}-libcap-ng.patch" ) - -src_configure() { - local myeconfargs=( - --enable-shared --disable-static - --enable-clang-wrappers - --enable-clang-rewrite-includes - ) - - econf "${myeconfargs[@]}" -} - -src_install() { - default - - newconfd suse/sysconfig.icecream icecream - newinitd "${FILESDIR}"/icecream-r2 icecream - - insinto /etc/logrotate.d - newins suse/logrotate icecream - - insinto /usr/share/shadowman/tools - newins - icecc <<<'/usr/libexec/icecc/bin' - - find "${D}" -name '*.la' -delete || die -} - -pkg_prerm() { - if [[ -z ${REPLACED_BY_VERSION} && ${ROOT} == / ]]; then - eselect compiler-shadow remove icecc - fi -} - -pkg_postinst() { - if [[ ${ROOT} == / ]]; then - eselect compiler-shadow update icecc - fi -} diff --git a/sys-devel/icecream/icecream-1.4.ebuild b/sys-devel/icecream/icecream-1.4.ebuild new file mode 100644 index 00000000000..8b29c30afdb --- /dev/null +++ b/sys-devel/icecream/icecream-1.4.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +AT_NOELIBTOOLIZE="yes" +inherit autotools systemd tmpfiles + +DESCRIPTION="Distributed compiler with a central scheduler to share build load" +HOMEPAGE="https://github.com/icecc/icecream" +SRC_URI="https://github.com/icecc/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~hppa ~ppc ~sparc ~x86" + +DEPEND="app-arch/libarchive:= + app-arch/zstd:= + acct-user/icecream + acct-group/icecream + dev-libs/lzo:2 + sys-libs/libcap-ng" +RDEPEND="${DEPEND} + dev-util/shadowman" +BDEPEND="app-text/docbook2X + virtual/pkgconfig" + +src_prepare() { + default + + eautoreconf +} + +src_configure() { + econf \ + --enable-clang-rewrite-includes \ + --enable-clang-wrappers +} + +src_install() { + default + + find "${ED}" -name '*.la' -delete || die + + systemd_dounit "${FILESDIR}"/iceccd.service + systemd_dounit "${FILESDIR}"/icecc-scheduler.service + + newconfd suse/sysconfig.icecream icecream + newinitd "${FILESDIR}"/icecream.openrc icecream + + keepdir /var/log/icecream + fowners icecream:icecream /var/log/icecream + fperms 0750 /var/log/icecream + + newtmpfiles "${FILESDIR}"/icecream-tmpfiles.conf icecream.conf + + insinto /etc/logrotate.d + newins suse/logrotate icecream + + insinto /etc/firewalld/services + doins suse/iceccd.xml + doins suse/icecc-scheduler.xml + + insinto /usr/share/shadowman/tools + newins - icecc <<<"${EPREFIX}"/usr/libexec/icecc/bin +} + +pkg_prerm() { + if [[ -z ${REPLACED_BY_VERSION} && -z ${ROOT} ]] ; then + eselect compiler-shadow remove icecc + fi +} + +pkg_postinst() { + tmpfiles_process icecream.conf + + if [[ -z ${ROOT} ]] ; then + eselect compiler-shadow update icecc + fi +} diff --git a/sys-devel/kgcc64/Manifest b/sys-devel/kgcc64/Manifest index 8daf9ae4744..a7c8ca028d9 100644 --- a/sys-devel/kgcc64/Manifest +++ b/sys-devel/kgcc64/Manifest @@ -1,11 +1,8 @@ DIST gcc-10.3.0-patches-1.tar.bz2 15282 BLAKE2B ef283e8b108af9bfd3324fabb95c835374113c6ff2cf1430a5568b3d1b27183e6de6751367c1e5720c85ac4c45132848888d5510c63f95e88a1f623b6bcf4000 SHA512 6dc435c8619a1532000fae843b9964d0d1e28d3cc9cc1962ab7391570a0cf1135424ea5c0b0d3d5ec5ea863f02e963be2ec4c94822f217fc692a1d808325404e DIST gcc-10.3.0.tar.xz 76692288 BLAKE2B ac7898f5eb8a7c5f151a526d1bb38913a68b50a65e4d010ac09fa20b6c801c671c790d780f23ccb8e4ecdfc686f4aa588082ccc9eb5c80c7b0e30788f824c1eb SHA512 2b2dd7453d48a398c29eaebd1422b70341001b8c90a62aee51e83344e7fdd8a8e45f82a4a9165bd7edc76dada912c932f4b6632c5636760fec4c5d7e402b3f86 DIST gcc-11-20220115.tar.xz 75676672 BLAKE2B 12171fd97731dbca67f13cc2a3a3a3989c22d628b289cbd3d46080f77a8d951f15c1e54e83a2e62ab41b69221f9784e970799a11a9ed5b224a77ba4b1b081f07 SHA512 7455b3b29d3c64df9123afef82faf922d97e08a3ea30fbc2d9286d4f6ed2fafbfc0f9d94ae1b9eee45329e95a27bd642b3aa679d83a0c27a3e30967d49e0728c -DIST gcc-11.1.0-patches-1.tar.bz2 12130 BLAKE2B 4d763b83dba7875bbbe8bbb9b6c392791ba97037d17347548604ffa7c70b32fdafcd45b0722ae40aa3aa8cbb34b9f3e3aa399d0096e35e74f75b174aad0c032e SHA512 e4e363c6a81bbc423ec36b6c57801ea2a70961ee7d7d0333924c7012b2b6fd4008f53e9208b5d1f6025f9e74a95d46c121b4b8909827070b46091228688996a4 -DIST gcc-11.1.0.tar.xz 78877216 BLAKE2B fe617e776b0270d11adea21b5c37d889de90865c19ab82d1c37bbd5c5b9c583a98c174606c4f893ca4950a4233e2a58aae93ad6aa7ad33d4e78a31c72371c1ed SHA512 fd6bba0f67ff48069d03073d1a9b5e896383b1cfc9dde008e868e60a9ec5014a837d56af0ecbf467b3fb9b37ec74a676e819a18b44393a0a3c4280175b5d7ad8 -DIST gcc-11.2.0-patches-1.tar.bz2 11537 BLAKE2B 9dd791ada244c9b70b8b99f9f305a688c248134715ed1b26d406e53b114983faae6873cdc521497164388d24d5f61c199e98df146bc02f5578e877295bcf5c82 SHA512 6539efc60c656d0798a5896dc1b944ed69914b815102c7a1c10bdba4ef935abd326b01309f38316e121f1ed90ceb2abcaf65df6af116892daad829ac2623cefc -DIST gcc-11.2.0.tar.xz 80888824 BLAKE2B 69b61234ac436edfea2933df68c434a2ce7aa4454ef4da573e82587e1a42dc420189e949cfdadaf4cb37fc0de9674822210a95b77ff03aca0dbedfe67df19cc6 SHA512 d53a0a966230895c54f01aea38696f818817b505f1e2bfa65e508753fcd01b2aedb4a61434f41f3a2ddbbd9f41384b96153c684ded3f0fa97c82758d9de5c7cf DIST gcc-11.3.0-patches-4.tar.bz2 14030 BLAKE2B cdd555f329c7c0b993cd3527489681bfcc2162db0997611b66337e6b287356761c7deccd3b9f9bb8980a32df0574017a52c5e445e24db746757d87ffccb1ea89 SHA512 cb227599d01734ae9f9fc7ae2c8dd4cae1da80d6ab398ec6f112535239ac76ce8e91fbac88e19c2f75cb08ab75f966c1d1ad4af80ede67e953fbbafc7baefa58 +DIST gcc-11.3.0.tar.xz 81141364 BLAKE2B 7e562d25446ca4ab9fe8cdb714866f66aba3744d78bf84f31bfb097c1a981e4c7f990cb1e6bcfec5ae6671836a4984e2b70eb8fed81dcef5e244f88da8623469 SHA512 f0be5ad705c73b84477128a69c047f57dd47002f375eb60e1e842e08cf2009a509e92152bca345823926d550b7395ae6d4de7db51d1ee371c2dc37313881fca7 DIST gcc-9.3.0-patches-3.tar.bz2 14193 BLAKE2B 4863fec1af41a8cdb2c24479b28812df36c1f71ab71d267ff0efc467cfb8ce99ed77714ceaedfb08b0d1eb0eb9316758cc7cbc5a8ad0bb582050690935e64b46 SHA512 8b90a5826df64e6f74e4f6c0e5acead695b38f671e26485b110d5b341daaad4ac21aabb04baae9ad457408eed274888b7f785bbc782611acfc7261e6a315d110 DIST gcc-9.3.0.tar.xz 70533868 BLAKE2B 21efb1432aefad5ed9b9b395e88ef2adfda3a8ea6e3e808cd151da6e66df9fed1bafdc8b8ff055d4b2272ac786d8b7ddc4293bb6b51c55c40a261a0eda0e7cb4 SHA512 4b9e3639eef6e623747a22c37a904b4750c93b6da77cf3958d5047e9b5ebddb7eebe091cc16ca0a227c0ecbd2bf3b984b221130f269a97ee4cc18f9cf6c444de DIST gcc-9.4.0-patches-1.tar.bz2 14012 BLAKE2B d5fbfd73d9c3a5b66be5b124d981fe5a7468363c83784989a50731f87931435f4b6302e4c20a64b20680581ed40005eff7bdd5855526a093f73a04c3c1ddab31 SHA512 b84884c7d2197cb14229d3321b98cd66c783cf9ebf7e5d1b1186e6cf32ee9e47d004ebad26118f9c848f9bc0a3783ceb23d9b65101d98c3bfa99874e66ee7cbc diff --git a/sys-devel/kgcc64/kgcc64-10.3.0.ebuild b/sys-devel/kgcc64/kgcc64-10.3.0.ebuild index e05d42e06fa..3eb8d3aeded 100644 --- a/sys-devel/kgcc64/kgcc64-10.3.0.ebuild +++ b/sys-devel/kgcc64/kgcc64-10.3.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -13,6 +13,7 @@ case ${CHOST} in esac export CTARGET TOOLCHAIN_ALLOWED_LANGS="c" +TOOLCHAIN_PATCH_DEV="slyfox" GCC_TARGET_NO_MULTILIB=true PATCH_VER="1" diff --git a/sys-devel/kgcc64/kgcc64-11.1.0.ebuild b/sys-devel/kgcc64/kgcc64-11.1.0.ebuild deleted file mode 100644 index c8abbd9325b..00000000000 --- a/sys-devel/kgcc64/kgcc64-11.1.0.ebuild +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -case ${CHOST} in - hppa*) CTARGET=hppa64-${CHOST#*-};; - mips*) CTARGET=${CHOST/mips/mips64};; - powerpc*) CTARGET=${CHOST/powerpc/powerpc64};; - s390*) CTARGET=${CHOST/s390/s390x};; - sparc*) CTARGET=${CHOST/sparc/sparc64};; - i?86*) CTARGET=x86_64-${CHOST#*-};; -esac -export CTARGET -TOOLCHAIN_ALLOWED_LANGS="c" -GCC_TARGET_NO_MULTILIB=true - -PATCH_VER="1" -inherit toolchain - -DESCRIPTION="64bit kernel compiler" - -# Works on hppa and mips; all other archs, refer to bug #228115 -KEYWORDS="~hppa" - -# unlike every other target, hppa has not unified the 32/64 bit -# ports in binutils yet -DEPEND="hppa? ( sys-devel/binutils-hppa64 )" - -pkg_postinst() { - toolchain_pkg_postinst - - cd "${ROOT}"/usr/bin - local x - for x in gcc cpp ; do - cat <<-EOF >${CTARGET%%-*}-linux-${x} - #!/bin/sh - exec ${CTARGET}-${x} "\$@" - EOF - chmod a+rx ${CTARGET%%-*}-linux-${x} - done -} diff --git a/sys-devel/kgcc64/kgcc64-11.2.1_p20220115.ebuild b/sys-devel/kgcc64/kgcc64-11.2.1_p20220115.ebuild index 437e1247a19..53f4e1488ec 100644 --- a/sys-devel/kgcc64/kgcc64-11.2.1_p20220115.ebuild +++ b/sys-devel/kgcc64/kgcc64-11.2.1_p20220115.ebuild @@ -13,8 +13,8 @@ case ${CHOST} in esac export CTARGET TOOLCHAIN_ALLOWED_LANGS="c" +TOOLCHAIN_PATCH_DEV="sam" GCC_TARGET_NO_MULTILIB=true - PATCH_VER="4" PATCH_GCC_VER="11.3.0" inherit toolchain @@ -22,7 +22,7 @@ inherit toolchain DESCRIPTION="64bit kernel compiler" # Works on hppa and mips; all other archs, refer to bug #228115 -KEYWORDS="~hppa" +KEYWORDS="hppa" # unlike every other target, hppa has not unified the 32/64 bit # ports in binutils yet diff --git a/sys-devel/kgcc64/kgcc64-11.2.0.ebuild b/sys-devel/kgcc64/kgcc64-11.3.0.ebuild index e6b50adde92..53f4e1488ec 100644 --- a/sys-devel/kgcc64/kgcc64-11.2.0.ebuild +++ b/sys-devel/kgcc64/kgcc64-11.3.0.ebuild @@ -13,19 +13,20 @@ case ${CHOST} in esac export CTARGET TOOLCHAIN_ALLOWED_LANGS="c" +TOOLCHAIN_PATCH_DEV="sam" GCC_TARGET_NO_MULTILIB=true - -PATCH_VER="1" +PATCH_VER="4" +PATCH_GCC_VER="11.3.0" inherit toolchain DESCRIPTION="64bit kernel compiler" # Works on hppa and mips; all other archs, refer to bug #228115 -KEYWORDS="~hppa" +KEYWORDS="hppa" # unlike every other target, hppa has not unified the 32/64 bit # ports in binutils yet -DEPEND="hppa? ( sys-devel/binutils-hppa64 )" +BDEPEND="hppa? ( sys-devel/binutils-hppa64 )" pkg_postinst() { toolchain_pkg_postinst diff --git a/sys-devel/kgcc64/kgcc64-9.3.0-r2.ebuild b/sys-devel/kgcc64/kgcc64-9.3.0-r2.ebuild index 973b2870eba..1c81c1c0fb3 100644 --- a/sys-devel/kgcc64/kgcc64-9.3.0-r2.ebuild +++ b/sys-devel/kgcc64/kgcc64-9.3.0-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -13,6 +13,7 @@ case ${CHOST} in esac export CTARGET TOOLCHAIN_ALLOWED_LANGS="c" +TOOLCHAIN_PATCH_DEV="slyfox" GCC_TARGET_NO_MULTILIB=true PATCH_VER="3" diff --git a/sys-devel/kgcc64/kgcc64-9.4.0.ebuild b/sys-devel/kgcc64/kgcc64-9.4.0.ebuild index e6b50adde92..25de4c73834 100644 --- a/sys-devel/kgcc64/kgcc64-9.4.0.ebuild +++ b/sys-devel/kgcc64/kgcc64-9.4.0.ebuild @@ -13,6 +13,7 @@ case ${CHOST} in esac export CTARGET TOOLCHAIN_ALLOWED_LANGS="c" +TOOLCHAIN_PATCH_DEV="slyfox" GCC_TARGET_NO_MULTILIB=true PATCH_VER="1" diff --git a/sys-devel/libtool/Manifest b/sys-devel/libtool/Manifest index 4f2d5bac189..123e05bfb24 100644 --- a/sys-devel/libtool/Manifest +++ b/sys-devel/libtool/Manifest @@ -1 +1,2 @@ DIST libtool-2.4.6.tar.xz 973080 BLAKE2B 0865af9f8701ca9dc62eec8294a088d24f4a3ff541bc76acfe7b69f70637d7e8261a17d69f7d54a4177f974c429be68467883a1560edb539061966cbf7d4a356 SHA512 a6eef35f3cbccf2c9e2667f44a476ebc80ab888725eb768e91a3a6c33b8c931afc46eb23efaee76c8696d3e4eed74ab1c71157bcb924f38ee912c8a90a6521a4 +DIST libtool-2.4.7.tar.xz 1016040 BLAKE2B 5e022586337637dd634bd40578ad944bec6e3b8de41f95d55777b90cc88cbc4badb3d76cbf0e638166ece1ea7de828e83590e1e6bac30c1e4b1c254a11a742f2 SHA512 47f4c6de40927254ff9ba452612c0702aea6f4edc7e797f0966c8c6bf0340d533598976cdba17f0bdc64545572e71cd319bbb587aa5f47cd2e7c1d96f873a3da diff --git a/sys-devel/libtool/libtool-2.4.7.ebuild b/sys-devel/libtool/libtool-2.4.7.ebuild new file mode 100644 index 00000000000..09853e34e58 --- /dev/null +++ b/sys-devel/libtool/libtool-2.4.7.ebuild @@ -0,0 +1,115 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# Please bump with dev-libs/libltdl. + +# bug #225559 +LIBTOOLIZE="true" +WANT_LIBTOOL="none" +inherit autotools prefix + +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://git.savannah.gnu.org/git/libtool.git" + inherit git-r3 +else + SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" +fi + +DESCRIPTION="A shared library tool for developers" +HOMEPAGE="https://www.gnu.org/software/libtool/" + +LICENSE="GPL-2" +SLOT="2" +IUSE="vanilla" + +# Pull in libltdl directly until we convert packages to the new dep. +RDEPEND=" + sys-devel/gnuconfig + >=sys-devel/autoconf-2.69:* + >=sys-devel/automake-1.13:* + >=dev-libs/libltdl-2.4.7" +DEPEND="${RDEPEND}" +[[ ${PV} == *9999 ]] && BDEPEND="sys-apps/help2man" + +PATCHES=( + # bug #109105 + "${FILESDIR}"/${PN}-2.4.3-use-linux-version-in-fbsd.patch + # bug #581314 + "${FILESDIR}"/${PN}-2.4.6-ppc64le.patch + + "${FILESDIR}"/${PN}-2.4.6-mint.patch + "${FILESDIR}"/${PN}-2.2.6a-darwin-module-bundle.patch + "${FILESDIR}"/${PN}-2.4.6-darwin-use-linux-version.patch +) + +src_prepare() { + if [[ ${PV} == *9999 ]] ; then + eapply "${FILESDIR}"/${PN}-2.4.6-pthread.patch # bug #650876 + ./bootstrap || die + else + PATCHES+=( + "${FILESDIR}"/${PN}-2.4.6-pthread_bootstrapped.patch # bug #650876 + ) + fi + + # WARNING: File build-aux/ltmain.sh is read-only; trying to patch anyway + chmod +w build-aux/ltmain.sh || die + + if use vanilla ; then + eapply_user + return 0 + else + default + fi + + if use prefix ; then + # seems that libtool has to know about EPREFIX a little bit + # better, since it fails to find prefix paths to search libs + # from, resulting in some packages building static only, since + # libtool is fooled into thinking that libraries are unavailable + # (argh...). This could also be fixed by making the gcc wrapper + # return the correct result for -print-search-dirs (doesn't + # include prefix dirs ...). + eapply "${FILESDIR}"/${PN}-2.2.10-eprefix.patch + eprefixify m4/libtool.m4 + fi + + pushd libltdl >/dev/null || die + AT_NOELIBTOOLIZE=yes eautoreconf + popd >/dev/null || die + AT_NOELIBTOOLIZE=yes eautoreconf + + # Make sure timestamps don't trigger a rebuild of man pages. #556512 + if [[ ${PV} != *9999 ]] ; then + touch doc/*.1 || die + export HELP2MAN=false + fi +} + +src_configure() { + # the libtool script uses bash code in it and at configure time, tries + # to find a bash shell. if /bin/sh is bash, it uses that. this can + # cause problems for people who switch /bin/sh on the fly to other + # shells, so just force libtool to use /bin/bash all the time. + export CONFIG_SHELL="$(type -P bash)" + + # Do not bother hardcoding the full path to sed. + # Just rely on $PATH. bug #574550 + export ac_cv_path_SED="$(basename "$(type -P sed)")" + + [[ ${CHOST} == *-darwin* ]] && local myconf="--program-prefix=g" + + ECONF_SOURCE="${S}" econf ${myconf} --disable-ltdl-install +} + +src_install() { + default + + local x + while read -d $'\0' -r x ; do + ln -sf "${EPREFIX}"/usr/share/gnuconfig/${x##*/} "${x}" || die + done < <(find "${ED}" '(' -name config.guess -o -name config.sub ')' -print0) +} diff --git a/sys-devel/libtool/libtool-9999.ebuild b/sys-devel/libtool/libtool-9999.ebuild index ea6a7173bed..65f0d1aab0d 100644 --- a/sys-devel/libtool/libtool-9999.ebuild +++ b/sys-devel/libtool/libtool-9999.ebuild @@ -1,9 +1,12 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -LIBTOOLIZE="true" #225559 +# Please bump with dev-libs/libltdl. + +# bug #225559 +LIBTOOLIZE="true" WANT_LIBTOOL="none" inherit autotools prefix @@ -27,12 +30,16 @@ RDEPEND=" sys-devel/gnuconfig >=sys-devel/autoconf-2.69:* >=sys-devel/automake-1.13:* - dev-libs/libltdl:0" + >=dev-libs/libltdl-2.4.7" DEPEND="${RDEPEND}" [[ ${PV} == *9999 ]] && BDEPEND="sys-apps/help2man" PATCHES=( - "${FILESDIR}"/${PN}-2.4.3-use-linux-version-in-fbsd.patch #109105 + # bug #109105 + "${FILESDIR}"/${PN}-2.4.3-use-linux-version-in-fbsd.patch + # bug #581314 + "${FILESDIR}"/${PN}-2.4.6-ppc64le.patch + "${FILESDIR}"/${PN}-2.4.6-mint.patch "${FILESDIR}"/${PN}-2.2.6a-darwin-module-bundle.patch "${FILESDIR}"/${PN}-2.4.6-darwin-use-linux-version.patch @@ -40,11 +47,11 @@ PATCHES=( src_prepare() { if [[ ${PV} == *9999 ]] ; then - eapply "${FILESDIR}"/${PN}-2.4.6-pthread.patch #650876 + eapply "${FILESDIR}"/${PN}-2.4.6-pthread.patch # bug #650876 ./bootstrap || die else PATCHES+=( - "${FILESDIR}"/${PN}-2.4.6-pthread_bootstrapped.patch #650876 + "${FILESDIR}"/${PN}-2.4.6-pthread_bootstrapped.patch # bug #650876 ) fi @@ -89,11 +96,13 @@ src_configure() { # shells, so just force libtool to use /bin/bash all the time. export CONFIG_SHELL="$(type -P bash)" - # Do not bother hardcoding the full path to sed. Just rely on $PATH. #574550 + # Do not bother hardcoding the full path to sed. + # Just rely on $PATH. bug #574550 export ac_cv_path_SED="$(basename "$(type -P sed)")" [[ ${CHOST} == *-darwin* ]] && local myconf="--program-prefix=g" - ECONF_SOURCE=${S} econf ${myconf} --disable-ltdl-install + + ECONF_SOURCE="${S}" econf ${myconf} --disable-ltdl-install } src_install() { diff --git a/sys-devel/lld/Manifest b/sys-devel/lld/Manifest index dd7644d6298..fed0786bf22 100644 --- a/sys-devel/lld/Manifest +++ b/sys-devel/lld/Manifest @@ -1,4 +1,9 @@ -DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81 +DIST llvm-project-14.0.5.src.tar.xz 105617748 BLAKE2B a68a6eb58302702f560d1204eb97d34b695eb5df417ccefb50117dbd641ba3c3dda9e64c04506e646dd40c1151eb60b12843e206996ef74b35b2841b8dabafda SHA512 db5a7ea1149988c2aab4ed634f14e00bb9a8042089350b811f875e295ced7b5add80a11b91cad80ba0ba9801261502644a720021506483c14dfb1bc24a7f54d5 +DIST llvm-project-14.0.5.src.tar.xz.sig 566 BLAKE2B ecf66df5d0acb382c9d441aee053404254fa4087d57130b04bb496af9cbb71c59e82f0938f44953d7fd777524781d13d1327b6c64065cf45b177bc3ea0e5c3f2 SHA512 a785e38f11863a46de8766ff4495a73173479cdbd95dc539804b0381a7a834a409713dbaf441272a9cc2963a3c7015c95dc6f0dcfa745e8d6047b1ad5feacff7 +DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f15e428f22a536a17e5f4e3eb29a003b8a8ec0abe0fa3e072591161d5f30ef7d8867c1ce34d1b341ad858e93c00263499941a99 SHA512 6fc6eeb60fac698702d1aac495fc0161eb7216a1f8db2020af8fccec5837831f7cc20dc2a169bf4f0b5f520748280b4a86621f3697d622aa58faaa45dbfaad13 +DIST llvm-project-14.0.6.src.tar.xz.sig 566 BLAKE2B cb658ad43d8ab6c43a5773aedadf0569c97b5ee4b1bd58eceb10e1879a30880c741c3d66bedd462c892309b688fb7b2673115a62d1f74d71ee375a578de9547f SHA512 b4a7b368532a7a4a24376cfa7db8f6d3478f6d4446474342fc00b474ecf466330cd0f16783209263c4c72d5fc7ddedfb11b95578842e700cfb7ee0bb34cc95d6 DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1 -DIST llvmorg-13.0.0.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2 -DIST llvmorg-13.0.1-rc3.tar.gz 147302323 BLAKE2B 9ac2f97568062d7dd618295a68d6e14898fcd69e2bb66290b999ceb8c12132371f4e9b59d8ba2b252e5e5cb249045676b24fc50c117b2afae20abab98f426582 SHA512 88a04ad02af2d41ec21c7a62bad21ee0e627b7276a16795875afd062ed29ac7fb4aadec5b5e48785a6502c9fd797a4b67d648a21f193c9f7602112870b10a3d1 +DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f +DIST llvmorg-14.0.1.tar.gz 158074615 BLAKE2B bf80366461580058494eb101646efcd1a8b55a66818a710c2eb8c649bf88c02fe4552cecf4c1c8637a64e7cee8d644bca31aafc804765ed18f2b5e2975dd6c92 SHA512 0a15aa9cfc978a7b03a1659a2affad65ede66d280f5c12bf0beaaf194cd7bdd57ff438b5f40e64c1e1b88f368de99be349e9d30b544d2bbe4a50f0ebed3307f2 +DIST llvmorg-14.0.3.tar.gz 158092596 BLAKE2B ef901df510ec6bc1242595ec330e9c9ee76e696b077d67a8d62b53608c3d18b2f2d7ea3150864e13d9b37a8ce899ebca946ebe72cbc4538700176e20859ddec2 SHA512 511e93fd9b1c414c38fe9e2649679ac0b16cb04f7f7838569d187b04c542a185e364d6db73e96465026e3b2533649eb75ac95507d12514af32b28bdfb66f2646 +DIST llvmorg-14.0.4.tar.gz 158088617 BLAKE2B 7fb894548dce72593a8639b4d0220d2499577f80d38b97600749c91a498c69dfbbe818cee35e4a76370795e55da7037543ea341ad7567a6f548893c67dce9e64 SHA512 e14e6c3a1915a96e9ddc609f16ca3a398ca6f7fd0a691dadaa24490078a661340e845cb2d18f3679de4f47300bb822c33ae69548af6a0370d55737831a28b959 diff --git a/sys-devel/lld/lld-11.1.0-r1.ebuild b/sys-devel/lld/lld-11.1.0-r1.ebuild deleted file mode 100644 index fc27b8c1f6d..00000000000 --- a/sys-devel/lld/lld-11.1.0-r1.ebuild +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7..9} ) -inherit cmake llvm llvm.org python-any-r1 - -DESCRIPTION="The LLVM linker (link editor)" -HOMEPAGE="https://llvm.org/" - -LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" -SLOT="0" -KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86" -IUSE="test" -RESTRICT="!test? ( test )" - -RDEPEND="~sys-devel/llvm-${PV}" -DEPEND="${RDEPEND}" -BDEPEND=" - test? ( - >=dev-util/cmake-3.16 - $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") - )" - -LLVM_COMPONENTS=( lld ) -LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} ) -llvm.org_set_globals - -python_check_deps() { - has_version -b "dev-python/lit[${PYTHON_USEDEP}]" -} - -pkg_setup() { - LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup - use test && python-any-r1_pkg_setup -} - -src_configure() { - local mycmakeargs=( - -DBUILD_SHARED_LIBS=ON - -DLLVM_INCLUDE_TESTS=$(usex test) - ) - use test && mycmakeargs+=( - -DLLVM_BUILD_TESTS=ON - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" - -DLLVM_LIT_ARGS="$(get_lit_flags)" - -DPython3_EXECUTABLE="${PYTHON}" - ) - cmake_src_configure -} - -src_test() { - local -x LIT_PRESERVES_TMP=1 - cmake_build check-lld -} diff --git a/sys-devel/lld/lld-11.1.0.ebuild b/sys-devel/lld/lld-11.1.0.ebuild deleted file mode 100644 index acbc80f1dda..00000000000 --- a/sys-devel/lld/lld-11.1.0.ebuild +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7..9} ) -inherit cmake llvm llvm.org python-any-r1 - -DESCRIPTION="The LLVM linker (link editor)" -HOMEPAGE="https://llvm.org/" - -LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" -SLOT="0" -KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86" -IUSE="test" -RESTRICT="!test? ( test )" - -RDEPEND="~sys-devel/llvm-${PV}" -DEPEND="${RDEPEND}" -BDEPEND=" - test? ( - >=dev-util/cmake-3.16 - $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") - )" - -LLVM_COMPONENTS=( lld ) -LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} ) -llvm.org_set_globals - -python_check_deps() { - has_version -b "dev-python/lit[${PYTHON_USEDEP}]" -} - -pkg_setup() { - LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup - use test && python-any-r1_pkg_setup -} - -src_configure() { - local mycmakeargs=( - -DBUILD_SHARED_LIBS=OFF - - -DLLVM_INCLUDE_TESTS=$(usex test) - ) - use test && mycmakeargs+=( - -DLLVM_BUILD_TESTS=ON - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" - -DLLVM_LIT_ARGS="$(get_lit_flags)" - -DPython3_EXECUTABLE="${PYTHON}" - ) - - cmake_src_configure -} - -src_test() { - local -x LIT_PRESERVES_TMP=1 - cmake_build check-lld -} - -src_install() { - cmake_src_install - # LLD has no shared libraries, so strip it all for the time being - rm -r "${ED}"/usr/{include,lib*} || die -} diff --git a/sys-devel/lld/lld-13.0.0.ebuild b/sys-devel/lld/lld-13.0.1.ebuild index 16d9d087418..254b9182c56 100644 --- a/sys-devel/lld/lld-13.0.0.ebuild +++ b/sys-devel/lld/lld-13.0.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 diff --git a/sys-devel/lld/lld-13.0.1_rc3.ebuild b/sys-devel/lld/lld-14.0.1.ebuild index 3377caffce1..24d9edd3e0d 100644 --- a/sys-devel/lld/lld-13.0.1_rc3.ebuild +++ b/sys-devel/lld/lld-14.0.1.ebuild @@ -11,7 +11,7 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" -KEYWORDS="" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" IUSE="debug test" RESTRICT="!test? ( test )" @@ -23,7 +23,7 @@ BDEPEND=" $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") )" -LLVM_COMPONENTS=( lld libunwind/include/mach-o ) +LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o ) LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} ) llvm.org_set_globals diff --git a/sys-devel/lld/lld-14.0.3.ebuild b/sys-devel/lld/lld-14.0.3.ebuild new file mode 100644 index 00000000000..461302a580e --- /dev/null +++ b/sys-devel/lld/lld-14.0.3.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +inherit cmake flag-o-matic llvm llvm.org python-any-r1 + +DESCRIPTION="The LLVM linker (link editor)" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" +IUSE="debug test" +RESTRICT="!test? ( test )" + +DEPEND=" + ~sys-devel/llvm-${PV} +" +RDEPEND=" + ${DEPEND} +" +BDEPEND=" + test? ( + >=dev-util/cmake-3.16 + $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") + ) +" + +LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o ) +LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} ) +llvm.org_set_globals + +python_check_deps() { + has_version -b "dev-python/lit[${PYTHON_USEDEP}]" +} + +pkg_setup() { + LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup + use test && python-any-r1_pkg_setup +} + +src_unpack() { + llvm.org_src_unpack + + # Directory ${WORKDIR}/llvm does not exist with USE="-test", + # but LLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" is set below, + # and ${LLVM_MAIN_SRC_DIR}/../libunwind/include is used by build system + # (lld/MachO/CMakeLists.txt) and is expected to be resolvable + # to existent directory ${WORKDIR}/libunwind/include. + mkdir -p "${WORKDIR}/llvm" || die +} + +src_configure() { + # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + + use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + + local mycmakeargs=( + -DBUILD_SHARED_LIBS=ON + -DLLVM_INCLUDE_TESTS=$(usex test) + -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" + ) + use test && mycmakeargs+=( + -DLLVM_BUILD_TESTS=ON + -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" + -DLLVM_LIT_ARGS="$(get_lit_flags)" + -DPython3_EXECUTABLE="${PYTHON}" + ) + cmake_src_configure +} + +src_test() { + local -x LIT_PRESERVES_TMP=1 + cmake_build check-lld +} diff --git a/sys-devel/lld/lld-14.0.0.9999.ebuild b/sys-devel/lld/lld-14.0.4.ebuild index 863c9b49bdb..c913a676f6d 100644 --- a/sys-devel/lld/lld-14.0.0.9999.ebuild +++ b/sys-devel/lld/lld-14.0.4.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 PYTHON_COMPAT=( python3_{8..10} ) inherit cmake flag-o-matic llvm llvm.org python-any-r1 @@ -11,19 +11,24 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" -KEYWORDS="" +KEYWORDS="amd64 ~arm arm64 ~ppc ppc64 ~riscv x86" IUSE="debug test" RESTRICT="!test? ( test )" -RDEPEND="~sys-devel/llvm-${PV}" -DEPEND="${RDEPEND}" +DEPEND=" + ~sys-devel/llvm-${PV} +" +RDEPEND=" + ${DEPEND} +" BDEPEND=" test? ( >=dev-util/cmake-3.16 $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") - )" + ) +" -LLVM_COMPONENTS=( lld libunwind/include/mach-o ) +LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o ) LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} ) llvm.org_set_globals diff --git a/sys-devel/lld/lld-14.0.5.ebuild b/sys-devel/lld/lld-14.0.5.ebuild new file mode 100644 index 00000000000..461302a580e --- /dev/null +++ b/sys-devel/lld/lld-14.0.5.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +inherit cmake flag-o-matic llvm llvm.org python-any-r1 + +DESCRIPTION="The LLVM linker (link editor)" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" +IUSE="debug test" +RESTRICT="!test? ( test )" + +DEPEND=" + ~sys-devel/llvm-${PV} +" +RDEPEND=" + ${DEPEND} +" +BDEPEND=" + test? ( + >=dev-util/cmake-3.16 + $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") + ) +" + +LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o ) +LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} ) +llvm.org_set_globals + +python_check_deps() { + has_version -b "dev-python/lit[${PYTHON_USEDEP}]" +} + +pkg_setup() { + LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup + use test && python-any-r1_pkg_setup +} + +src_unpack() { + llvm.org_src_unpack + + # Directory ${WORKDIR}/llvm does not exist with USE="-test", + # but LLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" is set below, + # and ${LLVM_MAIN_SRC_DIR}/../libunwind/include is used by build system + # (lld/MachO/CMakeLists.txt) and is expected to be resolvable + # to existent directory ${WORKDIR}/libunwind/include. + mkdir -p "${WORKDIR}/llvm" || die +} + +src_configure() { + # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + + use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + + local mycmakeargs=( + -DBUILD_SHARED_LIBS=ON + -DLLVM_INCLUDE_TESTS=$(usex test) + -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" + ) + use test && mycmakeargs+=( + -DLLVM_BUILD_TESTS=ON + -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" + -DLLVM_LIT_ARGS="$(get_lit_flags)" + -DPython3_EXECUTABLE="${PYTHON}" + ) + cmake_src_configure +} + +src_test() { + local -x LIT_PRESERVES_TMP=1 + cmake_build check-lld +} diff --git a/sys-devel/lld/lld-14.0.6.ebuild b/sys-devel/lld/lld-14.0.6.ebuild new file mode 100644 index 00000000000..461302a580e --- /dev/null +++ b/sys-devel/lld/lld-14.0.6.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +inherit cmake flag-o-matic llvm llvm.org python-any-r1 + +DESCRIPTION="The LLVM linker (link editor)" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" +IUSE="debug test" +RESTRICT="!test? ( test )" + +DEPEND=" + ~sys-devel/llvm-${PV} +" +RDEPEND=" + ${DEPEND} +" +BDEPEND=" + test? ( + >=dev-util/cmake-3.16 + $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") + ) +" + +LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o ) +LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} ) +llvm.org_set_globals + +python_check_deps() { + has_version -b "dev-python/lit[${PYTHON_USEDEP}]" +} + +pkg_setup() { + LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup + use test && python-any-r1_pkg_setup +} + +src_unpack() { + llvm.org_src_unpack + + # Directory ${WORKDIR}/llvm does not exist with USE="-test", + # but LLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" is set below, + # and ${LLVM_MAIN_SRC_DIR}/../libunwind/include is used by build system + # (lld/MachO/CMakeLists.txt) and is expected to be resolvable + # to existent directory ${WORKDIR}/libunwind/include. + mkdir -p "${WORKDIR}/llvm" || die +} + +src_configure() { + # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + + use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + + local mycmakeargs=( + -DBUILD_SHARED_LIBS=ON + -DLLVM_INCLUDE_TESTS=$(usex test) + -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" + ) + use test && mycmakeargs+=( + -DLLVM_BUILD_TESTS=ON + -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" + -DLLVM_LIT_ARGS="$(get_lit_flags)" + -DPython3_EXECUTABLE="${PYTHON}" + ) + cmake_src_configure +} + +src_test() { + local -x LIT_PRESERVES_TMP=1 + cmake_build check-lld +} diff --git a/sys-devel/lld/lld-13.0.1.9999.ebuild b/sys-devel/lld/lld-15.0.0.9999.ebuild index 863c9b49bdb..e9db4aa03db 100644 --- a/sys-devel/lld/lld-13.0.1.9999.ebuild +++ b/sys-devel/lld/lld-15.0.0.9999.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 PYTHON_COMPAT=( python3_{8..10} ) inherit cmake flag-o-matic llvm llvm.org python-any-r1 @@ -15,15 +15,20 @@ KEYWORDS="" IUSE="debug test" RESTRICT="!test? ( test )" -RDEPEND="~sys-devel/llvm-${PV}" -DEPEND="${RDEPEND}" +DEPEND=" + ~sys-devel/llvm-${PV} +" +RDEPEND=" + ${DEPEND} +" BDEPEND=" test? ( >=dev-util/cmake-3.16 $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") - )" + ) +" -LLVM_COMPONENTS=( lld libunwind/include/mach-o ) +LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o ) LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} ) llvm.org_set_globals diff --git a/sys-devel/llvm-common/Manifest b/sys-devel/llvm-common/Manifest index dd7644d6298..fed0786bf22 100644 --- a/sys-devel/llvm-common/Manifest +++ b/sys-devel/llvm-common/Manifest @@ -1,4 +1,9 @@ -DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81 +DIST llvm-project-14.0.5.src.tar.xz 105617748 BLAKE2B a68a6eb58302702f560d1204eb97d34b695eb5df417ccefb50117dbd641ba3c3dda9e64c04506e646dd40c1151eb60b12843e206996ef74b35b2841b8dabafda SHA512 db5a7ea1149988c2aab4ed634f14e00bb9a8042089350b811f875e295ced7b5add80a11b91cad80ba0ba9801261502644a720021506483c14dfb1bc24a7f54d5 +DIST llvm-project-14.0.5.src.tar.xz.sig 566 BLAKE2B ecf66df5d0acb382c9d441aee053404254fa4087d57130b04bb496af9cbb71c59e82f0938f44953d7fd777524781d13d1327b6c64065cf45b177bc3ea0e5c3f2 SHA512 a785e38f11863a46de8766ff4495a73173479cdbd95dc539804b0381a7a834a409713dbaf441272a9cc2963a3c7015c95dc6f0dcfa745e8d6047b1ad5feacff7 +DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f15e428f22a536a17e5f4e3eb29a003b8a8ec0abe0fa3e072591161d5f30ef7d8867c1ce34d1b341ad858e93c00263499941a99 SHA512 6fc6eeb60fac698702d1aac495fc0161eb7216a1f8db2020af8fccec5837831f7cc20dc2a169bf4f0b5f520748280b4a86621f3697d622aa58faaa45dbfaad13 +DIST llvm-project-14.0.6.src.tar.xz.sig 566 BLAKE2B cb658ad43d8ab6c43a5773aedadf0569c97b5ee4b1bd58eceb10e1879a30880c741c3d66bedd462c892309b688fb7b2673115a62d1f74d71ee375a578de9547f SHA512 b4a7b368532a7a4a24376cfa7db8f6d3478f6d4446474342fc00b474ecf466330cd0f16783209263c4c72d5fc7ddedfb11b95578842e700cfb7ee0bb34cc95d6 DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1 -DIST llvmorg-13.0.0.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2 -DIST llvmorg-13.0.1-rc3.tar.gz 147302323 BLAKE2B 9ac2f97568062d7dd618295a68d6e14898fcd69e2bb66290b999ceb8c12132371f4e9b59d8ba2b252e5e5cb249045676b24fc50c117b2afae20abab98f426582 SHA512 88a04ad02af2d41ec21c7a62bad21ee0e627b7276a16795875afd062ed29ac7fb4aadec5b5e48785a6502c9fd797a4b67d648a21f193c9f7602112870b10a3d1 +DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f +DIST llvmorg-14.0.1.tar.gz 158074615 BLAKE2B bf80366461580058494eb101646efcd1a8b55a66818a710c2eb8c649bf88c02fe4552cecf4c1c8637a64e7cee8d644bca31aafc804765ed18f2b5e2975dd6c92 SHA512 0a15aa9cfc978a7b03a1659a2affad65ede66d280f5c12bf0beaaf194cd7bdd57ff438b5f40e64c1e1b88f368de99be349e9d30b544d2bbe4a50f0ebed3307f2 +DIST llvmorg-14.0.3.tar.gz 158092596 BLAKE2B ef901df510ec6bc1242595ec330e9c9ee76e696b077d67a8d62b53608c3d18b2f2d7ea3150864e13d9b37a8ce899ebca946ebe72cbc4538700176e20859ddec2 SHA512 511e93fd9b1c414c38fe9e2649679ac0b16cb04f7f7838569d187b04c542a185e364d6db73e96465026e3b2533649eb75ac95507d12514af32b28bdfb66f2646 +DIST llvmorg-14.0.4.tar.gz 158088617 BLAKE2B 7fb894548dce72593a8639b4d0220d2499577f80d38b97600749c91a498c69dfbbe818cee35e4a76370795e55da7037543ea341ad7567a6f548893c67dce9e64 SHA512 e14e6c3a1915a96e9ddc609f16ca3a398ca6f7fd0a691dadaa24490078a661340e845cb2d18f3679de4f47300bb822c33ae69548af6a0370d55737831a28b959 diff --git a/sys-devel/llvm-common/llvm-common-13.0.0.ebuild b/sys-devel/llvm-common/llvm-common-13.0.1.ebuild index 79fd5f8009d..e77208540cb 100644 --- a/sys-devel/llvm-common/llvm-common-13.0.0.ebuild +++ b/sys-devel/llvm-common/llvm-common-13.0.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 diff --git a/sys-devel/llvm-common/llvm-common-11.1.0.ebuild b/sys-devel/llvm-common/llvm-common-14.0.1.ebuild index 277a3cc44f9..3b5304a686c 100644 --- a/sys-devel/llvm-common/llvm-common-11.1.0.ebuild +++ b/sys-devel/llvm-common/llvm-common-14.0.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -10,7 +10,7 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" -KEYWORDS="amd64 arm arm64 ppc64 ~riscv ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos" IUSE="" RDEPEND="!sys-devel/llvm:0" diff --git a/sys-devel/llvm-common/llvm-common-13.0.1.9999.ebuild b/sys-devel/llvm-common/llvm-common-14.0.3.ebuild index 53511a0a20e..104c8747bbe 100644 --- a/sys-devel/llvm-common/llvm-common-13.0.1.9999.ebuild +++ b/sys-devel/llvm-common/llvm-common-14.0.3.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit llvm.org @@ -10,10 +10,11 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" -KEYWORDS="" -IUSE="" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos" -RDEPEND="!sys-devel/llvm:0" +RDEPEND=" + !sys-devel/llvm:0 +" LLVM_COMPONENTS=( llvm/utils/vim ) llvm.org_set_globals diff --git a/sys-devel/llvm-common/llvm-common-14.0.0.9999.ebuild b/sys-devel/llvm-common/llvm-common-14.0.4.ebuild index 53511a0a20e..7590aa728ec 100644 --- a/sys-devel/llvm-common/llvm-common-14.0.0.9999.ebuild +++ b/sys-devel/llvm-common/llvm-common-14.0.4.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit llvm.org @@ -10,10 +10,11 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" -KEYWORDS="" -IUSE="" +KEYWORDS="amd64 ~arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos" -RDEPEND="!sys-devel/llvm:0" +RDEPEND=" + !sys-devel/llvm:0 +" LLVM_COMPONENTS=( llvm/utils/vim ) llvm.org_set_globals diff --git a/sys-devel/llvm-common/llvm-common-14.0.5.ebuild b/sys-devel/llvm-common/llvm-common-14.0.5.ebuild new file mode 100644 index 00000000000..104c8747bbe --- /dev/null +++ b/sys-devel/llvm-common/llvm-common-14.0.5.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit llvm.org + +DESCRIPTION="Common files shared between multiple slots of LLVM" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos" + +RDEPEND=" + !sys-devel/llvm:0 +" + +LLVM_COMPONENTS=( llvm/utils/vim ) +llvm.org_set_globals + +src_install() { + insinto /usr/share/vim/vimfiles + doins -r */ + # some users may find it useful + newdoc README README.vim + dodoc vimrc +} diff --git a/sys-devel/llvm-common/llvm-common-14.0.6.ebuild b/sys-devel/llvm-common/llvm-common-14.0.6.ebuild new file mode 100644 index 00000000000..104c8747bbe --- /dev/null +++ b/sys-devel/llvm-common/llvm-common-14.0.6.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit llvm.org + +DESCRIPTION="Common files shared between multiple slots of LLVM" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos" + +RDEPEND=" + !sys-devel/llvm:0 +" + +LLVM_COMPONENTS=( llvm/utils/vim ) +llvm.org_set_globals + +src_install() { + insinto /usr/share/vim/vimfiles + doins -r */ + # some users may find it useful + newdoc README README.vim + dodoc vimrc +} diff --git a/sys-devel/llvm-common/llvm-common-13.0.1_rc3.ebuild b/sys-devel/llvm-common/llvm-common-15.0.0.9999.ebuild index fdadac15eda..df37476f6fb 100644 --- a/sys-devel/llvm-common/llvm-common-13.0.1_rc3.ebuild +++ b/sys-devel/llvm-common/llvm-common-15.0.0.9999.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit llvm.org @@ -11,9 +11,10 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" KEYWORDS="" -IUSE="" -RDEPEND="!sys-devel/llvm:0" +RDEPEND=" + !sys-devel/llvm:0 +" LLVM_COMPONENTS=( llvm/utils/vim ) llvm.org_set_globals diff --git a/sys-devel/llvm-roc/Manifest b/sys-devel/llvm-roc/Manifest index 80142c71322..393d9f05867 100644 --- a/sys-devel/llvm-roc/Manifest +++ b/sys-devel/llvm-roc/Manifest @@ -8,3 +8,5 @@ DIST llvm-rocm-ocl-4.1.0.tar.gz 128913932 BLAKE2B 15a041ec7b9fec91e409c8ab98ff88 DIST llvm-rocm-ocl-4.1.1.tar.gz 128914019 BLAKE2B 9806d1da497e9d9864fd015fc92f5e2d8a6077315d96538064357a38347bc9180948c65cdca9e29574b40f8df62c0660762731564822ac9e8b5364bebf016e43 SHA512 0e4c6b9b0c0330d58616f22d8ec6ebdd6c83aef9ce9968765ac56c022bcd76cba8af5a6cdfb47ed560b33cd67832ac5b026502357af6caec4ab699f1443163fd DIST llvm-rocm-ocl-4.2.0.tar.gz 132337711 BLAKE2B f08781f881f2853cd551828ef9190c1253e33ca1bfb13aac790b6484838fe5481be9519609ea9cf4bc09a6c8631c54a567123dfe97c25498c51c464d215049de SHA512 694c37c707c84d18cddb92054d8d59e1eea82c9c9928d0111992cbae1421d6bb614a0889891993b444a821c35fa6e91c801ac8555761c2cd0803f89981475952 DIST llvm-rocm-ocl-4.3.0.tar.gz 134152148 BLAKE2B aaadb75f0b2f72d3c4dca4b375a38b2806491b854d45f6f95bc398c4b7685fccbc4e6df86869c200f08ced5ddb540344ace2402819cdd3c27c5167a71a78bb3b SHA512 4f85f06d5331770b8697bbe62776579ed02016d899ed9c5328d5953fc5992a0996f7934e7417d6062e77a317d242295803fbeab04b0428d5f257cecd4c25c0cd +DIST llvm-rocm-ocl-4.5.2.tar.gz 137370130 BLAKE2B f91823b9f0a3b78062eb5e9aa564a31752ab377bebc613892938d4aa6f8e54eb2b00123d0e60e5e703cd41d380cedac07234f024e3812b8df71519d0c7c32625 SHA512 fa4147e73fd37db6735e29cb99c5a7da4edcd1f51af30574d35a359b483aba4b3d4bdefa0845d3991fc0d0758b3e403e7e252033712cc4a8c038d07d9539c18f +DIST llvm-rocm-ocl-5.0.2.tar.gz 150281451 BLAKE2B e4363266e05e13af761dd6f440dbfc30905f219e428fa3b2595800ba0c80c97cd7e2615d68acd9aea4fc66454ee8a3ff7a52a60d3aed4e93af5007050277e5fe SHA512 9be9f1a0ad1a0089aa27858174ce37c7a02902b6dedc338382f42ed0567823cc4bb11b68c130470590c16d4d92ab2735a06c27d248237ffa2d394253328f6705 diff --git a/sys-devel/llvm-roc/files/llvm-roc-4.3.0-hip-location.patch b/sys-devel/llvm-roc/files/llvm-roc-4.3.0-hip-location.patch index 1fe93a33db3..f3d22b99691 100644 --- a/sys-devel/llvm-roc/files/llvm-roc-4.3.0-hip-location.patch +++ b/sys-devel/llvm-roc/files/llvm-roc-4.3.0-hip-location.patch @@ -143,6 +143,15 @@ Author: Yiyang Wu <xgreenlandforwyy@gmail.com> } RocmInstallationDetector::RocmInstallationDetector( +@@ -397,7 +272,7 @@ void RocmInstallationDetector::detectDev + // - ${ROCM_ROOT}/lib/bitcode/* + // so try to detect these layouts. + static constexpr std::array<const char *, 2> SubDirsList[] = { +- {"amdgcn", "bitcode"}, ++ {"lib/amdgcn", "bitcode"}, + {"lib", ""}, + {"lib", "bitcode"}, + }; @@ -423,42 +298,7 @@ void RocmInstallationDetector::detectDev } diff --git a/sys-devel/llvm-roc/files/llvm-roc-4.5.2-add_libraries.patch b/sys-devel/llvm-roc/files/llvm-roc-4.5.2-add_libraries.patch new file mode 100644 index 00000000000..e2fe9282d83 --- /dev/null +++ b/sys-devel/llvm-roc/files/llvm-roc-4.5.2-add_libraries.patch @@ -0,0 +1,11 @@ +diff -Naur a/clang/lib/Basic/CMakeLists.txt b/clang/lib/Basic/CMakeLists.txt +--- a/clang/lib/Basic/CMakeLists.txt 2019-12-28 07:42:49.119055933 +0100 ++++ b/clang/lib/Basic/CMakeLists.txt 2019-12-28 07:42:13.265056070 +0100 +@@ -2,6 +2,7 @@ + Core + MC + Support ++ Option + ) + + find_first_existing_vc_file("${LLVM_MAIN_SRC_DIR}" llvm_vc) diff --git a/sys-devel/llvm-roc/files/llvm-roc-4.5.2-hip-location.patch b/sys-devel/llvm-roc/files/llvm-roc-4.5.2-hip-location.patch new file mode 100644 index 00000000000..f6f60cfb1b0 --- /dev/null +++ b/sys-devel/llvm-roc/files/llvm-roc-4.5.2-hip-location.patch @@ -0,0 +1,197 @@ +replace hardcoded hip finder with Gentoo paths. + +It is not necessary to check HIP runtime each time. + +Author: Benda Xu <heroxbd@gentoo.org> +Author: Yiyang Wu <xgreenlandforwyy@gmail.com> + +--- orig/clang/lib/Driver/ToolChains/AMDGPU.cpp ++++ llvm-project-rocm-4.3.0/clang/lib/Driver/ToolChains/AMDGPU.cpp +@@ -165,133 +165,7 @@ + /// cached and populated only once. + const SmallVectorImpl<RocmInstallationDetector::Candidate> & + RocmInstallationDetector::getInstallationPathCandidates() { +- +- // Return the cached candidate list if it has already been populated. +- if (!ROCmSearchDirs.empty()) +- return ROCmSearchDirs; +- +- auto DoPrintROCmSearchDirs = [&]() { +- if (PrintROCmSearchDirs) +- for (auto Cand : ROCmSearchDirs) { +- llvm::errs() << "ROCm installation search path"; +- if (Cand.isSPACK()) +- llvm::errs() << " (Spack " << Cand.SPACKReleaseStr << ")"; +- llvm::errs() << ": " << Cand.Path << '\n'; +- } +- }; +- +- // For candidate specified by --rocm-path we do not do strict check, i.e., +- // checking existence of HIP version file and device library files. +- if (!RocmPathArg.empty()) { +- ROCmSearchDirs.emplace_back(RocmPathArg.str()); +- DoPrintROCmSearchDirs(); +- return ROCmSearchDirs; +- } else if (const char *RocmPathEnv = ::getenv("ROCM_PATH")) { +- if (!StringRef(RocmPathEnv).empty()) { +- ROCmSearchDirs.emplace_back(RocmPathEnv); +- DoPrintROCmSearchDirs(); +- return ROCmSearchDirs; +- } +- } +- +- // Try to find relative to the compiler binary. +- const char *InstallDir = D.getInstalledDir(); +- +- // Check both a normal Unix prefix position of the clang binary, as well as +- // the Windows-esque layout the ROCm packages use with the host architecture +- // subdirectory of bin. +- auto DeduceROCmPath = [](StringRef ClangPath) { +- // Strip off directory (usually bin) +- StringRef ParentDir = llvm::sys::path::parent_path(ClangPath); +- StringRef ParentName = llvm::sys::path::filename(ParentDir); +- +- // Some builds use bin/{host arch}, so go up again. +- if (ParentName == "bin") { +- ParentDir = llvm::sys::path::parent_path(ParentDir); +- ParentName = llvm::sys::path::filename(ParentDir); +- } +- +- // Detect ROCm packages built with SPACK. +- // clang is installed at +- // <rocm_root>/llvm-amdgpu-<rocm_release_string>-<hash>/bin directory. +- // We only consider the parent directory of llvm-amdgpu package as ROCm +- // installation candidate for SPACK. +- if (ParentName.startswith("llvm-amdgpu-")) { +- auto SPACKPostfix = +- ParentName.drop_front(strlen("llvm-amdgpu-")).split('-'); +- auto SPACKReleaseStr = SPACKPostfix.first; +- if (!SPACKReleaseStr.empty()) { +- ParentDir = llvm::sys::path::parent_path(ParentDir); +- return Candidate(ParentDir.str(), /*StrictChecking=*/true, +- SPACKReleaseStr); +- } +- } +- +- // Some versions of the rocm llvm package install to /opt/rocm/llvm/bin +- // Some versions of the aomp package install to /opt/rocm/aomp/bin +- if (ParentName == "llvm" || ParentName.startswith("aomp")) +- ParentDir = llvm::sys::path::parent_path(ParentDir); +- // Some versions of the aomp package install to /opt/rocm/aomp/bin +- // and it seems ParentDir is already pointing to correct place. +- return Candidate(ParentDir.str(), /*StrictChecking=*/true); +- }; +- +- // Deduce ROCm path by the path used to invoke clang. Do not resolve symbolic +- // link of clang itself. +- ROCmSearchDirs.emplace_back(DeduceROCmPath(InstallDir)); +- +- // Deduce ROCm path by the real path of the invoked clang, resolving symbolic +- // link of clang itself. +- llvm::SmallString<256> RealClangPath; +- llvm::sys::fs::real_path(D.getClangProgramPath(), RealClangPath); +- auto ParentPath = llvm::sys::path::parent_path(RealClangPath); +- if (ParentPath != InstallDir) +- ROCmSearchDirs.emplace_back(DeduceROCmPath(ParentPath)); +- +- // Device library may be installed in clang resource directory. +- ROCmSearchDirs.emplace_back(D.ResourceDir, +- /*StrictChecking=*/true); +- +- ROCmSearchDirs.emplace_back(D.SysRoot + "/opt/rocm", +- /*StrictChecking=*/true); +- +- // Find the latest /opt/rocm-{release} directory. +- std::error_code EC; +- std::string LatestROCm; +- llvm::VersionTuple LatestVer; +- // Get ROCm version from ROCm directory name. +- auto GetROCmVersion = [](StringRef DirName) { +- llvm::VersionTuple V; +- std::string VerStr = DirName.drop_front(strlen("rocm-")).str(); +- // The ROCm directory name follows the format of +- // rocm-{major}.{minor}.{subMinor}[-{build}] +- std::replace(VerStr.begin(), VerStr.end(), '-', '.'); +- V.tryParse(VerStr); +- return V; +- }; +- for (llvm::vfs::directory_iterator +- File = D.getVFS().dir_begin(D.SysRoot + "/opt", EC), +- FileEnd; +- File != FileEnd && !EC; File.increment(EC)) { +- llvm::StringRef FileName = llvm::sys::path::filename(File->path()); +- if (!FileName.startswith("rocm-")) +- continue; +- if (LatestROCm.empty()) { +- LatestROCm = FileName.str(); +- LatestVer = GetROCmVersion(LatestROCm); +- continue; +- } +- auto Ver = GetROCmVersion(FileName); +- if (LatestVer < Ver) { +- LatestROCm = FileName.str(); +- LatestVer = Ver; +- } +- } +- if (!LatestROCm.empty()) +- ROCmSearchDirs.emplace_back(D.SysRoot + "/opt/" + LatestROCm, +- /*StrictChecking=*/true); +- +- DoPrintROCmSearchDirs(); ++ ROCmSearchDirs.emplace_back(D.SysRoot + "/usr", /*StrictChecking=*/true); + return ROCmSearchDirs; + } + +@@ -397,7 +272,7 @@ void RocmInstallationDetector::detectDev + // - ${ROCM_ROOT}/lib/bitcode/* + // so try to detect these layouts. + static constexpr std::array<const char *, 2> SubDirsList[] = { +- {"amdgcn", "bitcode"}, ++ {"lib/amdgcn", "bitcode"}, + {"lib", ""}, + {"lib", "bitcode"}, + }; +@@ -424,42 +298,7 @@ + } + + void RocmInstallationDetector::detectHIPRuntime() { +- SmallVector<Candidate, 4> HIPSearchDirs; +- if (!HIPPathArg.empty()) +- HIPSearchDirs.emplace_back(HIPPathArg.str(), /*StrictChecking=*/true); +- else +- HIPSearchDirs.append(getInstallationPathCandidates()); +- auto &FS = D.getVFS(); +- +- for (const auto &Candidate : HIPSearchDirs) { +- InstallPath = Candidate.Path; +- if (InstallPath.empty() || !FS.exists(InstallPath)) +- continue; +- // HIP runtime built by SPACK is installed to +- // <rocm_root>/hip-<rocm_release_string>-<hash> directory. +- auto SPACKPath = findSPACKPackage(Candidate, "hip"); +- InstallPath = SPACKPath.empty() ? InstallPath : SPACKPath; +- +- BinPath = InstallPath; +- llvm::sys::path::append(BinPath, "bin"); +- IncludePath = InstallPath; +- llvm::sys::path::append(IncludePath, "include"); +- LibPath = InstallPath; +- llvm::sys::path::append(LibPath, "lib"); +- +- llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> VersionFile = +- FS.getBufferForFile(BinPath + "/.hipVersion"); +- if (!VersionFile && Candidate.StrictChecking) +- continue; +- +- if (HIPVersionArg.empty() && VersionFile) +- if (parseHIPVersionFile((*VersionFile)->getBuffer())) +- continue; +- +- HasHIPRuntime = true; +- return; +- } +- HasHIPRuntime = false; ++ HasHIPRuntime = true; + } + + void RocmInstallationDetector::print(raw_ostream &OS) const { diff --git a/sys-devel/llvm-roc/files/llvm-roc-5.0.0-add_GNU-stack.patch b/sys-devel/llvm-roc/files/llvm-roc-5.0.0-add_GNU-stack.patch new file mode 100644 index 00000000000..f57989c8c8a --- /dev/null +++ b/sys-devel/llvm-roc/files/llvm-roc-5.0.0-add_GNU-stack.patch @@ -0,0 +1,14 @@ +Add .note.GNU-stack to mitigate QA notice according to +https://wiki.gentoo.org/wiki/Hardened/GNU_stack_quickstart +=================================================================== +--- llvm-project-rocm-5.0.0.orig/compiler-rt/lib/orc/elfnix_tls.x86-64.S ++++ llvm-project-rocm-5.0.0/compiler-rt/lib/orc/elfnix_tls.x86-64.S +@@ -61,4 +61,8 @@ ___orc_rt_elfnix_tls_get_addr: + popq %rbp + ret + ++#if defined(__linux__) && defined(__ELF__) ++ .section .note.GNU-stack,"",%progbits ++#endif ++ + #endif // defined(__x86_64__) diff --git a/sys-devel/llvm-roc/files/llvm-roc-5.0.0-hip-location.patch b/sys-devel/llvm-roc/files/llvm-roc-5.0.0-hip-location.patch new file mode 100644 index 00000000000..614a16d1e81 --- /dev/null +++ b/sys-devel/llvm-roc/files/llvm-roc-5.0.0-hip-location.patch @@ -0,0 +1,206 @@ +replace hardcoded hip finder with Gentoo paths. + +It is not necessary to check HIP runtime each time. + +Author: Benda Xu <heroxbd@gentoo.org> +Author: Yiyang Wu <xgreenlandforwyy@gmail.com> + +Index: llvm-project-rocm-5.0.1/clang/lib/Driver/ToolChains/AMDGPU.cpp +=================================================================== +--- llvm-project-rocm-5.0.1.orig/clang/lib/Driver/ToolChains/AMDGPU.cpp ++++ llvm-project-rocm-5.0.1/clang/lib/Driver/ToolChains/AMDGPU.cpp +@@ -169,139 +169,8 @@ bool RocmInstallationDetector::parseHIPV + /// cached and populated only once. + const SmallVectorImpl<RocmInstallationDetector::Candidate> & + RocmInstallationDetector::getInstallationPathCandidates() { +- +- // Return the cached candidate list if it has already been populated. +- if (!ROCmSearchDirs.empty()) +- return ROCmSearchDirs; +- +- auto DoPrintROCmSearchDirs = [&]() { +- if (PrintROCmSearchDirs) +- for (auto Cand : ROCmSearchDirs) { +- llvm::errs() << "ROCm installation search path"; +- if (Cand.isSPACK()) +- llvm::errs() << " (Spack " << Cand.SPACKReleaseStr << ")"; +- llvm::errs() << ": " << Cand.Path << '\n'; +- } +- }; +- +- // For candidate specified by --rocm-path we do not do strict check, i.e., +- // checking existence of HIP version file and device library files. +- if (!RocmPathArg.empty()) { +- ROCmSearchDirs.emplace_back(RocmPathArg.str()); +- DoPrintROCmSearchDirs(); +- return ROCmSearchDirs; +- } else if (const char *RocmPathEnv = ::getenv("ROCM_PATH")) { +- if (!StringRef(RocmPathEnv).empty()) { +- ROCmSearchDirs.emplace_back(RocmPathEnv); +- DoPrintROCmSearchDirs(); +- return ROCmSearchDirs; +- } +- } +- +- // Try to find relative to the compiler binary. +- const char *InstallDir = D.getInstalledDir(); +- +- // Check both a normal Unix prefix position of the clang binary, as well as +- // the Windows-esque layout the ROCm packages use with the host architecture +- // subdirectory of bin. +- auto DeduceROCmPath = [](StringRef ClangPath) { +- // Strip off directory (usually bin) +- StringRef ParentDir = llvm::sys::path::parent_path(ClangPath); +- StringRef ParentName = llvm::sys::path::filename(ParentDir); +- +- // Some builds use bin/{host arch}, so go up again. +- if (ParentName == "bin") { +- ParentDir = llvm::sys::path::parent_path(ParentDir); +- ParentName = llvm::sys::path::filename(ParentDir); +- } +- +- // Detect ROCm packages built with SPACK. +- // clang is installed at +- // <rocm_root>/llvm-amdgpu-<rocm_release_string>-<hash>/bin directory. +- // We only consider the parent directory of llvm-amdgpu package as ROCm +- // installation candidate for SPACK. +- if (ParentName.startswith("llvm-amdgpu-")) { +- auto SPACKPostfix = +- ParentName.drop_front(strlen("llvm-amdgpu-")).split('-'); +- auto SPACKReleaseStr = SPACKPostfix.first; +- if (!SPACKReleaseStr.empty()) { +- ParentDir = llvm::sys::path::parent_path(ParentDir); +- return Candidate(ParentDir.str(), /*StrictChecking=*/true, +- SPACKReleaseStr); +- } +- } +- +- // Some versions of the rocm llvm package install to /opt/rocm/llvm/bin +- // Some versions of the aomp package install to /opt/rocm/aomp/bin +- if (ParentName == "llvm" || ParentName.startswith("aomp")) +- ParentDir = llvm::sys::path::parent_path(ParentDir); +- // Some versions of the aomp package install to /opt/rocm/aomp/bin +- // and it seems ParentDir is already pointing to correct place. +- return Candidate(ParentDir.str(), /*StrictChecking=*/true); +- }; +- +- // Deduce ROCm path by the path used to invoke clang. Do not resolve symbolic +- // link of clang itself. +- ROCmSearchDirs.emplace_back(DeduceROCmPath(InstallDir)); +- +- // Deduce ROCm path by the real path of the invoked clang, resolving symbolic +- // link of clang itself. +- llvm::SmallString<256> RealClangPath; +- llvm::sys::fs::real_path(D.getClangProgramPath(), RealClangPath); +- auto ParentPath = llvm::sys::path::parent_path(RealClangPath); +- if (ParentPath != InstallDir) +- ROCmSearchDirs.emplace_back(DeduceROCmPath(ParentPath)); +- +- // Device library may be installed in clang or resource directory. +- auto ClangRoot = llvm::sys::path::parent_path(InstallDir); +- auto RealClangRoot = llvm::sys::path::parent_path(ParentPath); +- ROCmSearchDirs.emplace_back(ClangRoot.str(), /*StrictChecking=*/true); +- if (RealClangRoot != ClangRoot) +- ROCmSearchDirs.emplace_back(RealClangRoot.str(), /*StrictChecking=*/true); +- ROCmSearchDirs.emplace_back(D.ResourceDir, +- /*StrictChecking=*/true); +- +- ROCmSearchDirs.emplace_back(D.SysRoot + "/opt/rocm", +- /*StrictChecking=*/true); +- +- // Find the latest /opt/rocm-{release} directory. +- std::error_code EC; +- std::string LatestROCm; +- llvm::VersionTuple LatestVer; +- // Get ROCm version from ROCm directory name. +- auto GetROCmVersion = [](StringRef DirName) { +- llvm::VersionTuple V; +- std::string VerStr = DirName.drop_front(strlen("rocm-")).str(); +- // The ROCm directory name follows the format of +- // rocm-{major}.{minor}.{subMinor}[-{build}] +- std::replace(VerStr.begin(), VerStr.end(), '-', '.'); +- V.tryParse(VerStr); +- return V; +- }; +- for (llvm::vfs::directory_iterator +- File = D.getVFS().dir_begin(D.SysRoot + "/opt", EC), +- FileEnd; +- File != FileEnd && !EC; File.increment(EC)) { +- llvm::StringRef FileName = llvm::sys::path::filename(File->path()); +- if (!FileName.startswith("rocm-")) +- continue; +- if (LatestROCm.empty()) { +- LatestROCm = FileName.str(); +- LatestVer = GetROCmVersion(LatestROCm); +- continue; +- } +- auto Ver = GetROCmVersion(FileName); +- if (LatestVer < Ver) { +- LatestROCm = FileName.str(); +- LatestVer = Ver; +- } +- } +- if (!LatestROCm.empty()) +- ROCmSearchDirs.emplace_back(D.SysRoot + "/opt/" + LatestROCm, +- /*StrictChecking=*/true); +- +- DoPrintROCmSearchDirs(); +- return ROCmSearchDirs; ++ ROCmSearchDirs.emplace_back(D.SysRoot + "/usr", /*StrictChecking=*/true); ++ return ROCmSearchDirs; + } + + RocmInstallationDetector::RocmInstallationDetector( +@@ -410,7 +279,7 @@ void RocmInstallationDetector::detectDev + // - ${ROCM_ROOT}/lib/bitcode/* + // so try to detect these layouts. + static constexpr std::array<const char *, 2> SubDirsList[] = { +- {"amdgcn", "bitcode"}, ++ {"lib/amdgcn", "bitcode"}, + {"lib", ""}, + {"lib", "bitcode"}, + }; +@@ -433,42 +302,7 @@ void RocmInstallationDetector::detectDev + } + + void RocmInstallationDetector::detectHIPRuntime() { +- SmallVector<Candidate, 4> HIPSearchDirs; +- if (!HIPPathArg.empty()) +- HIPSearchDirs.emplace_back(HIPPathArg.str(), /*StrictChecking=*/true); +- else +- HIPSearchDirs.append(getInstallationPathCandidates()); +- auto &FS = D.getVFS(); +- +- for (const auto &Candidate : HIPSearchDirs) { +- InstallPath = Candidate.Path; +- if (InstallPath.empty() || !FS.exists(InstallPath)) +- continue; +- // HIP runtime built by SPACK is installed to +- // <rocm_root>/hip-<rocm_release_string>-<hash> directory. +- auto SPACKPath = findSPACKPackage(Candidate, "hip"); +- InstallPath = SPACKPath.empty() ? InstallPath : SPACKPath; +- +- BinPath = InstallPath; +- llvm::sys::path::append(BinPath, "bin"); +- IncludePath = InstallPath; +- llvm::sys::path::append(IncludePath, "include"); +- LibPath = InstallPath; +- llvm::sys::path::append(LibPath, "lib"); +- +- llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> VersionFile = +- FS.getBufferForFile(BinPath + "/.hipVersion"); +- if (!VersionFile && Candidate.StrictChecking) +- continue; +- +- if (HIPVersionArg.empty() && VersionFile) +- if (parseHIPVersionFile((*VersionFile)->getBuffer())) +- continue; +- +- HasHIPRuntime = true; +- return; +- } +- HasHIPRuntime = false; ++ HasHIPRuntime = true; + } + + void RocmInstallationDetector::print(raw_ostream &OS) const { diff --git a/sys-devel/llvm-roc/files/llvm-roc-5.0.0-linkdl.patch b/sys-devel/llvm-roc/files/llvm-roc-5.0.0-linkdl.patch new file mode 100644 index 00000000000..80598c6f990 --- /dev/null +++ b/sys-devel/llvm-roc/files/llvm-roc-5.0.0-linkdl.patch @@ -0,0 +1,11 @@ +LLVMOffloadArch should link libdl to fix undefined symbol 'dlsym' when linking +--- llvm.orig/lib/OffloadArch/offload-arch/CMakeLists.txt ++++ llvm/lib/OffloadArch/offload-arch/CMakeLists.txt +@@ -3,6 +3,7 @@ add_llvm_tool(offload-arch + ${CMAKE_CURRENT_SOURCE_DIR}/offload-arch.cpp + DEPENDS generated-table LLVMOffloadArch + ) ++target_link_libraries(LLVMOffloadArch PRIVATE ${CMAKE_DL_LIBS}) + target_link_libraries(offload-arch PRIVATE LLVMOffloadArch) + + if(CMAKE_HOST_UNIX) diff --git a/sys-devel/llvm-roc/llvm-roc-4.5.2.ebuild b/sys-devel/llvm-roc/llvm-roc-4.5.2.ebuild new file mode 100644 index 00000000000..59ebbeed8b5 --- /dev/null +++ b/sys-devel/llvm-roc/llvm-roc-4.5.2.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +DESCRIPTION="Radeon Open Compute llvm,lld,clang" +HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm/" +SRC_URI="https://github.com/RadeonOpenCompute/llvm-project/archive/rocm-${PV}.tar.gz -> llvm-rocm-ocl-${PV}.tar.gz" + +LICENSE="UoI-NCSA rc BSD public-domain" +SLOT="0" +KEYWORDS="~amd64" +IUSE="debug +runtime" + +RDEPEND=" + dev-libs/libxml2 + sys-libs/zlib + sys-libs/ncurses:=" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/llvm-project-rocm-${PV}/llvm" + +PATCHES=( + "${FILESDIR}/${PN}-4.2.0-current_pos.patch" + "${FILESDIR}/${PN}-4.2.0-add_Object.patch" +) + +CMAKE_BUILD_TYPE=Release + +src_prepare() { + cd "${WORKDIR}/llvm-project-rocm-${PV}" || die + eapply "${FILESDIR}/${PN}-4.5.2-add_libraries.patch" + eapply "${FILESDIR}/${PN}-4.0.0-remove-isystem-usr-include.patch" + eapply "${FILESDIR}/${PN}-4.5.2-hip-location.patch" + eapply "${FILESDIR}/${PN}-4.2.0-cyclades.patch" + + if [[ -n ${EPREFIX} ]]; then + pushd "${S}"/../clang >/dev/null || die + sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt || die + eend $? + ebegin "Use "${EPREFIX}" as default sysroot" + cd lib/Driver/ToolChains >/dev/null || die + ebegin "Use dynamic linker from ${EPREFIX}" + sed -i -e "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" Linux.cpp || die + eend $? + + ebegin "Remove --sysroot call on ld for native toolchain" + sed -i -e "$(grep -n -B1 sysroot= Gnu.cpp | sed -ne '{1s/-.*//;1p}'),+1 d" Gnu.cpp || die + eend $? + popd >/dev/null || die + fi + + # handled by sysroot, don't prefixify here. + sed -e 's:/opt/rocm:/usr/lib/hip:' \ + -i "${S}"/../clang/lib/Driver/ToolChains/AMDGPU.cpp || die + + eapply_user + cmake_src_prepare +} + +src_configure() { + PROJECTS="clang;lld;llvm" + + if usex runtime; then + PROJECTS+=";compiler-rt" + fi + + local mycmakeargs=( + -Wno-dev + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc" + -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON + -DLLVM_ENABLE_PROJECTS="${PROJECTS}" + -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" + -DLLVM_BUILD_DOCS=NO + -DLLVM_ENABLE_BINDINGS=OFF + -DLLVM_ENABLE_OCAMLDOC=OFF + -DLLVM_ENABLE_SPHINX=NO + -DLLVM_ENABLE_DOXYGEN=OFF + -DLLVM_BUILD_UTILS=ON + -DLLVM_VERSION_SUFFIX=roc + -DOCAMLFIND=NO + ) + + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + + cmake_src_configure +} + +src_install() { + cmake_src_install + cat > "99${PN}" <<-EOF + LDPATH="${EROOT}/usr/lib/llvm/roc/lib" + EOF + doenvd "99${PN}" +} diff --git a/sys-devel/llvm-roc/llvm-roc-5.0.2.ebuild b/sys-devel/llvm-roc/llvm-roc-5.0.2.ebuild new file mode 100644 index 00000000000..6dc4f6a23e2 --- /dev/null +++ b/sys-devel/llvm-roc/llvm-roc-5.0.2.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="Radeon Open Compute llvm,lld,clang" +HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm/" +SRC_URI="https://github.com/RadeonOpenCompute/llvm-project/archive/rocm-${PV}.tar.gz -> llvm-rocm-ocl-${PV}.tar.gz" + +LICENSE="UoI-NCSA rc BSD public-domain" +SLOT="0" +KEYWORDS="~amd64" +IUSE="debug +runtime" + +RDEPEND=" + dev-libs/libxml2 + sys-libs/zlib + sys-libs/ncurses:=" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/llvm-project-rocm-${PV}/llvm" + +PATCHES=( + "${FILESDIR}/${PN}-4.2.0-current_pos.patch" + "${FILESDIR}/${PN}-5.0.0-linkdl.patch" +) + +CMAKE_BUILD_TYPE=RelWithDebInfo + +src_prepare() { + pushd "${WORKDIR}/llvm-project-rocm-${PV}" || die + eapply "${FILESDIR}/${PN}-4.0.0-remove-isystem-usr-include.patch" + eapply "${FILESDIR}/${PN}-5.0.0-hip-location.patch" + eapply "${FILESDIR}/${PN}-5.0.0-add_GNU-stack.patch" + popd || die + + if [[ -n ${EPREFIX} ]]; then + pushd "${S}"/../clang >/dev/null || die + sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt || die + eend $? + ebegin "Use "${EPREFIX}" as default sysroot" + cd lib/Driver/ToolChains >/dev/null || die + ebegin "Use dynamic linker from ${EPREFIX}" + sed -i -e "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" Linux.cpp || die + eend $? + + ebegin "Remove --sysroot call on ld for native toolchain" + sed -i -e "$(grep -n -B1 sysroot= Gnu.cpp | sed -ne '{1s/-.*//;1p}'),+1 d" Gnu.cpp || die + eend $? + popd >/dev/null || die + fi + + # handled by sysroot, don't prefixify here. + sed -e 's:/opt/rocm:/usr/lib/hip:' \ + -i "${S}"/../clang/lib/Driver/ToolChains/AMDGPU.cpp || die + + eapply_user + cmake_src_prepare +} + +src_configure() { + PROJECTS="clang;lld;llvm" + + if usex runtime; then + PROJECTS+=";compiler-rt" + fi + + local mycmakeargs=( + -Wno-dev + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc" + -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON + -DLLVM_ENABLE_PROJECTS="${PROJECTS}" + -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" + -DLLVM_BUILD_DOCS=NO + -DLLVM_ENABLE_BINDINGS=OFF + -DLLVM_ENABLE_OCAMLDOC=OFF + -DLLVM_ENABLE_SPHINX=NO + -DLLVM_ENABLE_DOXYGEN=OFF + -DLLVM_BUILD_UTILS=ON + -DLLVM_VERSION_SUFFIX=roc + -DOCAMLFIND=NO + ) + + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + + cmake_src_configure +} + +src_install() { + cmake_src_install + cat > "99${PN}" <<-EOF + LDPATH="${EPREFIX}/usr/lib/llvm/roc/lib" + EOF + doenvd "99${PN}" +} diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest index 713e89cfe95..bdbe648fb80 100644 --- a/sys-devel/llvm/Manifest +++ b/sys-devel/llvm/Manifest @@ -1,12 +1,24 @@ -DIST llvm-11.1.0-manpages.tar.bz2 191571 BLAKE2B d6f8e1390dd3e6e8bbcd66c0079ef89f2ff3479743499c36ab32f8bc8281631a96113df9a87f6284058365950f4df3c75dacfcc11920fc5ea7ef0233ba842b77 SHA512 2543e519f51cc7ecb51a732c658ec5d35c5225e30a677f24ead75e81fb1ab793a030e79f21d0b702a2cf6ab6da1a2cba839b49a98e1b0a36384e98076ed5c4b1 DIST llvm-12.0.1-manpages.tar.bz2 191582 BLAKE2B a049cd305c257875d47e92d703c51aee8225854f999eddbd530c7a978704a981b05bc0819ba31a2f2a218d3569b078f0deb01b0eeb385966253b54a0fdc090d1 SHA512 9931a57f843709aed59193524fe980af695e4e23c8f53ec3cff308677ba4fc520ca58032b50b68440c7762305855317d9a705fe5ccbb543fb104f4deb5d10ea5 -DIST llvm-13.0.0-manpages.tar.bz2 202595 BLAKE2B 1a3a389e8c544675f7ba2692f92bb82a83beabd6c595211806ef7f473e1741ea633a773edf623011d3d011ef2ee7a1611fc9620fe921eeebe1b99c3b8b3a0652 SHA512 344139f3123169776e0fd603e605bbf537d15d80ff56ad60e66ed1639a9dec53a8ac5cd088c8e14c8b7a799b563268445562293ba1d4efeb8db438cbd9cb5fb0 -DIST llvm-gentoo-patchset-11.1.0-1.tar.xz 4032 BLAKE2B e69138a422e315b31a3d9c11faa4ae1ddf1bf9092cee2db0de4d2adef81fd802973488293aab48b764402b51996893b17ca03249ef4620848a576d1f6cdb9698 SHA512 e1c5504dab6c5db9fdf4addfeb12316f22d0258717ba551a9b7b3ba37919491fb6011ac5cca1e793b7509d5c1c186bc6bc4213f7d6155d190612492b216f979b +DIST llvm-13.0.1-manpages.tar.bz2 202187 BLAKE2B 32a761426dbe4c3c355d30660254305cd88b6d513faee04c78e370cea9d38761108a9be4c4b4ac39b6a74400af1f9d37ffd11ab05acd7340175c8d66845ae7d9 SHA512 9495e1daf588540fdb8b9ee905a9b6be4693bd70b7f42c8e8a0d667242fc24dc853c45918d3bc09d02f0761ad61541bc9749c1498e312da129abdab638a0d572 +DIST llvm-14.0.1-manpages.tar.bz2 86273 BLAKE2B 174b412568565bdd4c3db34b1b2f2482a18ca45a0a6269ca381fe5c77da21b85dafabad29551b262d593006e9b68e6f7fdf43c2ec626204970d1280dd87a5f3d SHA512 49c58094eebecfadff97d62b4e6b0129e07c52ad7fe3ea4ce5c955e6fc9c73ac443b6a6e0f8322cf25e1d88b059c4231c4798d8da04340a46f6f84fb1b386f29 +DIST llvm-14.0.3-manpages.tar.bz2 217443 BLAKE2B ebea48d9015bb0b53e8b799d8d79ac7a8d03f55440e5d3a08a9ce6c8f106c3f37e597c46aaf824dfee87c222775630299a5c277b4b29d43e831116c12932675a SHA512 db762ff7bfde28147276cacb5c5753a1bb4dd08dc8840423d6fc073629cd97bc3c7f54402cb17aa00cfc06f9f775f7ac9478c2661cacf86d5517a968d290beb3 +DIST llvm-14.0.4-manpages.tar.bz2 214161 BLAKE2B 9e8a0a78cce26b0e5235750a2af99542a496d34726046fbfa3274a22a55a75b3210c4af49e768130515c636ae3d6350f909ccb601888c276ce8cbd6b029b7172 SHA512 793dcbac320d26d26c637f2d38de0a55f5a91d13c93fa1aa2753103a07720248ffc16e8f1914ce81e8c291f02797360c052c23b027d773ac05a5563744313828 +DIST llvm-14.0.5-manpages.tar.bz2 217258 BLAKE2B 617f454e8d05f644ba1314d0bf72446e00058a547858469442017fffdd4c629f9240b96fb2107bee0aae7e5e85cfa35a21c072378bb2d0bc8260d1c021751f9d SHA512 051f154e3498dca3da420cafedd4ea4e43bbdb1eaf95f5c15107b05cedbaea4bf2d6b4c9567a95f0b8e513173c975e637391055bcd4802dcd0339b88b23da648 +DIST llvm-14.0.6-manpages.tar.bz2 214038 BLAKE2B c1ec35a5eeb35b720bf9a3a5ea9820eceaa26d9030a876772aca25dd47f8848500b94309ae9e6f3e9bc16e083d91747664e16b01dec06897e294e55fbf6f5cb3 SHA512 ea22af2f6cbfd3183f4e9ba5638e2667ca48562519bd679744d86778fed8da97173a25f57671aa67bcb45a7e4c8fd6cbbf461589a8611e1c8eb1b9eda7cc430f DIST llvm-gentoo-patchset-12.0.1.tar.xz 5280 BLAKE2B 963d005bc7b636570be90eb841ac5bcaeb927538cc7de27683167111a17d6496677c7517de2ecfaf14b5d8ac22bad357be490b8a2ed9aba502fd5f447ecc99e9 SHA512 fc7c38e671555751650299c3a8bee44d5c7f26e11b68d5538c507fb7fe9ff2d349bdcd43bce90a448a747f082d523b3849d6bcda5e3ae2e998edcb926d6aa249 -DIST llvm-gentoo-patchset-13.0.0.tar.xz 5012 BLAKE2B 6760c78c086aaf6629143fd920b0a2c68cad9278628fbea8164dfeb59db95984a5b5d6b3505b510c697e8c95bf8d2be782c6b73c01622d52f2da9b07ecff39e0 SHA512 7764d49343b795b6bebae64f646ba27e3e6cc2a20b8a1aee645ce0d8474633c34acfbb73c08546fee415755dd4ea5a98c1d84db5e394cf5f4fc802eb61148ab6 -DIST llvm-gentoo-patchset-13.0.1-rc3.tar.xz 4808 BLAKE2B d8ed3ae424914437413e2e8c029880072e93d79ca79b842ad59451df46594c9b0d73ee5d49d3b65c4c7a40c86b2e0d43501ef106aea7c481f22425a5245a3411 SHA512 10430a720b120a340a681fa435a7f050741c75270607e3f5214bf829313d274c11f019f1ac072857dc5d7f868e6eb013932d1c94446e8cb2e151ac818a081914 -DIST llvm-gentoo-patchset-9999-1.tar.xz 4032 BLAKE2B b9413484dafed8ae0c68c2c164b45fd07bb8d5d0898f03abe118fd2120ffcb1fb6c949de9649a97c2e8105f24b9d131a725c67c0a502ca4d4d192c1a0d65f49d SHA512 e64449eeaf756c5bd945109937b84ba4bd8a015222bd792d39cf3947871e87571a4ca57814790e51544cb05ad4c2d1f044e818e4caaac7c2e2a02cb1aa290fcc -DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81 +DIST llvm-gentoo-patchset-13.0.1.tar.xz 6288 BLAKE2B 899222b962486e924e4f8a2b574d285531a3f87af9385ff68c81db92aa224a0cde6d4ee049b5405056bedb4b232b50e1d5840024071a4a215f6311853304c92d SHA512 b2805337f1deca626768a44c5e7ac9ed16e0c31bead1647d44a493a8123c1b8e8f1c8ceee3536bcc6fa87fdd3fcec408229f701adf30eff07e7ef9889b847b01 +DIST llvm-gentoo-patchset-14.0.1.tar.xz 4724 BLAKE2B 2689298c687fa8b5fa2545afccc248c00ff6778f1a14e3e7999e5d52a1b0b9c3b2e66e8c008e27c62c6c3c08009dc7d9d083ca53698138258ac972e4ad03c042 SHA512 a9f071ad0a792f558105a64790f9e470d8aaed05bd1baabbe86539760c881f772602a03265e0962d8599f991f7fd44d14a49e2ef9d74bb5eb283f473f4084d32 +DIST llvm-gentoo-patchset-14.0.3.tar.xz 5492 BLAKE2B 48a46d50a81c5572d1573c6923bc404b198f74ee8587a928e0858553dac37f7fa39cc969d72b938ef3d2f04f6872f9e2e2478821ab90c657ecbbacb3f7d99d7a SHA512 b917b549de6d46cd7aab3e59b888b5e5ffb955435b33d6538be2f31dc30217a24740a673cb6bb661087c245121edb079052b179badaf70b86b985ca69b3652a6 +DIST llvm-gentoo-patchset-14.0.4.tar.xz 4072 BLAKE2B cbd8804e33069ca2709503931545a57cfd33c06f28696d876d499285e9add9487a069495b756bbb94d29a162c39ece651defddd302e3ac523c5484c09fb3d2ea SHA512 db00268d01e7ec99b907321384c02468a53020386ee4fc819fabfc1cd0784323044931dac42437968d5fd37190da1b9f8f847af553a65a0595c33cecfd82c293 +DIST llvm-gentoo-patchset-14.0.5.tar.xz 4072 BLAKE2B c35072f70831d5e3c9f7236f8473b098e6b8da4f27ce6a382ff4d3cd235837b25b9a1bc1e406ce0d3feb05e4d1e1c8bf141ff8f218568d5a5339fd1092f86b62 SHA512 646e0515a6cf1aae86f05db4797d7af6e3c9b8a6070f41cbd36535944029e0e5888128e33d8c44af22b5bb9ccba392b9dfeabc7708e5eab11858edefced6b68d +DIST llvm-gentoo-patchset-14.0.6.tar.xz 4544 BLAKE2B b613582fa048837303168a2d62835688128621236022ca6c232293cb2e4549174ef256e7dcd8303bfef6d5456d0459ddb2cbda4a4d323b82901da4c16f15dcc4 SHA512 fb89a3186c5bffdc6245ed103d79fe6802a86986bd43891b7e128955bd546dffcb5b4083ac9e7966f67ce8dd82322756a11428ab4c62d21f012d614062adab35 +DIST llvm-gentoo-patchset-9999-r3.tar.xz 4076 BLAKE2B 30bdf740606a1718ae45d850803385d425b656fbbe0250f587cad54f55272e3617d5ee0d04f534a58f87408b0a2dea322ebf1bb8cd653a2beba21d0bc5778c62 SHA512 2c7080ffd09d7dcf4c72a97044a5c63ab895250721d60270bc51c2095aef5f9039781892b4c0d14e942611686153f874a1f52a1c854bb8ca093383c08bdc005a +DIST llvm-project-14.0.5.src.tar.xz 105617748 BLAKE2B a68a6eb58302702f560d1204eb97d34b695eb5df417ccefb50117dbd641ba3c3dda9e64c04506e646dd40c1151eb60b12843e206996ef74b35b2841b8dabafda SHA512 db5a7ea1149988c2aab4ed634f14e00bb9a8042089350b811f875e295ced7b5add80a11b91cad80ba0ba9801261502644a720021506483c14dfb1bc24a7f54d5 +DIST llvm-project-14.0.5.src.tar.xz.sig 566 BLAKE2B ecf66df5d0acb382c9d441aee053404254fa4087d57130b04bb496af9cbb71c59e82f0938f44953d7fd777524781d13d1327b6c64065cf45b177bc3ea0e5c3f2 SHA512 a785e38f11863a46de8766ff4495a73173479cdbd95dc539804b0381a7a834a409713dbaf441272a9cc2963a3c7015c95dc6f0dcfa745e8d6047b1ad5feacff7 +DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f15e428f22a536a17e5f4e3eb29a003b8a8ec0abe0fa3e072591161d5f30ef7d8867c1ce34d1b341ad858e93c00263499941a99 SHA512 6fc6eeb60fac698702d1aac495fc0161eb7216a1f8db2020af8fccec5837831f7cc20dc2a169bf4f0b5f520748280b4a86621f3697d622aa58faaa45dbfaad13 +DIST llvm-project-14.0.6.src.tar.xz.sig 566 BLAKE2B cb658ad43d8ab6c43a5773aedadf0569c97b5ee4b1bd58eceb10e1879a30880c741c3d66bedd462c892309b688fb7b2673115a62d1f74d71ee375a578de9547f SHA512 b4a7b368532a7a4a24376cfa7db8f6d3478f6d4446474342fc00b474ecf466330cd0f16783209263c4c72d5fc7ddedfb11b95578842e700cfb7ee0bb34cc95d6 DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1 -DIST llvmorg-13.0.0.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2 -DIST llvmorg-13.0.1-rc3.tar.gz 147302323 BLAKE2B 9ac2f97568062d7dd618295a68d6e14898fcd69e2bb66290b999ceb8c12132371f4e9b59d8ba2b252e5e5cb249045676b24fc50c117b2afae20abab98f426582 SHA512 88a04ad02af2d41ec21c7a62bad21ee0e627b7276a16795875afd062ed29ac7fb4aadec5b5e48785a6502c9fd797a4b67d648a21f193c9f7602112870b10a3d1 +DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f +DIST llvmorg-14.0.1.tar.gz 158074615 BLAKE2B bf80366461580058494eb101646efcd1a8b55a66818a710c2eb8c649bf88c02fe4552cecf4c1c8637a64e7cee8d644bca31aafc804765ed18f2b5e2975dd6c92 SHA512 0a15aa9cfc978a7b03a1659a2affad65ede66d280f5c12bf0beaaf194cd7bdd57ff438b5f40e64c1e1b88f368de99be349e9d30b544d2bbe4a50f0ebed3307f2 +DIST llvmorg-14.0.3.tar.gz 158092596 BLAKE2B ef901df510ec6bc1242595ec330e9c9ee76e696b077d67a8d62b53608c3d18b2f2d7ea3150864e13d9b37a8ce899ebca946ebe72cbc4538700176e20859ddec2 SHA512 511e93fd9b1c414c38fe9e2649679ac0b16cb04f7f7838569d187b04c542a185e364d6db73e96465026e3b2533649eb75ac95507d12514af32b28bdfb66f2646 +DIST llvmorg-14.0.4.tar.gz 158088617 BLAKE2B 7fb894548dce72593a8639b4d0220d2499577f80d38b97600749c91a498c69dfbbe818cee35e4a76370795e55da7037543ea341ad7567a6f548893c67dce9e64 SHA512 e14e6c3a1915a96e9ddc609f16ca3a398ca6f7fd0a691dadaa24490078a661340e845cb2d18f3679de4f47300bb822c33ae69548af6a0370d55737831a28b959 diff --git a/sys-devel/llvm/llvm-11.1.0.ebuild b/sys-devel/llvm/llvm-11.1.0.ebuild deleted file mode 100644 index aa2dcac7329..00000000000 --- a/sys-devel/llvm/llvm-11.1.0.ebuild +++ /dev/null @@ -1,512 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7..9} ) -inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \ - toolchain-funcs - -DESCRIPTION="Low Level Virtual Machine" -HOMEPAGE="https://llvm.org/" - -# Those are in lib/Targets, without explicit CMakeLists.txt mention -ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC VE ) -# Keep in sync with CMakeLists.txt -ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430 - NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore - "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}" ) -ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) - -# Additional licenses: -# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD. -# 2. xxhash: BSD. -# 3. MD5 code: public-domain. -# 4. ConvertUTF.h: TODO. - -LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc" -SLOT="$(ver_cut 1)" -KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86 ~amd64-linux ~ppc-macos ~x64-macos" -IUSE="debug doc exegesis +gold libedit +libffi ncurses test xar xml z3 ${ALL_LLVM_TARGETS[*]}" -REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )" -RESTRICT="!test? ( test )" - -RDEPEND=" - sys-libs/zlib:0=[${MULTILIB_USEDEP}] - exegesis? ( dev-libs/libpfm:= ) - gold? ( >=sys-devel/binutils-2.31.1-r4:*[plugins] ) - libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] ) - libffi? ( >=dev-libs/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) - ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) - xar? ( app-arch/xar ) - xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) - z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )" -DEPEND="${RDEPEND} - gold? ( sys-libs/binutils-libs )" -BDEPEND=" - dev-lang/perl - >=dev-util/cmake-3.16 - sys-devel/gnuconfig - kernel_Darwin? ( - <sys-libs/libcxx-$(ver_cut 1-3).9999 - >=sys-devel/binutils-apple-5.1 - ) - doc? ( $(python_gen_any_dep ' - dev-python/recommonmark[${PYTHON_USEDEP}] - dev-python/sphinx[${PYTHON_USEDEP}] - ') ) - libffi? ( virtual/pkgconfig ) - ${PYTHON_DEPS}" -# There are no file collisions between these versions but having :0 -# installed means llvm-config there will take precedence. -RDEPEND="${RDEPEND} - !sys-devel/llvm:0" -PDEPEND="sys-devel/llvm-common - gold? ( >=sys-devel/llvmgold-${SLOT} )" - -LLVM_COMPONENTS=( llvm ) -LLVM_MANPAGES=pregenerated -LLVM_PATCHSET=11.1.0-1 -llvm.org_set_globals - -python_check_deps() { - use doc || return 0 - - has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" && - has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" -} - -check_live_ebuild() { - local prod_targets=( - $(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \ - | tail -n +2 | head -n -1) - ) - local all_targets=( - lib/Target/*/ - ) - all_targets=( "${all_targets[@]#lib/Target/}" ) - all_targets=( "${all_targets[@]%/}" ) - - local exp_targets=() i - for i in "${all_targets[@]}"; do - has "${i}" "${prod_targets[@]}" || exp_targets+=( "${i}" ) - done - # reorder - all_targets=( "${prod_targets[@]}" "${exp_targets[@]}" ) - - if [[ ${exp_targets[*]} != ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]} ]]; then - eqawarn "ALL_LLVM_EXPERIMENTAL_TARGETS is outdated!" - eqawarn " Have: ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]}" - eqawarn "Expected: ${exp_targets[*]}" - eqawarn - fi - - if [[ ${all_targets[*]} != ${ALL_LLVM_TARGETS[*]#llvm_targets_} ]]; then - eqawarn "ALL_LLVM_TARGETS is outdated!" - eqawarn " Have: ${ALL_LLVM_TARGETS[*]#llvm_targets_}" - eqawarn "Expected: ${all_targets[*]}" - fi -} - -check_distribution_components() { - if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then - local all_targets=() my_targets=() l - cd "${BUILD_DIR}" || die - - while read -r l; do - if [[ ${l} == install-*-stripped:* ]]; then - l=${l#install-} - l=${l%%-stripped*} - - case ${l} in - # shared libs - LLVM|LLVMgold) - ;; - # TableGen lib + deps - LLVMDemangle|LLVMSupport|LLVMTableGen) - ;; - # static libs - LLVM*) - continue - ;; - # meta-targets - distribution|llvm-libraries) - continue - ;; - # used only w/ USE=doc - docs-llvm-html) - use doc || continue - ;; - esac - - all_targets+=( "${l}" ) - fi - done < <(ninja -t targets all) - - while read -r l; do - my_targets+=( "${l}" ) - done < <(get_distribution_components $"\n") - - local add=() remove=() - for l in "${all_targets[@]}"; do - if ! has "${l}" "${my_targets[@]}"; then - add+=( "${l}" ) - fi - done - for l in "${my_targets[@]}"; do - if ! has "${l}" "${all_targets[@]}"; then - remove+=( "${l}" ) - fi - done - - if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then - eqawarn "get_distribution_components() is outdated!" - eqawarn " Add: ${add[*]}" - eqawarn "Remove: ${remove[*]}" - fi - cd - >/dev/null || die - fi -} - -src_prepare() { - # disable use of SDK on OSX, bug #568758 - sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die - - # Update config.guess to support more systems - cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die - - # Verify that the live ebuild is up-to-date - check_live_ebuild - - llvm.org_src_prepare -} - -# Is LLVM being linked against libc++? -is_libcxx_linked() { - local code='#include <ciso646> -#if defined(_LIBCPP_VERSION) - HAVE_LIBCXX -#endif -' - local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1 - - [[ ${out} == *HAVE_LIBCXX* ]] -} - -get_distribution_components() { - local sep=${1-;} - - local out=( - # shared libs - LLVM - LTO - Remarks - - # tools - llvm-config - - # common stuff - cmake-exports - llvm-headers - - # libraries needed for clang-tblgen - LLVMDemangle - LLVMSupport - LLVMTableGen - ) - - if multilib_is_native_abi; then - out+=( - # utilities - llvm-tblgen - FileCheck - llvm-PerfectShuffle - count - not - yaml-bench - - # tools - bugpoint - dsymutil - llc - lli - lli-child-target - llvm-addr2line - llvm-ar - llvm-as - llvm-bcanalyzer - llvm-c-test - llvm-cat - llvm-cfi-verify - llvm-config - llvm-cov - llvm-cvtres - llvm-cxxdump - llvm-cxxfilt - llvm-cxxmap - llvm-diff - llvm-dis - llvm-dlltool - llvm-dwarfdump - llvm-dwp - llvm-elfabi - llvm-exegesis - llvm-extract - llvm-gsymutil - llvm-ifs - llvm-install-name-tool - llvm-jitlink - llvm-lib - llvm-link - llvm-lipo - llvm-lto - llvm-lto2 - llvm-mc - llvm-mca - llvm-ml - llvm-modextract - llvm-mt - llvm-nm - llvm-objcopy - llvm-objdump - llvm-opt-report - llvm-pdbutil - llvm-profdata - llvm-ranlib - llvm-rc - llvm-readelf - llvm-readobj - llvm-reduce - llvm-rtdyld - llvm-size - llvm-split - llvm-stress - llvm-strings - llvm-strip - llvm-symbolizer - llvm-undname - llvm-xray - obj2yaml - opt - sancov - sanstats - verify-uselistorder - yaml2obj - - # python modules - opt-viewer - ) - - if llvm_are_manpages_built; then - out+=( - # manpages - docs-dsymutil-man - docs-llvm-dwarfdump-man - docs-llvm-man - ) - fi - use doc && out+=( - docs-llvm-html - ) - - use gold && out+=( - LLVMgold - ) - fi - - printf "%s${sep}" "${out[@]}" -} - -multilib_src_configure() { - local ffi_cflags ffi_ldflags - if use libffi; then - ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi) - ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi) - fi - - local libdir=$(get_libdir) - local mycmakeargs=( - # disable appending VCS revision to the version to improve - # direct cache hit ratio - -DLLVM_APPEND_VC_REV=OFF - -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}" - -DLLVM_LIBDIR_SUFFIX=${libdir#lib} - - -DBUILD_SHARED_LIBS=OFF - -DLLVM_BUILD_LLVM_DYLIB=ON - -DLLVM_LINK_LLVM_DYLIB=ON - -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components) - - # cheap hack: LLVM combines both anyway, and the only difference - # is that the former list is explicitly verified at cmake time - -DLLVM_TARGETS_TO_BUILD="" - -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" - -DLLVM_BUILD_TESTS=$(usex test) - - -DLLVM_ENABLE_FFI=$(usex libffi) - -DLLVM_ENABLE_LIBEDIT=$(usex libedit) - -DLLVM_ENABLE_TERMINFO=$(usex ncurses) - -DLLVM_ENABLE_LIBXML2=$(usex xml) - -DLLVM_ENABLE_ASSERTIONS=$(usex debug) - -DLLVM_ENABLE_LIBPFM=$(usex exegesis) - -DLLVM_ENABLE_EH=ON - -DLLVM_ENABLE_RTTI=ON - -DLLVM_ENABLE_Z3_SOLVER=$(usex z3) - - -DLLVM_HOST_TRIPLE="${CHOST}" - - -DFFI_INCLUDE_DIR="${ffi_cflags#-I}" - -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}" - # used only for llvm-objdump tool - -DHAVE_LIBXAR=$(multilib_native_usex xar 1 0) - - -DPython3_EXECUTABLE="${PYTHON}" - - # disable OCaml bindings (now in dev-ml/llvm-ocaml) - -DOCAMLFIND=NO - ) - - if is_libcxx_linked; then - # Smart hack: alter version suffix -> SOVERSION when linking - # against libc++. This way we won't end up mixing LLVM libc++ - # libraries with libstdc++ clang, and the other way around. - mycmakeargs+=( - -DLLVM_VERSION_SUFFIX="libcxx" - -DLLVM_ENABLE_LIBCXX=ON - ) - fi - -# Note: go bindings have no CMake rules at the moment -# but let's kill the check in case they are introduced -# if ! multilib_is_native_abi || ! use go; then - mycmakeargs+=( - -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND - ) -# fi - - use test && mycmakeargs+=( - -DLLVM_LIT_ARGS="$(get_lit_flags)" - ) - - if multilib_is_native_abi; then - local build_docs=OFF - if llvm_are_manpages_built; then - build_docs=ON - mycmakeargs+=( - -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" - -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" - -DSPHINX_WARNINGS_AS_ERRORS=OFF - ) - fi - - mycmakeargs+=( - -DLLVM_BUILD_DOCS=${build_docs} - -DLLVM_ENABLE_OCAMLDOC=OFF - -DLLVM_ENABLE_SPHINX=${build_docs} - -DLLVM_ENABLE_DOXYGEN=OFF - -DLLVM_INSTALL_UTILS=ON - ) - use gold && mycmakeargs+=( - -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include - ) - fi - - if tc-is-cross-compiler; then - local tblgen="${EPREFIX}/usr/lib/llvm/${SLOT}/bin/llvm-tblgen" - [[ -x "${tblgen}" ]] \ - || die "${tblgen} not found or usable" - mycmakeargs+=( - -DCMAKE_CROSSCOMPILING=ON - -DLLVM_TABLEGEN="${tblgen}" - ) - fi - - # workaround BMI bug in gcc-7 (fixed in 7.4) - # https://bugs.gentoo.org/649880 - # apply only to x86, https://bugs.gentoo.org/650506 - if tc-is-gcc && [[ ${MULTILIB_ABI_FLAG} == abi_x86* ]] && - [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]] - then - local CFLAGS="${CFLAGS} -mno-bmi" - local CXXFLAGS="${CXXFLAGS} -mno-bmi" - fi - - # LLVM can have very high memory consumption while linking, - # exhausting the limit on 32-bit linker executable - use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" - - # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 - use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" - cmake_src_configure - - multilib_is_native_abi && check_distribution_components -} - -multilib_src_compile() { - cmake_build distribution - - pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld - pax-mark m "${BUILD_DIR}"/bin/lli - pax-mark m "${BUILD_DIR}"/bin/lli-child-target - - if use test; then - pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests - pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests - pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests - fi -} - -multilib_src_test() { - # respect TMPDIR! - local -x LIT_PRESERVES_TMP=1 - cmake_build check -} - -src_install() { - local MULTILIB_CHOST_TOOLS=( - /usr/lib/llvm/${SLOT}/bin/llvm-config - ) - - local MULTILIB_WRAPPED_HEADERS=( - /usr/include/llvm/Config/llvm-config.h - ) - - local LLVM_LDPATHS=() - multilib-minimal_src_install - - # move wrapped headers back - mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die -} - -multilib_src_install() { - DESTDIR=${D} cmake_build install-distribution - - # move headers to /usr/include for wrapping - rm -rf "${ED}"/usr/include || die - mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die - - LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" ) -} - -multilib_src_install_all() { - local revord=$(( 9999 - ${SLOT} )) - newenvd - "60llvm-${revord}" <<-_EOF_ - PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" - # we need to duplicate it in ROOTPATH for Portage to respect... - ROOTPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" - MANPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" - LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" - _EOF_ - - docompress "/usr/lib/llvm/${SLOT}/share/man" - llvm_install_manpages -} - -pkg_postinst() { - elog "You can find additional opt-viewer utility scripts in:" - elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/opt-viewer" - elog "To use these scripts, you will need Python along with the following" - elog "packages:" - elog " dev-python/pygments (for opt-viewer)" - elog " dev-python/pyyaml (for all of them)" -} diff --git a/sys-devel/llvm/llvm-12.0.1.ebuild b/sys-devel/llvm/llvm-12.0.1.ebuild index 673ce859188..3b38dc9ca6f 100644 --- a/sys-devel/llvm/llvm-12.0.1.ebuild +++ b/sys-devel/llvm/llvm-12.0.1.ebuild @@ -65,7 +65,7 @@ PDEPEND="sys-devel/llvm-common gold? ( >=sys-devel/llvmgold-${SLOT} )" LLVM_COMPONENTS=( llvm ) -LLVM_MANPAGES=pregenerated +LLVM_MANPAGES=1 LLVM_PATCHSET=12.0.1 llvm.org_set_globals @@ -141,7 +141,7 @@ check_distribution_components() { all_targets+=( "${l}" ) fi - done < <(ninja -t targets all) + done < <(${NINJA} -t targets all) while read -r l; do my_targets+=( "${l}" ) diff --git a/sys-devel/llvm/llvm-13.0.1_rc3.ebuild b/sys-devel/llvm/llvm-13.0.1.ebuild index f5d3be28370..9ae168db4cf 100644 --- a/sys-devel/llvm/llvm-13.0.1_rc3.ebuild +++ b/sys-devel/llvm/llvm-13.0.1.ebuild @@ -18,7 +18,7 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc" SLOT="$(ver_cut 1)" -KEYWORDS="" +KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos" IUSE="+binutils-plugin debug doc exegesis libedit +libffi ncurses test xar xml z3" RESTRICT="!test? ( test )" @@ -47,6 +47,9 @@ BDEPEND=" dev-python/sphinx[${PYTHON_USEDEP}] ') ) libffi? ( virtual/pkgconfig ) + test? ( + sys-apps/which + ) ${PYTHON_DEPS}" # There are no file collisions between these versions but having :0 # installed means llvm-config there will take precedence. @@ -56,7 +59,7 @@ PDEPEND="sys-devel/llvm-common binutils-plugin? ( >=sys-devel/llvmgold-${SLOT} )" LLVM_COMPONENTS=( llvm ) -LLVM_MANPAGES=build +LLVM_MANPAGES=1 LLVM_PATCHSET=${PV/_/-} LLVM_USE_TARGETS=provide llvm.org_set_globals @@ -131,7 +134,7 @@ check_distribution_components() { all_targets+=( "${l}" ) fi - done < <(ninja -t targets all) + done < <(${NINJA} -t targets all) while read -r l; do my_targets+=( "${l}" ) diff --git a/sys-devel/llvm/llvm-14.0.0.9999.ebuild b/sys-devel/llvm/llvm-14.0.1.ebuild index f89b54bbb6c..c65be474357 100644 --- a/sys-devel/llvm/llvm-14.0.0.9999.ebuild +++ b/sys-devel/llvm/llvm-14.0.1.ebuild @@ -18,7 +18,7 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc" SLOT="$(ver_cut 1)" -KEYWORDS="" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos" IUSE="+binutils-plugin debug doc exegesis libedit +libffi ncurses test xar xml z3" RESTRICT="!test? ( test )" @@ -55,9 +55,9 @@ RDEPEND="${RDEPEND} PDEPEND="sys-devel/llvm-common binutils-plugin? ( >=sys-devel/llvmgold-${SLOT} )" -LLVM_COMPONENTS=( llvm third-party ) -LLVM_MANPAGES=build -LLVM_PATCHSET=9999-1 +LLVM_COMPONENTS=( llvm cmake third-party ) +LLVM_MANPAGES=1 +LLVM_PATCHSET=14.0.1 LLVM_USE_TARGETS=provide llvm.org_set_globals @@ -131,7 +131,7 @@ check_distribution_components() { all_targets+=( "${l}" ) fi - done < <(ninja -t targets all) + done < <(${NINJA} -t targets all) while read -r l; do my_targets+=( "${l}" ) @@ -235,6 +235,7 @@ get_distribution_components() { llvm-cxxdump llvm-cxxfilt llvm-cxxmap + llvm-debuginfod-find llvm-diff llvm-dis llvm-dlltool @@ -280,6 +281,7 @@ get_distribution_components() { llvm-strip llvm-symbolizer llvm-tapi-diff + llvm-tli-checker llvm-undname llvm-windres llvm-xray @@ -437,6 +439,9 @@ multilib_src_configure() { use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" cmake_src_configure + grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=$(ver_cut 1)$" \ + CMakeCache.txt || + die "Incorrect version, did you update _LLVM_MASTER_MAJOR?" multilib_is_native_abi && check_distribution_components } diff --git a/sys-devel/llvm/llvm-13.0.0.ebuild b/sys-devel/llvm/llvm-14.0.3.ebuild index 9f6396c849a..66789e47a59 100644 --- a/sys-devel/llvm/llvm-13.0.0.ebuild +++ b/sys-devel/llvm/llvm-14.0.3.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 PYTHON_COMPAT=( python3_{8..10} ) inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \ @@ -18,23 +18,27 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc" SLOT="$(ver_cut 1)" -KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos" -IUSE="debug doc exegesis +gold libedit +libffi ncurses test xar xml z3" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos" +IUSE="+binutils-plugin debug doc exegesis libedit +libffi ncurses test xar xml z3" RESTRICT="!test? ( test )" RDEPEND=" sys-libs/zlib:0=[${MULTILIB_USEDEP}] + binutils-plugin? ( >=sys-devel/binutils-2.31.1-r4:*[plugins] ) exegesis? ( dev-libs/libpfm:= ) - gold? ( >=sys-devel/binutils-2.31.1-r4:*[plugins] ) libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] ) libffi? ( >=dev-libs/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) xar? ( app-arch/xar ) xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) - z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )" -DEPEND="${RDEPEND} - gold? ( sys-libs/binutils-libs )" + z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] ) +" +DEPEND=" + ${RDEPEND} + binutils-plugin? ( sys-libs/binutils-libs ) +" BDEPEND=" + ${PYTHON_DEPS} dev-lang/perl >=dev-util/cmake-3.16 sys-devel/gnuconfig @@ -47,17 +51,24 @@ BDEPEND=" dev-python/sphinx[${PYTHON_USEDEP}] ') ) libffi? ( virtual/pkgconfig ) - ${PYTHON_DEPS}" + test? ( + sys-apps/which + ) +" # There are no file collisions between these versions but having :0 # installed means llvm-config there will take precedence. -RDEPEND="${RDEPEND} - !sys-devel/llvm:0" -PDEPEND="sys-devel/llvm-common - gold? ( >=sys-devel/llvmgold-${SLOT} )" - -LLVM_COMPONENTS=( llvm ) -LLVM_MANPAGES=pregenerated -LLVM_PATCHSET=${PV/_/-} +RDEPEND=" + ${RDEPEND} + !sys-devel/llvm:0 +" +PDEPEND=" + sys-devel/llvm-common + binutils-plugin? ( >=sys-devel/llvmgold-${SLOT} ) +" + +LLVM_COMPONENTS=( llvm cmake third-party ) +LLVM_MANPAGES=1 +LLVM_PATCHSET=${PV} LLVM_USE_TARGETS=provide llvm.org_set_globals @@ -131,7 +142,7 @@ check_distribution_components() { all_targets+=( "${l}" ) fi - done < <(ninja -t targets all) + done < <(${NINJA} -t targets all) while read -r l; do my_targets+=( "${l}" ) @@ -235,6 +246,7 @@ get_distribution_components() { llvm-cxxdump llvm-cxxfilt llvm-cxxmap + llvm-debuginfod-find llvm-diff llvm-dis llvm-dlltool @@ -280,6 +292,7 @@ get_distribution_components() { llvm-strip llvm-symbolizer llvm-tapi-diff + llvm-tli-checker llvm-undname llvm-windres llvm-xray @@ -307,7 +320,7 @@ get_distribution_components() { docs-llvm-html ) - use gold && out+=( + use binutils-plugin && out+=( LLVMgold ) fi @@ -404,7 +417,7 @@ multilib_src_configure() { -DLLVM_ENABLE_DOXYGEN=OFF -DLLVM_INSTALL_UTILS=ON ) - use gold && mycmakeargs+=( + use binutils-plugin && mycmakeargs+=( -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include ) fi @@ -437,6 +450,9 @@ multilib_src_configure() { use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" cmake_src_configure + grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=$(ver_cut 1)$" \ + CMakeCache.txt || + die "Incorrect version, did you update _LLVM_MASTER_MAJOR?" multilib_is_native_abi && check_distribution_components } diff --git a/sys-devel/llvm/llvm-14.0.4.ebuild b/sys-devel/llvm/llvm-14.0.4.ebuild new file mode 100644 index 00000000000..70a8953289a --- /dev/null +++ b/sys-devel/llvm/llvm-14.0.4.ebuild @@ -0,0 +1,530 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \ + toolchain-funcs + +DESCRIPTION="Low Level Virtual Machine" +HOMEPAGE="https://llvm.org/" + +# Additional licenses: +# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD. +# 2. xxhash: BSD. +# 3. MD5 code: public-domain. +# 4. ConvertUTF.h: TODO. + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc" +SLOT="$(ver_cut 1)" +KEYWORDS="amd64 ~arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos" +IUSE="+binutils-plugin debug doc exegesis libedit +libffi ncurses test xar xml z3" +RESTRICT="!test? ( test )" + +RDEPEND=" + sys-libs/zlib:0=[${MULTILIB_USEDEP}] + binutils-plugin? ( >=sys-devel/binutils-2.31.1-r4:*[plugins] ) + exegesis? ( dev-libs/libpfm:= ) + libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] ) + libffi? ( >=dev-libs/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) + ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) + xar? ( app-arch/xar ) + xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) + z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] ) +" +DEPEND=" + ${RDEPEND} + binutils-plugin? ( sys-libs/binutils-libs ) +" +BDEPEND=" + ${PYTHON_DEPS} + dev-lang/perl + >=dev-util/cmake-3.16 + sys-devel/gnuconfig + kernel_Darwin? ( + <sys-libs/libcxx-$(ver_cut 1-3).9999 + >=sys-devel/binutils-apple-5.1 + ) + doc? ( $(python_gen_any_dep ' + dev-python/recommonmark[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') ) + libffi? ( virtual/pkgconfig ) + test? ( + sys-apps/which + ) +" +# There are no file collisions between these versions but having :0 +# installed means llvm-config there will take precedence. +RDEPEND=" + ${RDEPEND} + !sys-devel/llvm:0 +" +PDEPEND=" + sys-devel/llvm-common + binutils-plugin? ( >=sys-devel/llvmgold-${SLOT} ) +" + +LLVM_COMPONENTS=( llvm cmake third-party ) +LLVM_MANPAGES=1 +LLVM_PATCHSET=${PV} +LLVM_USE_TARGETS=provide +llvm.org_set_globals + +python_check_deps() { + use doc || return 0 + + has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" && + has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" +} + +check_live_ebuild() { + local prod_targets=( + $(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \ + | tail -n +2 | head -n -1) + ) + local all_targets=( + lib/Target/*/ + ) + all_targets=( "${all_targets[@]#lib/Target/}" ) + all_targets=( "${all_targets[@]%/}" ) + + local exp_targets=() i + for i in "${all_targets[@]}"; do + has "${i}" "${prod_targets[@]}" || exp_targets+=( "${i}" ) + done + + if [[ ${exp_targets[*]} != ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]} ]]; then + eqawarn "ALL_LLVM_EXPERIMENTAL_TARGETS is outdated!" + eqawarn " Have: ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]}" + eqawarn "Expected: ${exp_targets[*]}" + eqawarn + fi + + if [[ ${prod_targets[*]} != ${ALL_LLVM_PRODUCTION_TARGETS[*]} ]]; then + eqawarn "ALL_LLVM_PRODUCTION_TARGETS is outdated!" + eqawarn " Have: ${ALL_LLVM_PRODUCTION_TARGETS[*]}" + eqawarn "Expected: ${prod_targets[*]}" + fi +} + +check_distribution_components() { + if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then + local all_targets=() my_targets=() l + cd "${BUILD_DIR}" || die + + while read -r l; do + if [[ ${l} == install-*-stripped:* ]]; then + l=${l#install-} + l=${l%%-stripped*} + + case ${l} in + # shared libs + LLVM|LLVMgold) + ;; + # TableGen lib + deps + LLVMDemangle|LLVMSupport|LLVMTableGen) + ;; + # static libs + LLVM*) + continue + ;; + # meta-targets + distribution|llvm-libraries) + continue + ;; + # used only w/ USE=doc + docs-llvm-html) + use doc || continue + ;; + esac + + all_targets+=( "${l}" ) + fi + done < <(${NINJA} -t targets all) + + while read -r l; do + my_targets+=( "${l}" ) + done < <(get_distribution_components $"\n") + + local add=() remove=() + for l in "${all_targets[@]}"; do + if ! has "${l}" "${my_targets[@]}"; then + add+=( "${l}" ) + fi + done + for l in "${my_targets[@]}"; do + if ! has "${l}" "${all_targets[@]}"; then + remove+=( "${l}" ) + fi + done + + if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then + eqawarn "get_distribution_components() is outdated!" + eqawarn " Add: ${add[*]}" + eqawarn "Remove: ${remove[*]}" + fi + cd - >/dev/null || die + fi +} + +src_prepare() { + # disable use of SDK on OSX, bug #568758 + sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die + + # Update config.guess to support more systems + cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die + + # Verify that the live ebuild is up-to-date + check_live_ebuild + + llvm.org_src_prepare + + # remove regressing test + # https://github.com/llvm/llvm-project/issues/55761 + rm test/Other/ChangePrinters/DotCfg/print-changed-dot-cfg.ll || die +} + +# Is LLVM being linked against libc++? +is_libcxx_linked() { + local code='#include <ciso646> +#if defined(_LIBCPP_VERSION) + HAVE_LIBCXX +#endif +' + local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1 + + [[ ${out} == *HAVE_LIBCXX* ]] +} + +get_distribution_components() { + local sep=${1-;} + + local out=( + # shared libs + LLVM + LTO + Remarks + + # tools + llvm-config + + # common stuff + cmake-exports + llvm-headers + + # libraries needed for clang-tblgen + LLVMDemangle + LLVMSupport + LLVMTableGen + ) + + if multilib_is_native_abi; then + out+=( + # utilities + llvm-tblgen + FileCheck + llvm-PerfectShuffle + count + not + yaml-bench + + # tools + bugpoint + dsymutil + llc + lli + lli-child-target + llvm-addr2line + llvm-ar + llvm-as + llvm-bcanalyzer + llvm-bitcode-strip + llvm-c-test + llvm-cat + llvm-cfi-verify + llvm-config + llvm-cov + llvm-cvtres + llvm-cxxdump + llvm-cxxfilt + llvm-cxxmap + llvm-debuginfod-find + llvm-diff + llvm-dis + llvm-dlltool + llvm-dwarfdump + llvm-dwp + llvm-exegesis + llvm-extract + llvm-gsymutil + llvm-ifs + llvm-install-name-tool + llvm-jitlink + llvm-jitlink-executor + llvm-lib + llvm-libtool-darwin + llvm-link + llvm-lipo + llvm-lto + llvm-lto2 + llvm-mc + llvm-mca + llvm-ml + llvm-modextract + llvm-mt + llvm-nm + llvm-objcopy + llvm-objdump + llvm-opt-report + llvm-otool + llvm-pdbutil + llvm-profdata + llvm-profgen + llvm-ranlib + llvm-rc + llvm-readelf + llvm-readobj + llvm-reduce + llvm-rtdyld + llvm-sim + llvm-size + llvm-split + llvm-stress + llvm-strings + llvm-strip + llvm-symbolizer + llvm-tapi-diff + llvm-tli-checker + llvm-undname + llvm-windres + llvm-xray + obj2yaml + opt + sancov + sanstats + split-file + verify-uselistorder + yaml2obj + + # python modules + opt-viewer + ) + + if llvm_are_manpages_built; then + out+=( + # manpages + docs-dsymutil-man + docs-llvm-dwarfdump-man + docs-llvm-man + ) + fi + use doc && out+=( + docs-llvm-html + ) + + use binutils-plugin && out+=( + LLVMgold + ) + fi + + printf "%s${sep}" "${out[@]}" +} + +multilib_src_configure() { + local ffi_cflags ffi_ldflags + if use libffi; then + ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi) + ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi) + fi + + local libdir=$(get_libdir) + local mycmakeargs=( + # disable appending VCS revision to the version to improve + # direct cache hit ratio + -DLLVM_APPEND_VC_REV=OFF + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}" + -DLLVM_LIBDIR_SUFFIX=${libdir#lib} + + -DBUILD_SHARED_LIBS=OFF + -DLLVM_BUILD_LLVM_DYLIB=ON + -DLLVM_LINK_LLVM_DYLIB=ON + -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components) + + # cheap hack: LLVM combines both anyway, and the only difference + # is that the former list is explicitly verified at cmake time + -DLLVM_TARGETS_TO_BUILD="" + -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" + -DLLVM_BUILD_TESTS=$(usex test) + + -DLLVM_ENABLE_FFI=$(usex libffi) + -DLLVM_ENABLE_LIBEDIT=$(usex libedit) + -DLLVM_ENABLE_TERMINFO=$(usex ncurses) + -DLLVM_ENABLE_LIBXML2=$(usex xml) + -DLLVM_ENABLE_ASSERTIONS=$(usex debug) + -DLLVM_ENABLE_LIBPFM=$(usex exegesis) + -DLLVM_ENABLE_EH=ON + -DLLVM_ENABLE_RTTI=ON + -DLLVM_ENABLE_Z3_SOLVER=$(usex z3) + + -DLLVM_HOST_TRIPLE="${CHOST}" + + -DFFI_INCLUDE_DIR="${ffi_cflags#-I}" + -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}" + # used only for llvm-objdump tool + -DLLVM_HAVE_LIBXAR=$(multilib_native_usex xar 1 0) + + -DPython3_EXECUTABLE="${PYTHON}" + + # disable OCaml bindings (now in dev-ml/llvm-ocaml) + -DOCAMLFIND=NO + ) + + if is_libcxx_linked; then + # Smart hack: alter version suffix -> SOVERSION when linking + # against libc++. This way we won't end up mixing LLVM libc++ + # libraries with libstdc++ clang, and the other way around. + mycmakeargs+=( + -DLLVM_VERSION_SUFFIX="libcxx" + -DLLVM_ENABLE_LIBCXX=ON + ) + fi + +# Note: go bindings have no CMake rules at the moment +# but let's kill the check in case they are introduced +# if ! multilib_is_native_abi || ! use go; then + mycmakeargs+=( + -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND + ) +# fi + + use test && mycmakeargs+=( + -DLLVM_LIT_ARGS="$(get_lit_flags)" + ) + + if multilib_is_native_abi; then + local build_docs=OFF + if llvm_are_manpages_built; then + build_docs=ON + mycmakeargs+=( + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" + -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" + -DSPHINX_WARNINGS_AS_ERRORS=OFF + ) + fi + + mycmakeargs+=( + -DLLVM_BUILD_DOCS=${build_docs} + -DLLVM_ENABLE_OCAMLDOC=OFF + -DLLVM_ENABLE_SPHINX=${build_docs} + -DLLVM_ENABLE_DOXYGEN=OFF + -DLLVM_INSTALL_UTILS=ON + ) + use binutils-plugin && mycmakeargs+=( + -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include + ) + fi + + if tc-is-cross-compiler; then + local tblgen="${EPREFIX}/usr/lib/llvm/${SLOT}/bin/llvm-tblgen" + [[ -x "${tblgen}" ]] \ + || die "${tblgen} not found or usable" + mycmakeargs+=( + -DCMAKE_CROSSCOMPILING=ON + -DLLVM_TABLEGEN="${tblgen}" + ) + fi + + # workaround BMI bug in gcc-7 (fixed in 7.4) + # https://bugs.gentoo.org/649880 + # apply only to x86, https://bugs.gentoo.org/650506 + if tc-is-gcc && [[ ${MULTILIB_ABI_FLAG} == abi_x86* ]] && + [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]] + then + local CFLAGS="${CFLAGS} -mno-bmi" + local CXXFLAGS="${CXXFLAGS} -mno-bmi" + fi + + # LLVM can have very high memory consumption while linking, + # exhausting the limit on 32-bit linker executable + use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" + + # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + cmake_src_configure + + grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=$(ver_cut 1)$" \ + CMakeCache.txt || + die "Incorrect version, did you update _LLVM_MASTER_MAJOR?" + multilib_is_native_abi && check_distribution_components +} + +multilib_src_compile() { + cmake_build distribution + + pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld + pax-mark m "${BUILD_DIR}"/bin/lli + pax-mark m "${BUILD_DIR}"/bin/lli-child-target + + if use test; then + pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests + pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests + pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests + fi +} + +multilib_src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + cmake_build check +} + +src_install() { + local MULTILIB_CHOST_TOOLS=( + /usr/lib/llvm/${SLOT}/bin/llvm-config + ) + + local MULTILIB_WRAPPED_HEADERS=( + /usr/include/llvm/Config/llvm-config.h + ) + + local LLVM_LDPATHS=() + multilib-minimal_src_install + + # move wrapped headers back + mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die +} + +multilib_src_install() { + DESTDIR=${D} cmake_build install-distribution + + # move headers to /usr/include for wrapping + rm -rf "${ED}"/usr/include || die + mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die + + LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" ) +} + +multilib_src_install_all() { + local revord=$(( 9999 - ${SLOT} )) + newenvd - "60llvm-${revord}" <<-_EOF_ + PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" + # we need to duplicate it in ROOTPATH for Portage to respect... + ROOTPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" + MANPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" + LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" + _EOF_ + + docompress "/usr/lib/llvm/${SLOT}/share/man" + llvm_install_manpages +} + +pkg_postinst() { + elog "You can find additional opt-viewer utility scripts in:" + elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/opt-viewer" + elog "To use these scripts, you will need Python along with the following" + elog "packages:" + elog " dev-python/pygments (for opt-viewer)" + elog " dev-python/pyyaml (for all of them)" +} diff --git a/sys-devel/llvm/llvm-14.0.5.ebuild b/sys-devel/llvm/llvm-14.0.5.ebuild new file mode 100644 index 00000000000..ad91093de64 --- /dev/null +++ b/sys-devel/llvm/llvm-14.0.5.ebuild @@ -0,0 +1,530 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \ + toolchain-funcs + +DESCRIPTION="Low Level Virtual Machine" +HOMEPAGE="https://llvm.org/" + +# Additional licenses: +# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD. +# 2. xxhash: BSD. +# 3. MD5 code: public-domain. +# 4. ConvertUTF.h: TODO. + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc" +SLOT="$(ver_cut 1)" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos" +IUSE="+binutils-plugin debug doc exegesis libedit +libffi ncurses test xar xml z3" +RESTRICT="!test? ( test )" + +RDEPEND=" + sys-libs/zlib:0=[${MULTILIB_USEDEP}] + binutils-plugin? ( >=sys-devel/binutils-2.31.1-r4:*[plugins] ) + exegesis? ( dev-libs/libpfm:= ) + libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] ) + libffi? ( >=dev-libs/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) + ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) + xar? ( app-arch/xar ) + xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) + z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] ) +" +DEPEND=" + ${RDEPEND} + binutils-plugin? ( sys-libs/binutils-libs ) +" +BDEPEND=" + ${PYTHON_DEPS} + dev-lang/perl + >=dev-util/cmake-3.16 + sys-devel/gnuconfig + kernel_Darwin? ( + <sys-libs/libcxx-$(ver_cut 1-3).9999 + >=sys-devel/binutils-apple-5.1 + ) + doc? ( $(python_gen_any_dep ' + dev-python/recommonmark[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') ) + libffi? ( virtual/pkgconfig ) + test? ( + sys-apps/which + ) +" +# There are no file collisions between these versions but having :0 +# installed means llvm-config there will take precedence. +RDEPEND=" + ${RDEPEND} + !sys-devel/llvm:0 +" +PDEPEND=" + sys-devel/llvm-common + binutils-plugin? ( >=sys-devel/llvmgold-${SLOT} ) +" + +LLVM_COMPONENTS=( llvm cmake third-party ) +LLVM_MANPAGES=1 +LLVM_PATCHSET=${PV} +LLVM_USE_TARGETS=provide +llvm.org_set_globals + +python_check_deps() { + use doc || return 0 + + has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" && + has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" +} + +check_live_ebuild() { + local prod_targets=( + $(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \ + | tail -n +2 | head -n -1) + ) + local all_targets=( + lib/Target/*/ + ) + all_targets=( "${all_targets[@]#lib/Target/}" ) + all_targets=( "${all_targets[@]%/}" ) + + local exp_targets=() i + for i in "${all_targets[@]}"; do + has "${i}" "${prod_targets[@]}" || exp_targets+=( "${i}" ) + done + + if [[ ${exp_targets[*]} != ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]} ]]; then + eqawarn "ALL_LLVM_EXPERIMENTAL_TARGETS is outdated!" + eqawarn " Have: ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]}" + eqawarn "Expected: ${exp_targets[*]}" + eqawarn + fi + + if [[ ${prod_targets[*]} != ${ALL_LLVM_PRODUCTION_TARGETS[*]} ]]; then + eqawarn "ALL_LLVM_PRODUCTION_TARGETS is outdated!" + eqawarn " Have: ${ALL_LLVM_PRODUCTION_TARGETS[*]}" + eqawarn "Expected: ${prod_targets[*]}" + fi +} + +check_distribution_components() { + if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then + local all_targets=() my_targets=() l + cd "${BUILD_DIR}" || die + + while read -r l; do + if [[ ${l} == install-*-stripped:* ]]; then + l=${l#install-} + l=${l%%-stripped*} + + case ${l} in + # shared libs + LLVM|LLVMgold) + ;; + # TableGen lib + deps + LLVMDemangle|LLVMSupport|LLVMTableGen) + ;; + # static libs + LLVM*) + continue + ;; + # meta-targets + distribution|llvm-libraries) + continue + ;; + # used only w/ USE=doc + docs-llvm-html) + use doc || continue + ;; + esac + + all_targets+=( "${l}" ) + fi + done < <(${NINJA} -t targets all) + + while read -r l; do + my_targets+=( "${l}" ) + done < <(get_distribution_components $"\n") + + local add=() remove=() + for l in "${all_targets[@]}"; do + if ! has "${l}" "${my_targets[@]}"; then + add+=( "${l}" ) + fi + done + for l in "${my_targets[@]}"; do + if ! has "${l}" "${all_targets[@]}"; then + remove+=( "${l}" ) + fi + done + + if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then + eqawarn "get_distribution_components() is outdated!" + eqawarn " Add: ${add[*]}" + eqawarn "Remove: ${remove[*]}" + fi + cd - >/dev/null || die + fi +} + +src_prepare() { + # disable use of SDK on OSX, bug #568758 + sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die + + # Update config.guess to support more systems + cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die + + # Verify that the live ebuild is up-to-date + check_live_ebuild + + llvm.org_src_prepare + + # remove regressing test + # https://github.com/llvm/llvm-project/issues/55761 + rm test/Other/ChangePrinters/DotCfg/print-changed-dot-cfg.ll || die +} + +# Is LLVM being linked against libc++? +is_libcxx_linked() { + local code='#include <ciso646> +#if defined(_LIBCPP_VERSION) + HAVE_LIBCXX +#endif +' + local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1 + + [[ ${out} == *HAVE_LIBCXX* ]] +} + +get_distribution_components() { + local sep=${1-;} + + local out=( + # shared libs + LLVM + LTO + Remarks + + # tools + llvm-config + + # common stuff + cmake-exports + llvm-headers + + # libraries needed for clang-tblgen + LLVMDemangle + LLVMSupport + LLVMTableGen + ) + + if multilib_is_native_abi; then + out+=( + # utilities + llvm-tblgen + FileCheck + llvm-PerfectShuffle + count + not + yaml-bench + + # tools + bugpoint + dsymutil + llc + lli + lli-child-target + llvm-addr2line + llvm-ar + llvm-as + llvm-bcanalyzer + llvm-bitcode-strip + llvm-c-test + llvm-cat + llvm-cfi-verify + llvm-config + llvm-cov + llvm-cvtres + llvm-cxxdump + llvm-cxxfilt + llvm-cxxmap + llvm-debuginfod-find + llvm-diff + llvm-dis + llvm-dlltool + llvm-dwarfdump + llvm-dwp + llvm-exegesis + llvm-extract + llvm-gsymutil + llvm-ifs + llvm-install-name-tool + llvm-jitlink + llvm-jitlink-executor + llvm-lib + llvm-libtool-darwin + llvm-link + llvm-lipo + llvm-lto + llvm-lto2 + llvm-mc + llvm-mca + llvm-ml + llvm-modextract + llvm-mt + llvm-nm + llvm-objcopy + llvm-objdump + llvm-opt-report + llvm-otool + llvm-pdbutil + llvm-profdata + llvm-profgen + llvm-ranlib + llvm-rc + llvm-readelf + llvm-readobj + llvm-reduce + llvm-rtdyld + llvm-sim + llvm-size + llvm-split + llvm-stress + llvm-strings + llvm-strip + llvm-symbolizer + llvm-tapi-diff + llvm-tli-checker + llvm-undname + llvm-windres + llvm-xray + obj2yaml + opt + sancov + sanstats + split-file + verify-uselistorder + yaml2obj + + # python modules + opt-viewer + ) + + if llvm_are_manpages_built; then + out+=( + # manpages + docs-dsymutil-man + docs-llvm-dwarfdump-man + docs-llvm-man + ) + fi + use doc && out+=( + docs-llvm-html + ) + + use binutils-plugin && out+=( + LLVMgold + ) + fi + + printf "%s${sep}" "${out[@]}" +} + +multilib_src_configure() { + local ffi_cflags ffi_ldflags + if use libffi; then + ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi) + ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi) + fi + + local libdir=$(get_libdir) + local mycmakeargs=( + # disable appending VCS revision to the version to improve + # direct cache hit ratio + -DLLVM_APPEND_VC_REV=OFF + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}" + -DLLVM_LIBDIR_SUFFIX=${libdir#lib} + + -DBUILD_SHARED_LIBS=OFF + -DLLVM_BUILD_LLVM_DYLIB=ON + -DLLVM_LINK_LLVM_DYLIB=ON + -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components) + + # cheap hack: LLVM combines both anyway, and the only difference + # is that the former list is explicitly verified at cmake time + -DLLVM_TARGETS_TO_BUILD="" + -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" + -DLLVM_BUILD_TESTS=$(usex test) + + -DLLVM_ENABLE_FFI=$(usex libffi) + -DLLVM_ENABLE_LIBEDIT=$(usex libedit) + -DLLVM_ENABLE_TERMINFO=$(usex ncurses) + -DLLVM_ENABLE_LIBXML2=$(usex xml) + -DLLVM_ENABLE_ASSERTIONS=$(usex debug) + -DLLVM_ENABLE_LIBPFM=$(usex exegesis) + -DLLVM_ENABLE_EH=ON + -DLLVM_ENABLE_RTTI=ON + -DLLVM_ENABLE_Z3_SOLVER=$(usex z3) + + -DLLVM_HOST_TRIPLE="${CHOST}" + + -DFFI_INCLUDE_DIR="${ffi_cflags#-I}" + -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}" + # used only for llvm-objdump tool + -DLLVM_HAVE_LIBXAR=$(multilib_native_usex xar 1 0) + + -DPython3_EXECUTABLE="${PYTHON}" + + # disable OCaml bindings (now in dev-ml/llvm-ocaml) + -DOCAMLFIND=NO + ) + + if is_libcxx_linked; then + # Smart hack: alter version suffix -> SOVERSION when linking + # against libc++. This way we won't end up mixing LLVM libc++ + # libraries with libstdc++ clang, and the other way around. + mycmakeargs+=( + -DLLVM_VERSION_SUFFIX="libcxx" + -DLLVM_ENABLE_LIBCXX=ON + ) + fi + +# Note: go bindings have no CMake rules at the moment +# but let's kill the check in case they are introduced +# if ! multilib_is_native_abi || ! use go; then + mycmakeargs+=( + -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND + ) +# fi + + use test && mycmakeargs+=( + -DLLVM_LIT_ARGS="$(get_lit_flags)" + ) + + if multilib_is_native_abi; then + local build_docs=OFF + if llvm_are_manpages_built; then + build_docs=ON + mycmakeargs+=( + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" + -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" + -DSPHINX_WARNINGS_AS_ERRORS=OFF + ) + fi + + mycmakeargs+=( + -DLLVM_BUILD_DOCS=${build_docs} + -DLLVM_ENABLE_OCAMLDOC=OFF + -DLLVM_ENABLE_SPHINX=${build_docs} + -DLLVM_ENABLE_DOXYGEN=OFF + -DLLVM_INSTALL_UTILS=ON + ) + use binutils-plugin && mycmakeargs+=( + -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include + ) + fi + + if tc-is-cross-compiler; then + local tblgen="${EPREFIX}/usr/lib/llvm/${SLOT}/bin/llvm-tblgen" + [[ -x "${tblgen}" ]] \ + || die "${tblgen} not found or usable" + mycmakeargs+=( + -DCMAKE_CROSSCOMPILING=ON + -DLLVM_TABLEGEN="${tblgen}" + ) + fi + + # workaround BMI bug in gcc-7 (fixed in 7.4) + # https://bugs.gentoo.org/649880 + # apply only to x86, https://bugs.gentoo.org/650506 + if tc-is-gcc && [[ ${MULTILIB_ABI_FLAG} == abi_x86* ]] && + [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]] + then + local CFLAGS="${CFLAGS} -mno-bmi" + local CXXFLAGS="${CXXFLAGS} -mno-bmi" + fi + + # LLVM can have very high memory consumption while linking, + # exhausting the limit on 32-bit linker executable + use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" + + # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + cmake_src_configure + + grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=$(ver_cut 1)$" \ + CMakeCache.txt || + die "Incorrect version, did you update _LLVM_MASTER_MAJOR?" + multilib_is_native_abi && check_distribution_components +} + +multilib_src_compile() { + cmake_build distribution + + pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld + pax-mark m "${BUILD_DIR}"/bin/lli + pax-mark m "${BUILD_DIR}"/bin/lli-child-target + + if use test; then + pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests + pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests + pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests + fi +} + +multilib_src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + cmake_build check +} + +src_install() { + local MULTILIB_CHOST_TOOLS=( + /usr/lib/llvm/${SLOT}/bin/llvm-config + ) + + local MULTILIB_WRAPPED_HEADERS=( + /usr/include/llvm/Config/llvm-config.h + ) + + local LLVM_LDPATHS=() + multilib-minimal_src_install + + # move wrapped headers back + mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die +} + +multilib_src_install() { + DESTDIR=${D} cmake_build install-distribution + + # move headers to /usr/include for wrapping + rm -rf "${ED}"/usr/include || die + mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die + + LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" ) +} + +multilib_src_install_all() { + local revord=$(( 9999 - ${SLOT} )) + newenvd - "60llvm-${revord}" <<-_EOF_ + PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" + # we need to duplicate it in ROOTPATH for Portage to respect... + ROOTPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" + MANPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" + LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" + _EOF_ + + docompress "/usr/lib/llvm/${SLOT}/share/man" + llvm_install_manpages +} + +pkg_postinst() { + elog "You can find additional opt-viewer utility scripts in:" + elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/opt-viewer" + elog "To use these scripts, you will need Python along with the following" + elog "packages:" + elog " dev-python/pygments (for opt-viewer)" + elog " dev-python/pyyaml (for all of them)" +} diff --git a/sys-devel/llvm/llvm-14.0.6.ebuild b/sys-devel/llvm/llvm-14.0.6.ebuild new file mode 100644 index 00000000000..ad91093de64 --- /dev/null +++ b/sys-devel/llvm/llvm-14.0.6.ebuild @@ -0,0 +1,530 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \ + toolchain-funcs + +DESCRIPTION="Low Level Virtual Machine" +HOMEPAGE="https://llvm.org/" + +# Additional licenses: +# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD. +# 2. xxhash: BSD. +# 3. MD5 code: public-domain. +# 4. ConvertUTF.h: TODO. + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc" +SLOT="$(ver_cut 1)" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos" +IUSE="+binutils-plugin debug doc exegesis libedit +libffi ncurses test xar xml z3" +RESTRICT="!test? ( test )" + +RDEPEND=" + sys-libs/zlib:0=[${MULTILIB_USEDEP}] + binutils-plugin? ( >=sys-devel/binutils-2.31.1-r4:*[plugins] ) + exegesis? ( dev-libs/libpfm:= ) + libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] ) + libffi? ( >=dev-libs/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) + ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) + xar? ( app-arch/xar ) + xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) + z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] ) +" +DEPEND=" + ${RDEPEND} + binutils-plugin? ( sys-libs/binutils-libs ) +" +BDEPEND=" + ${PYTHON_DEPS} + dev-lang/perl + >=dev-util/cmake-3.16 + sys-devel/gnuconfig + kernel_Darwin? ( + <sys-libs/libcxx-$(ver_cut 1-3).9999 + >=sys-devel/binutils-apple-5.1 + ) + doc? ( $(python_gen_any_dep ' + dev-python/recommonmark[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') ) + libffi? ( virtual/pkgconfig ) + test? ( + sys-apps/which + ) +" +# There are no file collisions between these versions but having :0 +# installed means llvm-config there will take precedence. +RDEPEND=" + ${RDEPEND} + !sys-devel/llvm:0 +" +PDEPEND=" + sys-devel/llvm-common + binutils-plugin? ( >=sys-devel/llvmgold-${SLOT} ) +" + +LLVM_COMPONENTS=( llvm cmake third-party ) +LLVM_MANPAGES=1 +LLVM_PATCHSET=${PV} +LLVM_USE_TARGETS=provide +llvm.org_set_globals + +python_check_deps() { + use doc || return 0 + + has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" && + has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" +} + +check_live_ebuild() { + local prod_targets=( + $(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \ + | tail -n +2 | head -n -1) + ) + local all_targets=( + lib/Target/*/ + ) + all_targets=( "${all_targets[@]#lib/Target/}" ) + all_targets=( "${all_targets[@]%/}" ) + + local exp_targets=() i + for i in "${all_targets[@]}"; do + has "${i}" "${prod_targets[@]}" || exp_targets+=( "${i}" ) + done + + if [[ ${exp_targets[*]} != ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]} ]]; then + eqawarn "ALL_LLVM_EXPERIMENTAL_TARGETS is outdated!" + eqawarn " Have: ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]}" + eqawarn "Expected: ${exp_targets[*]}" + eqawarn + fi + + if [[ ${prod_targets[*]} != ${ALL_LLVM_PRODUCTION_TARGETS[*]} ]]; then + eqawarn "ALL_LLVM_PRODUCTION_TARGETS is outdated!" + eqawarn " Have: ${ALL_LLVM_PRODUCTION_TARGETS[*]}" + eqawarn "Expected: ${prod_targets[*]}" + fi +} + +check_distribution_components() { + if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then + local all_targets=() my_targets=() l + cd "${BUILD_DIR}" || die + + while read -r l; do + if [[ ${l} == install-*-stripped:* ]]; then + l=${l#install-} + l=${l%%-stripped*} + + case ${l} in + # shared libs + LLVM|LLVMgold) + ;; + # TableGen lib + deps + LLVMDemangle|LLVMSupport|LLVMTableGen) + ;; + # static libs + LLVM*) + continue + ;; + # meta-targets + distribution|llvm-libraries) + continue + ;; + # used only w/ USE=doc + docs-llvm-html) + use doc || continue + ;; + esac + + all_targets+=( "${l}" ) + fi + done < <(${NINJA} -t targets all) + + while read -r l; do + my_targets+=( "${l}" ) + done < <(get_distribution_components $"\n") + + local add=() remove=() + for l in "${all_targets[@]}"; do + if ! has "${l}" "${my_targets[@]}"; then + add+=( "${l}" ) + fi + done + for l in "${my_targets[@]}"; do + if ! has "${l}" "${all_targets[@]}"; then + remove+=( "${l}" ) + fi + done + + if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then + eqawarn "get_distribution_components() is outdated!" + eqawarn " Add: ${add[*]}" + eqawarn "Remove: ${remove[*]}" + fi + cd - >/dev/null || die + fi +} + +src_prepare() { + # disable use of SDK on OSX, bug #568758 + sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die + + # Update config.guess to support more systems + cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die + + # Verify that the live ebuild is up-to-date + check_live_ebuild + + llvm.org_src_prepare + + # remove regressing test + # https://github.com/llvm/llvm-project/issues/55761 + rm test/Other/ChangePrinters/DotCfg/print-changed-dot-cfg.ll || die +} + +# Is LLVM being linked against libc++? +is_libcxx_linked() { + local code='#include <ciso646> +#if defined(_LIBCPP_VERSION) + HAVE_LIBCXX +#endif +' + local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1 + + [[ ${out} == *HAVE_LIBCXX* ]] +} + +get_distribution_components() { + local sep=${1-;} + + local out=( + # shared libs + LLVM + LTO + Remarks + + # tools + llvm-config + + # common stuff + cmake-exports + llvm-headers + + # libraries needed for clang-tblgen + LLVMDemangle + LLVMSupport + LLVMTableGen + ) + + if multilib_is_native_abi; then + out+=( + # utilities + llvm-tblgen + FileCheck + llvm-PerfectShuffle + count + not + yaml-bench + + # tools + bugpoint + dsymutil + llc + lli + lli-child-target + llvm-addr2line + llvm-ar + llvm-as + llvm-bcanalyzer + llvm-bitcode-strip + llvm-c-test + llvm-cat + llvm-cfi-verify + llvm-config + llvm-cov + llvm-cvtres + llvm-cxxdump + llvm-cxxfilt + llvm-cxxmap + llvm-debuginfod-find + llvm-diff + llvm-dis + llvm-dlltool + llvm-dwarfdump + llvm-dwp + llvm-exegesis + llvm-extract + llvm-gsymutil + llvm-ifs + llvm-install-name-tool + llvm-jitlink + llvm-jitlink-executor + llvm-lib + llvm-libtool-darwin + llvm-link + llvm-lipo + llvm-lto + llvm-lto2 + llvm-mc + llvm-mca + llvm-ml + llvm-modextract + llvm-mt + llvm-nm + llvm-objcopy + llvm-objdump + llvm-opt-report + llvm-otool + llvm-pdbutil + llvm-profdata + llvm-profgen + llvm-ranlib + llvm-rc + llvm-readelf + llvm-readobj + llvm-reduce + llvm-rtdyld + llvm-sim + llvm-size + llvm-split + llvm-stress + llvm-strings + llvm-strip + llvm-symbolizer + llvm-tapi-diff + llvm-tli-checker + llvm-undname + llvm-windres + llvm-xray + obj2yaml + opt + sancov + sanstats + split-file + verify-uselistorder + yaml2obj + + # python modules + opt-viewer + ) + + if llvm_are_manpages_built; then + out+=( + # manpages + docs-dsymutil-man + docs-llvm-dwarfdump-man + docs-llvm-man + ) + fi + use doc && out+=( + docs-llvm-html + ) + + use binutils-plugin && out+=( + LLVMgold + ) + fi + + printf "%s${sep}" "${out[@]}" +} + +multilib_src_configure() { + local ffi_cflags ffi_ldflags + if use libffi; then + ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi) + ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi) + fi + + local libdir=$(get_libdir) + local mycmakeargs=( + # disable appending VCS revision to the version to improve + # direct cache hit ratio + -DLLVM_APPEND_VC_REV=OFF + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}" + -DLLVM_LIBDIR_SUFFIX=${libdir#lib} + + -DBUILD_SHARED_LIBS=OFF + -DLLVM_BUILD_LLVM_DYLIB=ON + -DLLVM_LINK_LLVM_DYLIB=ON + -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components) + + # cheap hack: LLVM combines both anyway, and the only difference + # is that the former list is explicitly verified at cmake time + -DLLVM_TARGETS_TO_BUILD="" + -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" + -DLLVM_BUILD_TESTS=$(usex test) + + -DLLVM_ENABLE_FFI=$(usex libffi) + -DLLVM_ENABLE_LIBEDIT=$(usex libedit) + -DLLVM_ENABLE_TERMINFO=$(usex ncurses) + -DLLVM_ENABLE_LIBXML2=$(usex xml) + -DLLVM_ENABLE_ASSERTIONS=$(usex debug) + -DLLVM_ENABLE_LIBPFM=$(usex exegesis) + -DLLVM_ENABLE_EH=ON + -DLLVM_ENABLE_RTTI=ON + -DLLVM_ENABLE_Z3_SOLVER=$(usex z3) + + -DLLVM_HOST_TRIPLE="${CHOST}" + + -DFFI_INCLUDE_DIR="${ffi_cflags#-I}" + -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}" + # used only for llvm-objdump tool + -DLLVM_HAVE_LIBXAR=$(multilib_native_usex xar 1 0) + + -DPython3_EXECUTABLE="${PYTHON}" + + # disable OCaml bindings (now in dev-ml/llvm-ocaml) + -DOCAMLFIND=NO + ) + + if is_libcxx_linked; then + # Smart hack: alter version suffix -> SOVERSION when linking + # against libc++. This way we won't end up mixing LLVM libc++ + # libraries with libstdc++ clang, and the other way around. + mycmakeargs+=( + -DLLVM_VERSION_SUFFIX="libcxx" + -DLLVM_ENABLE_LIBCXX=ON + ) + fi + +# Note: go bindings have no CMake rules at the moment +# but let's kill the check in case they are introduced +# if ! multilib_is_native_abi || ! use go; then + mycmakeargs+=( + -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND + ) +# fi + + use test && mycmakeargs+=( + -DLLVM_LIT_ARGS="$(get_lit_flags)" + ) + + if multilib_is_native_abi; then + local build_docs=OFF + if llvm_are_manpages_built; then + build_docs=ON + mycmakeargs+=( + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" + -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" + -DSPHINX_WARNINGS_AS_ERRORS=OFF + ) + fi + + mycmakeargs+=( + -DLLVM_BUILD_DOCS=${build_docs} + -DLLVM_ENABLE_OCAMLDOC=OFF + -DLLVM_ENABLE_SPHINX=${build_docs} + -DLLVM_ENABLE_DOXYGEN=OFF + -DLLVM_INSTALL_UTILS=ON + ) + use binutils-plugin && mycmakeargs+=( + -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include + ) + fi + + if tc-is-cross-compiler; then + local tblgen="${EPREFIX}/usr/lib/llvm/${SLOT}/bin/llvm-tblgen" + [[ -x "${tblgen}" ]] \ + || die "${tblgen} not found or usable" + mycmakeargs+=( + -DCMAKE_CROSSCOMPILING=ON + -DLLVM_TABLEGEN="${tblgen}" + ) + fi + + # workaround BMI bug in gcc-7 (fixed in 7.4) + # https://bugs.gentoo.org/649880 + # apply only to x86, https://bugs.gentoo.org/650506 + if tc-is-gcc && [[ ${MULTILIB_ABI_FLAG} == abi_x86* ]] && + [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]] + then + local CFLAGS="${CFLAGS} -mno-bmi" + local CXXFLAGS="${CXXFLAGS} -mno-bmi" + fi + + # LLVM can have very high memory consumption while linking, + # exhausting the limit on 32-bit linker executable + use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" + + # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + cmake_src_configure + + grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=$(ver_cut 1)$" \ + CMakeCache.txt || + die "Incorrect version, did you update _LLVM_MASTER_MAJOR?" + multilib_is_native_abi && check_distribution_components +} + +multilib_src_compile() { + cmake_build distribution + + pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld + pax-mark m "${BUILD_DIR}"/bin/lli + pax-mark m "${BUILD_DIR}"/bin/lli-child-target + + if use test; then + pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests + pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests + pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests + fi +} + +multilib_src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + cmake_build check +} + +src_install() { + local MULTILIB_CHOST_TOOLS=( + /usr/lib/llvm/${SLOT}/bin/llvm-config + ) + + local MULTILIB_WRAPPED_HEADERS=( + /usr/include/llvm/Config/llvm-config.h + ) + + local LLVM_LDPATHS=() + multilib-minimal_src_install + + # move wrapped headers back + mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die +} + +multilib_src_install() { + DESTDIR=${D} cmake_build install-distribution + + # move headers to /usr/include for wrapping + rm -rf "${ED}"/usr/include || die + mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die + + LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" ) +} + +multilib_src_install_all() { + local revord=$(( 9999 - ${SLOT} )) + newenvd - "60llvm-${revord}" <<-_EOF_ + PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" + # we need to duplicate it in ROOTPATH for Portage to respect... + ROOTPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" + MANPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" + LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" + _EOF_ + + docompress "/usr/lib/llvm/${SLOT}/share/man" + llvm_install_manpages +} + +pkg_postinst() { + elog "You can find additional opt-viewer utility scripts in:" + elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/opt-viewer" + elog "To use these scripts, you will need Python along with the following" + elog "packages:" + elog " dev-python/pygments (for opt-viewer)" + elog " dev-python/pyyaml (for all of them)" +} diff --git a/sys-devel/llvm/llvm-13.0.1.9999.ebuild b/sys-devel/llvm/llvm-15.0.0.9999.ebuild index 78904790149..6d34fc40175 100644 --- a/sys-devel/llvm/llvm-13.0.1.9999.ebuild +++ b/sys-devel/llvm/llvm-15.0.0.9999.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 PYTHON_COMPAT=( python3_{8..10} ) inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \ @@ -31,10 +31,14 @@ RDEPEND=" ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) xar? ( app-arch/xar ) xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) - z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )" -DEPEND="${RDEPEND} - binutils-plugin? ( sys-libs/binutils-libs )" + z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] ) +" +DEPEND=" + ${RDEPEND} + binutils-plugin? ( sys-libs/binutils-libs ) +" BDEPEND=" + ${PYTHON_DEPS} dev-lang/perl >=dev-util/cmake-3.16 sys-devel/gnuconfig @@ -47,17 +51,21 @@ BDEPEND=" dev-python/sphinx[${PYTHON_USEDEP}] ') ) libffi? ( virtual/pkgconfig ) - ${PYTHON_DEPS}" +" # There are no file collisions between these versions but having :0 # installed means llvm-config there will take precedence. -RDEPEND="${RDEPEND} - !sys-devel/llvm:0" -PDEPEND="sys-devel/llvm-common - binutils-plugin? ( >=sys-devel/llvmgold-${SLOT} )" - -LLVM_COMPONENTS=( llvm ) -LLVM_MANPAGES=build -LLVM_PATCHSET=9999-1 +RDEPEND=" + ${RDEPEND} + !sys-devel/llvm:0 +" +PDEPEND=" + sys-devel/llvm-common + binutils-plugin? ( >=sys-devel/llvmgold-${SLOT} ) +" + +LLVM_COMPONENTS=( llvm cmake third-party ) +LLVM_MANPAGES=1 +LLVM_PATCHSET=9999-r3 LLVM_USE_TARGETS=provide llvm.org_set_globals @@ -131,7 +139,7 @@ check_distribution_components() { all_targets+=( "${l}" ) fi - done < <(ninja -t targets all) + done < <(${NINJA} -t targets all) while read -r l; do my_targets+=( "${l}" ) @@ -214,6 +222,7 @@ get_distribution_components() { count not yaml-bench + UnicodeNameMappingGenerator # tools bugpoint @@ -235,6 +244,7 @@ get_distribution_components() { llvm-cxxdump llvm-cxxfilt llvm-cxxmap + llvm-debuginfod-find llvm-diff llvm-dis llvm-dlltool @@ -271,6 +281,7 @@ get_distribution_components() { llvm-readelf llvm-readobj llvm-reduce + llvm-remark-size-diff llvm-rtdyld llvm-sim llvm-size @@ -280,6 +291,7 @@ get_distribution_components() { llvm-strip llvm-symbolizer llvm-tapi-diff + llvm-tli-checker llvm-undname llvm-windres llvm-xray @@ -437,6 +449,9 @@ multilib_src_configure() { use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" cmake_src_configure + grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=$(ver_cut 1)$" \ + CMakeCache.txt || + die "Incorrect version, did you update _LLVM_MASTER_MAJOR?" multilib_is_native_abi && check_distribution_components } diff --git a/sys-devel/llvmgold/llvmgold-13-r1.ebuild b/sys-devel/llvmgold/llvmgold-13-r1.ebuild index 62c9f152543..c92356ad883 100644 --- a/sys-devel/llvmgold/llvmgold-13-r1.ebuild +++ b/sys-devel/llvmgold/llvmgold-13-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -9,7 +9,7 @@ SRC_URI="" LICENSE="public-domain" SLOT="0" -KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86 ~amd64-linux" +KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux" RDEPEND=" || ( diff --git a/sys-devel/llvmgold/llvmgold-14.ebuild b/sys-devel/llvmgold/llvmgold-14.ebuild index 314063f9db8..2c0474742d8 100644 --- a/sys-devel/llvmgold/llvmgold-14.ebuild +++ b/sys-devel/llvmgold/llvmgold-14.ebuild @@ -1,22 +1,20 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 DESCRIPTION="LLVMgold plugin symlink for autoloading" HOMEPAGE="https://llvm.org/" -SRC_URI="" +S=${WORKDIR} LICENSE="public-domain" SLOT="0" -KEYWORDS="" -IUSE="" -PROPERTIES="live" - -RDEPEND="sys-devel/llvm:${PV}[binutils-plugin] - !sys-devel/llvm:0" +KEYWORDS="amd64 ~arm arm64 ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux" -S=${WORKDIR} +RDEPEND=" + sys-devel/llvm:${PV}[binutils-plugin] + !sys-devel/llvm:0 +" src_install() { dodir "/usr/${CHOST}/binutils-bin/lib/bfd-plugins" diff --git a/sys-devel/llvmgold/llvmgold-11.ebuild b/sys-devel/llvmgold/llvmgold-15.ebuild index db2354e9c21..5dcc3164a55 100644 --- a/sys-devel/llvmgold/llvmgold-11.ebuild +++ b/sys-devel/llvmgold/llvmgold-15.ebuild @@ -1,21 +1,21 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 DESCRIPTION="LLVMgold plugin symlink for autoloading" HOMEPAGE="https://llvm.org/" -SRC_URI="" +S=${WORKDIR} LICENSE="public-domain" SLOT="0" -KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86 ~amd64-linux" -IUSE="" - -RDEPEND="sys-devel/llvm:${PV}[gold] - !sys-devel/llvm:0" +KEYWORDS="" +PROPERTIES="live" -S=${WORKDIR} +RDEPEND=" + sys-devel/llvm:${PV}[binutils-plugin] + !sys-devel/llvm:0 +" src_install() { dodir "/usr/${CHOST}/binutils-bin/lib/bfd-plugins" diff --git a/sys-devel/m4/Manifest b/sys-devel/m4/Manifest index 7b0eef3c82b..90afb460c0a 100644 --- a/sys-devel/m4/Manifest +++ b/sys-devel/m4/Manifest @@ -1 +1,3 @@ +DIST m4-1.4.19-test-198-sysval-r1.patch.gz 6292 BLAKE2B 62f52c8bb75e7b8f11e487906f1ce47069ea6d3095fd6532aa6b47bcd8109b7cd733fde26915d449a1cfc326f27f5ed83ba29a5a80687b8b9bdb73c8d87e96b8 SHA512 c3e7d4c1631e401c6b5477c22fd5de837188acf9d72551b116c665a927d1799b1fb249e90c9fb4f6f2f328ee84b2e4dd0bf54f684139997c19ee5b69a3e9284d DIST m4-1.4.19.tar.xz 1654908 BLAKE2B 08694485a49c542761fa9a7db4d7609f4dfb08a5c6b785b57f2e14cf1f696c2a1c788bb5eb934e8159a632b63ff071dfe42511d0109d7b1828f46d33c8bf416a SHA512 47f595845c89709727bda0b3fc78e3188ef78ec818965b395532e7041cabe9e49677ee4aca3d042930095a7f8df81de3da1026b23b6897be471f6cf13ddd512b +DIST m4-1.4.19.tar.xz.sig 488 BLAKE2B 99e89b1ed0bf158d29a652392fb122e23227e895c75a8c63057ebe33f11b433ab205ae99a991578a89df8c3e723fc00669d8cdb290fbc86eaa6c704b112e4370 SHA512 d6ac9c6a54c57e9b53fb3e34a60d49df2f46a6e494da0a0c9ae8246b984e68a853b5d8c42677c1a0485c3f36b0bce10a481d3775c0edc1dbdfb27b43545bc31e diff --git a/sys-devel/m4/files/loong-fix-build.patch b/sys-devel/m4/files/loong-fix-build.patch new file mode 100644 index 00000000000..d5243357928 --- /dev/null +++ b/sys-devel/m4/files/loong-fix-build.patch @@ -0,0 +1,30 @@ +[xen0n: this is https://github.com/sunhaiyong1978/CLFS-for-LoongArch/blob/1.0/patches/stack-direction-add-loongarch.patch with line number tweak, and change to generated file added as well.] +From: Sun Haiyong <youbest@sina.com> +Date: Tue, 31 Aug 2021 11:11:52 +0800 +Subject: [PATCH] stack-direction: Add support for loongarch CPU + +* m4/stack-direction.m4 (SV_STACK_DIRECTION): When the CPU is loongarch, +set "sv_cv_stack_direction" to "-1" . +--- a/m4/stack-direction.m4 ++++ b/m4/stack-direction.m4 +@@ -31,6 +31,7 @@ AC_DEFUN([SV_STACK_DIRECTION], + i?86 | x86_64 | \ + i860 | \ + ia64 | \ ++ loongarch* | \ + m32r | \ + m68* | \ + m88k | \ +--- a/configure ++++ b/configure +@@ -46399,6 +46399,7 @@ else $as_nop + i?86 | x86_64 | \ + i860 | \ + ia64 | \ ++ loongarch* | \ + m32r | \ + m68* | \ + m88k | \ +-- +2.17.2 + diff --git a/sys-devel/m4/files/ppc-musl.patch b/sys-devel/m4/files/ppc-musl.patch index d7d8255a444..4aff0ba1cf5 100644 --- a/sys-devel/m4/files/ppc-musl.patch +++ b/sys-devel/m4/files/ppc-musl.patch @@ -1,7 +1,8 @@ -Needed to fix build on ppc + musl. Doesn't seem to yet be in upstream gnulib. +Needed to fix build on ppc + musl. Should pop up in next gnulib sync in release (different patch). https://www.openwall.com/lists/musl/2017/11/05/2 https://github.com/void-linux/void-packages/blob/master/srcpkgs/grep/patches/ppc-musl.patch +https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=2d830e4a792fcd9f614ed08a7f18584b8b21d23b --- a/lib/sigsegv.c +++ b/lib/sigsegv.c @@ -221,8 +221,10 @@ int libsigsegv_version = LIBSIGSEGV_VERSION; diff --git a/sys-devel/m4/m4-1.4.19.ebuild b/sys-devel/m4/m4-1.4.19.ebuild index 96bbad22566..fcfe153e595 100644 --- a/sys-devel/m4/m4-1.4.19.ebuild +++ b/sys-devel/m4/m4-1.4.19.ebuild @@ -1,18 +1,23 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/m4.asc +inherit verify-sig + DESCRIPTION="GNU macro processor" HOMEPAGE="https://www.gnu.org/software/m4/m4.html" -if [[ "${PV}" == *_beta* ]] ; then +if [[ ${PV} == *_beta* ]] ; then MY_P="${PN}-1.4.18d" - #SRC_URI="mirror://gnu-alpha/${PN}/${MY_P}.tar.xz" SRC_URI="https://alpha.gnu.org/gnu/${PN}/${MY_P}.tar.xz" + SRC_URI+=" verify-sig? ( https://alpha.gnu.org/gnu/${PN}/${MY_P}.tar.xz.sig )" S="${WORKDIR}/${MY_P}" else SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + SRC_URI+=" https://dev.gentoo.org/~floppym/dist/${P}-test-198-sysval-r1.patch.gz" + SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" fi LICENSE="GPL-3" @@ -28,9 +33,33 @@ RDEPEND=" DEPEND="${RDEPEND}" # Remember: cannot dep on autoconf since it needs us BDEPEND="app-arch/xz-utils - nls? ( sys-devel/gettext )" + nls? ( sys-devel/gettext ) + verify-sig? ( sec-keys/openpgp-keys-m4 )" + +PATCHES=( + "${FILESDIR}"/ppc-musl.patch + "${FILESDIR}"/loong-fix-build.patch + "${WORKDIR}"/${P}-test-198-sysval-r1.patch +) + +src_unpack() { + if use verify-sig ; then + # Needed for downloaded patch (which is unsigned, which is fine) + verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.sig} + fi + + default +} -PATCHES=( "${FILESDIR}/ppc-musl.patch" ) +src_prepare() { + default + + # touch generated files after patching m4, to avoid activating maintainer + # mode + # remove when loong-fix-build.patch is no longer necessary + touch ./aclocal.m4 ./lib/config.hin ./configure ./doc/stamp-vti || die + find . -name Makefile.in -exec touch {} + || die +} src_configure() { local -a myeconfargs=( diff --git a/sys-devel/make/Manifest b/sys-devel/make/Manifest index 34d9f6842b0..f9cbb5a172f 100644 --- a/sys-devel/make/Manifest +++ b/sys-devel/make/Manifest @@ -1 +1,2 @@ DIST make-4.3.tar.gz 2317073 BLAKE2B 5a82ce1f30eb034366ac3b87d2ec6698aae17d7b1a611941cf42136b2453b34236ab55382eab0a593c43cee8b036ba4a054f966c41ba766fdbd2862942be5dff SHA512 9a1185cc468368f4ec06478b1cfa343bf90b5cd7c92c0536567db0315b0ee909af53ecce3d44cfd93dd137dbca1ed13af5713e8663590c4fdd21ea635d78496b +DIST make-4.3.tar.gz.sig 566 BLAKE2B 75bf71602e60f97ec8efa81676329047746d960257ef310b89a059144c00628b6a1ddf7a16a2ac2c3e935b8591475f5043a7c7546668ab39abbc4717c75a6528 SHA512 bf13e2943593b153457c8111179e8ae11cef2d9185a986106a1e70946a260bd930505a5e10002c5a60888e11affc07713c367b8680fd511ad87b2e124d303a99 diff --git a/sys-devel/make/files/make-3.82-darwin-library_search-dylib.patch b/sys-devel/make/files/make-3.82-darwin-library_search-dylib.patch index d2f60ec91cc..743583b5a0a 100644 --- a/sys-devel/make/files/make-3.82-darwin-library_search-dylib.patch +++ b/sys-devel/make/files/make-3.82-darwin-library_search-dylib.patch @@ -1,8 +1,8 @@ Fixed default libpatttern on Darwin, imported from prefix overlay. Got merged upstream: https://savannah.gnu.org/bugs/?37197 ---- a/default.c -+++ b/default.c +--- a/src/default.c ++++ b/src/default.c @@ -509,7 +509,11 @@ #ifdef __MSDOS__ ".LIBPATTERNS", "lib%.a $(DJDIR)/lib/lib%.a", diff --git a/sys-devel/make/files/make-4.2-default-cxx.patch b/sys-devel/make/files/make-4.2-default-cxx.patch index 4d592086a6f..39e3ee0dd9f 100644 --- a/sys-devel/make/files/make-4.2-default-cxx.patch +++ b/sys-devel/make/files/make-4.2-default-cxx.patch @@ -1,7 +1,5 @@ -diff --git a/default.c b/default.c -index 3d865c7..e8b3ed6 100644 ---- a/default.c -+++ b/default.c +--- a/src/default.c ++++ b/src/default.c @@ -530,7 +530,7 @@ static const char *default_variables[] = "OBJC", "gcc", #else diff --git a/sys-devel/make/make-4.3.ebuild b/sys-devel/make/make-4.3.ebuild index bd0a3434e14..50caf0365bb 100644 --- a/sys-devel/make/make-4.3.ebuild +++ b/sys-devel/make/make-4.3.ebuild @@ -1,24 +1,29 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit flag-o-matic +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/make.asc +inherit flag-o-matic verify-sig DESCRIPTION="Standard tool to compile source trees" HOMEPAGE="https://www.gnu.org/software/make/make.html" if [[ "$(ver_cut 3)" -ge 90 ]] ; then SRC_URI="https://alpha.gnu.org/gnu//make/${P}.tar.gz" + SRC_URI+=" verify-sig? ( https://alpha.gnu.org/gnu//make/${P}.tar.gz.sig )" else SRC_URI="mirror://gnu//make/${P}.tar.gz" - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + SRC_URI+=" verify-sig? ( mirror://gnu//make/${P}.tar.gz.sig )" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" fi + LICENSE="GPL-3+" SLOT="0" IUSE="guile nls static" DEPEND="guile? ( >=dev-scheme/guile-1.8:= )" -BDEPEND="nls? ( sys-devel/gettext )" +BDEPEND="nls? ( sys-devel/gettext ) + verify-sig? ( sec-keys/openpgp-keys-make )" RDEPEND="${DEPEND} nls? ( virtual/libintl )" @@ -27,12 +32,6 @@ PATCHES=( "${FILESDIR}"/${PN}-4.2-default-cxx.patch ) -src_prepare() { - # sources were moved into src directory - cd src || die - default -} - src_configure() { use static && append-ldflags -static local myeconfargs=( diff --git a/sys-devel/mold/Manifest b/sys-devel/mold/Manifest index 491f9500136..0ca5f897179 100644 --- a/sys-devel/mold/Manifest +++ b/sys-devel/mold/Manifest @@ -1,3 +1,3 @@ -DIST mold-1.0.0.tar.gz 3482927 BLAKE2B 56ebc267370548a2f91a71ebeed87871cede6f564c29dc7d44a499b95fe570f6e9c8a717baf2d9e235c7057c41e735b315493bd23d3b44574d2a44b14aaf5ef8 SHA512 99ffd0b9e2ff7157cc8b26808675c9d3147bf88961155ae19ed9b99990ac647b7ec31ee78d05062decc6d41e66d99aa0fdc398d119803929b8dbff51eb3d077c -DIST mold-1.0.1.tar.gz 3675262 BLAKE2B 0e40860d3c0a221d368c94b9f58c20b245ee61de6f9eb6d1454ed3b6f103933c79ddd7358049e2aacf497221232d952c2117ba2b3371cbe37fb8ad4ae42461c2 SHA512 cc03a7db395362b97879c28942397d4443d12b72e067b6f979b1ece4d8aab06154b4c1a0f4c57d6ac505bcd4f892bf9a355ad281d628d4d544d8f70edaf34b72 -DIST mold-1.0.2.tar.gz 4501088 BLAKE2B 51bac4bd44a785893c04dd03ccef6119b41a036789938a354545e7a22f16852b52079b3a3e4d27db860748e13966be18bbe813bf04b15c496f35d16ecca4b22c SHA512 27f6664e63c76c32a6e3ec8bfc4b204138926001f5431be94da9ce47a5d9d3b51aa634c5cd6df45be660d52ac0507f7b7eec17134e35db402db5747d2ecc3715 +DIST mold-1.2.1.tar.gz 4669615 BLAKE2B ba483a479d3eff0ea1dbce0da8c292b6a95c0faee2ac0f52d7be392e41d70e5ff3d7859e43fd721720bfb8331984823f2762acfd9dc51d3f5d8fd0a4865088c9 SHA512 fc39674b00119d09b3275ed7232356f0b25dad1a0f3a498f9db1a4835b6d4f9ea637ca9a643a05591ea895e8751d9bee43cdcb42303beb082462e76ddb42a0f1 +DIST mold-1.3.0.tar.gz 4689476 BLAKE2B 2696f74095763ecda7407d1e677a568e0fddbaf5a3ba16dd21e998d80ff77968d77f46f981958087ada11ede181bee1f0bb8c511eede549a81f4edd7c9dc1280 SHA512 c9da8ece83049afcb815444c81d090a7bdead85b88898460cd94cfc83766b54793d3aa15ce7ce3bd8070a080d1241684c15ad81485ec39cfef768360c574964a +DIST mold-1.3.1.tar.gz 4692379 BLAKE2B e34e9416cfc65d2097c4659ddc205a0c4492e50a1c6e4560006757e5c371d27410e38131f353cd0ee60b124e5fe42b0a1c50cdc3a7bed9f666596e608340e4fd SHA512 f576d2fcfee5cb3bade5ba24dcdd3020a16131ce7d4c3a00c3f92b94785ed86f3f040a6f5814b9c975c4c3d90a2b8c36a8101d5fbf1bc0a4be316f4a4a6dcefa diff --git a/sys-devel/mold/files/mold-1.0.1-no-gold-in-version.patch b/sys-devel/mold/files/mold-1.0.1-no-gold-in-version.patch deleted file mode 100644 index 429e55cc51a..00000000000 --- a/sys-devel/mold/files/mold-1.0.1-no-gold-in-version.patch +++ /dev/null @@ -1,50 +0,0 @@ -From cea6a569afa544826c91fda7ef0f9941f50c9459 Mon Sep 17 00:00:00 2001 -From: Rui Ueyama <ruiu@cs.stanford.edu> -Date: Wed, 12 Jan 2022 16:31:04 +0900 -Subject: [PATCH] [ELF] Remove "GNU gold" from the --version string - -That substring was introduced in de7ba9014f9d9d70b9173c4bfac6c3433186ba49 -to appease Gentoo's dev-libs/jansson-2.13.1-r1 package. But I think I -shouldn't done that from the beginning to avoid the sitaution of the -"User-Agent" string of the web browser, which everybody claims they -are Mozilla, AppleWebKit, Chrome and Safari simultaneously. ---- - main.cc | 4 ++-- - test/elf/version.sh | 6 +++--- - 2 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/main.cc b/main.cc -index 38a41cdf..8831f7f2 100644 ---- a/main.cc -+++ b/main.cc -@@ -26,10 +26,10 @@ std::string_view errno_string() { - - #ifdef GIT_HASH - const std::string mold_version = -- "mold " MOLD_VERSION " (" GIT_HASH "; compatible with GNU ld and GNU gold)"; -+ "mold " MOLD_VERSION " (" GIT_HASH "; compatible with GNU ld)"; - #else - const std::string mold_version = -- "mold " MOLD_VERSION " (compatible with GNU ld and GNU gold)"; -+ "mold " MOLD_VERSION " (compatible with GNU ld)"; - #endif - - void cleanup() { -diff --git a/test/elf/version.sh b/test/elf/version.sh -index ae52b504..4ca576ef 100755 ---- a/test/elf/version.sh -+++ b/test/elf/version.sh -@@ -10,10 +10,10 @@ mold="$(pwd)/mold" - t=out/test/elf/$testname - mkdir -p $t - --"$mold" -v | grep -q 'mold .*compatible with GNU ld and GNU gold' --"$mold" --version | grep -q 'mold .*compatible with GNU ld and GNU gold' -+"$mold" -v | grep -q 'mold .*compatible with GNU ld' -+"$mold" --version | grep -q 'mold .*compatible with GNU ld' - --"$mold" -V | grep -q 'mold .*compatible with GNU ld and GNU gold' -+"$mold" -V | grep -q 'mold .*compatible with GNU ld' - "$mold" -V | grep -q elf_x86_64 - "$mold" -V | grep -q elf_i386 - diff --git a/sys-devel/mold/files/mold-1.2.1-install-nopython.patch b/sys-devel/mold/files/mold-1.2.1-install-nopython.patch new file mode 100644 index 00000000000..661d3dcf392 --- /dev/null +++ b/sys-devel/mold/files/mold-1.2.1-install-nopython.patch @@ -0,0 +1,34 @@ +From 4fb6d4208cfb20bad4a3491a18e78409b5a8183f Mon Sep 17 00:00:00 2001 +From: Matthew Smith <matt@offtopica.uk> +Date: Sat, 30 Apr 2022 07:42:50 +0100 +Subject: [PATCH] Don't invoke Python to create libexec/mold/ld symlink + +Reverts commits 8073a92614fb59f59570031badab5dd4bc3b4f7f and +5803c3c200f301adc3abdb66df16d3d669712d70. + +Bug #841575 +--- + Makefile | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/Makefile b/Makefile +index d1abc850..10e053a9 100644 +--- a/Makefile ++++ b/Makefile +@@ -204,12 +204,7 @@ install: all + $(STRIP) $D$(LIBDIR)/mold/mold-wrapper.so + + $(INSTALL) -d $D$(LIBEXECDIR)/mold +- +-# We want to make a symblink with a relative path, so that users can +-# move the entire directory to other place without breaking the reference. +-# GNU ln supports `--relative` to do that, but that's not supported by +-# non-GNU systems. So we use Python to compute a relative path. +- ln -sf `python3 -c "import os.path; print(os.path.relpath('$(BINDIR)/mold', '$(LIBEXECDIR)/mold'))"` $D$(LIBEXECDIR)/mold/ld ++ ln -sf $(BINDIR)/mold $D$(LIBEXECDIR)/mold/ld + + $(INSTALL) -d $D$(MANDIR)/man1 + $(INSTALL_DATA) docs/mold.1 $D$(MANDIR)/man1 +-- +2.35.3 + diff --git a/sys-devel/mold/files/mold-1.3.0-openssl-pkgconfig.patch b/sys-devel/mold/files/mold-1.3.0-openssl-pkgconfig.patch new file mode 100644 index 00000000000..d2ed0af47b4 --- /dev/null +++ b/sys-devel/mold/files/mold-1.3.0-openssl-pkgconfig.patch @@ -0,0 +1,28 @@ +From a4fde946f49cddf4f7c1eceb3b86ca38375cec1d Mon Sep 17 00:00:00 2001 +From: Matthew Smith <matt@offtopica.uk> +Date: Sun, 26 Jun 2022 13:44:36 +0100 +Subject: [PATCH] Revert "Do not use pkg-config" + +This reverts commit 4ef90d4316bbba3a4b8902e38bf5f68171cc6ab7. +--- a/Makefile ++++ b/Makefile +@@ -18,6 +18,9 @@ ifeq ($(origin CXX), default) + CXX = c++ + endif + ++# Allow overriding pkg-config binary ++PKG_CONFIG = pkg-config ++ + # If you want to keep symbols in the installed binary, run make with + # `STRIP=true` to run /bin/true instead of the strip command. + STRIP = strip +@@ -100,7 +103,8 @@ ifeq ($(OS), Darwin) + endif + + ifeq ($(NEEDS_LIBCRYPTO), 1) +- MOLD_LDFLAGS += -lcrypto ++ MOLD_CXXFLAGS += $(shell $(PKG_CONFIG) --cflags-only-I openssl) ++ MOLD_LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L openssl) -lcrypto + endif + + # '-latomic' flag is needed building on riscv64 system. diff --git a/sys-devel/mold/metadata.xml b/sys-devel/mold/metadata.xml index 05bec5e598e..f8a85299d5b 100644 --- a/sys-devel/mold/metadata.xml +++ b/sys-devel/mold/metadata.xml @@ -5,6 +5,10 @@ <email>sam@gentoo.org</email> <name>Sam James</name> </maintainer> + <maintainer type="person"> + <email>matthew@gentoo.org</email> + <name>Matthew Smith</name> + </maintainer> <upstream> <remote-id type="github">rui314/mold</remote-id> </upstream> diff --git a/sys-devel/mold/mold-1.0.0-r1.ebuild b/sys-devel/mold/mold-1.0.0-r1.ebuild deleted file mode 100644 index 767cc5c80f5..00000000000 --- a/sys-devel/mold/mold-1.0.0-r1.ebuild +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright 2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit toolchain-funcs - -DESCRIPTION="A Modern Linker" -HOMEPAGE="https://github.com/rui314/mold" -if [[ ${PV} == 9999 ]] ; then - EGIT_REPO_URI="https://github.com/rui314/mold.git" - inherit git-r3 -else - SRC_URI="https://github.com/rui314/mold/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64" -fi - -LICENSE="AGPL-3" -SLOT="0" - -# Try again after 1.0 (nearly there, but path-related issues) -# https://github.com/rui314/mold/issues/137 -RESTRICT="test" - -RDEPEND=">=dev-cpp/tbb-2021.4.0:= - dev-libs/xxhash:= - sys-libs/zlib - !kernel_Darwin? ( - <dev-libs/mimalloc-2:= - dev-libs/openssl:= - )" -DEPEND="${RDEPEND}" - -src_prepare() { - default - - # Needs unpackaged dwarfdump - rm test/elf/{compress-debug-sections.sh,compressed-debug-info.sh} || die -} - -src_compile() { - tc-export CC CXX - - emake \ - SYSTEM_TBB=1 \ - SYSTEM_MIMALLOC=1 \ - STRIP="true" \ - LIBDIR="${EPREFIX}/usr/$(get_libdir)" -} - -src_test() { - emake \ - SYSTEM_TBB=1 \ - SYSTEM_MIMALLOC=1 \ - check -} - -src_install() { - emake \ - SYSTEM_TBB=1 \ - SYSTEM_MIMALLOC=1 \ - DESTDIR="${ED}" \ - PREFIX="${EPREFIX}/usr" \ - LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ - STRIP="true" \ - install -} diff --git a/sys-devel/mold/mold-1.0.1-r1.ebuild b/sys-devel/mold/mold-1.0.1-r1.ebuild deleted file mode 100644 index e0cd2503b62..00000000000 --- a/sys-devel/mold/mold-1.0.1-r1.ebuild +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright 2021-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit toolchain-funcs - -DESCRIPTION="A Modern Linker" -HOMEPAGE="https://github.com/rui314/mold" -if [[ ${PV} == 9999 ]] ; then - EGIT_REPO_URI="https://github.com/rui314/mold.git" - inherit git-r3 -else - SRC_URI="https://github.com/rui314/mold/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64" -fi - -LICENSE="AGPL-3" -SLOT="0" - -# Try again after 1.0 (nearly there, but path-related issues) -# https://github.com/rui314/mold/issues/137 -RESTRICT="test" - -RDEPEND=">=dev-cpp/tbb-2021.4.0:= - dev-libs/xxhash:= - sys-libs/zlib - !kernel_Darwin? ( - >=dev-libs/mimalloc-2:= - dev-libs/openssl:= - )" -DEPEND="${RDEPEND}" - -PATCHES=( "${FILESDIR}/${P}-no-gold-in-version.patch" ) - -src_prepare() { - default - - # Needs unpackaged dwarfdump - rm test/elf/{compress-debug-sections,compressed-debug-info}.sh || die -} - -src_compile() { - tc-export CC CXX - - emake \ - SYSTEM_TBB=1 \ - SYSTEM_MIMALLOC=1 \ - SYSTEM_XXHASH=1 \ - STRIP="true" \ - LIBDIR="${EPREFIX}/usr/$(get_libdir)" -} - -src_test() { - emake \ - SYSTEM_TBB=1 \ - SYSTEM_MIMALLOC=1 \ - check -} - -src_install() { - emake \ - SYSTEM_TBB=1 \ - SYSTEM_MIMALLOC=1 \ - SYSTEM_XXHASH=1 \ - DESTDIR="${ED}" \ - PREFIX="${EPREFIX}/usr" \ - LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ - STRIP="true" \ - install -} diff --git a/sys-devel/mold/mold-1.0.2.ebuild b/sys-devel/mold/mold-1.2.1-r1.ebuild index 3e1594e0dae..87931221e19 100644 --- a/sys-devel/mold/mold-1.0.2.ebuild +++ b/sys-devel/mold/mold-1.2.1-r1.ebuild @@ -18,24 +18,50 @@ fi LICENSE="AGPL-3" SLOT="0" -# Try again after 1.0 (nearly there, but path-related issues) -# https://github.com/rui314/mold/issues/137 -RESTRICT="test" - RDEPEND=">=dev-cpp/tbb-2021.4.0:= - dev-libs/xxhash:= sys-libs/zlib !kernel_Darwin? ( >=dev-libs/mimalloc-2:= dev-libs/openssl:= )" +# As of 1.1, xxhash is now a header-only dep, but it's now bundled :( +# TODO: restore SYSTEM_XXHASH upstream? DEPEND="${RDEPEND}" +PATCHES=( + # Bug #841575 + "${FILESDIR}"/${PN}-1.2.1-install-nopython.patch +) + +pkg_pretend() { + # Requires a c++20 compiler, see #831473 + if [[ ${MERGE_TYPE} != binary ]]; then + if tc-is-gcc && [[ $(gcc-major-version) -lt 10 ]]; then + die "${PN} needs at least gcc 10" + elif tc-is-clang && [[ $(clang-major-version) -lt 12 ]]; then + die "${PN} needs at least clang 12" + fi + fi +} + src_prepare() { default # Needs unpackaged dwarfdump - rm test/elf/{compress-debug-sections,compressed-debug-info}.sh || die + rm test/elf/{{dead,compress}-debug-sections,compressed-debug-info}.sh || die + + # Heavy tests, need qemu + rm test/elf/gdb-index-{compress-output,dwarf{2,3,4,5}}.sh || die + + # Sandbox sadness + rm test/elf/run.sh || die + sed -i 's|$mold-wrapper.so|"& ${LD_PRELOAD}"|' \ + test/elf/mold-wrapper{,2}.sh || die + + # static-pie tests require glibc built with static-pie support + if ! has_version -d 'sys-libs/glibc[static-pie(+)]'; then + rm test/elf/{hello,ifunc}-static-pie.sh || die + fi } src_compile() { @@ -46,7 +72,6 @@ src_compile() { CXXFLAGS="${CXXFLAGS}" \ SYSTEM_TBB=1 \ SYSTEM_MIMALLOC=1 \ - SYSTEM_XXHASH=1 \ STRIP="true" \ LIBDIR="${EPREFIX}/usr/$(get_libdir)" } @@ -62,8 +87,7 @@ src_install() { emake \ SYSTEM_TBB=1 \ SYSTEM_MIMALLOC=1 \ - SYSTEM_XXHASH=1 \ - DESTDIR="${ED}" \ + DESTDIR="${D}" \ PREFIX="${EPREFIX}/usr" \ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ STRIP="true" \ diff --git a/sys-devel/mold/mold-1.3.0.ebuild b/sys-devel/mold/mold-1.3.0.ebuild new file mode 100644 index 00000000000..2a7faac5052 --- /dev/null +++ b/sys-devel/mold/mold-1.3.0.ebuild @@ -0,0 +1,97 @@ +# Copyright 2021-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="A Modern Linker" +HOMEPAGE="https://github.com/rui314/mold" +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/rui314/mold.git" + inherit git-r3 +else + SRC_URI="https://github.com/rui314/mold/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +LICENSE="AGPL-3" +SLOT="0" + +RDEPEND=">=dev-cpp/tbb-2021.4.0:= + sys-libs/zlib + !kernel_Darwin? ( + >=dev-libs/mimalloc-2:= + dev-libs/openssl:= + )" +# As of 1.1, xxhash is now a header-only dep, but it's now bundled :( +# TODO: restore SYSTEM_XXHASH upstream? +DEPEND="${RDEPEND}" + +PATCHES=( + # Bug #841575 + "${FILESDIR}"/${PN}-1.2.1-install-nopython.patch + "${FILESDIR}"/${PN}-1.3.0-openssl-pkgconfig.patch +) + +pkg_pretend() { + # Requires a c++20 compiler, see #831473 + if [[ ${MERGE_TYPE} != binary ]]; then + if tc-is-gcc && [[ $(gcc-major-version) -lt 10 ]]; then + die "${PN} needs at least gcc 10" + elif tc-is-clang && [[ $(clang-major-version) -lt 12 ]]; then + die "${PN} needs at least clang 12" + fi + fi +} + +src_prepare() { + default + + # Needs unpackaged dwarfdump + rm test/elf/{{dead,compress}-debug-sections,compressed-debug-info}.sh || die + + # Heavy tests, need qemu + rm test/elf/gdb-index-{compress-output,dwarf{2,3,4,5}}.sh || die + rm test/elf/lto-{archive,dso,gcc,llvm,version-script}.sh || die + + # Sandbox sadness + rm test/elf/run.sh || die + sed -i 's|`pwd`/mold-wrapper.so|"& ${LD_PRELOAD}"|' \ + test/elf/mold-wrapper{,2}.sh || die + + # static-pie tests require glibc built with static-pie support + if ! has_version -d 'sys-libs/glibc[static-pie(+)]'; then + rm test/elf/{,ifunc-}static-pie.sh || die + fi +} + +src_compile() { + tc-export CC CXX + + emake \ + CFLAGS="${CFLAGS}" \ + CXXFLAGS="${CXXFLAGS}" \ + SYSTEM_TBB=1 \ + SYSTEM_MIMALLOC=1 \ + STRIP="true" \ + LIBDIR="${EPREFIX}/usr/$(get_libdir)" +} + +src_test() { + emake \ + SYSTEM_TBB=1 \ + SYSTEM_MIMALLOC=1 \ + check +} + +src_install() { + emake \ + SYSTEM_TBB=1 \ + SYSTEM_MIMALLOC=1 \ + DESTDIR="${D}" \ + PREFIX="${EPREFIX}/usr" \ + LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ + STRIP="true" \ + install +} diff --git a/sys-devel/mold/mold-1.3.1.ebuild b/sys-devel/mold/mold-1.3.1.ebuild new file mode 100644 index 00000000000..2a7faac5052 --- /dev/null +++ b/sys-devel/mold/mold-1.3.1.ebuild @@ -0,0 +1,97 @@ +# Copyright 2021-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="A Modern Linker" +HOMEPAGE="https://github.com/rui314/mold" +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/rui314/mold.git" + inherit git-r3 +else + SRC_URI="https://github.com/rui314/mold/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +LICENSE="AGPL-3" +SLOT="0" + +RDEPEND=">=dev-cpp/tbb-2021.4.0:= + sys-libs/zlib + !kernel_Darwin? ( + >=dev-libs/mimalloc-2:= + dev-libs/openssl:= + )" +# As of 1.1, xxhash is now a header-only dep, but it's now bundled :( +# TODO: restore SYSTEM_XXHASH upstream? +DEPEND="${RDEPEND}" + +PATCHES=( + # Bug #841575 + "${FILESDIR}"/${PN}-1.2.1-install-nopython.patch + "${FILESDIR}"/${PN}-1.3.0-openssl-pkgconfig.patch +) + +pkg_pretend() { + # Requires a c++20 compiler, see #831473 + if [[ ${MERGE_TYPE} != binary ]]; then + if tc-is-gcc && [[ $(gcc-major-version) -lt 10 ]]; then + die "${PN} needs at least gcc 10" + elif tc-is-clang && [[ $(clang-major-version) -lt 12 ]]; then + die "${PN} needs at least clang 12" + fi + fi +} + +src_prepare() { + default + + # Needs unpackaged dwarfdump + rm test/elf/{{dead,compress}-debug-sections,compressed-debug-info}.sh || die + + # Heavy tests, need qemu + rm test/elf/gdb-index-{compress-output,dwarf{2,3,4,5}}.sh || die + rm test/elf/lto-{archive,dso,gcc,llvm,version-script}.sh || die + + # Sandbox sadness + rm test/elf/run.sh || die + sed -i 's|`pwd`/mold-wrapper.so|"& ${LD_PRELOAD}"|' \ + test/elf/mold-wrapper{,2}.sh || die + + # static-pie tests require glibc built with static-pie support + if ! has_version -d 'sys-libs/glibc[static-pie(+)]'; then + rm test/elf/{,ifunc-}static-pie.sh || die + fi +} + +src_compile() { + tc-export CC CXX + + emake \ + CFLAGS="${CFLAGS}" \ + CXXFLAGS="${CXXFLAGS}" \ + SYSTEM_TBB=1 \ + SYSTEM_MIMALLOC=1 \ + STRIP="true" \ + LIBDIR="${EPREFIX}/usr/$(get_libdir)" +} + +src_test() { + emake \ + SYSTEM_TBB=1 \ + SYSTEM_MIMALLOC=1 \ + check +} + +src_install() { + emake \ + SYSTEM_TBB=1 \ + SYSTEM_MIMALLOC=1 \ + DESTDIR="${D}" \ + PREFIX="${EPREFIX}/usr" \ + LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ + STRIP="true" \ + install +} diff --git a/sys-devel/mold/mold-9999.ebuild b/sys-devel/mold/mold-9999.ebuild index 3e1594e0dae..2a7faac5052 100644 --- a/sys-devel/mold/mold-9999.ebuild +++ b/sys-devel/mold/mold-9999.ebuild @@ -18,24 +18,52 @@ fi LICENSE="AGPL-3" SLOT="0" -# Try again after 1.0 (nearly there, but path-related issues) -# https://github.com/rui314/mold/issues/137 -RESTRICT="test" - RDEPEND=">=dev-cpp/tbb-2021.4.0:= - dev-libs/xxhash:= sys-libs/zlib !kernel_Darwin? ( >=dev-libs/mimalloc-2:= dev-libs/openssl:= )" +# As of 1.1, xxhash is now a header-only dep, but it's now bundled :( +# TODO: restore SYSTEM_XXHASH upstream? DEPEND="${RDEPEND}" +PATCHES=( + # Bug #841575 + "${FILESDIR}"/${PN}-1.2.1-install-nopython.patch + "${FILESDIR}"/${PN}-1.3.0-openssl-pkgconfig.patch +) + +pkg_pretend() { + # Requires a c++20 compiler, see #831473 + if [[ ${MERGE_TYPE} != binary ]]; then + if tc-is-gcc && [[ $(gcc-major-version) -lt 10 ]]; then + die "${PN} needs at least gcc 10" + elif tc-is-clang && [[ $(clang-major-version) -lt 12 ]]; then + die "${PN} needs at least clang 12" + fi + fi +} + src_prepare() { default # Needs unpackaged dwarfdump - rm test/elf/{compress-debug-sections,compressed-debug-info}.sh || die + rm test/elf/{{dead,compress}-debug-sections,compressed-debug-info}.sh || die + + # Heavy tests, need qemu + rm test/elf/gdb-index-{compress-output,dwarf{2,3,4,5}}.sh || die + rm test/elf/lto-{archive,dso,gcc,llvm,version-script}.sh || die + + # Sandbox sadness + rm test/elf/run.sh || die + sed -i 's|`pwd`/mold-wrapper.so|"& ${LD_PRELOAD}"|' \ + test/elf/mold-wrapper{,2}.sh || die + + # static-pie tests require glibc built with static-pie support + if ! has_version -d 'sys-libs/glibc[static-pie(+)]'; then + rm test/elf/{,ifunc-}static-pie.sh || die + fi } src_compile() { @@ -46,7 +74,6 @@ src_compile() { CXXFLAGS="${CXXFLAGS}" \ SYSTEM_TBB=1 \ SYSTEM_MIMALLOC=1 \ - SYSTEM_XXHASH=1 \ STRIP="true" \ LIBDIR="${EPREFIX}/usr/$(get_libdir)" } @@ -62,8 +89,7 @@ src_install() { emake \ SYSTEM_TBB=1 \ SYSTEM_MIMALLOC=1 \ - SYSTEM_XXHASH=1 \ - DESTDIR="${ED}" \ + DESTDIR="${D}" \ PREFIX="${EPREFIX}/usr" \ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ STRIP="true" \ diff --git a/sys-devel/parity/parity-2.0.1.ebuild b/sys-devel/parity/parity-2.0.1.ebuild index a6d5f5cfc4a..3de370518ab 100644 --- a/sys-devel/parity/parity-2.0.1.ebuild +++ b/sys-devel/parity/parity-2.0.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -8,11 +8,11 @@ if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="git@github.com:ssi-schaefer/parity.git https://github.com/ssi-schaefer/parity.git" BDEPEND="dev-util/confix" else - SRC_URI="https://github.com/mduft/${PN}/releases/download/${PV}/${P}.tar.bz2" + SRC_URI="https://github.com/ssi-schaefer/${PN}/releases/download/${PV}/${P}.tar.bz2" KEYWORDS="~x64-cygwin" fi DESCRIPTION="A POSIX to native Win32 Cross-Compiler Tool (requires Visual Studio)" -HOMEPAGE="https://github.com/mduft/parity" +HOMEPAGE="https://github.com/ssi-schaefer/parity" parity-vcarchs() { echo x64=x86_64 x86=i686 ; } parity-vcvers-legacy() { echo 8_0 9_0 ; } diff --git a/sys-devel/parity/parity-9999.ebuild b/sys-devel/parity/parity-9999.ebuild deleted file mode 100644 index a6d5f5cfc4a..00000000000 --- a/sys-devel/parity/parity-9999.ebuild +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -if [[ ${PV} == 9999 ]]; then - inherit autotools git-r3 - EGIT_REPO_URI="git@github.com:ssi-schaefer/parity.git https://github.com/ssi-schaefer/parity.git" - BDEPEND="dev-util/confix" -else - SRC_URI="https://github.com/mduft/${PN}/releases/download/${PV}/${P}.tar.bz2" - KEYWORDS="~x64-cygwin" -fi -DESCRIPTION="A POSIX to native Win32 Cross-Compiler Tool (requires Visual Studio)" -HOMEPAGE="https://github.com/mduft/parity" - -parity-vcarchs() { echo x64=x86_64 x86=i686 ; } -parity-vcvers-legacy() { echo 8_0 9_0 ; } -parity-vcvers-current() { echo 10_0 11_0 12_0 14_0 15 16 ; } -parity-vcvers() { - parity-vcvers-legacy - parity-vcvers-current -} - -LICENSE="LGPL-3" -SLOT="0" -IUSE="$( - for a in $(parity-vcarchs); do echo "+vc${a%=*}"; done - for v in $(parity-vcvers-legacy); do echo "vc${v}"; done - for v in $(parity-vcvers-current); do echo "+vc${v}"; done -)" - -if [[ ${PV} == 9999 ]]; then - src_prepare() { - default - confix --output || die - eautoreconf - } -fi - -parity-enabled-vcarchs() { - local enabled= a - for a in $(parity-vcarchs) ; do - if use vc${a%=*} ; then - enabled+=",${a#*=}" - fi - done - echo ${enabled#,} -} - -parity-enabled-vcvers() { - local enabled= v - for v in $(parity-vcvers) ; do - if use vc${v} ; then - enabled+=",${v/_/.}" - fi - done - echo ${enabled#,} -} - -src_configure() { - local myconf=( - --enable-msvc-archs="$(parity-enabled-vcarchs)" - --enable-msvc-versions="$(parity-enabled-vcvers)" - --disable-default-msvc-version - ) - econf "${myconf[@]}" -} - -pkg_postinst() { - if [[ -n ${ROOT} ]] ; then - einfo "To enable all available MSVC versions, on the target machine please run:" - einfo " '${EPREFIX}/usr/bin/parity-setup' --enable-all" - else - "${EPREFIX}"/usr/bin/parity-setup --enable-all - fi -} diff --git a/sys-devel/patch/Manifest b/sys-devel/patch/Manifest index 15f0b1675c7..612a9aae3b5 100644 --- a/sys-devel/patch/Manifest +++ b/sys-devel/patch/Manifest @@ -1 +1,2 @@ DIST patch-2.7.6.tar.xz 783756 BLAKE2B e3dd2d155a94c39cb60eafc26677e84de14c3a6d5814dff69de091ded52f21862490970254297795f2c42a0c3203f7e88a8f65bb66968f8dfd6e066bf53f2dfb SHA512 fcca87bdb67a88685a8a25597f9e015f5e60197b9a269fa350ae35a7991ed8da553939b4bbc7f7d3cfd863c67142af403b04165633acbce4339056a905e87fbd +DIST patch-2.7.6.tar.xz.sig 801 BLAKE2B 8f2decb10402ecf0208d05ea7cce3bae565d31ee2bb2a118367c117d25b158d8bd525cae654ec0c0e2c036cc8f47a331edc1bb10b100683ade64dfa3b651988b SHA512 1302a1110dcda4f3d83b5263415d72be55c46dae0efb1c123e9c346154e09def5657004bbe7249e2d014555349410e7a5217140dd8852331235f75bcc757351b diff --git a/sys-devel/patch/patch-2.7.6-r4.ebuild b/sys-devel/patch/patch-2.7.6-r4.ebuild index 30d831025c0..25e164eeee9 100644 --- a/sys-devel/patch/patch-2.7.6-r4.ebuild +++ b/sys-devel/patch/patch-2.7.6-r4.ebuild @@ -3,21 +3,24 @@ EAPI="7" -inherit flag-o-matic +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/patch.asc +inherit flag-o-matic verify-sig DESCRIPTION="Utility to apply diffs to files" HOMEPAGE="https://www.gnu.org/software/patch/patch.html" SRC_URI="mirror://gnu/patch/${P}.tar.xz" +SRC_URI+=" verify-sig? ( mirror://gnu/patch/${P}.tar.xz.sig )" LICENSE="GPL-3+" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" IUSE="static test xattr" RESTRICT="!test? ( test )" RDEPEND="xattr? ( sys-apps/attr )" -DEPEND="${RDEPEND} - test? ( sys-apps/ed )" +DEPEND="${RDEPEND}" +BDEPEND="test? ( sys-apps/ed ) + verify-sig? ( sec-keys/openpgp-keys-patch )" PATCHES=( "${FILESDIR}"/${P}-fix-test-suite.patch diff --git a/sys-devel/prelink/Manifest b/sys-devel/prelink/Manifest deleted file mode 100644 index 139e3eee1b8..00000000000 --- a/sys-devel/prelink/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST prelink-cross-20151030.tar.bz2 701337 BLAKE2B 4875b936254a03afd0eeb1ee81ee99f97a2d654b7c0379acb80ea3763412f3e892c366a9962ff3e1493bba9c83a8a140e79a1d5fb08b269a08ef596d63fd1d32 SHA512 75edd8617b95ae5bd3bfc968732ee142c968855c97c5b2b93784d3476a9724e0fd9a4eb7af681a5356616a4f023e24d5c5a2e75fb57e2a25b142cc901d9bfcaf -DIST prelink.pdf 474129 BLAKE2B 6df5d4998d0822a8032c5dcd1103d7eafa8e9002f2cbfa8fa821131d7c804d2998100dc98d310ae3ae601137b6815435ecdd2684d547a8d25025984c20c06318 SHA512 86b7163fcf6f43d1764183b3dfc30aad8de99ce198b2721af276c81fc361e9f5fd8f4aea1e8e0c653f0566e8346dff4b4ba72909359167aa92c094f5561d2e1e diff --git a/sys-devel/prelink/files/prelink-20130503-libiberty-md5.patch b/sys-devel/prelink/files/prelink-20130503-libiberty-md5.patch deleted file mode 100644 index 5a9fffb838f..00000000000 --- a/sys-devel/prelink/files/prelink-20130503-libiberty-md5.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 8eeb9da6d017761037bf757780ea544dfeabbad8 Mon Sep 17 00:00:00 2001 -From: Mike Frysinger <vapier@gentoo.org> -Date: Tue, 31 Jul 2012 09:02:35 +0000 -Subject: [PATCH] libiberty/md5: fix strict alias warnings -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Current libiberty md5 code triggers these warnings with gcc-4.7.1 for me: - -libiberty/md5.c: In function ‘md5_finish_ctx’: -libiberty/md5.c:117:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] -libiberty/md5.c:118:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] - -The change below fixes things for me. The optimized output (-O2) is the same -before/after my change on x86_64-linux. I imagine it'll be the same for most -targets. It seems simpler than using a union on the md5_ctx buffer since these -are the only two locations in the code where this occurs. ---- - libiberty/ChangeLog | 5 +++++ - libiberty/md5.c | 12 ++++++++---- - 2 files changed, 13 insertions(+), 4 deletions(-) - -2012-07-31 Mike Frysinger <vapier@gentoo.org> - - * md5.c (md5_finish_ctx): Declare swap_bytes. Assign SWAP() output - to swap_bytes, and then call memcpy to move it to ctx->buffer. - -diff --git a/libiberty/md5.c b/libiberty/md5.c -index 0db8fc8..8cc0cb5 100644 ---- a/src/md5.c -+++ b/src/md5.c -@@ -103,6 +103,7 @@ md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) - { - /* Take yet unprocessed bytes into account. */ - md5_uint32 bytes = ctx->buflen; -+ md5_uint32 swap_bytes; - size_t pad; - - /* Now count remaining bytes. */ -@@ -113,10 +114,13 @@ md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) - pad = bytes >= 56 ? 64 + 56 - bytes : 56 - bytes; - memcpy (&ctx->buffer[bytes], fillbuf, pad); - -- /* Put the 64-bit file length in *bits* at the end of the buffer. */ -- *(md5_uint32 *) &ctx->buffer[bytes + pad] = SWAP (ctx->total[0] << 3); -- *(md5_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP ((ctx->total[1] << 3) | -- (ctx->total[0] >> 29)); -+ /* Put the 64-bit file length in *bits* at the end of the buffer. -+ Use memcpy to avoid aliasing problems. On most systems, this -+ will be optimized away to the same code. */ -+ swap_bytes = SWAP (ctx->total[0] << 3); -+ memcpy (&ctx->buffer[bytes + pad], &swap_bytes, sizeof (swap_bytes)); -+ swap_bytes = SWAP ((ctx->total[1] << 3) | (ctx->total[0] >> 29)); -+ memcpy (&ctx->buffer[bytes + pad + 4], &swap_bytes, sizeof (swap_bytes)); - - /* Process last bytes. */ - md5_process_block (ctx->buffer, bytes + pad + 8, ctx); --- -1.8.2.1 - diff --git a/sys-devel/prelink/files/prelink-20130503-prelink-conf.patch b/sys-devel/prelink/files/prelink-20130503-prelink-conf.patch deleted file mode 100644 index 9233a411482..00000000000 --- a/sys-devel/prelink/files/prelink-20130503-prelink-conf.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- a/doc/prelink.conf -+++ b/doc/prelink.conf -@@ -5,6 +5,7 @@ - # If a directory name is prefixed with `-h ', symbolic links in a - # directory hierarchy are followed. - # Directories or files with `-b ' prefix will be blacklisted. -+-c /etc/prelink.conf.d/*.conf - -b *.la - -b *.png - -b *.py -@@ -16,8 +16,11 @@ - -b *.a - -b *.js - -b /lib/modules ---b /usr/lib/locale ---b /usr/X11R6/lib{,64}/X11/xfig -+-b /usr/lib{,x32,32,64}/locale -+-b /usr/lib{,x32,32,64}/wine -+-b /usr/lib{,x32,32,64}/valgrind -+-b /usr/X11R6/lib{,x32,32,64}/X11/xfig -+-b /usr/src - -l /bin - -l /usr/bin - -l /sbin -@@ -27,9 +30,9 @@ - -l /usr/games - -l /usr/libexec - -l /var/ftp/bin ---l /lib{,64} ---l /usr/lib{,64} ---l /usr/X11R6/lib{,64} ---l /usr/kerberos/lib{,64} -+-l /lib{,x32,32,64} -+-l /usr/lib{,x32,32,64} -+-l /usr/X11R6/lib{,x32,32,64} -+-l /usr/kerberos/lib{,x32,32,64} - -l /usr/X11R6/LessTif ---l /var/ftp/lib{,64} -+-l /var/ftp/lib{,x32,32,64} diff --git a/sys-devel/prelink/files/prelink.confd b/sys-devel/prelink/files/prelink.confd deleted file mode 100644 index 6b89b8c1f1f..00000000000 --- a/sys-devel/prelink/files/prelink.confd +++ /dev/null @@ -1,43 +0,0 @@ -# For an in depth prelinking guide, please see: -# http://www.gentoo.org/doc/en/prelink-howto.xml - -# Control prelinking behavior in the cronjob. -# yes - automatically prelink the system -# no - automatically un-prelink the system -# "" - do nothing at all (user manages) -# (if you change this from yes to no prelink -ua -# will be run next night to undo prelinking) -PRELINKING="" - -# Options to pass to prelink -# -m Try to conserve virtual memory by allowing overlapping -# assigned virtual memory slots for libraries which -# never appear together in one binary -# -R Randomize virtual memory slot assignments for libraries. -# This makes it slightly harder for various buffer overflow -# attacks, since library addresses will be different on each -# host using -R. -PRELINK_OPTS=-mR - -# How often should full prelink be run (in days) -# Normally, prelink will be run in quick mode, every -# $PRELINK_FULL_TIME_INTERVAL days it will be run -# in normal mode. Comment it out if it should be run -# in normal mode always. -PRELINK_FULL_TIME_INTERVAL=14 - -# How often should prelink run (in days) even if -# no packages have been upgraded via portage. -# If $PRELINK_FULL_TIME_INTERVAL days have not elapsed -# yet since last normal mode prelinking, last -# quick mode prelinking happened less than -# $PRELINK_NOEMER_CHECK_INTERVAL days ago -# and no packages have been upgraded by portage -# since last quick mode prelinking, prelink -# will not do anything. -# Change to -# PRELINK_NOEMER_CHECK_INTERVAL=0 -# if you want to disable the portage database timestamp -# check (especially if you don't use portage -# exclusively to upgrade system libraries and/or binaries). -PRELINK_NOEMER_CHECK_INTERVAL=7 diff --git a/sys-devel/prelink/files/prelink.cron b/sys-devel/prelink/files/prelink.cron deleted file mode 100644 index 067fc2ea97a..00000000000 --- a/sys-devel/prelink/files/prelink.cron +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh - -. /etc/conf.d/prelink -log="/var/log/prelink.log" - -case $PRELINKING in - yes|no);; - *) exit 0;; -esac - -ionice -c3 -p $$ >/dev/null 2>&1 -renice +19 -p $$ >/dev/null 2>&1 - -if [ "$PRELINKING" != yes ]; then - sed -ri '/^[[:space:]]*#?[[:space:]]*KDE_IS_PRELINKED=/s:.*:#KDE_IS_PRELINKED=1:' /etc/env.d/*kde* 2>/dev/null - if [ -f /etc/prelink.cache ]; then - echo /usr/sbin/prelink -uav > ${log} - /usr/sbin/prelink -uav >> ${log} 2>&1 \ - || echo Prelink failed with return value $? >> ${log} - rm -f /etc/prelink.cache - # Restart init if needed - [ -n "$(find `ldd /sbin/init | awk 'NF == 4 { print $3 }'` /sbin/init -ctime -1 2>/dev/null )" ] && /sbin/telinit u - fi - exit 0 -fi - -sed -ri '/^[[:space:]]*#?[[:space:]]*KDE_IS_PRELINKED=/s:.*:KDE_IS_PRELINKED=1:' /etc/env.d/*kde* 2>/dev/null - -if [ ! -f /etc/prelink.cache -o -f /var/lib/misc/prelink.force ] \ - || grep -q '^prelink-ELF0.[0-2]' /etc/prelink.cache; then - # If cache does not exist or is from older prelink versions or - # if we were asked to explicitely, force full prelinking - rm -f /etc/prelink.cache /var/lib/misc/prelink.force - PRELINK_OPTS="$PRELINK_OPTS -f" - date > /var/lib/misc/prelink.full - cp -a /var/lib/misc/prelink.full /var/lib/misc/prelink.quick -elif [ -n "$PRELINK_FULL_TIME_INTERVAL" \ - -a "`find /var/lib/misc/prelink.full -mtime -${PRELINK_FULL_TIME_INTERVAL} 2>/dev/null`" \ - = /var/lib/misc/prelink.full ]; then - # If no more than PRELINK_NOEMER_CHECK_INTERVAL days elapsed from last prelink - # (be it full or quick) and no packages have been upgraded via rpm since then, - # don't do anything. - [ "`find /var/lib/misc/prelink.quick -mtime -${PRELINK_NOEMER_CHECK_INTERVAL:-7} 2>/dev/null`" \ - -a -f /var/cache/edb/counter \ - -a /var/cache/edb/counter -ot /var/lib/misc/prelink.quick ] && exit 0 - date > /var/lib/misc/prelink.quick - # If prelink without -q has been run in the last - # PRELINK_FULL_TIME_INTERVAL days, just use quick mode - PRELINK_OPTS="$PRELINK_OPTS -q" -else - date > /var/lib/misc/prelink.full - cp -a /var/lib/misc/prelink.full /var/lib/misc/prelink.quick -fi - -echo /usr/sbin/prelink -av $PRELINK_OPTS > ${log} -/usr/sbin/prelink -av $PRELINK_OPTS >> ${log} 2>&1 \ - || echo Prelink failed with return value $? >> ${log} -# Restart init if needed (and if exists) -[ -n "$(find `ldd /sbin/init 2>/dev/null | awk 'NF == 4 { print $3 }'` /sbin/init -ctime -1 2>/dev/null )" ] && /sbin/telinit u - -exit 0 diff --git a/sys-devel/prelink/files/prelink.service b/sys-devel/prelink/files/prelink.service deleted file mode 100644 index dcdbf813a0e..00000000000 --- a/sys-devel/prelink/files/prelink.service +++ /dev/null @@ -1,6 +0,0 @@ -[Unit] -Description=Perform system-wide prelinking - -[Service] -Type=oneshot -ExecStart=/etc/cron.daily/prelink diff --git a/sys-devel/prelink/files/prelink.timer b/sys-devel/prelink/files/prelink.timer deleted file mode 100644 index 5d58d437158..00000000000 --- a/sys-devel/prelink/files/prelink.timer +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Daily system-wide prelinking - -[Timer] -OnCalendar=daily -AccuracySec=12h -Persistent=true - -[Install] -WantedBy=timers.target diff --git a/sys-devel/prelink/metadata.xml b/sys-devel/prelink/metadata.xml deleted file mode 100644 index 5a1e1dee65d..00000000000 --- a/sys-devel/prelink/metadata.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<maintainer type="project"> - <email>toolchain@gentoo.org</email> - <name>Gentoo Toolchain Project</name> -</maintainer> -</pkgmetadata> diff --git a/sys-devel/prelink/prelink-20151030-r1.ebuild b/sys-devel/prelink/prelink-20151030-r1.ebuild deleted file mode 100644 index 17c39b3993e..00000000000 --- a/sys-devel/prelink/prelink-20151030-r1.ebuild +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright 2002-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -MY_PN="${PN}-cross" -MY_P="${MY_PN}-${PV}" - -inherit autotools flag-o-matic systemd - -DESCRIPTION="Modifies ELFs to avoid runtime symbol resolutions resulting in faster load times" -HOMEPAGE="https://git.yoctoproject.org/cgit/cgit.cgi/prelink-cross/ https://people.redhat.com/jakub/prelink" -SRC_URI="https://git.yoctoproject.org/cgit/cgit.cgi/${MY_PN}/snapshot/${MY_P}.tar.bz2 - doc? ( https://people.redhat.com/jakub/prelink/prelink.pdf )" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 ~arm ~arm64 ppc ppc64 x86" -IUSE="doc selinux" - -RDEPEND=">=dev-libs/elfutils-0.100 - selinux? ( sys-libs/libselinux ) - !dev-libs/libelf" -DEPEND="${RDEPEND} - sys-libs/binutils-libs" - -S=${WORKDIR}/${MY_P} - -PATCHES=( - "${FILESDIR}"/${PN}-20130503-prelink-conf.patch - "${FILESDIR}"/${PN}-20130503-libiberty-md5.patch -) - -# tests were fixed only in development version after 20151030 -RESTRICT=test - -src_prepare() { - default - - sed -i -e '/^CC=/s: : -Wl,--disable-new-dtags :' testsuite/functions.sh #100147 - - has_version 'dev-libs/elfutils[threads]' && append-ldflags -pthread - - eautoreconf -} - -src_configure() { - econf $(use_enable selinux) -} - -src_install() { - default - - use doc && dodoc "${DISTDIR}"/prelink.pdf - - insinto /etc - doins doc/prelink.conf - - exeinto /etc/cron.daily - newexe "${FILESDIR}"/prelink.cron prelink - newconfd "${FILESDIR}"/prelink.confd prelink - systemd_dounit "${FILESDIR}"/prelink.{service,timer} -} - -pkg_postinst() { - if [ -z "${REPLACING_VERSIONS}" ] ; then - elog "You may wish to read the Gentoo Linux Prelink Guide, which can be" - elog "found online at:" - elog " https://wiki.gentoo.org/wiki/Prelink" - elog "Please edit /etc/conf.d/prelink to enable and configure prelink" - fi -} diff --git a/sys-devel/prelink/prelink-99999999.ebuild b/sys-devel/prelink/prelink-99999999.ebuild deleted file mode 100644 index dfe534db619..00000000000 --- a/sys-devel/prelink/prelink-99999999.ebuild +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright 2002-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -MY_PN="${PN}-cross" -MY_P="${MY_PN}-${PV}" - -inherit autotools flag-o-matic git-r3 systemd - -DESCRIPTION="Modifies ELFs to avoid runtime symbol resolutions resulting in faster load times" -HOMEPAGE="https://git.yoctoproject.org/cgit/cgit.cgi/prelink-cross/ https://people.redhat.com/jakub/prelink" -EGIT_REPO_URI="https://git.yoctoproject.org/git/prelink-cross" - -LICENSE="GPL-2" -SLOT="0" -IUSE="doc selinux" - -RDEPEND=">=dev-libs/elfutils-0.100 - selinux? ( sys-libs/libselinux ) - !dev-libs/libelf" -DEPEND="${RDEPEND} - sys-libs/binutils-libs" - -PATCHES=( - "${FILESDIR}"/${PN}-20130503-prelink-conf.patch - "${FILESDIR}"/${PN}-20130503-libiberty-md5.patch -) - -src_prepare() { - default - - sed -i -e '/^CC=/s: : -Wl,--disable-new-dtags :' testsuite/functions.sh #100147 - - has_version 'dev-libs/elfutils[threads]' && append-ldflags -pthread - - eautoreconf -} - -src_configure() { - econf $(use_enable selinux) -} - -src_test() { - # prelink tests check exact library lists. - # LD_PRELOADed libraries break the assumption. - SANDBOX_ON=0 LD_PRELOAD= emake check VERBOSE=1 -} - -src_install() { - default - - use doc && dodoc doc/prelink.pdf - - insinto /etc - doins doc/prelink.conf - - exeinto /etc/cron.daily - newexe "${FILESDIR}"/prelink.cron prelink - newconfd "${FILESDIR}"/prelink.confd prelink - systemd_dounit "${FILESDIR}"/prelink.{service,timer} -} - -pkg_postinst() { - if [ -z "${REPLACING_VERSIONS}" ] ; then - elog "You may wish to read the Gentoo Linux Prelink Guide, which can be" - elog "found online at:" - elog " https://wiki.gentoo.org/wiki/Prelink" - elog "Please edit /etc/conf.d/prelink to enable and configure prelink" - fi -} diff --git a/sys-devel/rust-std/Manifest b/sys-devel/rust-std/Manifest index bb93701440e..94306c39795 100644 --- a/sys-devel/rust-std/Manifest +++ b/sys-devel/rust-std/Manifest @@ -1,6 +1 @@ -DIST rustc-1.53.0-src.tar.xz 115686332 BLAKE2B fa068f89d42f927fdc79ee31aad1386eaf2aa596a060e059c5a1a73fe48c48d008fc952cd6c7912b743e41d77a94b205639eed0f728b2539b62f18a772cabfe3 SHA512 70485cf7a0f7fc36ee31644e546374079dc387a85b44e5e793707fd0a4d7ca05d311291e78b86db955485d8f21c47ff9e1908acc4da68ba04929287213a40c24 -DIST rustc-1.54.0-src.tar.xz 116286856 BLAKE2B 5ac47822646a0b6205f09282168b4d4ddcace9f6bc8f242c890327ca4074626f129514f8bcae5c5556015745f718990cce490658076f5cd3526623439540416b SHA512 5162f85b43ca2c5af93fdbfb2597d75df8a838f7fcc025a5298499ce1043db50f1ea2fbba753e47ce5daad3d80d4b612acf6527ef902c34117763e687fdbbcfa -DIST rustc-1.55.0-src.tar.xz 117197580 BLAKE2B 8d9739ce7571146aee0e07c6287de9a8c4f1a914606cd47819eb1ef118b15772ecf22d0d43d7732f03c234a013fa54a4a7f0578a3f136af518f71bf64a03305d SHA512 7522f2fa95d5af92472404ecc97d7d9e745e88c933196a83fa373ce1efff6db3c295e0e2afdbfa1ff00644554efa0c3c7f6c11f9119ecf9010cb440b3f27c2da -DIST rustc-1.56.1-src.tar.xz 121798264 BLAKE2B 09677b0332022f28a0d80949a6735929dbf64276f7eb57195d8c33e6c80f13c903432ff77d8834093ab551677618fb1d385f2300e2b1b4c064f9c245c696be32 SHA512 193468e211cde9ebc5f6e30b8e3733b79bd8710fe6dd45c7ed8d4392f91010d30466787afd4d0b2041cd7dd994924fee8ad111048824e248bd994959e55bf15f -DIST rustc-1.58.0-src.tar.xz 124348768 BLAKE2B e5a0d919a1ca1202e218cec3da93fc69cba163069b1f2b4051778a49184715579c14cd6b03baa0225b10a8f1adf758aca427c910d95dfa2e647bbf8b7d133785 SHA512 70104f4d3b474dcb9935200ef0503f29cb15f10d38ba8630e1dadbb384924dd9137fced647794699efe83ac88083e4ae5f45712f0e1c8bc0a6f8c23eecdb0ae |