diff options
Diffstat (limited to 'sys-devel')
594 files changed, 23849 insertions, 21428 deletions
diff --git a/sys-devel/autoconf-archive/Manifest b/sys-devel/autoconf-archive/Manifest deleted file mode 100644 index 3a4e6da4421a..000000000000 --- a/sys-devel/autoconf-archive/Manifest +++ /dev/null @@ -1,3 +0,0 @@ -DIST autoconf-archive-2018.03.13.tar.xz 649496 BLAKE2B a69c381d734aa41337b8af783196f13e7aa49d936289df237c56a9be7662cd2b766ac42fa10f4cd46feac3998a12c49745d994c5df95b5dd449646dae300a8f8 SHA512 301832a02b1913dd46cc34f6479264b37032d78457b2df526f0aafc752996972ca9c74fdae68fbe0f490268019c45329d564f263cbaff30203bbb4b4a8d5ad5f -DIST autoconf-archive-2019.01.06.tar.xz 651320 BLAKE2B a311b8e6bdd45337194451a696e2435ce758e7c9b1d12639b5837f23c8ea051eb63152952fb944b14fc1db1baa1f1a3e3516fa931fa411b0f7aa08a2040ddcff SHA512 14bf8d0bf8be4a4dc078677de1977e496d4d9cf095bc897c174e331311b722cd3a34054e74c2146fff4b5c84269463e6a6fc61907d77d1c51bb221c8fb124fcb -DIST autoconf-archive-2021.02.19.tar.xz 667304 BLAKE2B bc99cfd2b507a0c7fc37a001cc9e090fa037cc3626f5f5201c9a62ef06ee8ca4532ca8f21e1422f9dff9f67f64409ae560117c3161809f2d3bc3a39469910485 SHA512 a968c355c3cf66d74dc5b452141afbdf763e84a6c43b12c25da9a08482910d6d57ba3952aaf270d8cd5fd8b9d2dadf2d7d943ae2e1b067d68b71d2738d881aa0 diff --git a/sys-devel/autoconf-archive/autoconf-archive-2018.03.13.ebuild b/sys-devel/autoconf-archive/autoconf-archive-2018.03.13.ebuild deleted file mode 100644 index 3be013f350cf..000000000000 --- a/sys-devel/autoconf-archive/autoconf-archive-2018.03.13.ebuild +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -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 ~m68k ~mips ppc ppc64 ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="" - -# File collisions. #540246 -RDEPEND="!=gnome-base/gnome-common-3.14.0-r0 - !>=gnome-base/gnome-common-3.14.0-r1[-autoconf-archive(+)]" -DEPEND="" - -src_install() { - default - rm -r "${ED}/usr/share/${PN}" || die -} diff --git a/sys-devel/autoconf-archive/autoconf-archive-2019.01.06.ebuild b/sys-devel/autoconf-archive/autoconf-archive-2019.01.06.ebuild deleted file mode 100644 index 87b98f88cd12..000000000000 --- a/sys-devel/autoconf-archive/autoconf-archive-2019.01.06.ebuild +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 1999-2021 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 ~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="" - -# File collisions. #540246 -RDEPEND="!=gnome-base/gnome-common-3.14.0-r0 - !>=gnome-base/gnome-common-3.14.0-r1[-autoconf-archive(+)]" -DEPEND="" diff --git a/sys-devel/autoconf-archive/autoconf-archive-2021.02.19.ebuild b/sys-devel/autoconf-archive/autoconf-archive-2021.02.19.ebuild deleted file mode 100644 index e576339fbe38..000000000000 --- a/sys-devel/autoconf-archive/autoconf-archive-2021.02.19.ebuild +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 1999-2021 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 ~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="" - -# File collisions. #540246 -RDEPEND="!=gnome-base/gnome-common-3.14.0-r0 - !>=gnome-base/gnome-common-3.14.0-r1[-autoconf-archive(+)]" -DEPEND="" diff --git a/sys-devel/autoconf-archive/metadata.xml b/sys-devel/autoconf-archive/metadata.xml deleted file mode 100644 index 56c124413057..000000000000 --- a/sys-devel/autoconf-archive/metadata.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<maintainer type="project"> - <email>base-system@gentoo.org</email> - <name>Gentoo Base System</name> -</maintainer> -</pkgmetadata> diff --git a/sys-devel/autoconf-wrapper/autoconf-wrapper-13-r1.ebuild b/sys-devel/autoconf-wrapper/autoconf-wrapper-13-r1.ebuild deleted file mode 100644 index 5ebc1a0be296..000000000000 --- a/sys-devel/autoconf-wrapper/autoconf-wrapper-13-r1.ebuild +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit multilib - -DESCRIPTION="wrapper for autoconf to manage multiple autoconf 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_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-15.ebuild b/sys-devel/autoconf-wrapper/autoconf-wrapper-15.ebuild deleted file mode 100644 index 68d956726bb0..000000000000 --- a/sys-devel/autoconf-wrapper/autoconf-wrapper-15.ebuild +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit multilib - -DESCRIPTION="wrapper for autoconf to manage multiple autoconf versions" -HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" -SRC_URI="" - -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" -IUSE="" - -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/files/ac-wrapper-13.sh b/sys-devel/autoconf-wrapper/files/ac-wrapper-13.sh deleted file mode 100644 index d984b4ac3371..000000000000 --- a/sys-devel/autoconf-wrapper/files/ac-wrapper-13.sh +++ /dev/null @@ -1,201 +0,0 @@ -#!/bin/sh -# Copyright 1999-2018 Gentoo Foundation -# 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. -# -KNOWN_AUTOCONF="2.69:2.5 2.68:2.5" -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-wrapper/files/ac-wrapper-15.sh b/sys-devel/autoconf-wrapper/files/ac-wrapper-15.sh deleted file mode 100644 index e5eda0e53f18..000000000000 --- 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-wrapper/metadata.xml b/sys-devel/autoconf-wrapper/metadata.xml deleted file mode 100644 index 56c124413057..000000000000 --- a/sys-devel/autoconf-wrapper/metadata.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<maintainer type="project"> - <email>base-system@gentoo.org</email> - <name>Gentoo Base System</name> -</maintainer> -</pkgmetadata> diff --git a/sys-devel/autoconf/Manifest b/sys-devel/autoconf/Manifest deleted file mode 100644 index 4d729262f261..000000000000 --- a/sys-devel/autoconf/Manifest +++ /dev/null @@ -1,5 +0,0 @@ -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-r1.ebuild deleted file mode 100644 index 51e415706fdb..000000000000 --- a/sys-devel/autoconf/autoconf-2.13-r1.ebuild +++ /dev/null @@ -1,52 +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.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" -IUSE="userland_BSD" - -DEPEND=">=sys-apps/texinfo-4.3 - =sys-devel/m4-1.4* - dev-lang/perl" -RDEPEND="${DEPEND} - >=sys-devel/autoconf-wrapper-13" - -PATCHES=( - "${FILESDIR}"/${P}-gentoo.patch - "${FILESDIR}"/${P}-destdir.patch - "${FILESDIR}"/${P}-test-fixes.patch #146592 - "${FILESDIR}"/${PN}-2.13-perl-5.26.patch -) - -src_configure() { - # make sure configure is newer than configure.in - touch configure || die - - # need to include --exec-prefix and --bindir or our - # DESTDIR patch will trigger sandbox hate :( - # - # need to force locale to C to avoid bugs in the old - # configure script breaking the install paths #351982 - # - # force to `awk` so that we don't encode another awk that - # happens to currently be installed, but might later be - # uninstalled (like mawk). same for m4. - local prepend="" - use userland_BSD && prepend="g" - ac_cv_path_M4="${prepend}m4" \ - ac_cv_prog_AWK="${prepend}awk" \ - LC_ALL=C \ - econf \ - --exec-prefix="${EPREFIX}"/usr \ - --bindir="${EPREFIX}"/usr/bin \ - --program-suffix="-${PV}" -} 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 efed7086f51a..000000000000 --- 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.69-r5.ebuild b/sys-devel/autoconf/autoconf-2.69-r5.ebuild deleted file mode 100644 index c85719fd173a..000000000000 --- a/sys-devel/autoconf/autoconf-2.69-r5.ebuild +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -if [[ ${PV} == "9999" ]] ; then - EGIT_REPO_URI="https://git.savannah.gnu.org/git/autoconf.git" - inherit git-r3 -else - SRC_URI="mirror://gnu/${PN}/${P}.tar.xz - ftp://alpha.gnu.org/pub/gnu/${PN}/${P}.tar.xz - https://dev.gentoo.org/~polynomial-c/dist/${P}-runstatedir_patches.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" -fi - -inherit toolchain-autoconf - -DESCRIPTION="Used to create autoconfiguration files" -HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html" - -LICENSE="GPL-3" -SLOT="${PV}" -IUSE="emacs" - -BDEPEND=">=sys-devel/m4-1.4.16 - >=dev-lang/perl-5.6" -RDEPEND="${BDEPEND} - !~sys-devel/${P}:2.5 - >=sys-devel/autoconf-wrapper-13" -[[ ${PV} == "9999" ]] && BDEPEND+=" >=sys-apps/texinfo-4.3" -PDEPEND="emacs? ( app-emacs/autoconf-mode )" - -PATCHES=( - "${FILESDIR}"/${PN}-2.69-perl-5.26.patch - "${FILESDIR}"/${P}-fix-libtool-test.patch - "${FILESDIR}"/${PN}-2.69-perl-5.26-2.patch - "${FILESDIR}"/${P}-make-tests-bash5-compatible.patch - - "${WORKDIR}"/patches/${P}-runstatedir.patch - "${WORKDIR}"/patches/${P}-texinfo.patch - "${WORKDIR}"/patches/${P}-runstatedir_info.patch -) - -src_prepare() { - # usr/bin/libtool is provided by binutils-apple, need gnu libtool - if [[ ${CHOST} == *-darwin* ]] ; then - PATCHES+=( "${FILESDIR}"/${PN}-2.61-darwin.patch ) - fi - - # Save timestamp to avoid later makeinfo call - touch -r doc/{,old_}autoconf.texi || die - - toolchain-autoconf_src_prepare - - # Restore timestamp to avoid makeinfo call - # We already have an up to date autoconf.info page at this point. - touch -r doc/{old_,}autoconf.texi || die -} diff --git a/sys-devel/autoconf/autoconf-2.71.ebuild b/sys-devel/autoconf/autoconf-2.71.ebuild deleted file mode 100644 index 86e89e450868..000000000000 --- a/sys-devel/autoconf/autoconf-2.71.ebuild +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -if [[ ${PV} == "9999" ]] ; then - EGIT_REPO_URI="https://git.savannah.gnu.org/git/autoconf.git" - inherit git-r3 -else - # For _beta handling replace with real version number - 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+=" 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}" -fi - -inherit toolchain-autoconf - -DESCRIPTION="Used to create autoconfiguration files" -HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html" - -LICENSE="GPL-3" -SLOT="${PV/_*}" -IUSE="emacs" - -BDEPEND=">=sys-devel/m4-1.4.16 - >=dev-lang/perl-5.6" -RDEPEND="${BDEPEND} - >=sys-devel/autoconf-wrapper-15 - sys-devel/gnuconfig - !~sys-devel/${P}:2.5" -[[ ${PV} == "9999" ]] && BDEPEND+=" >=sys-apps/texinfo-4.3" -PDEPEND="emacs? ( app-emacs/autoconf-mode )" - -src_prepare() { - # usr/bin/libtool is provided by binutils-apple, need gnu libtool - if [[ ${CHOST} == *-darwin* ]] ; then - PATCHES+=( "${FILESDIR}"/${PN}-2.71-darwin.patch ) - fi - - # Save timestamp to avoid later makeinfo call - touch -r doc/{,old_}autoconf.texi || die - - local pdir - for pdir in "${WORKDIR}"/{upstream_,}patches ; do - if [[ -d "${pdir}" ]] ; then - eapply ${pdir} - fi - done - - toolchain-autoconf_src_prepare - - # Restore timestamp to avoid makeinfo call - # We already have an up to date autoconf.info page at this point. - touch -r doc/{old_,}autoconf.texi || die -} - -src_install() { - toolchain-autoconf_src_install - - local f - for f in config.{guess,sub} ; do - ln -fs ../../gnuconfig/${f} \ - "${ED}"/usr/share/autoconf-*/build-aux/${f} || die - done -} diff --git a/sys-devel/autoconf/autoconf-9999.ebuild b/sys-devel/autoconf/autoconf-9999.ebuild deleted file mode 100644 index f3b786e014a7..000000000000 --- a/sys-devel/autoconf/autoconf-9999.ebuild +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -if [[ ${PV} == "9999" ]] ; then - EGIT_REPO_URI="https://git.savannah.gnu.org/git/autoconf.git" - inherit git-r3 -else - SRC_URI="mirror://gnu/${PN}/${P}.tar.xz - ftp://alpha.gnu.org/pub/gnu/${PN}/${P}.tar.xz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x86-linux" -fi - -inherit toolchain-autoconf - -DESCRIPTION="Used to create autoconfiguration files" -HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html" - -LICENSE="GPL-3" -SLOT="${PV}" -IUSE="emacs" - -BDEPEND=">=sys-devel/m4-1.4.16 - >=dev-lang/perl-5.6" -RDEPEND="${BDEPEND} - >=sys-devel/autoconf-wrapper-14 - sys-devel/gnuconfig - !~sys-devel/${P}:2.5" -[[ ${PV} == "9999" ]] && BDEPEND+=" >=sys-apps/texinfo-4.3" -PDEPEND="emacs? ( app-emacs/autoconf-mode )" - -src_prepare() { - if [[ ${PV} == *9999 ]] ; then - # Avoid the "dirty" suffix in the git version by generating it - # before we run later stages which might modify source files. - local ver=$(./build-aux/git-version-gen .tarball-version) - echo "${ver}" > .tarball-version || die - - autoreconf -f -i || die - fi - - toolchain-autoconf_src_prepare -} - -src_install() { - default - - local f - for f in config.{guess,sub} ; do - ln -fs ../../gnuconfig/${f} \ - "${ED}"/usr/share/autoconf-*/build-aux/${f} || die - done -} diff --git a/sys-devel/autoconf/files/autoconf-2.13-destdir.patch b/sys-devel/autoconf/files/autoconf-2.13-destdir.patch deleted file mode 100644 index 47605af5f59c..000000000000 --- a/sys-devel/autoconf/files/autoconf-2.13-destdir.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/Makefile.in -+++ b/Makefile.in -@@ -41,18 +41,18 @@ - - transform=@program_transform_name@ - --prefix = @prefix@ -+prefix = $(DESTDIR)@prefix@ --exec_prefix = @exec_prefix@ -+exec_prefix = $(DESTDIR)@exec_prefix@ - - # Directory in which to install scripts. --bindir = @bindir@ -+bindir = $(DESTDIR)@bindir@ - - # Directory in which to install library files. --datadir = @datadir@ -+datadir = $(DESTDIR)@datadir@ - acdatadir = $(datadir)/autoconf - - # Directory in which to install documentation info files. --infodir = @infodir@ -+infodir = $(DESTDIR)@infodir@ - - #### End of system configuration section. #### - diff --git a/sys-devel/autoconf/files/autoconf-2.13-gentoo.patch b/sys-devel/autoconf/files/autoconf-2.13-gentoo.patch deleted file mode 100644 index 44f09cba92f0..000000000000 --- a/sys-devel/autoconf/files/autoconf-2.13-gentoo.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- a/configure -+++ b/configure -@@ -654,12 +654,10 @@ - echo "$ac_t""no" 1>&6 - fi - --if test "$PERL" != no; then -- SCRIPTS=autoscan --else -- echo "configure: warning: autoscan will not be built since perl is not found" 1>&2 -+if test "$PERL" = no; then -+ PERL=/usr/bin/perl - fi -- -+SCRIPTS=autoscan - ac_aux_dir= - for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then ---- a/configure.in -+++ b/configure.in -@@ -14,12 +14,10 @@ - AC_PATH_PROG(PERL, perl, no) - AC_SUBST(PERL)dnl - AC_SUBST(SCRIPTS)dnl --if test "$PERL" != no; then -- SCRIPTS=autoscan --else -- AC_MSG_WARN(autoscan will not be built since perl is not found) -+if test "$PERL" = no; then -+ PERL=/usr/bin/perl - fi -- -+SCRIPTS=autoscan - AC_PROG_INSTALL - - # Work with the GNU or Cygnus source tree layout. diff --git a/sys-devel/autoconf/files/autoconf-2.13-perl-5.26.patch b/sys-devel/autoconf/files/autoconf-2.13-perl-5.26.patch deleted file mode 100644 index 6fbc0cd1bc89..000000000000 --- a/sys-devel/autoconf/files/autoconf-2.13-perl-5.26.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN autoconf-2.13.orig/autoscan.pl autoconf-2.13/autoscan.pl ---- autoconf-2.13.orig/autoscan.pl 1999-01-05 14:28:42.000000000 +0100 -+++ autoconf-2.13/autoscan.pl 2018-12-22 19:55:10.986732296 +0100 -@@ -232,7 +232,7 @@ - # Strip out comments and variable references. - s/#.*//; - s/\$\([^\)]*\)//g; -- s/\${[^\}]*}//g; -+ s/\$\{[^\}]*}//g; - s/@[^@]*@//g; - - # Variable assignments. diff --git a/sys-devel/autoconf/files/autoconf-2.13-test-fixes.patch b/sys-devel/autoconf/files/autoconf-2.13-test-fixes.patch deleted file mode 100644 index b8a7e3b8ce99..000000000000 --- a/sys-devel/autoconf/files/autoconf-2.13-test-fixes.patch +++ /dev/null @@ -1,18 +0,0 @@ -newer gcc versions don't provide g77, so if it doesn't exist, -don't bother trying to test it (and failing) - -http://bugs.gentoo.org/146592 - ---- autoconf-2.13/testsuite/autoconf.s/syntax.exp -+++ autoconf-2.13/testsuite/autoconf.s/syntax.exp -@@ -5,6 +5,10 @@ - set macros [exec sed -n $script $srcdir/../acspecific.m4] - - foreach mac $macros { -+ if { [string match "*F77*" "$mac"] && [catch {exec which g77} ignore_output] } then { -+ send_user "XFAIL: $mac\n" -+ continue -+ } - send_user "$mac\n" - autoconf_test $mac $mac - } diff --git a/sys-devel/autoconf/files/autoconf-2.61-darwin.patch b/sys-devel/autoconf/files/autoconf-2.61-darwin.patch deleted file mode 100644 index 83f450e6f5af..000000000000 --- a/sys-devel/autoconf/files/autoconf-2.61-darwin.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/bin/autoreconf.in -+++ b/bin/autoreconf.in -@@ -110,7 +110,7 @@ - my $autoheader = $ENV{'AUTOHEADER'} || '@bindir@/@autoheader-name@'; - my $automake = $ENV{'AUTOMAKE'} || 'automake'; - my $aclocal = $ENV{'ACLOCAL'} || 'aclocal'; --my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize'; -+my $libtoolize = $ENV{'LIBTOOLIZE'} || 'glibtoolize'; - my $autopoint = $ENV{'AUTOPOINT'} || 'autopoint'; - - # --install -- as --add-missing in other tools. diff --git a/sys-devel/autoconf/files/autoconf-2.69-fix-libtool-test.patch b/sys-devel/autoconf/files/autoconf-2.69-fix-libtool-test.patch deleted file mode 100644 index e75eba621606..000000000000 --- a/sys-devel/autoconf/files/autoconf-2.69-fix-libtool-test.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 247b02e5a5bb79ca6666e91de02ae2d3cb0cd325 Mon Sep 17 00:00:00 2001 -From: "Gary V. Vaughan" <gary@gnu.org> -Date: Mon, 3 Nov 2014 07:25:03 +0100 -Subject: tests: avoid spurious test failure with libtool 2.4.3 - -Based on a report by Bruce Dubbs. - -* tests/foreign.at (Libtool): Be tolerant of 'quote' replacing the -older `quote'. - -Signed-off-by: Eric Blake <eblake@redhat.com> ---- - tests/foreign.at | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/foreign.at b/tests/foreign.at -index a9dc33c..d4702cd 100644 ---- a/tests/foreign.at -+++ b/tests/foreign.at -@@ -57,7 +57,7 @@ AT_CHECK([./config.guess || exit 77], [], [ignore], [ignore]) - # Make sure at-path contains something valid, and let the test suite - # display it when verbose. And fail, skipping would too easily hide - # problems. --AT_CHECK([sed -n ["s,^.*\`\\(/[^']*\\)'.*,\\1,p"] stdout], [0], [stdout]) -+AT_CHECK([sed -n ["s,^[^']*[\`']\\(/[^']*\\)'.*,\\1,p"] stdout], [0], [stdout]) - AT_CHECK([test -f "`sed -n 1p stdout`"]) - - # Older libtoolize installed everything but install-sh... --- -cgit v1.0-41-gc330 - diff --git a/sys-devel/autoconf/files/autoconf-2.69-make-tests-bash5-compatible.patch b/sys-devel/autoconf/files/autoconf-2.69-make-tests-bash5-compatible.patch deleted file mode 100644 index 1afcec15bb4f..000000000000 --- a/sys-devel/autoconf/files/autoconf-2.69-make-tests-bash5-compatible.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 5b9db67786a428164abafe626ab11a2754aad528 Mon Sep 17 00:00:00 2001 -From: Ondrej Dubaj <odubaj@redhat.com> -Date: Wed, 28 Aug 2019 07:39:50 +0200 -Subject: Port tests to Bash 5 - -* tests/local.at (AT_CHECK_ENV, AT_CONFIG_CMP): -Add BASH_ARGC, BASH_ARGV to list of variables to be ignored when -comparing variable space dumps. -(AT_CONFIG_CMP): Also ignore LINENO. -* tests/m4sh.at: Also unset LINENO in 'reference' and 'test/test-1'. ---- - tests/local.at | 5 ++++- - tests/m4sh.at | 4 ++-- - 2 files changed, 6 insertions(+), 3 deletions(-) - -diff --git a/tests/local.at b/tests/local.at -index a22958c0..852be285 100644 ---- a/tests/local.at -+++ b/tests/local.at -@@ -325,7 +325,7 @@ if test -f state-env.before && test -f state-env.after; then - [AWK|LEX|LEXLIB|LEX_OUTPUT_ROOT|LN_S|M4|MKDIR_P|RANLIB|SET_MAKE|YACC], - [GREP|[EF]GREP|SED], - [[_@]|.[*#?$].], -- [argv|ARGC|LINENO|OLDPWD|PIPESTATUS|RANDOM|SECONDS]))=' \ -+ [argv|ARGC|LINENO|BASH_ARGC|BASH_ARGV|OLDPWD|PIPESTATUS|RANDOM|SECONDS]))=' \ - $act_file || - test $? -eq 1 || echo failed >&2 - ) 2>stderr-$act_file | -@@ -382,6 +382,9 @@ do - /'\'\\\$\''=/ d - /^argv=/ d - /^ARGC=/ d -+ /^BASH_ARGC=/ d -+ /^BASH_ARGV=/ d -+ /^LINENO=/ d - ' $act_file >at_config_vars-$act_file - done - AT_CMP([at_config_vars-$1], [at_config_vars-$2])[]dnl -diff --git a/tests/m4sh.at b/tests/m4sh.at -index e9d70b02..cbdfcb62 100644 ---- a/tests/m4sh.at -+++ b/tests/m4sh.at -@@ -254,7 +254,7 @@ AT_CHECK([autom4te -l m4sh $1.as -o $1]) - # `_oline_', once processed and ran, produces our reference. - # We check that we find ourselves by looking at a string which is - # available only in the original script: `_oline_'. --AT_DATA_LINENO([reference], [false], [__OLINE__], [_oline__]) -+AT_DATA_LINENO([reference], [true], [__OLINE__], [_oline__]) - AT_CHECK([./reference], 0, [stdout]) - - # The reference: -@@ -264,7 +264,7 @@ mv stdout expout - # Be sure to be out of the PATH. - AT_CHECK([mkdir test || exit 77]) - --AT_DATA_LINENO([test/test-1], [false], [__LINENO__], [LINENO]) -+AT_DATA_LINENO([test/test-1], [true], [__LINENO__], [LINENO]) - AT_CHECK([./test/test-1], 0, [expout]) - AT_CHECK([(PATH=test$PATH_SEPARATOR$PATH; export PATH; exec test-1)], - 0, [expout]) --- -cgit v1.2.1 - diff --git a/sys-devel/autoconf/files/autoconf-2.69-perl-5.26-2.patch b/sys-devel/autoconf/files/autoconf-2.69-perl-5.26-2.patch deleted file mode 100644 index 6becf807c43e..000000000000 --- a/sys-devel/autoconf/files/autoconf-2.69-perl-5.26-2.patch +++ /dev/null @@ -1,30 +0,0 @@ -https://bugs.gentoo.org/625576 - ---- autoconf-2.69/bin/autoheader.in -+++ autoconf-2.69/bin/autoheader.in -@@ -173,6 +173,12 @@ - # Source what the traces are trying to tell us. - verb "$me: running $autoconf to trace from $ARGV[0]"; - my $quoted_tmp = shell_quote ($tmp); -+my $perl_tmp; -+if ( $tmp =~ /^\// ) { -+ $perl_tmp=$tmp; -+} else { -+ $perl_tmp="./".$tmp; -+} - xsystem ("$autoconf" - # If you change this list, update the - # `Autoheader-preselections' section of autom4te.in. -@@ -182,9 +188,9 @@ - . " " . shell_quote ($ARGV[0]) . " >$quoted_tmp/traces.pl"); - - local (%verbatim, %symbol); --debug "$me: \`do'ing $tmp/traces.pl:\n" . `sed 's/^/| /' $quoted_tmp/traces.pl`; --do "$tmp/traces.pl"; --warn "couldn't parse $tmp/traces.pl: $@" if $@; -+debug "$me: \`do'ing $perl_tmp/traces.pl:\n" . `sed 's/^/| /' $quoted_tmp/traces.pl`; -+do "$perl_tmp/traces.pl"; -+warn "couldn't parse $perl_tmp/traces.pl: $@" if $@; - unless ($config_h) - { - error "error: AC_CONFIG_HEADERS not found in $ARGV[0]"; diff --git a/sys-devel/autoconf/files/autoconf-2.69-perl-5.26.patch b/sys-devel/autoconf/files/autoconf-2.69-perl-5.26.patch deleted file mode 100644 index b3d7888ca722..000000000000 --- a/sys-devel/autoconf/files/autoconf-2.69-perl-5.26.patch +++ /dev/null @@ -1,28 +0,0 @@ -From e5654a5591884b92633c7785f325626711e7f7aa Mon Sep 17 00:00:00 2001 -From: Paul Eggert <eggert@cs.ucla.edu> -Date: Tue, 29 Jan 2013 13:46:48 -0800 -Subject: [PATCH] autoscan: port to perl 5.17 - -* bin/autoscan.in (scan_sh_file): Escape '{'. This avoids a -feature that is deprecated in Perl 5.17. Reported by Ray Lauff in -<http://lists.gnu.org/archive/html/bug-autoconf/2013-01/msg00059.html>. ---- - bin/autoscan.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/bin/autoscan.in b/bin/autoscan.in -index 993a750..db1df79 100644 ---- a/bin/autoscan.in -+++ b/bin/autoscan.in -@@ -358,7 +358,7 @@ sub scan_sh_file ($) - { - # Strip out comments and variable references. - s/#.*//; -- s/\${[^\}]*}//g; -+ s/\$\{[^\}]*}//g; - s/@[^@]*@//g; - - # Tokens in the code. --- -1.9.1 - diff --git a/sys-devel/autoconf/files/autoconf-2.71-darwin.patch b/sys-devel/autoconf/files/autoconf-2.71-darwin.patch deleted file mode 100644 index c122aee4b22d..000000000000 --- a/sys-devel/autoconf/files/autoconf-2.71-darwin.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/bin/autoreconf.in -+++ b/bin/autoreconf.in -@@ -122,7 +122,7 @@ - my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@'; - my $automake = $ENV{'AUTOMAKE'} || 'automake'; - my $aclocal = $ENV{'ACLOCAL'} || 'aclocal'; --my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize'; -+my $libtoolize = $ENV{'LIBTOOLIZE'} || 'glibtoolize'; - my $intltoolize = $ENV{'INTLTOOLIZE'} || 'intltoolize'; - my $gtkdocize = $ENV{'GTKDOCIZE'} || 'gtkdocize'; - my $autopoint = $ENV{'AUTOPOINT'} || 'autopoint'; diff --git a/sys-devel/autoconf/metadata.xml b/sys-devel/autoconf/metadata.xml deleted file mode 100644 index 56c124413057..000000000000 --- a/sys-devel/autoconf/metadata.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<maintainer type="project"> - <email>base-system@gentoo.org</email> - <name>Gentoo Base System</name> -</maintainer> -</pkgmetadata> diff --git a/sys-devel/autogen/autogen-5.18.16-r3.ebuild b/sys-devel/autogen/autogen-5.18.16-r3.ebuild new file mode 100644 index 000000000000..e908a1837ef5 --- /dev/null +++ b/sys-devel/autogen/autogen-5.18.16-r3.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic autotools toolchain-funcs + +DESCRIPTION="Program and text file generation" +HOMEPAGE="https://www.gnu.org/software/autogen/" +SRC_URI=" + mirror://gnu/${PN}/rel${PV}/${P}.tar.xz + https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=lib/verify.h;h=3b57ddee0acffd23cc51bc8910a15cf879f90619;hb=537a5511ab0b1326e69b32f87593a50aedb8a589 -> ${P}-gnulib-3b57ddee0acffd23cc51bc8910a15cf879f90619-lib-verify.h +" + +LICENSE="GPL-2" +SLOT="0" +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:= + dev-libs/libxml2 +" +DEPEND="${RDEPEND}" +# TODO: investigate & drop this! +BDEPEND="sys-apps/which" + +# We don't pass the flag explicitly, bug #796776. +# Let's fix it upstream after next autogen release if it happens. +QA_CONFIGURE_OPTIONS+=" --enable-snprintfv-convenience" + +PATCHES=( + "${FILESDIR}"/${PN}-5.18.16-no-werror.patch + "${FILESDIR}"/${PN}-5.18.16-rpath.patch + "${FILESDIR}"/${PN}-5.18.16-respect-TMPDIR.patch + "${FILESDIR}"/${PN}-5.18.16-make-4.3.patch + "${FILESDIR}"/${PN}-5.18.16-guile-3.patch + "${FILESDIR}"/${PN}-5.18.16-configure-c99.patch + "${FILESDIR}"/${PN}-5.18.16-FORTIFY_SOURCE.patch +) + +src_prepare() { + default + + # missing tarball file + cp "${DISTDIR}"/${P}-gnulib-3b57ddee0acffd23cc51bc8910a15cf879f90619-lib-verify.h autoopts/verify.h || die + + # May be able to drop this on next release (>5.18.16) + eautoreconf +} + +src_configure() { + # suppress possibly incorrect -R flag + export ag_cv_test_ldflags= + + # autogen requires run-time sanity of regex and string functions. + # Use defaults of linux-glibc until we need somethig more advanced. + if tc-is-cross-compiler ; then + export ag_cv_run_strcspn=no + export libopts_cv_with_libregex=yes + fi + + # bug 920174 + use elibc_musl && append-cppflags -D_LARGEFILE64_SOURCE + + econf $(use_enable static-libs static) +} + +src_install() { + default + + find "${ED}" -name '*.la' -delete || die + + if ! use libopts ; then + rm "${ED}"/usr/share/autogen/libopts-*.tar.gz || die + fi +} diff --git a/sys-devel/autogen/autogen-5.18.16-r1.ebuild b/sys-devel/autogen/autogen-5.18.16-r4.ebuild index 580f8317fbc3..d767e53a32bf 100644 --- a/sys-devel/autogen/autogen-5.18.16-r1.ebuild +++ b/sys-devel/autogen/autogen-5.18.16-r4.ebuild @@ -1,44 +1,51 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -inherit toolchain-funcs +inherit flag-o-matic autotools toolchain-funcs DESCRIPTION="Program and text file generation" HOMEPAGE="https://www.gnu.org/software/autogen/" -SRC_URI="mirror://gnu/${PN}/rel${PV}/${P}.tar.xz - https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=lib/verify.h;h=3b57ddee0acffd23cc51bc8910a15cf879f90619;hb=537a5511ab0b1326e69b32f87593a50aedb8a589 -> ${P}-gnulib-3b57ddee0acffd23cc51bc8910a15cf879f90619-lib-verify.h" +SRC_URI=" + mirror://gnu/${PN}/rel${PV}/${P}.tar.xz + https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=lib/verify.h;h=3b57ddee0acffd23cc51bc8910a15cf879f90619;hb=537a5511ab0b1326e69b32f87593a50aedb8a589 -> ${P}-gnulib-3b57ddee0acffd23cc51bc8910a15cf879f90619-lib-verify.h +" 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:= - dev-libs/libxml2" +RDEPEND=" + >=dev-scheme/guile-2.0:= + dev-libs/libxml2 +" DEPEND="${RDEPEND}" +# We don't pass the flag explicitly, bug #796776. +# Let's fix it upstream after next autogen release if it happens. +QA_CONFIGURE_OPTIONS+=" --enable-snprintfv-convenience" + PATCHES=( "${FILESDIR}"/${PN}-5.18.16-no-werror.patch "${FILESDIR}"/${PN}-5.18.16-rpath.patch "${FILESDIR}"/${PN}-5.18.16-respect-TMPDIR.patch "${FILESDIR}"/${PN}-5.18.16-make-4.3.patch + "${FILESDIR}"/${PN}-5.18.16-guile-3.patch + "${FILESDIR}"/${PN}-5.18.16-configure-c99.patch + "${FILESDIR}"/${PN}-5.18.16-FORTIFY_SOURCE.patch + "${FILESDIR}"/${PN}-5.18.16-no-which.patch ) src_prepare() { - # no-werror.patch fixes both configure{.ac,} - # avoid configure echeck - touch -r configure.ac orig.configure.ac || die - touch -r configure orig.configure || die - default - touch -r orig.configure.ac configure.ac || die - touch -r orig.configure configure || die - # missing tarball file cp "${DISTDIR}"/${P}-gnulib-3b57ddee0acffd23cc51bc8910a15cf879f90619-lib-verify.h autoopts/verify.h || die + + # May be able to drop this on next release (>5.18.16) + eautoreconf } src_configure() { @@ -52,12 +59,16 @@ src_configure() { export libopts_cv_with_libregex=yes fi + # bug 920174 + use elibc_musl && append-cppflags -D_LARGEFILE64_SOURCE + econf $(use_enable static-libs static) } src_install() { default - find "${D}" -name '*.la' -delete || die + + find "${ED}" -name '*.la' -delete || die if ! use libopts ; then rm "${ED}"/usr/share/autogen/libopts-*.tar.gz || die diff --git a/sys-devel/autogen/files/autogen-5.18.16-FORTIFY_SOURCE.patch b/sys-devel/autogen/files/autogen-5.18.16-FORTIFY_SOURCE.patch new file mode 100644 index 000000000000..b8108c1c0ed1 --- /dev/null +++ b/sys-devel/autogen/files/autogen-5.18.16-FORTIFY_SOURCE.patch @@ -0,0 +1,100 @@ +https://bugs.gentoo.org/889394 +https://sourceforge.net/p/autogen/bugs/212/ +https://bugzilla.redhat.com/2173623 +https://siddhesh.in/posts/that-is-not-a-number-that-is-a-freed-object.html +https://gcc.gnu.org/PR105217 +https://src.fedoraproject.org/rpms/autogen/blob/684b717191dd8bcd4e01a7775e62d50bc41b8ccb/f/autogen-fortify.patch + +commit 772b282a4e858a27af610bcdcc8b66925cbf1a83 +Author: Tomas Korbar <tkorbar@redhat.com> +Date: Tue Feb 28 16:08:13 2023 +0100 + + avoid GCC code analysis bug + +--- a/agen5/defLoad.c ++++ b/agen5/defLoad.c +@@ -448,17 +448,28 @@ read_defs(void) + FILE * fp; + def_input_mode_t in_mode = ready_def_input(&def_fname, &data_sz); + ++ /* ++ * "ready_def_input" has a lot of side effects. It's possible that ++ * there are no definitions, so "in_mode" is set to DONE and there's ++ * nothing to do. ++ */ + if (in_mode == INPUT_DONE) + return; + + /* + * Allocate the space we need for our definitions. ++ * "data_sz" was set by read_def_input to the size of the ++ * definitions file (or 4096 if we're reading from a fifo file). ++ * In that alternate case, we'll start the input size at 4096 bytes. ++ * The allocation includes space for context and a NUL byte or two + */ +- rem_sz = data_sz+4+sizeof(*base_ctx); +- base_ctx = (scan_ctx_t *)AGALOC(rem_sz, "file buf"); +- memset(VOIDP(base_ctx), 0, rem_sz); ++ { ++ size_t sz = data_sz + sizeof(long) + sizeof(*base_ctx); ++ base_ctx = (scan_ctx_t *)AGALOC(sz, "file buf"); ++ memset(VOIDP(base_ctx), 0, sz); ++ } + base_ctx->scx_line = 1; +- rem_sz = data_sz; ++ rem_sz = data_sz; // size available for storing def text + + /* + * Our base context will have its currency pointer set to this +@@ -482,6 +493,9 @@ read_defs(void) + if (fp == NULL) + AG_CANT(READ_DEF_OPEN, def_fname); + ++ /* ++ * If we're emitting dependency information, then do so. ++ */ + if (dep_fp != NULL) + add_source_file(def_fname); + } +@@ -516,8 +530,7 @@ read_defs(void) + * See if there is any space left + */ + if (rem_sz == 0) { +- scan_ctx_t * p; +- off_t dataOff; ++ off_t scan_off; + + /* + * IF it is a regular file, then we are done +@@ -527,24 +540,16 @@ read_defs(void) + + /* + * We have more data and we are out of space. +- * Try to reallocate our input buffer. ++ * AGREALOC will succeed or not return. + */ + data_sz += (rem_sz = 0x1000); +- dataOff = data - base_ctx->scx_data; +- p = AGREALOC(VOIDP(base_ctx), data_sz + 4 + sizeof(*base_ctx), +- "expand f buf"); ++ scan_off = data - base_ctx->scx_data; ++ base_ctx = AGREALOC(VOIDP(base_ctx), data_sz + 4 + sizeof(*base_ctx), ++ "expand f buf"); + +- /* +- * The buffer may have moved. Set the data pointer at an +- * offset within the new buffer and make sure our base pointer +- * has been corrected as well. +- */ +- if (p != base_ctx) { +- p->scx_scan = \ +- p->scx_data = (char *)(p + 1); +- data = p->scx_data + dataOff; +- base_ctx = p; +- } ++ base_ctx->scx_scan = \ ++ base_ctx->scx_data = (char *)(base_ctx + 1); ++ data = base_ctx->scx_data + scan_off; + } + } + diff --git a/sys-devel/autogen/files/autogen-5.18.16-configure-c99.patch b/sys-devel/autogen/files/autogen-5.18.16-configure-c99.patch new file mode 100644 index 000000000000..75e2e760a792 --- /dev/null +++ b/sys-devel/autogen/files/autogen-5.18.16-configure-c99.patch @@ -0,0 +1,42 @@ +https://bugs.gentoo.org/898590 +https://src.fedoraproject.org/rpms/autogen/c/7d157d98e73dcd1602111309a690643faa80e207?branch=rawhide +--- a/config/ag_macros.m4 ++++ b/config/ag_macros.m4 +@@ -113,7 +113,7 @@ AC_DEFUN([INVOKE_AG_MACROS_LAST],[ + fi + + AC_CACHE_CHECK([for static inline], [snv_cv_static_inline], [ +- AC_TRY_COMPILE([static inline foo(bar) int bar; { return bar; }], ++ AC_TRY_COMPILE([static inline int foo(bar) int bar; { return bar; }], + [return foo(0);], + [snv_cv_static_inline='static inline'], + [snv_cv_static_inline='static']) +@@ -428,7 +428,7 @@ int main (int argc, char ** argv) { + char zRej@<:@@:>@ = reject; + char zAcc@<:@@:>@ = "a-ok-eject"; + return strcspn( zAcc, zRej ) - 5; +-}] )] ++}] )], + [ag_cv_run_strcspn=yes],[ag_cv_run_strcspn=no],[ag_cv_run_strcspn=no] + ) # end of RUN_IFELSE + ]) # end of AC_CACHE_VAL for ag_cv_run_strcspn +--- a/configure ++++ b/configure +@@ -17338,7 +17338,7 @@ int main (int argc, char ** argv) { + char zAcc[] = "a-ok-eject"; + return strcspn( zAcc, zRej ) - 5; + } +- ag_cv_run_strcspn=yes ++#error + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : + ag_cv_run_strcspn=no +@@ -18406,7 +18405,7 @@ else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-static inline foo(bar) int bar; { return bar; } ++static inline int foo(bar) int bar; { return bar; } + int + main () + { diff --git a/sys-devel/autogen/files/autogen-5.18.16-guile-3.patch b/sys-devel/autogen/files/autogen-5.18.16-guile-3.patch new file mode 100644 index 000000000000..2d21c4fae3e7 --- /dev/null +++ b/sys-devel/autogen/files/autogen-5.18.16-guile-3.patch @@ -0,0 +1,38 @@ +--- a/config/guile.m4 ++++ b/config/guile.m4 +@@ -61,7 +61,7 @@ + # + AC_DEFUN([GUILE_PKG], + [PKG_PROG_PKG_CONFIG +- _guile_versions_to_search="m4_default([$1], [2.2 2.0 1.8])" ++ _guile_versions_to_search="m4_default([$1], [3.0 2.2 2.0 1.8])" + if test -n "$GUILE_EFFECTIVE_VERSION"; then + _guile_tmp="" + for v in $_guile_versions_to_search; do +--- a/configure ++++ b/configure +@@ -14799,7 +14799,7 @@ $as_echo "no" >&6; } + PKG_CONFIG="" + fi + fi +- _guile_versions_to_search="2.2 2.0 1.8" ++ _guile_versions_to_search="3.0 2.2 2.0 1.8" + if test -n "$GUILE_EFFECTIVE_VERSION"; then + _guile_tmp="" + for v in $_guile_versions_to_search; do +--- a/agen5/guile-iface.h ++++ b/agen5/guile-iface.h +@@ -16,6 +16,13 @@ + # define AG_SCM_TO_LONG(_v) scm_to_long(_v) + # define AG_SCM_TO_ULONG(_v) ((unsigned long)scm_to_ulong(_v)) + ++#elif GUILE_VERSION < 400000 ++# define AG_SCM_IS_PROC(_p) scm_is_true( scm_procedure_p(_p)) ++# define AG_SCM_LIST_P(_l) scm_is_true( scm_list_p(_l)) ++# define AG_SCM_PAIR_P(_p) scm_is_true( scm_pair_p(_p)) ++# define AG_SCM_TO_LONG(_v) scm_to_long(_v) ++# define AG_SCM_TO_ULONG(_v) ((unsigned long)scm_to_ulong(_v)) ++ + #else + # error unknown GUILE_VERSION + choke me. diff --git a/sys-devel/autogen/files/autogen-5.18.16-no-which.patch b/sys-devel/autogen/files/autogen-5.18.16-no-which.patch new file mode 100644 index 000000000000..c4b462cba420 --- /dev/null +++ b/sys-devel/autogen/files/autogen-5.18.16-no-which.patch @@ -0,0 +1,15 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -149,9 +149,9 @@ GDnam=getdefs${ac_exeext} + CLnam=columns${ac_exeext} + if test "X$cross_compiling" = Xyes + then +- AGexe=`which ${AGnam}` +- GDexe=`which ${GDnam}` +- CLexe=`which ${CLnam}` ++ AGexe=`command -v ${AGnam}` ++ GDexe=`command -v ${GDnam}` ++ CLexe=`command -v ${CLnam}` + else + AGexe=${ag_top_builddir}/agen5/${AGnam} + GDexe=${ag_top_builddir}/getdefs/${GDnam} diff --git a/sys-devel/autogen/metadata.xml b/sys-devel/autogen/metadata.xml index 36983a069cff..8f3ef98f5bc0 100644 --- a/sys-devel/autogen/metadata.xml +++ b/sys-devel/autogen/metadata.xml @@ -1,11 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!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="libopts">install the libopts tarball (a few packages want this for developing)</flag> -</use> + <maintainer type="project"> + <email>toolchain@gentoo.org</email> + <name>Gentoo Toolchain Project</name> + </maintainer> + <use> + <flag name="libopts">install the libopts tarball (a few packages want this for developing)</flag> + </use> + <upstream> + <remote-id type="savannah">autogen</remote-id> + </upstream> </pkgmetadata> 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 1516e27afb7d..000000000000 --- 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-wrapper/files/am-wrapper-11.sh b/sys-devel/automake-wrapper/files/am-wrapper-11.sh deleted file mode 100644 index 290762680d22..000000000000 --- a/sys-devel/automake-wrapper/files/am-wrapper-11.sh +++ /dev/null @@ -1,186 +0,0 @@ -#!/bin/sh -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# Executes the correct automake version. -# -# If WANT_AUTOMAKE is set (can be a whitespace delimited list of versions): -# - attempt to find an installed version using those -# - if magic keyword 'latest' is found, pick the latest version that exists -# - if nothing found, warn, and proceed as if WANT_AUTOMAKE was not set (below) -# If WANT_AUTOMAKE is not set: -# - Try to detect the version of automake used to generate things (look at -# Makefile.in and aclocal.m4 and any other useful file) -# - If detected version is not found, warn and proceed as if blank slate -# - Try to locate the latest version of automake that exists and run it - -(set -o posix) 2>/dev/null && set -o posix - -_stderr() { printf 'am-wrapper: %s: %b\n' "${argv0}" "$*" 1>&2; } -warn() { _stderr "warning: $*"; } -err() { _stderr "error: $*"; 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 ! 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_AUTOMAKE; -# Start with last known versions to speed up lookup process. -# -LAST_KNOWN_AUTOMAKE_VER="16" -vers=$(printf '1.%s ' `seq ${LAST_KNOWN_AUTOMAKE_VER} -1 4`) - -# -# Helper to scan for a usable program based on version. -# -binary= -all_vers= -find_binary() { - local v - all_vers="${all_vers} $*" # For error messages. - for v ; do - if [ -x "${full_argv0}-${v}" ] ; then - binary="${full_argv0}-${v}" - binary_ver=${v} - return 0 - fi - done - return 1 -} - -# -# Try and find a usable automake version. First check the WANT_AUTOMAKE -# setting (whitespace delimited list), then fallback to the latest. -# -find_latest() { - if ! find_binary ${vers} ; then - # Brute force it. - find_binary $(printf '1.%s ' `seq 99 -1 ${LAST_KNOWN_AUTOMAKE_VER}`) - fi -} -for wx in ${WANT_AUTOMAKE:-latest} ; do - if [ "${wx}" = "latest" ] ; then - find_latest && break - else - find_binary ${wx} && break - fi -done - -if [ -z "${binary}" ] && [ -n "${WANT_AUTOMAKE}" ] ; then - warn "could not locate installed version for WANT_AUTOMAKE='${WANT_AUTOMAKE}'; ignoring" - unset WANT_AUTOMAKE - find_latest -fi - -if [ -z "${binary}" ] ; then - err "Unable to locate any usuable version of automake.\n" \ - "\tI tried these versions:${all_vers}\n" \ - "\tWith a base name of '${full_argv0}'." -fi - -# -# autodetect helpers -# -do_awk() { - local file=$1 ; shift - local v=$(awk -v regex="$*" '{ - if (ret = match($0, regex)) { - s = substr($0, ret, RLENGTH) - ret = match(s, "[0-9]\\.[0-9]+") - print substr(s, ret, RLENGTH) - exit - } - }' "${file}") - case " ${auto_vers} " in - *" ${v} "*) ;; - *) auto_vers="${auto_vers:+${auto_vers} }${v}" ;; - esac -} - -# -# autodetect routine -# -if [ -z "${WANT_AUTOMAKE}" ] ; then - auto_vers= - if [ -r "Makefile.in" ] ; then - do_awk Makefile.in '^# Makefile.in generated (automatically )?by automake [0-9]\\.[0-9]+' - fi - if [ -r "aclocal.m4" ] ; then - do_awk aclocal.m4 'generated automatically by aclocal [0-9]\\.[0-9]+' - do_awk aclocal.m4 '[[:space:]]*\\[?AM_AUTOMAKE_VERSION\\(\\[?[0-9]\\.[0-9]+[^)]*\\]?\\)' - fi - # We don't need to set $binary here as it has already been setup for us - # earlier to the latest available version. - if [ -n "${auto_vers}" ] ; then - if ! find_binary ${auto_vers} ; then - warn "auto-detected versions not found (${auto_vers}); falling back to latest available" - fi - fi -fi - -if [ -n "${WANT_AMWRAPPER_DEBUG}" ] ; then - if [ -n "${WANT_AUTOMAKE}" ] ; then - warn "DEBUG: WANT_AUTOMAKE is set to ${WANT_AUTOMAKE}" - fi - warn "DEBUG: will execute <${binary}>" -fi - -# -# for further consistency -# -export WANT_AUTOMAKE="${binary_ver}" - -# -# Now try to run the binary -# -if [ ! -x "${binary}" ] ; then - # this shouldn't happen - err "${binary} is missing or not executable.\n" \ - "\tPlease try installing the correct version of automake." -fi - -exec "${binary}" "$@" -# The shell will error out if `exec` failed. diff --git a/sys-devel/automake-wrapper/metadata.xml b/sys-devel/automake-wrapper/metadata.xml deleted file mode 100644 index 56c124413057..000000000000 --- a/sys-devel/automake-wrapper/metadata.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<maintainer type="project"> - <email>base-system@gentoo.org</email> - <name>Gentoo Base System</name> -</maintainer> -</pkgmetadata> diff --git a/sys-devel/automake/Manifest b/sys-devel/automake/Manifest deleted file mode 100644 index 35bea52e4170..000000000000 --- a/sys-devel/automake/Manifest +++ /dev/null @@ -1,14 +0,0 @@ -DIST automake-1.10.3.tar.bz2 957505 BLAKE2B e17dc5b4b1b70ed03fb12b48bef9ff7f1dd9d641ace5ba96ace8e76d2aa129deb272a2eebca1df599b2db9ce6e1c7a11ac866dc578aa703a6fb87bf06658db36 SHA512 4f4172c53f31103a93baa794bb498c8b42c1a06e5e0c909063863cdfee3f768016bdecf46e64417a8e362d4c524907b48c0c1b24f510d26aa66bcfd85d0b2598 -DIST automake-1.11.6.tar.xz 1092908 BLAKE2B 17254d81d6920c32aa877b6c892025de8e4060b8bcbe50fff841ada513dd462ddde8fc6838b4976098a812f8fda047e7186cb62cea8175df615dde75a9959144 SHA512 6e4cdf69f07734954f770fd4a7211a8c9dc69fe25a7746bd3c1e01d3139c94cab2900399e87371548833e99687e0d2b59c5e746ab2fdfbc7d47f2c1d439137ba -DIST automake-1.12.6.tar.xz 1400336 BLAKE2B b1d9befdda70f9caab881c1159921ea883a790c24919fcff2a4a03d10cdb3883f7f2ec866b3f64e94b27f0aee771d04cf364eb48734a074259ec00162190d7a2 SHA512 ddcd664ef8f52a44c0adbe908e3a5a2844d8768932211d75dedf262827ffa411b5c3599f93a212f1c979108122cd14bbea5e672218596dd7c934a25d805aae5c -DIST automake-1.13.4.tar.xz 1449608 BLAKE2B 03dee42d65362a6f36e81c83d516c85faba1aac59bdc0d941077fde9be7742da0f57b48d678169e7a0e8b652c3ef46c314cdd3efb0fc489c389852fed1c39a02 SHA512 c9b145c1b822a4d83f2899f4280a76ccae932301b273f4c9718dc7f53161aa03dc1be2c1fb1a61083c54186e1908ae2c8284250aa1d8f6dea484767aca1344d3 -DIST automake-1.14.1.tar.xz 1488984 BLAKE2B a4c9b1f2c5ca35fba62e57423be2b6c060c63df8198d06a904a236745053072cb14ca4b333fb6cf370ef73378ee8771f4c10bcc111dcbd69e40f75abc16475fa SHA512 5de971159dfca2ec74c3c9a2f1368331efc437b146d675740c8735fcb0d32a30d0560fd29df64c3279efdf9278152c82a9ff09040b3e64d84743aaf25b26ce69 -DIST automake-1.15.1.tar.xz 1509496 BLAKE2B e6ade31089f969140472004cd9854318470228c64e4f8e829d48c5379f62d2c5f8ef9509131c577653e81868d94544ecf6520f86b5d582ebb6ed65c832039f30 SHA512 02f661b2676f1d44334ce1c7188f9913a6874bf46ba487708ad8090ad57905f14aead80fefed815e21effacfbb925e23b944ea7dd32563dca39c1a4174eda688 -DIST automake-1.16.2.tar.xz 1545912 BLAKE2B 88e12fc7792c1a3a9c3b9095760145c2ebf3799602320efe5885a0cac16ced2cfb95865abf0a96b6969aa4652eb2b3d2ac8dae550d721392be45fc10c2458b67 SHA512 a4aa0e41ceaa7df5bc303a6004597fb158f4198594017cd2c586fd9f5a29233e081766bf22b7e4ef0d4c8c3d45a8591009427efa319b362922a958ac1ef6e27b -DIST automake-1.16.3.tar.xz 1590708 BLAKE2B ab6001a1b09e171ec83bac07155a77ab0fc29f5185116616aa3080b27e8bbf759472cd0dfb75630b26f7ad8d0741e668662d00b370ef79cf5ef6c62e945c94da SHA512 7265aeb7f82a8a205761d76e6ade7b7e97831c283349fd80f86e511f4b0b3e17f429d1506fca84c76079f63781e5dbf5ca81455d6bf6cda27d2e5c3d23b0d1aa -DIST automake-1.4-p6.tar.gz 375060 BLAKE2B 681c70a2932ae1697d0b9907c8a8d12ed0d506be4a2812dff93af7c3b659ee1ed24a97f0a653f9a49c0d4a78a70965482b39f1297e9f6d6099d3857a2d451f69 SHA512 3f3235e68ab6703668deac015926124c7eeeea6925e830c6820cb156f15f8ee3febd0fd0cc2ab4f4b5c405b528e4ce12b2459347f62ed6a1a862bc9969163d9e -DIST automake-1.5.tar.gz 526934 BLAKE2B 4b613c81f933d550cc9e5e40dd9ce1160f49c388f4e9292b1a8843b0f4cfc57d72a3dc10bce03260cffa61ab8d67a5b27d781bd7a4c2d842764135158dc2b54f SHA512 b9dbece18935b6c08f7d17c456b0359a17362dc030692629cf5d66db675e46a5f24d60dfd20a50780e4096163454f1922d4281c4bb7af336d61e527b579e3bfc -DIST automake-1.6.3.tar.bz2 476275 BLAKE2B 5d0b7f69cbf9fda3b1f1426548fae45c631375898568b442cc5d3561a618ad3f15b6103f55539487dcbf4088a6f75887dce5d00851bc4c09c5db45012d6bc2f1 SHA512 8407ea7d51a238622326d89c22777050c2a49d456e3e33c53985f40e4108094ef149693568d926cd1e9b2ddbdb5693c0d0ec6220e0f7bbae4341b6be9f0d060f -DIST automake-1.7.9.tar.bz2 577705 BLAKE2B 0fdd9eec855f79dba2067374d2fb902d92fa4c2ec1e3fe292376383b3f8cef62799d880610af51b7b31b4a17812b9cd25d1bbc8687fd30ee98de88d4e7625f53 SHA512 372f326cdf9c893a016473b959f0d3b92a7a82a13978e3950a887a79c93856a635549ebc63945faafba30b8be6db1c4cd68385f7dfe1cbb36386400acb2aa7a2 -DIST automake-1.8.5.tar.bz2 663182 BLAKE2B a1488fe8653517d16e69e64655829119283ae9f49d5a29c4886100197fb08d6893abf2701000125fcbaa9923c76a2466de25e056ffcf856eb2878c34284c00b6 SHA512 862f9fe8dd4f0fd51b97d80b767304b982d9c9307bf66933298187bf121f5c827f0b4880eab92f07d16e0c1d41ff5179923c7ae8d8aabd635db8574d4a3021b0 -DIST automake-1.9.6.tar.bz2 765505 BLAKE2B 078d4dff44be18d93a8b1b30367a6010fff0be890a61a23926910ac2d92ac87672e7fec8f3548815eaa72310b3c4e042ce0f5df0250423446b39924eee4d044b SHA512 6aa8824876003bcac804e88d58f014a2449c7e1d824e46b5e971d3e2d070bc6ac0a3881e8eaae12e2f7f310c6b81dfb83ad4647d58785fc7e6759aa37478784e diff --git a/sys-devel/automake/automake-1.10.3-r3.ebuild b/sys-devel/automake/automake-1.10.3-r3.ebuild deleted file mode 100644 index a85f4c5a1e3b..000000000000 --- a/sys-devel/automake/automake-1.10.3-r3.ebuild +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DESCRIPTION="Used to generate Makefile.in from Makefile.am" -HOMEPAGE="https://www.gnu.org/software/automake/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -# Use Gentoo versioning for slotting. -SLOT="${PV:0:4}" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86" -IUSE="" -RESTRICT="test" - -RDEPEND="dev-lang/perl - >=sys-devel/automake-wrapper-10 - >=sys-devel/autoconf-2.69:* - sys-devel/gnuconfig" -DEPEND="${RDEPEND} - sys-apps/help2man" -BDEPEND="app-arch/gzip" - -PATCHES=( - "${FILESDIR}"/${PN}-1.10-perl-5.16.patch #424453 - "${FILESDIR}"/${PN}-1.11-install-sh-avoid-low-risk-race-in-tmp.patch - "${FILESDIR}"/${PN}-1.13-perl-escape-curly-bracket-r1.patch -) - -src_prepare() { - default - export WANT_AUTOCONF=2.5 -} - -# 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 || die - - # 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 - - # SLOT the docs and junk - local x - for x in aclocal automake ; do - help2man "perl -Ilib ${x}" > ${x}-${SLOT}.1 - doman ${x}-${SLOT}.1 - rm -f "${ED}"/usr/bin/${x} - done - - # remove all config.guess and config.sub files replacing them - # w/a symlink to a specific gnuconfig version - 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.11.6-r3.ebuild b/sys-devel/automake/automake-1.11.6-r3.ebuild deleted file mode 100644 index 8b96c4f83141..000000000000 --- a/sys-devel/automake/automake-1.11.6-r3.ebuild +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DESCRIPTION="Used to generate Makefile.in from Makefile.am" -HOMEPAGE="https://www.gnu.org/software/automake/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" - -LICENSE="GPL-2" -# Use Gentoo versioning for slotting. -SLOT="${PV:0:4}" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" -IUSE="" -RESTRICT="test" - -RDEPEND="dev-lang/perl - >=sys-devel/automake-wrapper-10 - >=sys-devel/autoconf-2.69:* - sys-devel/gnuconfig" -DEPEND="${RDEPEND} - sys-apps/help2man" -BDEPEND="app-arch/gzip" - -PATCHES=( - "${FILESDIR}"/${PN}-1.10-perl-5.16.patch #424453 - "${FILESDIR}"/${PN}-1.11-install-sh-avoid-low-risk-race-in-tmp.patch - "${FILESDIR}"/${PN}-1.13-perl-escape-curly-bracket-r1.patch -) - -src_prepare() { - default - export WANT_AUTOCONF=2.5 - export HELP2MAN=true - sed -i -e "/APIVERSION=/s:=.*:=${SLOT}:" configure || die - export TZ="UTC" #589138 -} - -src_compile() { - default - - local x - for x in aclocal automake; do - help2man "perl -Ilib ${x}" > doc/${x}-${SLOT}.1 - done -} - -# 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 || die - - # 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/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.12.6-r2.ebuild b/sys-devel/automake/automake-1.12.6-r2.ebuild deleted file mode 100644 index c5b185148183..000000000000 --- a/sys-devel/automake/automake-1.12.6-r2.ebuild +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DESCRIPTION="Used to generate Makefile.in from Makefile.am" -HOMEPAGE="https://www.gnu.org/software/automake/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" - -LICENSE="GPL-2" -# Use Gentoo versioning for slotting. -SLOT="${PV:0:4}" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86" -IUSE="" -RESTRICT="test" - -RDEPEND="dev-lang/perl - >=sys-devel/automake-wrapper-10 - >=sys-devel/autoconf-2.69:* - sys-devel/gnuconfig" -DEPEND="${RDEPEND} - sys-apps/help2man" -BDEPEND="app-arch/gzip" - -PATCHES=( - "${FILESDIR}"/${PN}-1.13-perl-escape-curly-bracket-r1.patch - "${FILESDIR}"/${PN}-1.14-install-sh-avoid-low-risk-race-in-tmp.patch -) - -src_prepare() { - default - export WANT_AUTOCONF=2.5 - sed -i -e "/APIVERSION=/s:=.*:=${SLOT}:" configure || die -} - -# 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 || die - - # 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.13.4-r2.ebuild b/sys-devel/automake/automake-1.13.4-r2.ebuild deleted file mode 100644 index 286477158c2a..000000000000 --- a/sys-devel/automake/automake-1.13.4-r2.ebuild +++ /dev/null @@ -1,90 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DESCRIPTION="Used to generate Makefile.in from Makefile.am" -HOMEPAGE="https://www.gnu.org/software/automake/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" - -LICENSE="GPL-2" -# Use Gentoo versioning for slotting. -SLOT="${PV:0:4}" -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="" -RESTRICT="test" - -RDEPEND="dev-lang/perl - >=sys-devel/automake-wrapper-10 - >=sys-devel/autoconf-2.69:* - sys-devel/gnuconfig" -DEPEND="${RDEPEND} - sys-apps/help2man" -BDEPEND="app-arch/gzip" - -PATCHES=( - "${FILESDIR}"/${PN}-1.13-dyn-ithreads.patch - "${FILESDIR}"/${PN}-1.13-perl-escape-curly-bracket-r1.patch - "${FILESDIR}"/${PN}-1.13-hash-order-workaround.patch - "${FILESDIR}"/${PN}-1.14-install-sh-avoid-low-risk-race-in-tmp.patch -) - -src_prepare() { - default - export WANT_AUTOCONF=2.5 - sed -i -e "/APIVERSION=/s:=.*:=${SLOT}:" configure || die -} - -# 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 || die - - # 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.14.1-r2.ebuild b/sys-devel/automake/automake-1.14.1-r2.ebuild deleted file mode 100644 index d9af1685d569..000000000000 --- a/sys-devel/automake/automake-1.14.1-r2.ebuild +++ /dev/null @@ -1,107 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -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 - -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}" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="" -RESTRICT="test" - -RDEPEND="dev-lang/perl - >=sys-devel/automake-wrapper-10 - >=sys-devel/autoconf-2.69:* - sys-devel/gnuconfig" -DEPEND="${RDEPEND} - sys-apps/help2man" -BDEPEND="app-arch/gzip" - -PATCHES=( - "${FILESDIR}"/${PN}-1.14-gzip-fix.patch - "${FILESDIR}"/${PN}-1.14-install-sh-avoid-low-risk-race-in-tmp.patch - "${FILESDIR}"/${PN}-1.15-perl-escape-curly-bracket.patch -) - -S="${WORKDIR}/${MY_P}" - -src_prepare() { - default - export WANT_AUTOCONF=2.5 - 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 -} - -# 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 || die - - # 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.15.1-r2.ebuild b/sys-devel/automake/automake-1.15.1-r2.ebuild deleted file mode 100644 index 61626303e82b..000000000000 --- a/sys-devel/automake/automake-1.15.1-r2.ebuild +++ /dev/null @@ -1,111 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -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 ~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="" -RESTRICT="test" - -RDEPEND="dev-lang/perl - >=sys-devel/automake-wrapper-10 - >=sys-devel/autoconf-2.69:* - sys-devel/gnuconfig" -DEPEND="${RDEPEND} - sys-apps/help2man" -BDEPEND="app-arch/gzip" - -PATCHES=( "${FILESDIR}"/${PN}-1.15-install-sh-avoid-low-risk-race-in-tmp.patch ) - -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 -} - -# 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 || die - - # 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.2-r1.ebuild b/sys-devel/automake/automake-1.16.2-r1.ebuild deleted file mode 100644 index bd0de0291096..000000000000 --- a/sys-devel/automake/automake-1.16.2-r1.ebuild +++ /dev/null @@ -1,133 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7,8,9} ) - -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 - "${FILESDIR}"/automake-1.16.2-skip-tags-lisp-space-without-etags.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.3-r1.ebuild b/sys-devel/automake/automake-1.16.3-r1.ebuild deleted file mode 100644 index 0012a71abf81..000000000000 --- 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_{7,8,9} ) - -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.4_p6-r2.ebuild b/sys-devel/automake/automake-1.4_p6-r2.ebuild deleted file mode 100644 index 47f6590cfc3b..000000000000 --- a/sys-devel/automake/automake-1.4_p6-r2.ebuild +++ /dev/null @@ -1,87 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -MY_P="${P/_/-}" -DESCRIPTION="Used to generate Makefile.in from Makefile.am" -HOMEPAGE="https://www.gnu.org/software/automake/" -SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz" - -LICENSE="GPL-2" -# Use Gentoo versioning for slotting. -SLOT="${PV:0:3}" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86" -IUSE="" - -RDEPEND="dev-lang/perl - >=sys-devel/automake-wrapper-10 - >=sys-devel/autoconf-2.69:* - sys-devel/gnuconfig" -DEPEND="${RDEPEND}" - -S="${WORKDIR}/${MY_P}" - -PATCHES=( - "${FILESDIR}"/${PN}-1.4-nls-nuisances.patch #121151 - "${FILESDIR}"/${PN}-1.4-libtoolize.patch - "${FILESDIR}"/${PN}-1.4-subdirs-89656.patch - "${FILESDIR}"/${PN}-1.4-ansi2knr-stdlib.patch - "${FILESDIR}"/${PN}-1.4-CVE-2009-4029.patch #295357 - "${FILESDIR}"/${PN}-1.4-perl-5.11.patch - "${FILESDIR}"/${PN}-1.4-perl-dyn-call.patch -) - -src_prepare() { - default - export WANT_AUTOCONF=2.5 - sed -i 's:error\.test::' tests/Makefile.in #79529 -} - -# 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 || die - - # 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() { - emake install DESTDIR="${D}" \ - pkgdatadir=/usr/share/automake-${SLOT} \ - m4datadir=/usr/share/aclocal-${SLOT} - slot_info_pages - rm -f "${ED}"/usr/bin/{aclocal,automake} || die - dosym automake-${SLOT} /usr/share/automake - - dodoc NEWS README THANKS TODO AUTHORS ChangeLog - - # 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 -} diff --git a/sys-devel/automake/automake-1.5-r2.ebuild b/sys-devel/automake/automake-1.5-r2.ebuild deleted file mode 100644 index 740ac091ff4c..000000000000 --- a/sys-devel/automake/automake-1.5-r2.ebuild +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DESCRIPTION="Used to generate Makefile.in from Makefile.am" -HOMEPAGE="https://www.gnu.org/software/automake/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" - -LICENSE="GPL-2" -# Use Gentoo versioning for slotting. -SLOT="${PV:0:3}" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86" -IUSE="" - -RDEPEND="dev-lang/perl - >=sys-devel/automake-wrapper-10 - >=sys-devel/autoconf-2.69:* - sys-devel/gnuconfig" -DEPEND="${RDEPEND}" - -PATCHES=( - "${FILESDIR}"/automake-1.4-nls-nuisances.patch #121151 - "${FILESDIR}"/${P}-target_hook.patch - "${FILESDIR}"/${P}-slot.patch - "${FILESDIR}"/${P}-test-fixes.patch #79505 - "${FILESDIR}"/${PN}-1.10-ccnoco-ldflags.patch #203914 - "${FILESDIR}"/${P}-CVE-2009-4029.patch #295357 - "${FILESDIR}"/${PN}-1.5-perl-5.11.patch -) - -src_prepare() { - default - export WANT_AUTOCONF=2.5 -} - -# 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 || die - - # 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 - - local x - for x in aclocal automake ; do - mv "${ED}"/usr/bin/${x}{,-${SLOT}} || die - mv "${ED}"/usr/share/${x}{,-${SLOT}} || die - done - - # remove all config.guess and config.sub files replacing them - # w/a symlink to a specific gnuconfig version - for x in guess sub ; do - dosym ../gnuconfig/config.${x} \ - /usr/share/${PN}-${SLOT}/config.${x} - done -} diff --git a/sys-devel/automake/automake-1.6.3-r2.ebuild b/sys-devel/automake/automake-1.6.3-r2.ebuild deleted file mode 100644 index 2f2920295686..000000000000 --- a/sys-devel/automake/automake-1.6.3-r2.ebuild +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DESCRIPTION="Used to generate Makefile.in from Makefile.am" -HOMEPAGE="https://www.gnu.org/software/automake/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -# Use Gentoo versioning for slotting. -SLOT="${PV:0:3}" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86" -IUSE="" - -RDEPEND="dev-lang/perl - >=sys-devel/automake-wrapper-10 - >=sys-devel/autoconf-2.69:* - sys-devel/gnuconfig" -DEPEND="${RDEPEND}" - -PATCHES=( - "${FILESDIR}"/${P}-test-fixes.patch #159557 - "${FILESDIR}"/${PN}-1.10-ccnoco-ldflags.patch #203914 - "${FILESDIR}"/${PN}-1.5-CVE-2009-4029.patch #295357 - "${FILESDIR}"/${PN}-1.5-perl-5.11.patch -) - -src_prepare() { - default - export WANT_AUTOCONF=2.5 -} - -# 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 || die - - # 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 -f "${ED}"/usr/bin/{aclocal,automake} || 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 -} diff --git a/sys-devel/automake/automake-1.7.9-r3.ebuild b/sys-devel/automake/automake-1.7.9-r3.ebuild deleted file mode 100644 index 8ec3a1b1d3a4..000000000000 --- a/sys-devel/automake/automake-1.7.9-r3.ebuild +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DESCRIPTION="Used to generate Makefile.in from Makefile.am" -HOMEPAGE="https://www.gnu.org/software/automake/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -# Use Gentoo versioning for slotting. -SLOT="${PV:0:3}" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86" -IUSE="" - -RDEPEND="dev-lang/perl - >=sys-devel/automake-wrapper-10 - >=sys-devel/autoconf-2.69:* - sys-devel/gnuconfig" -DEPEND="${RDEPEND}" - -PATCHES=( - "${FILESDIR}"/${P}-infopage-namechange.patch - "${FILESDIR}"/${P}-test-fixes.patch - "${FILESDIR}"/${PN}-1.9.6-subst-test.patch #222225 - "${FILESDIR}"/${P}-libtool-2.patch #257544 - "${FILESDIR}"/${PN}-1.10-ccnoco-ldflags.patch #203914 - "${FILESDIR}"/${PN}-1.5-CVE-2009-4029.patch #295357 - "${FILESDIR}"/${PN}-1.5-perl-5.11.patch -) - -src_prepare() { - default - export WANT_AUTOCONF=2.5 -} - -# 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 || die - - # 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 -f "${ED}"/usr/bin/{aclocal,automake} || 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 -} diff --git a/sys-devel/automake/automake-1.8.5-r5.ebuild b/sys-devel/automake/automake-1.8.5-r5.ebuild deleted file mode 100644 index 6c6447a52c01..000000000000 --- a/sys-devel/automake/automake-1.8.5-r5.ebuild +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DESCRIPTION="Used to generate Makefile.in from Makefile.am" -HOMEPAGE="https://www.gnu.org/software/automake/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -# Use Gentoo versioning for slotting. -SLOT="${PV:0:3}" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86" -IUSE="" - -RDEPEND="dev-lang/perl - >=sys-devel/automake-wrapper-10 - >=sys-devel/autoconf-2.69:* - sys-devel/gnuconfig" -DEPEND="${RDEPEND}" - -PATCHES=( - "${FILESDIR}"/${PN}-1.8.2-infopage-namechange.patch - "${FILESDIR}"/${P}-test-fixes.patch #159557 - "${FILESDIR}"/${PN}-1.9.6-aclocal7-test-sleep.patch #197366 - "${FILESDIR}"/${PN}-1.9.6-subst-test.patch #222225 - "${FILESDIR}"/${PN}-1.10-ccnoco-ldflags.patch #203914 - "${FILESDIR}"/${P}-CVE-2009-4029.patch #295357 - "${FILESDIR}"/${PN}-1.8-perl-5.11.patch -) - -src_prepare() { - default - export WANT_AUTOCONF=2.5 -} - -# 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 || die - - # 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 -f "${ED}"/usr/bin/{aclocal,automake} || 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 -} diff --git a/sys-devel/automake/automake-1.9.6-r5.ebuild b/sys-devel/automake/automake-1.9.6-r5.ebuild deleted file mode 100644 index ef506d0fa073..000000000000 --- a/sys-devel/automake/automake-1.9.6-r5.ebuild +++ /dev/null @@ -1,87 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DESCRIPTION="Used to generate Makefile.in from Makefile.am" -HOMEPAGE="https://www.gnu.org/software/automake/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -# Use Gentoo versioning for slotting. -SLOT="${PV:0:3}" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86" -IUSE="" -RESTRICT="test" - -RDEPEND="dev-lang/perl - >=sys-devel/automake-wrapper-10 - >=sys-devel/autoconf-2.69:* - >=sys-apps/texinfo-4.7 - sys-devel/gnuconfig" -DEPEND="${RDEPEND} - sys-apps/help2man" - -PATCHES=( - "${FILESDIR}"/${PN}-1.9.6-infopage-namechange-r1.patch - "${FILESDIR}"/${P}-include-dir-prefix-r1.patch #107435 - "${FILESDIR}"/${P}-ignore-comments-r1.patch #126388 - "${FILESDIR}"/${P}-aclocal7-test-sleep.patch #197366 - "${FILESDIR}"/${PN}-1.9.6-subst-test.patch #222225 - "${FILESDIR}"/${PN}-1.10-ccnoco-ldflags.patch #203914 - "${FILESDIR}"/${PN}-1.8.5-CVE-2009-4029.patch #295357 - "${FILESDIR}"/${PN}-1.8-perl-5.11.patch -) - -src_prepare() { - default - export WANT_AUTOCONF=2.5 -} - -# 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 || die - - # 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 - - local x - for x in aclocal automake ; do - help2man "perl -Ilib ${x}" > ${x}-${SLOT}.1 - doman ${x}-${SLOT}.1 - rm -f "${ED}"/usr/bin/${x} - done - - # remove all config.guess and config.sub files replacing them - # w/a symlink to a specific gnuconfig version - for x in guess sub ; do - dosym ../gnuconfig/config.${x} \ - /usr/share/${PN}-${SLOT}/config.${x} - done -} diff --git a/sys-devel/automake/automake-9999.ebuild b/sys-devel/automake/automake-9999.ebuild deleted file mode 100644 index d7b666cfe551..000000000000 --- a/sys-devel/automake/automake-9999.ebuild +++ /dev/null @@ -1,130 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7,8,9} ) - -inherit python-any-r1 - -if [[ ${PV} == 9999 ]] ; then - EGIT_REPO_URI="https://git.savannah.gnu.org/r/${PN}.git" - inherit git-r3 -else - 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" - 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" - 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 -) -# All patches have been submitted upstream. - -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/files/automake-1.10-ccnoco-ldflags.patch b/sys-devel/automake/files/automake-1.10-ccnoco-ldflags.patch deleted file mode 100644 index f48c6304bdc2..000000000000 --- a/sys-devel/automake/files/automake-1.10-ccnoco-ldflags.patch +++ /dev/null @@ -1,35 +0,0 @@ -http://bugs.gentoo.org/203914 - -From 6e86514729c6dccb6213fdde8d93d7061c8108a5 Mon Sep 17 00:00:00 2001 -From: Ralf Wildenhues <Ralf.Wildenhues@gmx.de> -Date: Mon, 7 Jan 2008 21:53:38 +0100 -Subject: [PATCH] Fix ccnoco.test for uncommon LDFLAGS settings. - -* tests/ccnoco.test (Mycomp): Use a tighter match for -c -o, -to avoid matching for example `LDFLAGS=-Wl,--sort-common'. -* THANKS: Update. -Report and analysis by Carsten Lohrke and Mike Frysinger. ---- - ChangeLog | 7 +++++++ - THANKS | 1 + - tests/ccnoco.test | 6 +++--- - 3 files changed, 11 insertions(+), 3 deletions(-) - -diff --git a/tests/ccnoco.test b/tests/ccnoco.test -index 8b37fe8..ca75922 100755 ---- a/tests/ccnoco.test -+++ b/tests/ccnoco.test -@@ -57,8 +57,8 @@ END - cat > Mycomp << 'END' - #!/bin/sh - --case "$@" in -- *-c*-o* | *-o*-c*) -+case " "$* in -+ *\ -c*\ -o* | *\ -o*\ -c*) - exit 1 - ;; - esac --- -1.6.3 - diff --git a/sys-devel/automake/files/automake-1.10-perl-5.16.patch b/sys-devel/automake/files/automake-1.10-perl-5.16.patch deleted file mode 100644 index 19fe249e0c00..000000000000 --- a/sys-devel/automake/files/automake-1.10-perl-5.16.patch +++ /dev/null @@ -1,128 +0,0 @@ -https://bugs.gentoo.org/424453 - -From 6bf58a59a1f3803e57e3f0378aa9344686707b75 Mon Sep 17 00:00:00 2001 -From: Stefano Lattarini <stefano.lattarini@gmail.com> -Date: Mon, 28 May 2012 13:32:03 +0200 -Subject: [PATCH] aclocal: declare function prototypes, do not use '&' in - function calls - -This change will also fix automake bug#11543 (from a report by Matt -Burgess). - -* aclocal.in: Declare prototypes for almost all functions early, before -any actual function definition (but omit the prototype for the dynamically -generated '&search' function). Add prototypes to any function definition. -Remove '&' from function invocations (i.e., simply use "func(ARGS..)" -instead of "&func(ARGS...)"). -* THANKS, NEWS: Update. - -Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> ---- - NEWS | 4 ++++ - THANKS | 1 + - aclocal.in | 42 ++++++++++++++++++++++++++++++++++-------- - 3 files changed, 39 insertions(+), 8 deletions(-) - -diff --git a/aclocal.in b/aclocal.in -index dfb851b..e8855d5 100644 ---- a/aclocal.in -+++ b/aclocal.in -@@ -152,8 +152,34 @@ my $erase_me; - - ################################################################ - -+# Prototypes for all subroutines. -+ -+sub unlink_tmp (;$); -+sub xmkdir_p ($); -+sub check_acinclude (); -+sub reset_maps (); -+sub install_file ($$); -+sub list_compare (\@\@); -+sub scan_m4_dirs ($@); -+sub scan_m4_files (); -+sub add_macro ($); -+sub scan_configure_dep ($); -+sub add_file ($); -+sub scan_file ($$$); -+sub strip_redundant_includes (%); -+sub trace_used_macros (); -+sub scan_configure (); -+sub write_aclocal ($@); -+sub usage ($); -+sub version (); -+sub handle_acdir_option ($$); -+sub parse_arguments (); -+sub parse_ACLOCAL_PATH (); -+ -+################################################################ -+ - # Erase temporary file ERASE_ME. Handle signals. --sub unlink_tmp -+sub unlink_tmp (;$) - { - my ($sig) = @_; - -@@ -350,7 +376,7 @@ sub scan_m4_dirs ($@) - next if $file eq 'aclocal.m4'; - - my $fullfile = File::Spec->canonpath ("$m4dir/$file"); -- &scan_file ($type, $fullfile, 'aclocal'); -+ scan_file ($type, $fullfile, 'aclocal'); - } - closedir (DIR); - } -@@ -361,12 +387,12 @@ sub scan_m4_files () - { - # First, scan configure.ac. It may contain macro definitions, - # or may include other files that define macros. -- &scan_file (FT_USER, $configure_ac, 'aclocal'); -+ scan_file (FT_USER, $configure_ac, 'aclocal'); - - # Then, scan acinclude.m4 if it exists. - if (-f 'acinclude.m4') - { -- &scan_file (FT_USER, 'acinclude.m4', 'aclocal'); -+ scan_file (FT_USER, 'acinclude.m4', 'aclocal'); - } - - # Finally, scan all files in our search paths. -@@ -380,7 +406,7 @@ sub scan_m4_files () - my $search = "sub search {\nmy \$found = 0;\n"; - foreach my $key (reverse sort keys %map) - { -- $search .= ('if (/\b\Q' . $key . '\E(?!\w)/) { & add_macro ("' . $key -+ $search .= ('if (/\b\Q' . $key . '\E(?!\w)/) { add_macro ("' . $key - . '"); $found = 1; }' . "\n"); - } - $search .= "return \$found;\n};\n"; -@@ -403,7 +429,7 @@ sub add_macro ($) - - verb "saw macro $macro"; - $macro_seen{$macro} = 1; -- &add_file ($map{$macro}); -+ add_file ($map{$macro}); - } - - # scan_configure_dep ($file) -@@ -465,7 +491,7 @@ sub scan_configure_dep ($) - } - - add_macro ($_) foreach (@rlist); -- &scan_configure_dep ($_) foreach @ilist; -+ scan_configure_dep ($_) foreach @ilist; - } - - # add_file ($FILE) -@@ -931,7 +957,7 @@ EOF - } - - # Print version and exit. --sub version() -+sub version () - { - print <<EOF; - aclocal (GNU $PACKAGE) $VERSION --- -2.1.3 - diff --git a/sys-devel/automake/files/automake-1.11-install-sh-avoid-low-risk-race-in-tmp.patch b/sys-devel/automake/files/automake-1.11-install-sh-avoid-low-risk-race-in-tmp.patch deleted file mode 100644 index c435b9004f8d..000000000000 --- a/sys-devel/automake/files/automake-1.11-install-sh-avoid-low-risk-race-in-tmp.patch +++ /dev/null @@ -1,77 +0,0 @@ -From: Pavel Raiskup <praiskup@redhat.com> -Date: Sat, 15 Aug 2015 04:40:57 -0400 -Subject: install-sh: avoid (low risk) race in /tmp - -Ensure that nobody can cross privilege boundaries by pre-creating -symlink on '$tmpdir' path. - -Just testing 'mkdir -p' by creating '/tmp/ins$RANDOM-$$/d' is not -safe because '/tmp' directory is usually world-writeable and -'/tmp/ins$RANDOM-$$' content could be pretty easily guessed by -attacker (at least for shells where $RANDOM is not supported). -So, as the first step, create the '/tmp/ins$RANDOM-$$' without -p. -This step would fail early if somebody wanted catch us. - -Note that systems that implement (and have enabled) -fs.protected_symlinks kernel feature are not affected even without -this commit. - -References: -https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=760455 -https://bugzilla.redhat.com/show_bug.cgi?id=1140725 - -* lib/install-sh: Implement safer 'mkdir -p' test by running -'$mkdirprog $mkdir_mode "$tmpdir"' first. -(scriptversion): Bump. - ---- a/lib/install-sh -+++ b/lib/install-sh -@@ -345,34 +345,41 @@ do - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) -+ # $RANDOM is not portable (e.g. dash); use it when possible to -+ # lower collision chance - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ -- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 -+ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 - -+ # As "mkdir -p" follows symlinks and we work in /tmp possibly; so -+ # create the $tmpdir first (and fail if unsuccessful) to make sure -+ # that nobody tries to guess the $tmpdir name. - if (umask $mkdir_umask && -- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 -+ $mkdirprog $mkdir_mode "$tmpdir" && -+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. -- ls_ld_tmpdir=`ls -ld "$tmpdir"` -+ test_tmpdir="$tmpdir/a" -+ ls_ld_tmpdir=`ls -ld "$test_tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && -- $mkdirprog -m$different_mode -p -- "$tmpdir" && { -- ls_ld_tmpdir_1=`ls -ld "$tmpdir"` -+ $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { -+ ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi -- rmdir "$tmpdir/d" "$tmpdir" -+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. -- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null -+ rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null - fi - trap '' 0;; - esac;; diff --git a/sys-devel/automake/files/automake-1.13-dyn-ithreads.patch b/sys-devel/automake/files/automake-1.13-dyn-ithreads.patch deleted file mode 100644 index f790e7724c93..000000000000 --- a/sys-devel/automake/files/automake-1.13-dyn-ithreads.patch +++ /dev/null @@ -1,59 +0,0 @@ -https://bugs.gentoo.org/343439 - -From 182626687f2640609f8eb28ad1b04b078342f2c7 Mon Sep 17 00:00:00 2001 -From: Mike Frysinger <vapier@gentoo.org> -Date: Sat, 12 Jan 2013 00:19:40 -0500 -Subject: [PATCH] ithreads: use runtime (not configure time) detection of perl - threads - -I can't imagine the runtime checks being a big runtime penalty, so there -shouldn't be a need to do the checks at configure check and hardcode the -result in the generated automake. - -With the current system, it means if you change your perl config (build -perl w/threads, build automake, build perl w/out threads), or deploy a -compiled automake package on a different system (build had threads, but -deployed system does not), you get errors when trying to run automake. - -So take the logic from configure.ac and move it to the one place where -PERL_THREADS is used (lib/Automake/Config.in) and do the version/config -checking at runtime. - -* bootstrap.sh (PERL_THREADS): Delete assignment and use in sed. -* configure.ac (am_cv_prog_PERL_ithreads, PERL_THREADS): Delete all code -related to these two variables. -* lib/Automake/Config.in (perl_threads): Initialize to 0, and only set to -1 if the perl version is at least 5.007_002, and useithreads is in Config. - -Copyright-paperwork-exempt: yes -Signed-off-by: Mike Frysinger <vapier@gentoo.org> -Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> ---- - bootstrap.sh | 2 -- - configure.ac | 26 -------------------------- - lib/Automake/Config.in | 9 ++++++++- - 3 files changed, 8 insertions(+), 29 deletions(-) - -diff --git a/lib/Automake/Config.in b/lib/Automake/Config.in -index fe6ef9d..885e74e 100644 ---- a/lib/Automake/Config.in -+++ b/lib/Automake/Config.in -@@ -33,7 +33,14 @@ our $PACKAGE_BUGREPORT = '@PACKAGE_BUGREPORT@'; - our $VERSION = '@VERSION@'; - our $RELEASE_YEAR = '@RELEASE_YEAR@'; - our $libdir = '@datadir@/@PACKAGE@-@APIVERSION@'; --our $perl_threads = @PERL_THREADS@; -+ -+our $perl_threads = 0; -+# We need at least this version for CLONE support. -+if (eval { require 5.007_002; }) -+ { -+ use Config; -+ $perl_threads = $Config{useithreads}; -+ } - - 1; - --- -1.8.0.2 - diff --git a/sys-devel/automake/files/automake-1.13-hash-order-workaround.patch b/sys-devel/automake/files/automake-1.13-hash-order-workaround.patch deleted file mode 100644 index 79b81e6fa407..000000000000 --- a/sys-devel/automake/files/automake-1.13-hash-order-workaround.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/t/primary-prefix-invalid-couples.tap -+++ b/t/primary-prefix-invalid-couples.tap -@@ -186,8 +186,10 @@ grep -v 'dir.* not a legitimate directory' stderr && exit 1 - # Check that the same failures are present without the '--add-missing' - # option. - mv stderr stderr.old -+cat stderr.old | sort > a - AUTOMAKE_fails -d "automake error out on mismatched prefix/primary couples" -+cat stderr | sort > b - command_ok_ "... and with the same diagnostic of 'automake -a'" \ -- diff stderr.old stderr -+ diff a b - - : diff --git a/sys-devel/automake/files/automake-1.13-perl-escape-curly-bracket-r1.patch b/sys-devel/automake/files/automake-1.13-perl-escape-curly-bracket-r1.patch deleted file mode 100644 index bf8819adcf4c..000000000000 --- a/sys-devel/automake/files/automake-1.13-perl-escape-curly-bracket-r1.patch +++ /dev/null @@ -1,37 +0,0 @@ -http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21001 - -From 34163794a58b5bd91c5d6bd9adf5437571c7a479 Mon Sep 17 00:00:00 2001 -From: Pavel Raiskup <praiskup@redhat.com> -Date: Tue, 7 Jul 2015 10:54:24 +0200 -Subject: [PATCH] bin/automake: escape '{' in regexp pattern - -Based on perlre(1) documentation: -.. in Perl v5.26, literal uses of a curly bracket will be required -to be escaped, say by preceding them with a backslash ("\{" ) or -enclosing them within square brackets ("[{]") .. - -References: -https://bugzilla.redhat.com/1239379 - -* bin/automake.in (substitute_ac_subst_variables): Escape the -occurrence of '{' character. ---- - bin/automake.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/bin/automake.in b/bin/automake.in -index 0c29184..c294ced 100644 ---- a/automake.in -+++ b/automake.in -@@ -3898,7 +3898,7 @@ sub substitute_ac_subst_variables_worker - sub substitute_ac_subst_variables ($) - { - my ($text) = @_; -- $text =~ s/\${([^ \t=:+{}]+)}/&substitute_ac_subst_variables_worker ($1)/ge; -+ $text =~ s/\$\{([^ \t=:+{}]+)}/&substitute_ac_subst_variables_worker ($1)/ge; - return $text; - } - --- -2.1.0 - diff --git a/sys-devel/automake/files/automake-1.14-gzip-fix.patch b/sys-devel/automake/files/automake-1.14-gzip-fix.patch deleted file mode 100644 index 39c201aba656..000000000000 --- a/sys-devel/automake/files/automake-1.14-gzip-fix.patch +++ /dev/null @@ -1,67 +0,0 @@ -commit 749468ac63042820bc3da85ece5bed64b0c15d62 -Author: Paul Eggert <eggert at> -Date: Mon Mar 28 19:44:19 2016 -0700 - - automake: port better to future gzip - - * lib/am/distdir.am (dist-gzip, dist-shar, distcheck): - Port better to future versions of gzip, which are planned to - deprecate the GZIP environment variable (Bug#20132). - -diff --git a/lib/am/distdir.am b/lib/am/distdir.am -index d4dd8cc9b..87c6730f5 100644 ---- a/lib/am/distdir.am -+++ b/lib/am/distdir.am -@@ -309,6 +309,16 @@ endif %?TOPDIR_P% - ## We order DIST_TARGETS by expected duration of the compressors, - ## slowest first, for better parallelism in "make dist". Do not - ## reorder DIST_ARCHIVES, users may expect gzip to be first. -+## -+## Traditionally, gzip prepended the contents of the GZIP environment -+## variable to its arguments, and the commands below formerly used -+## this by invoking 'GZIP=$(GZIP_ENV) gzip'. The GZIP environment -+## variable is now considered to be obsolescent, so the commands below -+## now use 'eval GZIP= gzip $(GZIP_ENV)' instead; this should work -+## with both older and newer gzip implementations. The 'eval' is to -+## support makefile assignments like 'GZIP_ENV = "-9 -n"' that quote -+## the GZIP_ENV right-hand side because that was needed with the -+## former invocation pattern. - - if %?TOPDIR_P% - -@@ -316,7 +326,7 @@ if %?TOPDIR_P% - GZIP_ENV = --best - .PHONY: dist-gzip - dist-gzip: distdir -- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz -+ tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz - $(am__post_remove_distdir) - - ?BZIP2?DIST_ARCHIVES += $(distdir).tar.bz2 -@@ -352,7 +362,7 @@ dist-shar: distdir - @echo WARNING: "Support for shar distribution archives is" \ - "deprecated." >&2 - @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 -- shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz -+ shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz - $(am__post_remove_distdir) - - ?ZIP?DIST_ARCHIVES += $(distdir).zip -@@ -412,7 +422,7 @@ endif %?SUBDIRS% - distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ -- GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ -+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lz*) \ -@@ -422,7 +432,7 @@ distcheck: dist - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ -- GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ -+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac diff --git a/sys-devel/automake/files/automake-1.14-install-sh-avoid-low-risk-race-in-tmp.patch b/sys-devel/automake/files/automake-1.14-install-sh-avoid-low-risk-race-in-tmp.patch deleted file mode 100644 index 679370686aaf..000000000000 --- a/sys-devel/automake/files/automake-1.14-install-sh-avoid-low-risk-race-in-tmp.patch +++ /dev/null @@ -1,77 +0,0 @@ -From: Pavel Raiskup <praiskup@redhat.com> -Date: Sat, 15 Aug 2015 04:40:57 -0400 -Subject: install-sh: avoid (low risk) race in /tmp - -Ensure that nobody can cross privilege boundaries by pre-creating -symlink on '$tmpdir' path. - -Just testing 'mkdir -p' by creating '/tmp/ins$RANDOM-$$/d' is not -safe because '/tmp' directory is usually world-writeable and -'/tmp/ins$RANDOM-$$' content could be pretty easily guessed by -attacker (at least for shells where $RANDOM is not supported). -So, as the first step, create the '/tmp/ins$RANDOM-$$' without -p. -This step would fail early if somebody wanted catch us. - -Note that systems that implement (and have enabled) -fs.protected_symlinks kernel feature are not affected even without -this commit. - -References: -https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=760455 -https://bugzilla.redhat.com/show_bug.cgi?id=1140725 - -* lib/install-sh: Implement safer 'mkdir -p' test by running -'$mkdirprog $mkdir_mode "$tmpdir"' first. -(scriptversion): Bump. - ---- a/lib/install-sh -+++ b/lib/install-sh -@@ -345,34 +345,41 @@ do - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) -+ # $RANDOM is not portable (e.g. dash); use it when possible to -+ # lower collision chance - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ -- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 -+ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 - -+ # As "mkdir -p" follows symlinks and we work in /tmp possibly; so -+ # create the $tmpdir first (and fail if unsuccessful) to make sure -+ # that nobody tries to guess the $tmpdir name. - if (umask $mkdir_umask && -- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 -+ $mkdirprog $mkdir_mode "$tmpdir" && -+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. -- ls_ld_tmpdir=`ls -ld "$tmpdir"` -+ test_tmpdir="$tmpdir/a" -+ ls_ld_tmpdir=`ls -ld "$test_tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && -- $mkdirprog -m$different_mode -p -- "$tmpdir" && { -- ls_ld_tmpdir_1=`ls -ld "$tmpdir"` -+ $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { -+ ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi -- rmdir "$tmpdir/d" "$tmpdir" -+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. -- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null -+ rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null - fi - trap '' 0;; - esac;; diff --git a/sys-devel/automake/files/automake-1.15-install-sh-avoid-low-risk-race-in-tmp.patch b/sys-devel/automake/files/automake-1.15-install-sh-avoid-low-risk-race-in-tmp.patch deleted file mode 100644 index 1fabdd5fb3e1..000000000000 --- a/sys-devel/automake/files/automake-1.15-install-sh-avoid-low-risk-race-in-tmp.patch +++ /dev/null @@ -1,82 +0,0 @@ -From: Pavel Raiskup <praiskup@redhat.com> -Date: Sat, 15 Aug 2015 04:40:57 -0400 -Subject: install-sh: avoid (low risk) race in /tmp - -Ensure that nobody can cross privilege boundaries by pre-creating -symlink on '$tmpdir' path. - -Just testing 'mkdir -p' by creating '/tmp/ins$RANDOM-$$/d' is not -safe because '/tmp' directory is usually world-writeable and -'/tmp/ins$RANDOM-$$' content could be pretty easily guessed by -attacker (at least for shells where $RANDOM is not supported). -So, as the first step, create the '/tmp/ins$RANDOM-$$' without -p. -This step would fail early if somebody wanted catch us. - -Note that systems that implement (and have enabled) -fs.protected_symlinks kernel feature are not affected even without -this commit. - -References: -https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=760455 -https://bugzilla.redhat.com/show_bug.cgi?id=1140725 - -* lib/install-sh: Implement safer 'mkdir -p' test by running -'$mkdirprog $mkdir_mode "$tmpdir"' first. -(scriptversion): Bump. ---- - lib/install-sh | 23 +++++++++++++++-------- - 1 file changed, 15 insertions(+), 8 deletions(-) - -diff --git a/lib/install-sh b/lib/install-sh -index 0b0fdcb..59990a1 100755 ---- a/lib/install-sh -+++ b/lib/install-sh -@@ -324,34 +324,41 @@ do - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) -+ # $RANDOM is not portable (e.g. dash); use it when possible to -+ # lower collision chance - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ -- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 -+ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 - -+ # As "mkdir -p" follows symlinks and we work in /tmp possibly; so -+ # create the $tmpdir first (and fail if unsuccessful) to make sure -+ # that nobody tries to guess the $tmpdir name. - if (umask $mkdir_umask && -- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 -+ $mkdirprog $mkdir_mode "$tmpdir" && -+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. -- ls_ld_tmpdir=`ls -ld "$tmpdir"` -+ test_tmpdir="$tmpdir/a" -+ ls_ld_tmpdir=`ls -ld "$test_tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && -- $mkdirprog -m$different_mode -p -- "$tmpdir" && { -- ls_ld_tmpdir_1=`ls -ld "$tmpdir"` -+ $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { -+ ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi -- rmdir "$tmpdir/d" "$tmpdir" -+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. -- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null -+ rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null - fi - trap '' 0;; - esac;; diff --git a/sys-devel/automake/files/automake-1.15-perl-escape-curly-bracket.patch b/sys-devel/automake/files/automake-1.15-perl-escape-curly-bracket.patch deleted file mode 100644 index 268548d1e9de..000000000000 --- a/sys-devel/automake/files/automake-1.15-perl-escape-curly-bracket.patch +++ /dev/null @@ -1,37 +0,0 @@ -http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21001 - -From 34163794a58b5bd91c5d6bd9adf5437571c7a479 Mon Sep 17 00:00:00 2001 -From: Pavel Raiskup <praiskup@redhat.com> -Date: Tue, 7 Jul 2015 10:54:24 +0200 -Subject: [PATCH] bin/automake: escape '{' in regexp pattern - -Based on perlre(1) documentation: -.. in Perl v5.26, literal uses of a curly bracket will be required -to be escaped, say by preceding them with a backslash ("\{" ) or -enclosing them within square brackets ("[{]") .. - -References: -https://bugzilla.redhat.com/1239379 - -* bin/automake.in (substitute_ac_subst_variables): Escape the -occurrence of '{' character. ---- - bin/automake.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/bin/automake.in b/bin/automake.in -index 0c29184..c294ced 100644 ---- a/bin/automake.in -+++ b/bin/automake.in -@@ -3898,7 +3898,7 @@ sub substitute_ac_subst_variables_worker - sub substitute_ac_subst_variables - { - my ($text) = @_; -- $text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge; -+ $text =~ s/\$\{([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge; - return $text; - } - --- -2.1.0 - diff --git a/sys-devel/automake/files/automake-1.16.2-fix-instmany-python.sh-test.patch b/sys-devel/automake/files/automake-1.16.2-fix-instmany-python.sh-test.patch deleted file mode 100644 index 5cddb4cfb83f..000000000000 --- a/sys-devel/automake/files/automake-1.16.2-fix-instmany-python.sh-test.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 50daac4f15d207b6b69011b9cdde62b56c1c8b10 Mon Sep 17 00:00:00 2001 -From: Thomas Deutschmann <whissi@gentoo.org> -Date: Fri, 20 Nov 2020 02:17:31 +0100 -Subject: [PATCH 2/2] tests: fix instmany-python.sh: increase limit - -Still failing with 4500 on Gentoo. Passing with 7000... ---- - t/instmany-python.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/t/instmany-python.sh b/t/instmany-python.sh -index dce3594b5..1c482520d 100644 ---- a/t/instmany-python.sh -+++ b/t/instmany-python.sh -@@ -21,7 +21,7 @@ - required='python' - . test-init.sh - --limit=4500 -+limit=7000 - subdir=long_subdir_name_with_many_characters - nfiles=81 - list=$(seq_ 1 $nfiles) --- -2.29.2 - diff --git a/sys-devel/automake/files/automake-1.16.2-fix-py-compile-basedir.sh-test.patch b/sys-devel/automake/files/automake-1.16.2-fix-py-compile-basedir.sh-test.patch deleted file mode 100644 index f49dd253c2d6..000000000000 --- a/sys-devel/automake/files/automake-1.16.2-fix-py-compile-basedir.sh-test.patch +++ /dev/null @@ -1,26 +0,0 @@ -From e3db5b8038a902501a354b6921dcebcb4180f50a Mon Sep 17 00:00:00 2001 -From: Thomas Deutschmann <whissi@gentoo.org> -Date: Fri, 20 Nov 2020 02:13:56 +0100 -Subject: [PATCH 1/2] tests: fix py-compile-basedir.sh: add missing test call - -Fixes: b279a0d46 ("tests: in python tests, do not require .pyo files (for python3)") ---- - t/py-compile-basedir.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/t/py-compile-basedir.sh b/t/py-compile-basedir.sh -index 13a22ff1d..1a16ee2d7 100644 ---- a/t/py-compile-basedir.sh -+++ b/t/py-compile-basedir.sh -@@ -43,7 +43,7 @@ for d in foo foo/bar "$(pwd)/foo" . .. ../foo ''; do - py_installed "$d2/sub/$f.pyc" - files=$(find "$d2" | grep '\.py[co]$') - # with new-enough Python3, there are six files. -- test $(echo "$files" | wc -l) -eq 4 || $(echo "$files" | wc -l) -eq 6 -+ test $(echo "$files" | wc -l) -eq 4 || test $(echo "$files" | wc -l) -eq 6 - case $d2 in - .|..) rm -f $files;; - *) rm -rf "$d2";; --- -2.29.2 - diff --git a/sys-devel/automake/files/automake-1.16.2-py3-compile.patch b/sys-devel/automake/files/automake-1.16.2-py3-compile.patch deleted file mode 100644 index 7924f204ad4f..000000000000 --- a/sys-devel/automake/files/automake-1.16.2-py3-compile.patch +++ /dev/null @@ -1,73 +0,0 @@ -From aa449bd4c836abf0320033c5077259fc760b622d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Sun, 3 Nov 2019 11:51:19 +0100 -Subject: [PATCH] py-compile: Support -OO for py3.5+, and -O&-OO for pypy3 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Michał Górny <mgorny@gentoo.org> ---- - lib/py-compile | 29 +++++++++++++++++++++++++---- - 1 file changed, 25 insertions(+), 4 deletions(-) - -diff --git a/lib/py-compile b/lib/py-compile -index e56d98d6e..5b9ae5d5d 100755 ---- a/lib/py-compile -+++ b/lib/py-compile -@@ -126,12 +126,10 @@ if test "$python_major" -le 2; then - import_lib=imp - import_test="hasattr(imp, 'get_tag')" - import_call=imp.cache_from_source -- import_arg2=', False' # needed in one call and not the other - else - import_lib=importlib - import_test="hasattr(sys.implementation, 'cache_tag')" - import_call=importlib.util.cache_from_source -- import_arg2= - fi - - $PYTHON -c " -@@ -159,7 +157,7 @@ $PYTHON -O -c " - import sys, os, py_compile, $import_lib - - # pypy does not use .pyo optimization --if hasattr(sys, 'pypy_translation_info'): -+if hasattr(sys, 'pypy_translation_info') and sys.hexversion < 0x03050000: - sys.exit(0) - - files = '''$files''' -@@ -173,7 +171,30 @@ for file in files.split(): - sys.stdout.write(file) - sys.stdout.flush() - if $import_test: -- py_compile.compile(filepath, $import_call(filepath$import_arg2), path) -+ py_compile.compile(filepath, $import_call(filepath), path) -+ else: -+ py_compile.compile(filepath, filepath + 'o', path) -+sys.stdout.write('\n')" 2>/dev/null || : -+ -+$PYTHON -OO -c " -+import sys, os, py_compile, $import_lib -+ -+# python<3.5 does not have split files for -O and -OO -+if sys.hexversion < 0x03050000: -+ sys.exit(0) -+ -+files = '''$files''' -+sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n') -+for file in files.split(): -+ $pathtrans -+ $filetrans -+ if not os.path.exists(filepath) or not (len(filepath) >= 3 -+ and filepath[-3:] == '.py'): -+ continue -+ sys.stdout.write(file) -+ sys.stdout.flush() -+ if $import_test: -+ py_compile.compile(filepath, $import_call(filepath), path) - else: - py_compile.compile(filepath, filepath + 'o', path) - sys.stdout.write('\n')" 2>/dev/null || : --- -2.25.2 diff --git a/sys-devel/automake/files/automake-1.16.2-skip-tags-lisp-space-without-etags.patch b/sys-devel/automake/files/automake-1.16.2-skip-tags-lisp-space-without-etags.patch deleted file mode 100644 index 70ca8f783c3e..000000000000 --- a/sys-devel/automake/files/automake-1.16.2-skip-tags-lisp-space-without-etags.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 77d39959511295f5a30332d5d03f0a6956bd9460 Mon Sep 17 00:00:00 2001 -From: Karl Berry <karl@freefriends.org> -Date: Tue, 24 Mar 2020 18:30:18 -0700 -Subject: [PATCH] tests: require etags for tags-lisp-space test. - -* t/tags-lisp-space.sh (required): set to etags. ---- - t/tags-lisp-space.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/t/tags-lisp-space.sh b/t/tags-lisp-space.sh -index d0a940ba3..44312b0b7 100755 ---- a/t/tags-lisp-space.sh -+++ b/t/tags-lisp-space.sh -@@ -18,7 +18,7 @@ - # if there are CONFIG_HEADERS. - # See automake bug#38139. - --required='' -+required=etags - . test-init.sh - - # some AC_CONFIG_FILES header is needed to trigger the bug. diff --git a/sys-devel/automake/files/automake-1.4-CVE-2009-4029.patch b/sys-devel/automake/files/automake-1.4-CVE-2009-4029.patch deleted file mode 100644 index 42aef8c8e1bc..000000000000 --- a/sys-devel/automake/files/automake-1.4-CVE-2009-4029.patch +++ /dev/null @@ -1,65 +0,0 @@ -http://bugs.gentoo.org/295357 - -(Makefile.in mangled a little for 1.4_p6) - -From 449d20aa12e13fefd848604225fc83d0c39c61d0 Mon Sep 17 00:00:00 2001 -From: Jim Meyering <meyering@redhat.com> -Date: Tue, 1 Dec 2009 22:48:15 +0100 -Subject: [PATCH 1/1] do not put world-writable directories in distribution tarballs - -* automake.in (handle_dist_worker): Do not make all directories -group- or world-writable. Instead, use 755. - -Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de> ---- - Makefile.in | 4 ++-- - automake.in | 4 ++-- - 4 files changed, 14 insertions(+), 4 deletions(-) - -diff --git a/Makefile.in b/Makefile.in -index 93da407..59eb9f4 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -456,7 +456,7 @@ dist-all: distdir - distdir: $(DISTFILES) - -rm -rf $(distdir) - mkdir $(distdir) -- -chmod 777 $(distdir) -+ -chmod 755 $(distdir) - @for file in $(DISTFILES); do \ - d=$(srcdir); \ - if test -d $$d/$$file; then \ -@@ -477,7 +477,7 @@ distdir: $(DISTFILES) - test -d $(distdir)/$$subdir \ - || mkdir $(distdir)/$$subdir \ - || exit 1; \ -- chmod 777 $(distdir)/$$subdir; \ -+ chmod 755 $(distdir)/$$subdir; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \ - || exit 1; \ - fi; \ -diff --git a/automake.in b/automake.in -index 8eceea7..8f48236 100755 ---- a/automake.in -+++ b/automake.in -@@ -2336,7 +2336,7 @@ sub handle_dist_worker - # Create dist directory. - $output_rules .= ("\t-rm -rf \$(distdir)\n" - . "\tmkdir \$(distdir)\n" -- . "\t-chmod 777 \$(distdir)\n"); -+ . "\t-chmod 755 \$(distdir)\n"); - } - - # Only run automake in `dist' target if --include-deps and -@@ -2468,7 +2468,7 @@ sub handle_dist_worker - . "\t" . ' test -d $(distdir)/$$subdir ' . "\\\n" - . "\t" . ' || mkdir $(distdir)/$$subdir ' . "\\\n" - . "\t" . ' || exit 1; ' . "\\\n" -- . "\t" . ' chmod 777 $(distdir)/$$subdir; ' . "\\\n" -+ . "\t" . ' chmod 755 $(distdir)/$$subdir; ' . "\\\n" - . "\t" . ' (cd $$subdir' - . ' && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(' - . (($relative_dir eq '.') ? 'distdir' : 'top_distdir') --- -1.6.5.4 - diff --git a/sys-devel/automake/files/automake-1.4-ansi2knr-stdlib.patch b/sys-devel/automake/files/automake-1.4-ansi2knr-stdlib.patch deleted file mode 100644 index 62a076107ee5..000000000000 --- a/sys-devel/automake/files/automake-1.4-ansi2knr-stdlib.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/ansi2knr.c -+++ b/ansi2knr.c -@@ -132,7 +132,7 @@ - - #endif /* not HAVE_CONFIG_H */ - --#if STDC_HEADERS -+#if STDC_HEADERS || HAVE_STDLIB_H - # include <stdlib.h> - #else - /* diff --git a/sys-devel/automake/files/automake-1.4-libtoolize.patch b/sys-devel/automake/files/automake-1.4-libtoolize.patch deleted file mode 100644 index 3e818ca960ba..000000000000 --- a/sys-devel/automake/files/automake-1.4-libtoolize.patch +++ /dev/null @@ -1,17 +0,0 @@ -Patch from redhat/fedora which made it into upstream. - ---- a/automake.in -+++ b/automake.in -@@ -6882,9 +6882,11 @@ - $suppress = 1; - - # Maybe run libtoolize. -+ @libtoolize_args = ('--automake'); -+ push @libtoolize_args, '-c' if $copy_missing; - if ($seen_libtool - && grep ($_ eq $file, @libtoolize_files) -- && system ('libtoolize', '--automake')) -+ && system ('libtoolize', @libtoolize_args)) - { - $message = "installing \`$errfile'"; - $suppress = 0; diff --git a/sys-devel/automake/files/automake-1.4-nls-nuisances.patch b/sys-devel/automake/files/automake-1.4-nls-nuisances.patch deleted file mode 100644 index d84d29698e64..000000000000 --- a/sys-devel/automake/files/automake-1.4-nls-nuisances.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/configure -+++ b/configure -@@ -46,6 +46,16 @@ - infodir='${prefix}/info' - mandir='${prefix}/man' - -+# NLS nuisances. -+# Only set these to C if already set. These must not be set unconditionally -+# because not all systems understand e.g. LANG=C (notably SCO). -+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -+# Non-C LC_CTYPE values break the ctype check. -+if test "${LANG+set}" = set; then LANG=C; export LANG; fi -+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi -+ - # Initialize some other variables. - subdirs= - MFLAGS= MAKEFLAGS= diff --git a/sys-devel/automake/files/automake-1.4-perl-5.11.patch b/sys-devel/automake/files/automake-1.4-perl-5.11.patch deleted file mode 100644 index f0423a64fbb8..000000000000 --- a/sys-devel/automake/files/automake-1.4-perl-5.11.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 375912c466b28a6121d351b9ff5513133a1c7227 Mon Sep 17 00:00:00 2001 -From: Jim Meyering <meyering@redhat.com> -Date: Sun, 29 Nov 2009 20:35:03 +0100 -Subject: [PATCH] avoid a warning from perl-5.11 - -* lib/Automake/Wrap.pm (_tab_length): Remove useless use of tr's -"/d" modifier. - -Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de> ---- - ChangeLog | 6 ++++++ - lib/Automake/Wrap.pm | 2 +- - 2 files changed, 7 insertions(+), 1 deletion(-) - ---- a/automake.in -+++ b/automake.in -@@ -5126,7 +5126,7 @@ sub pretty_print_internal - # character counts for eight. So we count the number of Tabs and - # multiply by 7. - local ($fill_length) = length ($fill); -- $fill_length += 7 * ($fill =~ tr/\t/\t/d); -+ $fill_length += 7 * ($fill =~ tr/\t/\t/); - - local ($bol) = ($head eq ''); - foreach (@values) --- -2.1.3 - diff --git a/sys-devel/automake/files/automake-1.4-perl-dyn-call.patch b/sys-devel/automake/files/automake-1.4-perl-dyn-call.patch deleted file mode 100644 index 9a140aa50510..000000000000 --- a/sys-devel/automake/files/automake-1.4-perl-dyn-call.patch +++ /dev/null @@ -1,23 +0,0 @@ -at some point, a perl update broke this syntax. use a newer style that works -with at least perl-5.16. - ---- a/automake.in -+++ b/automake.in -@@ -983,7 +983,7 @@ sub finish_languages - - # Compute the function name of the finisher and then call it. - $name = 'lang_' . $lang . '_finish'; -- do $name (); -+ &$name (); - } - - # If the project is entirely C++ or entirely Fortran 77, don't -@@ -1144,7 +1144,7 @@ sub handle_single_transform_list - # Found the language, so see what it says. - local ($subr) = 'lang_' . $lang . '_rewrite'; - # Note: computed subr call. -- local ($r) = do $subr ($base, $extension); -+ local ($r) = &$subr ($base, $extension); - # Skip this entry if we were asked not to process it. - next if ! $r; - diff --git a/sys-devel/automake/files/automake-1.4-subdirs-89656.patch b/sys-devel/automake/files/automake-1.4-subdirs-89656.patch deleted file mode 100644 index 7500fc98d9ac..000000000000 --- a/sys-devel/automake/files/automake-1.4-subdirs-89656.patch +++ /dev/null @@ -1,22 +0,0 @@ -Patch from redhat/fedora which made it into upstream. - ---- automake-1.4-p6/subdirs.am.subdirs 2001-07-16 22:47:36.000000000 -0700 -+++ automake-1.4-p6/subdirs.am 2003-04-25 08:24:35.000000000 -0700 -@@ -27,7 +27,7 @@ - all-recursive install-data-recursive install-exec-recursive \ - installdirs-recursive install-recursive uninstall-recursive @INSTALLINFO@ \ - check-recursive installcheck-recursive info-recursive dvi-recursive: -- @set fnord $(MAKEFLAGS); amf=$$2; \ -+ @set fnord $$MAKEFLAGS; amf=$$2; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ -@@ -55,7 +55,7 @@ check-recursive installcheck-recursive i - ## bombs. - mostlyclean-recursive clean-recursive distclean-recursive \ - maintainer-clean-recursive: -- @set fnord $(MAKEFLAGS); amf=$$2; \ -+ @set fnord $$MAKEFLAGS; amf=$$2; \ - dot_seen=no; \ - rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ - rev="$$subdir $$rev"; \ diff --git a/sys-devel/automake/files/automake-1.5-CVE-2009-4029.patch b/sys-devel/automake/files/automake-1.5-CVE-2009-4029.patch deleted file mode 100644 index d91139b30178..000000000000 --- a/sys-devel/automake/files/automake-1.5-CVE-2009-4029.patch +++ /dev/null @@ -1,60 +0,0 @@ -http://bugs.gentoo.org/295357 - -From b1c42762931e9cd03aee3e4b4284dc2920c9eabc Mon Sep 17 00:00:00 2001 -From: Jim Meyering <meyering@redhat.com> -Date: Tue, 1 Dec 2009 22:48:15 +0100 -Subject: [PATCH 1/1] do not put world-writable directories in distribution tarballs - -* lib/am/distdir.am (distdir): Do not make all directories -group- or world-writable. Instead, use 755. - -Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de> ---- - Makefile.in | 3 ++- - lib/am/distdir.am | 9 +++------ - 4 files changed, 15 insertions(+), 7 deletions(-) - -diff --git a/Makefile.in b/Makefile.in -index ebbfd2f..76991db 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -379,7 +379,8 @@ distdir: $(DISTFILES) - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="${top_distdir}" distdir="$(distdir)" \ - dist-info -- -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ -+ -find "$(distdir)" -type d ! -perm -755 \ -+ -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ -diff --git a/lib/am/distdir.am b/lib/am/distdir.am -index e808966..0a01c4e 100644 ---- a/lib/am/distdir.am -+++ b/lib/am/distdir.am -@@ -127,11 +127,7 @@ if %?DIST-TARGETS% - endif %?DIST-TARGETS% - ## - ## This complex find command will try to avoid changing the modes of --## links into the source tree, in case they're hard-linked. It will --## also make directories writable by everybody, because some --## brain-dead tar implementations change ownership and permissions of --## a directory before extracting the files, thus becoming unable to --## extract them. -+## links into the source tree, in case they're hard-linked. - ## - ## Ignore return result from chmod, because it might give an error - ## if we chmod a symlink. -@@ -144,7 +140,8 @@ endif %?DIST-TARGETS% - ## the file in place in the source tree. - ## - if %?TOPDIR_P% -- -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ -+ -find "$(distdir)" -type d ! -perm -755 \ -+ -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ --- -1.6.5.4 - diff --git a/sys-devel/automake/files/automake-1.5-perl-5.11.patch b/sys-devel/automake/files/automake-1.5-perl-5.11.patch deleted file mode 100644 index 1ee36468c319..000000000000 --- a/sys-devel/automake/files/automake-1.5-perl-5.11.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 375912c466b28a6121d351b9ff5513133a1c7227 Mon Sep 17 00:00:00 2001 -From: Jim Meyering <meyering@redhat.com> -Date: Sun, 29 Nov 2009 20:35:03 +0100 -Subject: [PATCH] avoid a warning from perl-5.11 - -* lib/Automake/Wrap.pm (_tab_length): Remove useless use of tr's -"/d" modifier. - -Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de> ---- - ChangeLog | 6 ++++++ - lib/Automake/Wrap.pm | 2 +- - 2 files changed, 7 insertions(+), 1 deletion(-) - ---- a/automake.in -+++ b/automake.in -@@ -5277,7 +5277,7 @@ sub pretty_print_internal - # character counts for eight. So we count the number of Tabs and - # multiply by 7. - my $fill_length = length ($fill); -- $fill_length += 7 * ($fill =~ tr/\t/\t/d); -+ $fill_length += 7 * ($fill =~ tr/\t/\t/); - - foreach (@values) - { --- -2.1.3 - diff --git a/sys-devel/automake/files/automake-1.5-slot.patch b/sys-devel/automake/files/automake-1.5-slot.patch deleted file mode 100644 index 640e73c7b794..000000000000 --- a/sys-devel/automake/files/automake-1.5-slot.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- a/aclocal.in -+++ b/aclocal.in -@@ -33,5 +33,5 @@ - $prefix = "@prefix@"; - # Note that this isn't pkgdatadir, but a separate directory. --$acdir = "@datadir@/aclocal"; -+$acdir = "@datadir@/aclocal-1.5"; - - # Some globals. -@@ -116,4 +116,5 @@ - - local (@dirlist) = &parse_arguments (@ARGV); -+push (@dirlist, "/usr/share/aclocal") if (!grep(/^--acdir/, @ARGV)); - &scan_m4_files (@dirlist); - &scan_configure; -@@ -203,5 +204,5 @@ - if ($print_and_exit) - { -- print $acdir, "\n"; -+ print "/usr/share/aclocal", "\n"; - exit 0; - } ---- a/automake.in -+++ b/automake.in -@@ -32,7 +32,7 @@ - BEGIN - { - my $prefix = "@prefix@"; -- my $perllibdir = $ENV{'perllibdir'} || "@datadir@/@PACKAGE@"; -+ my $perllibdir = $ENV{'perllibdir'} || "@datadir@/@PACKAGE@-1.5"; - unshift @INC, "$perllibdir"; - } - -@@ -127,7 +127,7 @@ - my $VERSION = "@VERSION@"; - my $PACKAGE = "@PACKAGE@"; - my $prefix = "@prefix@"; --my $libdir = "@datadir@/@PACKAGE@"; -+my $libdir = "@datadir@/@PACKAGE@-1.5"; - - # String constants. - my $IGNORE_PATTERN = '^\s*##([^#\n].*)?\n'; diff --git a/sys-devel/automake/files/automake-1.5-target_hook.patch b/sys-devel/automake/files/automake-1.5-target_hook.patch deleted file mode 100644 index 5f3bdb1f06c0..000000000000 --- a/sys-devel/automake/files/automake-1.5-target_hook.patch +++ /dev/null @@ -1,34 +0,0 @@ -*** automake-1.5/automake.in ---- automake-1.5/automake.in -*************** -*** 1941,1945 **** - - # Let the language do some special magic if required. -! $lang->target_hook ($aggregate, $object, $full); - - if ($derived_source) ---- 1941,1947 ---- - - # Let the language do some special magic if required. -! if (defined $lang) { -! $lang->target_hook ($aggregate, $object, $full); -! } - - if ($derived_source) -*** automake-1.5/m4/depout.m4 ---- automake-1.5/m4/depout.m4 -*************** -*** 13,18 **** - for mf in $CONFIG_FILES; do - case "$mf" in -! Makefile) dirpart=.;; -! */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;; - *) continue;; - esac ---- 13,18 ---- - for mf in $CONFIG_FILES; do - case "$mf" in -! Makefile|GNUmakefile) dirpart=.;; -! */Makefile|*/GNUmakefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;; - *) continue;; - esac diff --git a/sys-devel/automake/files/automake-1.5-test-fixes.patch b/sys-devel/automake/files/automake-1.5-test-fixes.patch deleted file mode 100644 index 8f34a793e450..000000000000 --- a/sys-devel/automake/files/automake-1.5-test-fixes.patch +++ /dev/null @@ -1,65 +0,0 @@ -Fix the tests so they don't fail :) -http://bugs.gentoo.org/79505 - -insthook: -update the head/tail syntax since coreutils has deprecated the old style - -dirname: -just disable the pos - -ccnoco: -rip patches from fedora - -depcomp2: #181484 -fix false positive when using newer autoconf -- it throws a warning based -on dataroot which causes a failure when there was none - ---- automake-1.5/tests/insthook.test -+++ automake-1.5/tests/insthook.test -@@ -17 +17 @@ --test x$lnum != x && tail +$lnum Makefile.in | head -3 | grep install-exec-hook -+test x$lnum != x && tail -n +$lnum Makefile.in | head -n 3 | grep install-exec-hook ---- automake-1.5/tests/dirname.test -+++ automake-1.5/tests/dirname.test -@@ -1,2 +1,3 @@ - #! /bin/sh -+exit 0 - ---- automake-1.5/tests/ccnoco.test -+++ automake-1.5/tests/ccnoco.test -@@ -39,7 +39,6 @@ - } - END - --$needs_autoconf - gcc -v || exit 77 - - cat > Mycomp << 'END' -@@ -51,7 +50,7 @@ - ;; - esac - --exec gcc ${1+"$@"} -+exec gcc "$@" - END - - chmod +x Mycomp -@@ -59,6 +58,10 @@ - set -e - - -+# Ignore user CFLAGS. -+CFLAGS= -+export CFLAGS -+ - for conf in configure.1 configure.3; do - cp $conf configure.in - ---- automake-1.5/tests/depcomp2.test -+++ automake-1.5/tests/depcomp2.test -@@ -17,4 +17,5 @@ - cat > Makefile.am << 'END' - SUBDIRS = subdir -+datarootdir = @datarootdir@ - END - diff --git a/sys-devel/automake/files/automake-1.6.3-test-fixes.patch b/sys-devel/automake/files/automake-1.6.3-test-fixes.patch deleted file mode 100644 index 666517754a96..000000000000 --- a/sys-devel/automake/files/automake-1.6.3-test-fixes.patch +++ /dev/null @@ -1,28 +0,0 @@ -Fix the tests so they don't fail :) - -depcomp2: #159557 #181484 -fix false positive when using newer autoconf -- it throws a warning based -on dataroot which causes a failure when there was none - -man2: #159557 -grab update from newer automake - ---- automake-1.6.3/tests/depcomp2.test -+++ automake-1.6.3/tests/depcomp2.test -@@ -17,4 +17,5 @@ - cat > Makefile.am << 'END' - SUBDIRS = subdir -+datarootdir = @datarootdir@ - END - ---- automake-1.6.3/tests/man2.test -+++ automake-1.6.3/tests/man2.test -@@ -23,7 +23,7 @@ - $AUTOMAKE - - # Let's play with $DESTDIR too, it shouldn't hurt. --./configure --prefix='' -+./configure --prefix='' --mandir=/man - DESTDIR="`pwd`/=inst" $MAKE -e SHELL=/bin/sh install - - test -f ./=inst/man/man2/foo.2 diff --git a/sys-devel/automake/files/automake-1.7.9-infopage-namechange.patch b/sys-devel/automake/files/automake-1.7.9-infopage-namechange.patch deleted file mode 100644 index bb1c21175175..000000000000 --- a/sys-devel/automake/files/automake-1.7.9-infopage-namechange.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/Makefile.in -+++ b/Makefile.in -@@ -199,8 +199,9 @@ - - .texi.info: - @rm -f $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9] -- $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -- -o $@ `test -f '$<' || echo '$(srcdir)/'`$< -+ cd $(srcdir) \ -+ && $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \ -+ `echo $< | sed 's,.*/,,'` - - .texi.dvi: - TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ - MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ diff --git a/sys-devel/automake/files/automake-1.7.9-libtool-2.patch b/sys-devel/automake/files/automake-1.7.9-libtool-2.patch deleted file mode 100644 index ad1d75d8caa9..000000000000 --- a/sys-devel/automake/files/automake-1.7.9-libtool-2.patch +++ /dev/null @@ -1,43 +0,0 @@ -fixup tests w/libtool-2 - -https://bugs.gentoo.org/257544 - ---- automake-1.7.9/tests/libtool5.test -+++ automake-1.7.9/tests/libtool5.test -@@ -45,5 +45,6 @@ - END - - libtoolize -+[ -e config.guess ] || libtoolize --install - $ACLOCAL - $AUTOMAKE ---- automake-1.7.9/tests/ltcond2.test -+++ automake-1.7.9/tests/ltcond2.test -@@ -73,6 +73,7 @@ - echo 'int main() { print(); return 0; }' >main.c - - libtoolize -+[ -e config.guess ] || libtoolize --install - $ACLOCAL - $AUTOCONF - $AUTOMAKE ---- automake-1.7.9/tests/ltcond.test -+++ automake-1.7.9/tests/ltcond.test -@@ -62,6 +62,7 @@ - mkdir empty - - libtoolize -+[ -e config.guess ] || libtoolize --install - $ACLOCAL - $AUTOCONF - $AUTOMAKE ---- automake-1.7.9/tests/ltconv.test -+++ automake-1.7.9/tests/ltconv.test -@@ -111,6 +111,7 @@ - EOF - - libtoolize -+[ -e config.guess ] || libtoolize --install - $ACLOCAL - $AUTOCONF - $AUTOMAKE diff --git a/sys-devel/automake/files/automake-1.7.9-test-fixes.patch b/sys-devel/automake/files/automake-1.7.9-test-fixes.patch deleted file mode 100644 index 00854886d66d..000000000000 --- a/sys-devel/automake/files/automake-1.7.9-test-fixes.patch +++ /dev/null @@ -1,46 +0,0 @@ -Fix the tests so they don't fail :) - -exdir2 man2 transform: #159557 #162565 -grab updates from newer automake - -mkdir-tests.m4: -when mixing newer gettext with this automake, the tests bomb out -as AM_PROG_MKDIR_P is not provided properly - ---- automake-1.7.9/tests/man2.test -+++ automake-1.7.9/tests/man2.test -@@ -41,7 +41,7 @@ - $AUTOMAKE - - # Let's play with $DESTDIR too, it shouldn't hurt. --./configure --prefix='' -+./configure --prefix='' --mandir=/man - DESTDIR="`pwd`/_inst" $MAKE -e install - - test -f ./_inst/man/man2/foo.2 ---- automake-1.7.9/tests/transform.test -+++ automake-1.7.9/tests/transform.test -@@ -56,7 +56,7 @@ - $AUTOCONF - $AUTOMAKE - --./configure --program-prefix=gnu- --prefix `pwd`/inst -+./configure --program-prefix=gnu- --prefix `pwd`/inst --mandir `pwd`/inst/man - $MAKE - $MAKE test-install - $MAKE uninstall ---- automake-1.7.9/tests/exdir2.test -+++ automake-1.7.9/tests/exdir2.test -@@ -23,7 +23,7 @@ - . ./defs || exit 1 - - cat > Makefile.am << 'EOF' --html_DATA = zot.html -+quuz_DATA = zot.html - pkgdata_DATA = qbert - EOF - ---- automake-1.7.9/m4/mkdir-tests.m4 -+++ automake-1.7.9/m4/mkdir-tests.m4 -@@ -0,0 +1 @@ -+AC_DEFUN([AM_PROG_MKDIR_P]) diff --git a/sys-devel/automake/files/automake-1.8-perl-5.11.patch b/sys-devel/automake/files/automake-1.8-perl-5.11.patch deleted file mode 100644 index 0808174f0102..000000000000 --- a/sys-devel/automake/files/automake-1.8-perl-5.11.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 375912c466b28a6121d351b9ff5513133a1c7227 Mon Sep 17 00:00:00 2001 -From: Jim Meyering <meyering@redhat.com> -Date: Sun, 29 Nov 2009 20:35:03 +0100 -Subject: [PATCH] avoid a warning from perl-5.11 - -* lib/Automake/Wrap.pm (_tab_length): Remove useless use of tr's -"/d" modifier. - -Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de> ---- - ChangeLog | 6 ++++++ - lib/Automake/Wrap.pm | 2 +- - 2 files changed, 7 insertions(+), 1 deletion(-) - -diff --git a/lib/Automake/Wrap.pm b/lib/Automake/Wrap.pm -index 09a135a..66213d1 100644 ---- a/lib/Automake/Wrap.pm -+++ b/lib/Automake/Wrap.pm -@@ -55,7 +55,7 @@ sub tab_length($) - { - my ($txt) = @_; - my $len = length ($txt); -- $len += 7 * ($txt =~ tr/\t/\t/d); -+ $len += 7 * ($txt =~ tr/\t/\t/); - return $len; - } - --- -2.1.3 - diff --git a/sys-devel/automake/files/automake-1.8.2-infopage-namechange.patch b/sys-devel/automake/files/automake-1.8.2-infopage-namechange.patch deleted file mode 100644 index bc7d58ed35ec..000000000000 --- a/sys-devel/automake/files/automake-1.8.2-infopage-namechange.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- automake-1.8.2/doc/Makefile.in 2004-02-03 21:59:01.585999688 +0200 -+++ automake-1.8.2.info/doc/Makefile.in 2004-02-03 22:04:03.893042032 +0200 -@@ -175,29 +175,10 @@ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - - .texi.info: -- restore=: && \ -- backupdir="$(am__leading_dot)am$$$$" && \ -- am__cwd=`pwd` && cd $(srcdir) && \ -- rm -rf $$backupdir && mkdir $$backupdir && \ -- for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ -- if test -f $$f; then \ -- mv $$f $$backupdir; \ -- restore=mv; \ -- fi; \ -- done; \ -- cd "$$am__cwd"; \ -- if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -- -o $@ $<; \ -- then \ -- rc=0; \ -- cd $(srcdir); \ -- else \ -- rc=$$?; \ -- cd $(srcdir) && \ -- $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ -- fi; \ -- rm -rf $$backupdir; \ -- exit $$rc -+ @rm -f $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9] -+ cd $(srcdir) \ -+ && $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \ -+ `echo $< | sed 's,.*/,,'` - - .texi.dvi: - TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ diff --git a/sys-devel/automake/files/automake-1.8.5-CVE-2009-4029.patch b/sys-devel/automake/files/automake-1.8.5-CVE-2009-4029.patch deleted file mode 100644 index 9e42e52c80bd..000000000000 --- a/sys-devel/automake/files/automake-1.8.5-CVE-2009-4029.patch +++ /dev/null @@ -1,60 +0,0 @@ -http://bugs.gentoo.org/295357 - -From 4331fc7423036e68a9e480fb0ff56934b5d2be0e Mon Sep 17 00:00:00 2001 -From: Jim Meyering <meyering@redhat.com> -Date: Tue, 1 Dec 2009 22:07:45 +0100 -Subject: [PATCH 1/1] do not put world-writable directories in distribution tarballs - -* lib/am/distdir.am (distdir): Do not make all directories -group- or world-writable. Instead, use 755. - -Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de> ---- - Makefile.in | 3 ++- - lib/am/distdir.am | 9 +++------ - 4 files changed, 17 insertions(+), 8 deletions(-) - -diff --git a/Makefile.in b/Makefile.in -index f6971b4..c753eaa 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -389,7 +389,8 @@ distdir: $(DISTFILES) - || exit 1; \ - fi; \ - done -- -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ -+ -find "$(distdir)" -type d ! -perm -755 \ -+ -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ -diff --git a/lib/am/distdir.am b/lib/am/distdir.am -index 0ed0593..91dbe6b 100644 ---- a/lib/am/distdir.am -+++ b/lib/am/distdir.am -@@ -190,11 +190,7 @@ if %?DIST-TARGETS% - endif %?DIST-TARGETS% - ## - ## This complex find command will try to avoid changing the modes of --## links into the source tree, in case they're hard-linked. It will --## also make directories writable by everybody, because some --## brain-dead tar implementations change ownership and permissions of --## a directory before extracting the files, thus becoming unable to --## extract them. -+## links into the source tree, in case they're hard-linked. - ## - ## Ignore return result from chmod, because it might give an error - ## if we chmod a symlink. -@@ -207,7 +203,8 @@ endif %?DIST-TARGETS% - ## the file in place in the source tree. - ## - if %?TOPDIR_P% -- -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ -+ -find "$(distdir)" -type d ! -perm -755 \ -+ -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ --- -1.6.5.4 - diff --git a/sys-devel/automake/files/automake-1.8.5-test-fixes.patch b/sys-devel/automake/files/automake-1.8.5-test-fixes.patch deleted file mode 100644 index 43290d1e0d4b..000000000000 --- a/sys-devel/automake/files/automake-1.8.5-test-fixes.patch +++ /dev/null @@ -1,43 +0,0 @@ -Fix the tests so they don't fail :) - -exdir2 man2 transform: #159557 #162565 -grab updates from newer automake - ---- automake-1.8.5/tests/man2.test -+++ automake-1.8.5/tests/man2.test -@@ -41,7 +41,7 @@ - $AUTOMAKE - - # Let's play with $DESTDIR too, it shouldn't hurt. --./configure --prefix='' -+./configure --prefix='' --mandir=/man - DESTDIR="`pwd`/_inst" $MAKE -e install - - test -f ./_inst/man/man2/foo.2 ---- automake-1.8.5/tests/transform.test -+++ automake-1.8.5/tests/transform.test -@@ -56,7 +56,7 @@ - $AUTOCONF - $AUTOMAKE - --./configure --program-prefix=gnu- --prefix `pwd`/inst -+./configure --program-prefix=gnu- --prefix `pwd`/inst --mandir `pwd`/inst/man - $MAKE - $MAKE test-install - $MAKE uninstall ---- automake-1.8.5/tests/exdir2.test -+++ automake-1.8.5/tests/exdir2.test -@@ -25,11 +25,11 @@ - set -e - - cat > Makefile.am << 'EOF' --html_DATA = zot.html -+quuz_DATA = zot.html - pkgdata_DATA = qbert - EOF - - $ACLOCAL - AUTOMAKE_fails - grep 'pkgdatadir' stderr && exit 1 --grep 'Makefile.am:1:.*htmldir.*undefined' stderr -+grep 'Makefile.am:1:.*quuzdir.*undefined' stderr diff --git a/sys-devel/automake/files/automake-1.9.6-aclocal7-test-sleep.patch b/sys-devel/automake/files/automake-1.9.6-aclocal7-test-sleep.patch deleted file mode 100644 index ea2b227b8d40..000000000000 --- a/sys-devel/automake/files/automake-1.9.6-aclocal7-test-sleep.patch +++ /dev/null @@ -1,39 +0,0 @@ -http://bugs.gentoo.org/197366 - -commit 8952f7248c2637426bcf83d38f07a8b02124a06e -Author: Ralf Wildenhues <Ralf.Wildenhues@gmx.de> -Date: Wed May 10 20:50:53 2006 +0000 - - * tests/aclocal7.test: Add `$sleep's between file touching - and automake resp aclocal+automake invocations, to ensure - they complete with a time stamp strictly later than the touched - file. - -diff --git a/tests/aclocal7.test b/tests/aclocal7.test -index 787565c..f6d5e31 100755 ---- a/tests/aclocal7.test -+++ b/tests/aclocal7.test -@@ -89,6 +89,7 @@ test `ls -1t sub/Makefile.in foo | sed 1q` = sub/Makefile.in - touch fragment.inc - $sleep - touch foo -+$sleep - $ACLOCAL -I m4 - $AUTOMAKE --no-force - # Only ./Makefile.in should change. -@@ -101,6 +102,7 @@ grep README Makefile.in && exit 1 - : > README - $sleep - touch foo -+$sleep - $AUTOMAKE --no-force - # Even if no dependency change, the content changed. - test `ls -1t Makefile.in foo | sed 1q` = Makefile.in -@@ -111,6 +113,7 @@ grep README Makefile.in - : > sub/Makefile.in - $sleep - touch foo -+$sleep - $ACLOCAL -I m4 - $AUTOMAKE --no-force - # Only sub/Makefile.in should change. diff --git a/sys-devel/automake/files/automake-1.9.6-ignore-comments-r1.patch b/sys-devel/automake/files/automake-1.9.6-ignore-comments-r1.patch deleted file mode 100644 index da3f288d739e..000000000000 --- a/sys-devel/automake/files/automake-1.9.6-ignore-comments-r1.patch +++ /dev/null @@ -1,29 +0,0 @@ -http://bugs.gentoo.org/126388 - -2006-03-16 Mike Frysinger <vapier@gentoo.org> - - * aclocal.in (scan_configure_dep): Ignore ## lines. - (scan_file): Remove dnl and # comments. - ---- a/aclocal.in -+++ b/aclocal.in -@@ -227,6 +227,8 @@ - foreach (split ("\n", $contents)) - { - ++$line; -+ # Ignore `##' lines. -+ next if /^##/; - # Remove comments from current line. - s/\bdnl\b.*$//; - s/\#.*$//; -@@ -311,6 +313,10 @@ - - $contents .= $_; - -+ # Remove comments from current line. -+ s/\bdnl\b.*$//; -+ s/\#.*$//; -+ - while (/$ac_defun_rx/go) - { - if (! defined $1) diff --git a/sys-devel/automake/files/automake-1.9.6-include-dir-prefix-r1.patch b/sys-devel/automake/files/automake-1.9.6-include-dir-prefix-r1.patch deleted file mode 100644 index a1cc613e880c..000000000000 --- a/sys-devel/automake/files/automake-1.9.6-include-dir-prefix-r1.patch +++ /dev/null @@ -1,31 +0,0 @@ -http://bugs.gentoo.org/107435 -http://lists.gnu.org/archive/html/automake/2005-09/msg00088.html - -2005-09-27 Stepan Kasal <address@hidden> - - * automake.in (handle_single_transform): Direct suffix rule preserves - the directory prefix, so the generated object name should contain - it, too. - ---- a/automake.in 2005-09-17 15:05:39.000000000 +0200 -+++ b/automake.in 2005-09-27 17:10:47.000000000 +0200 -@@ -1755,6 +1755,10 @@ - # This is probably the result of a direct suffix rule. - # In this case we just accept the rewrite. - $object = "$base$extension"; -+ if ($directory ne '') -+ { -+ $object = $directory . '/' . $object; -+ } - $linker = ''; - } - else -@@ -1824,7 +1828,7 @@ - - # For Java, the way we're handling it right now, a - # `..' component doesn't make sense. -- if ($lang->name eq 'java' && $object =~ /(\/|^)\.\.\//) -+ if ($lang && $lang->name eq 'java' && $object =~ /(\/|^)\.\.\//) - { - err_am "`$full' should not contain a `..' component"; - } diff --git a/sys-devel/automake/files/automake-1.9.6-infopage-namechange-r1.patch b/sys-devel/automake/files/automake-1.9.6-infopage-namechange-r1.patch deleted file mode 100644 index d99c442e93a2..000000000000 --- a/sys-devel/automake/files/automake-1.9.6-infopage-namechange-r1.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- a/doc/Makefile.in.orig 2005-07-11 00:39:31.000000000 -0400 -+++ b/doc/Makefile.in 2005-07-11 00:40:46.000000000 -0400 -@@ -187,26 +187,10 @@ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - - .texi.info: -- restore=: && backupdir="$(am__leading_dot)am$$$$" && \ -- am__cwd=`pwd` && cd $(srcdir) && \ -- rm -rf $$backupdir && mkdir $$backupdir && \ -- if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ -- for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ -- if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ -- done; \ -- else :; fi && \ -- cd "$$am__cwd"; \ -- if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -- -o $@ $<; \ -- then \ -- rc=0; \ -- cd $(srcdir); \ -- else \ -- rc=$$?; \ -- cd $(srcdir) && \ -- $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ -- fi; \ -- rm -rf $$backupdir; exit $$rc -+ @rm -f $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9] -+ cd $(srcdir) \ -+ && $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \ -+ `echo $< | sed 's,.*/,,'` - - .texi.dvi: - TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ diff --git a/sys-devel/automake/files/automake-1.9.6-subst-test.patch b/sys-devel/automake/files/automake-1.9.6-subst-test.patch deleted file mode 100644 index 6b794b1e1377..000000000000 --- a/sys-devel/automake/files/automake-1.9.6-subst-test.patch +++ /dev/null @@ -1,42 +0,0 @@ -https://bugs.gentoo.org/222225 - -Patch from automake upstream git-repo to fix "make check" with newer versions of autoconf - -From: Ralf Wildenhues <Ralf.Wildenhues@gmx.de> -Date: Sun, 22 Jul 2007 09:06:23 +0000 (+0000) -Subject: * tests/subst.test: Move the AC_SUBST into a macro definition. -X-Git-Url: http://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff_plain;h=3d85de7baa9edf21c56401db3d25ef8a8e8d7797 - -* tests/subst.test: Move the AC_SUBST into a macro definition. -Avoids an error from CVS Autoconf. -* THANKS: Update. -Report by Benoit Sigoure. ---- -diff --git a/tests/subst.test b/tests/subst.test -index 33e925d..a72af85 100755 ---- a/tests/subst.test -+++ b/tests/subst.test -@@ -1,5 +1,5 @@ - #! /bin/sh --# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc. -+# Copyright (C) 1996, 2001, 2002, 2007 Free Software Foundation, Inc. - # - # This file is part of GNU Automake. - # -@@ -24,8 +24,14 @@ - . ./defs || exit 1 - - cat >> configure.in << 'END' --AC_SUBST($1) --AC_SUBST([$]$1) dnl this is the actual invocation that was used -+dnl This test used to have the following lines, which cannot have -+dnl worked sensibly with Autoconf for years, however: -+dnl AC_SUBST($1) -+dnl AC_SUBST([$]$1) dnl this is the actual invocation that was used -+dnl -+AC_DEFUN([FOO], -+[AC_SUBST([$1])]) -+FOO([BAR]) - END - - : > Makefile.am diff --git a/sys-devel/automake/metadata.xml b/sys-devel/automake/metadata.xml deleted file mode 100644 index f919a871fcbd..000000000000 --- a/sys-devel/automake/metadata.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<maintainer type="project"> - <email>base-system@gentoo.org</email> - <name>Gentoo Base System</name> -</maintainer> -<upstream> - <remote-id type="cpe">cpe:/a:gnu:automake</remote-id> -</upstream> -</pkgmetadata> diff --git a/sys-devel/bc/Manifest b/sys-devel/bc/Manifest index 2c8012c81682..fed58953c5bc 100644 --- a/sys-devel/bc/Manifest +++ b/sys-devel/bc/Manifest @@ -1,2 +1 @@ -DIST bc-1.06.95.tar.bz2 290069 BLAKE2B 774f07b1f85b4de7c4707baa355caed5a9fc7b3a5ee1a14f4e9fd59f47a4bbdf34bcb76dc05de4dd8c65615284c3588ad7961fa493ed559a0e8880647835bda0 SHA512 16ec13f87ef76ad4de77d378ef8d65a582adca1bf661c9d7675e78d940680c77e81a00a01817fde7c1ad1524562d6f933caa5c42a0686f3f85aadbb39393afb1 DIST bc-1.07.1.tar.gz 419850 BLAKE2B dcedc193be5521aa0fa3a19746233ed65bc1fe8ef12e15155341706de6fbeecb6dd7ee4ab11e2d4b3aca2ae7097cce89e389b3573493bbc893e00b4ed3239594 SHA512 02126d0db6b6ed06d56cfc292d6f5475ff1e574779d7e69c7809bbb1e13f946f57ea07da2a7666baa092507a951a822044b0970075f75eefe65a5c1999b75d34 diff --git a/sys-devel/bc/bc-1.06.95-r2.ebuild b/sys-devel/bc/bc-1.06.95-r2.ebuild deleted file mode 100644 index 2b569e4bd4c6..000000000000 --- a/sys-devel/bc/bc-1.06.95-r2.ebuild +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -inherit epatch flag-o-matic toolchain-funcs - -DESCRIPTION="Handy console-based calculator utility" -HOMEPAGE="https://www.gnu.org/software/bc/bc.html" -SRC_URI="https://alpha.gnu.org/gnu/bc/${P}.tar.bz2 - mirror://gnu/bc/${P}.tar.bz2" - -LICENSE="GPL-2 LGPL-2.1" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~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-devel/flex - virtual/yacc -" - -src_prepare() { - epatch "${FILESDIR}"/${P}-void_uninitialized.patch #349339 - epatch "${FILESDIR}"/${P}-mem-leak.patch #264889 -} - -src_configure() { - export CONFIG_SHELL=${BASH} - - local libedit - if use readline ; then - libedit="--without-libedit" - else - libedit=$(use_with libedit) - fi - use static && append-ldflags -static - # Clobber any CONFIG_SHELL setting the user has forced on us. - # We should be able to delete this w/the next release as it - # should use updated autoconf. - CONFIG_SHELL=/bin/bash \ - econf \ - $(use_with readline) \ - ${libedit} - - # 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/* -} - -src_compile() { - emake AR="$(tc-getAR)" -} diff --git a/sys-devel/bc/bc-1.07.1-r3.ebuild b/sys-devel/bc/bc-1.07.1-r3.ebuild deleted file mode 100644 index 84f22cd7fd26..000000000000 --- a/sys-devel/bc/bc-1.07.1-r3.ebuild +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit flag-o-matic toolchain-funcs - -DESCRIPTION="Handy console-based calculator utility" -HOMEPAGE="https://www.gnu.org/software/bc/bc.html" -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" -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-devel/flex - virtual/yacc -" - -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" -} - -src_configure() { - local myconf=( - $(use_with readline) - ) - if use readline ; then - myconf+=( --without-libedit ) - else - myconf+=( $(use_with libedit) ) - fi - use static && append-ldflags -static - - 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/* -} - -src_compile() { - emake AR="$(tc-getAR)" -} diff --git a/sys-devel/bc/bc-1.07.1-r6.ebuild b/sys-devel/bc/bc-1.07.1-r6.ebuild new file mode 100644 index 000000000000..b3c954931a8e --- /dev/null +++ b/sys-devel/bc/bc-1.07.1-r6.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Handy console-based calculator utility" +HOMEPAGE="https://www.gnu.org/software/bc/bc.html" +SRC_URI="mirror://gnu/bc/${P}.tar.gz" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="libedit readline static" + +RDEPEND=" + !readline? ( libedit? ( dev-libs/libedit:= ) ) + readline? ( + sys-libs/readline:= + sys-libs/ncurses:= + )" +DEPEND="${RDEPEND}" +BDEPEND=" + sys-devel/flex + app-alternatives/yacc" +PDEPEND="app-alternatives/bc" + +PATCHES=( "${FILESDIR}"/${PN}-1.07.1-no-ed-its-sed.patch ) + +src_prepare() { + default + + # 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() { + local myconf=( + $(use_with readline) + --program-suffix=-reference + ) + + if use readline ; then + myconf+=( --without-libedit ) + else + myconf+=( $(use_with libedit) ) + fi + + use static && append-ldflags -static + + # The libedit code isn't compatible currently. #830101 + use libedit && append-flags -fcommon + + # AC_SYS_LARGEFILE in configure.ac would handle this, but we don't patch + # autotools otherwise currently. This change has been sent upstream, but + # who knows when they'll make another release. + append-lfs-flags + + # configure dies with other lexes: + # "configure: error: readline works only with flex." + export LEX=flex + + econf "${myconf[@]}" + + # Do not regen docs -- configure produces a small fragment that includes + # the version info which causes all pages to regen (newer file). Bug #554774 + touch -r doc doc/* || die +} + +src_compile() { + emake AR="$(tc-getAR)" +} + +pkg_postinst() { + # ensure to preserve the symlinks before app-alternatives/bc + # is installed + local x + for x in bc dc ; do + if [[ ! -h ${EROOT}/usr/bin/${x} ]] ; then + ln -s "${x}-reference" "${EROOT}/usr/bin/${x}" || die + fi + done +} diff --git a/sys-devel/bc/files/bc-1.06.95-mem-leak.patch b/sys-devel/bc/files/bc-1.06.95-mem-leak.patch deleted file mode 100644 index 13628464b540..000000000000 --- a/sys-devel/bc/files/bc-1.06.95-mem-leak.patch +++ /dev/null @@ -1,24 +0,0 @@ -https://bugs.gentoo.org/264889 - ---- a/bc/bc.y -+++ b/bc/bc.y -@@ -569,6 +569,7 @@ expression : named_expression ASSIGN_OP - generate (">"); - break; - } -+ free($2); - } - | expression '+' expression - { ---- a/bc/util.c -+++ b/bc/util.c -@@ -602,8 +602,7 @@ lookup (name, namekind) - case FUNCTDEF: - if (id->f_name != 0) - { -- if (namekind != FUNCT) -- free(name); -+ free(name); - /* Check to see if we are redefining a math lib function. */ - if (use_math && namekind == FUNCTDEF && id->f_name <= 6) - id->f_name = next_func++; diff --git a/sys-devel/bc/files/bc-1.06.95-void_uninitialized.patch b/sys-devel/bc/files/bc-1.06.95-void_uninitialized.patch deleted file mode 100644 index 3304973f89af..000000000000 --- a/sys-devel/bc/files/bc-1.06.95-void_uninitialized.patch +++ /dev/null @@ -1,13 +0,0 @@ -http://www.pixelbeat.org/programming/oss_bug_flow.html -https://bugs.gentoo.org/349339 - ---- bc/storage.c -+++ bc/storage.c -@@ -99,6 +99,7 @@ - { - f = &functions[indx]; - f->f_defined = FALSE; -+ f->f_void = FALSE; - f->f_body = (char *) bc_malloc (BC_START_SIZE); - f->f_body_size = BC_START_SIZE; - f->f_code_size = 0; diff --git a/sys-devel/bc/metadata.xml b/sys-devel/bc/metadata.xml index 56c124413057..b0d83aa2e489 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 "http://www.gentoo.org/dtd/metadata.dtd"> +<!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.ebuild b/sys-devel/bin86/bin86-0.16.21-r1.ebuild index b21fcec3bf49..cdbd313b3371 100644 --- a/sys-devel/bin86/bin86-0.16.21.ebuild +++ b/sys-devel/bin86/bin86-0.16.21-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="6" +EAPI="8" -inherit toolchain-funcs epatch +inherit toolchain-funcs DESCRIPTION="Assembler and loader used to create kernel bootsector" HOMEPAGE="http://v3.sk/~lkundrak/dev86/" @@ -12,7 +12,8 @@ SRC_URI="http://v3.sk/~lkundrak/dev86/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86" -IUSE="" + +PATCHES="${FILESDIR}"/${PN}-0.16.21-amd64-build.patch src_prepare() { use elibc_musl && CPPFLAGS="${CPPFLAGS} -U__linux__" @@ -23,9 +24,8 @@ src_prepare() { -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 + default } src_install() { diff --git a/sys-devel/bin86/bin86-0.16.21-r2.ebuild b/sys-devel/bin86/bin86-0.16.21-r2.ebuild new file mode 100644 index 000000000000..c7be6fd8af00 --- /dev/null +++ b/sys-devel/bin86/bin86-0.16.21-r2.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +inherit toolchain-funcs + +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" + +PATCHES=( "${FILESDIR}"/${PN}-0.16.21-amd64-build.patch + "${FILESDIR}"/${PN}-0.16.21-fix-build-for-clang16.patch +) + +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 + tc-export CC + default +} + +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.21-amd64-build.patch index b494a8b724de..9e5a85299fe6 100644 --- a/sys-devel/bin86/files/bin86-0.16.17-amd64-build.patch +++ b/sys-devel/bin86/files/bin86-0.16.21-amd64-build.patch @@ -2,10 +2,12 @@ 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; +diff --git a/ld/x86_aout.h b/ld/x86_aout.h +index 542a70d..a38488d 100644 +--- a/ld/x86_aout.h ++++ b/ld/x86_aout.h +@@ -19,7 +19,9 @@ typedef long Long; + typedef int32_t Long; #define __OUT_OK 1 #else -typedef char Long[4]; @@ -13,5 +15,5 @@ https://bugs.gentoo.org/428228 +#include <inttypes.h> +typedef int32_t Long; #endif + #endif - struct exec { /* a.out header */ diff --git a/sys-devel/bin86/files/bin86-0.16.21-fix-build-for-clang16.patch b/sys-devel/bin86/files/bin86-0.16.21-fix-build-for-clang16.patch new file mode 100644 index 000000000000..9b821ca35850 --- /dev/null +++ b/sys-devel/bin86/files/bin86-0.16.21-fix-build-for-clang16.patch @@ -0,0 +1,145 @@ +Subject: [PATCH] fix build for clang 16 + +clang 16 does not allow implicit int in function declarations + +Bug: https://bugs.gentoo.org/880797 +Upstream PR: https://github.com/lkundrak/dev86/pull/26 + +Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de> +--- + ld/catimage.c | 32 +++++++++++++++++++------------- + ld/objchop.c | 16 ++++++++-------- + 2 files changed, 27 insertions(+), 21 deletions(-) + +diff --git a/ld/catimage.c b/ld/catimage.c +index 1f5e160..47161b9 100644 +--- a/ld/catimage.c ++++ b/ld/catimage.c +@@ -24,6 +24,7 @@ + #ifdef __STDC__ + #include <unistd.h> + #include <stdlib.h> ++#include <string.h> + #endif + #include "x86_aout.h" + +@@ -39,9 +40,14 @@ FILE * ofd; + FILE * ifd = 0; + struct exec header; + +-main(argc, argv) +-int argc; +-char ** argv; ++void open_obj(char * fname); ++void copy_segment(long out_offset,long in_offset,long length); ++void patch_bin(long file_off, int value); ++void read_symtable(void); ++void fatal(char * str); ++ ++int ++main(int argc, char ** argv) + { + long image_offset, text_off; + int image_id; +@@ -100,8 +106,8 @@ char ** argv; + exit(0); + } + +-open_obj(fname) +-char * fname; ++void ++open_obj(char * fname) + { + input_file = fname; + +@@ -117,8 +123,8 @@ char * fname; + fatal("Input file has bad magic number"); + } + +-copy_segment(out_offset, in_offset, length) +-long out_offset, in_offset, length; ++void ++copy_segment(long out_offset,long in_offset,long length) + { + char buffer[1024]; + int ssize; +@@ -143,9 +149,8 @@ long out_offset, in_offset, length; + } + } + +-patch_bin(file_off, value) +-long file_off; +-int value; ++void ++patch_bin(long file_off, int value) + { + char wbuf[4]; + if( file_off > 0 ) +@@ -163,7 +168,8 @@ int value; + } + } + +-read_symtable() ++void ++read_symtable(void) + { + struct nlist item; + int nitems; +@@ -234,8 +240,8 @@ read_symtable() + } + } + +-fatal(str) +-char * str; ++void ++fatal(char * str) + { + fprintf(stderr, "catimage:%s: %s\n", input_file, str); + exit(2); +diff --git a/ld/objchop.c b/ld/objchop.c +index c7631c1..495df75 100644 +--- a/ld/objchop.c ++++ b/ld/objchop.c +@@ -16,12 +16,13 @@ main() + + #else + ++void fatal(char* str); ++void write_file(char *fname, long bsize); ++ + FILE * ifd; + struct exec header; + +-main(argc, argv) +-int argc; +-char ** argv; ++int main(int argc, char** argv) + { + FILE * ofd; + if( argc != 5 ) fatal("Usage: objchop a.out text.bin data.bin sizes.asm"); +@@ -56,9 +57,8 @@ char ** argv; + exit(0); + } + +-write_file(fname, bsize) +-char * fname; +-long bsize; ++void ++write_file(char *fname, long bsize) + { + char buffer[1024]; + int ssize; +@@ -81,8 +81,8 @@ long bsize; + fclose(ofd); + } + +-fatal(str) +-char * str; ++void ++fatal(char* str) + { + fprintf(stderr, "objchop: %s\n", str); + exit(2); +-- +2.41.0 + diff --git a/sys-devel/bin86/metadata.xml b/sys-devel/bin86/metadata.xml index e3d90415dc52..c850d812bccf 100644 --- a/sys-devel/bin86/metadata.xml +++ b/sys-devel/bin86/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <!-- maintainer-needed --> <upstream> diff --git a/sys-devel/binutils-apple/Manifest b/sys-devel/binutils-apple/Manifest index a6468db7cc6c..22c77453207c 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 darwin-xtools-8.2.1-r103.tar.gz 3106189 BLAKE2B f13e77f796eefc393389206d5663c98d55c3fe0eb5123b366155e7c993cea421a039121d705cab2aa5fcdab2ef08d2b17dd5b9d6e0b2c50c97db067b0ec10283 SHA512 241f402ac368606eb9b89421a3e0a2ebbde1ea79d6e84cc55680a7f3dbc31dfa402ee7b20f605627c1bfd9097bbe824dea466339a7ff9026810911ef70940bda 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 42f2f2808cb7..000000000000 --- 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-3.2.6.ebuild b/sys-devel/binutils-apple/binutils-apple-3.2.6-r1.ebuild index 49c5ce262a52..22d10d9f7b20 100644 --- a/sys-devel/binutils-apple/binutils-apple-3.2.6.ebuild +++ b/sys-devel/binutils-apple/binutils-apple-3.2.6-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="6" +EAPI="7" -inherit eutils flag-o-matic toolchain-funcs +inherit flag-o-matic toolchain-funcs RESTRICT="test" # the test suite will test what's installed. @@ -34,7 +34,7 @@ S=${WORKDIR} is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } -prepare_ld64() { +eprepare_ld64() { cd "${S}"/${LD64}/src cp "${WORKDIR}"/Makefile Makefile || die @@ -90,14 +90,14 @@ prepare_ld64() { } src_prepare() { - prepare_ld64 + eprepare_ld64 cd "${S}"/${CCTOOLS} - epatch "${WORKDIR}"/${PN}-3.2.6-as-dir.patch - epatch "${WORKDIR}"/${PN}-3.1.1-libtool-ranlib.patch - epatch "${WORKDIR}"/${PN}-3.1.1-nmedit.patch - epatch "${WORKDIR}"/${PN}-3.1.1-no-headers.patch - epatch "${WORKDIR}"/${PN}-3.1.1-no-oss-dir.patch + eapply -p1 "${WORKDIR}"/${PN}-3.2.6-as-dir.patch + eapply -p1 "${WORKDIR}"/${PN}-3.1.1-libtool-ranlib.patch + eapply -p1 "${WORKDIR}"/${PN}-3.1.1-nmedit.patch + eapply -p1 "${WORKDIR}"/${PN}-3.1.1-no-headers.patch + eapply -p1 "${WORKDIR}"/${PN}-3.1.1-no-oss-dir.patch # drop as targets which are not suported by anything sed -i \ @@ -109,8 +109,8 @@ src_prepare() { as/Makefile || die cd "${S}"/${LD64} - epatch "${WORKDIR}"/${PN}-3.1.1-testsuite.patch - epatch "${WORKDIR}"/${PN}-3.2.6-lto.patch + eapply -p1 "${WORKDIR}"/${PN}-3.1.1-testsuite.patch + eapply -p1 "${WORKDIR}"/${PN}-3.2.6-lto.patch cd "${S}" ebegin "cleaning Makefiles from unwanted CFLAGS" @@ -200,19 +200,19 @@ install_cctools() { COMMON_SUBDIRS='ar misc otool' \ SUBDIRS_32= \ RC_CFLAGS="${CFLAGS}" OFLAG="${CFLAGS}" \ - DSTROOT=\"${D}\" \ - BINDIR=\"${EPREFIX}\"${BINPATH} \ - LOCBINDIR=\"${EPREFIX}\"${BINPATH} \ - USRBINDIR=\"${EPREFIX}\"${BINPATH} \ - LOCLIBDIR=\"${EPREFIX}\"${LIBPATH} \ - MANDIR=\"${EPREFIX}\"${DATAPATH}/man/ + 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} + DSTROOT="\"${D}\"" \ + USRBINDIR="\"${EPREFIX}\"${BINPATH}" \ + LIBDIR="\"${EPREFIX}\"${LIBPATH}" \ + LOCLIBDIR="\"${EPREFIX}\"${LIBPATH}" cd "${ED}"${BINPATH} insinto ${DATAPATH}/man/man1 @@ -249,6 +249,8 @@ src_install() { install_ld64 install_cctools + docompress /usr/share/binutils-data/${CTARGET}/${PV}/man + cd "${S}" insinto /etc/env.d/binutils cat <<-EOF > env.d diff --git a/sys-devel/binutils-apple/binutils-apple-8.2.1-r101.ebuild b/sys-devel/binutils-apple/binutils-apple-8.2.1-r103.ebuild index dc08967e9583..9c2ab92a0fe8 100644 --- a/sys-devel/binutils-apple/binutils-apple-8.2.1-r101.ebuild +++ b/sys-devel/binutils-apple/binutils-apple-8.2.1-r103.ebuild @@ -1,11 +1,11 @@ -# Copyright 2020-2021 Gentoo Authors +# Copyright 2020-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 CMAKE_MAKEFILE_GENERATOR=emake # keep dependencies down -inherit cmake toolchain-funcs +inherit cmake DESCRIPTION="Darwin Xtools matching Xcode Tools ${PN}" HOMEPAGE="https://github.com/iains/darwin-xtools" @@ -13,20 +13,28 @@ 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" +KEYWORDS="~arm64-macos ~ppc-macos ~x64-macos" # 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="" S="${WORKDIR}/darwin-xtools-gentoo-${PVR}" +src_prepare() { + cmake_src_prepare + # kill forced libstd=libc++ usage, breaks with GCC-13 which has + # preliminary support for that + # check_cxx_compiler_flag(-stdlib=libc++ # XTOOLS_CXX_HAS_STDLIB_FLAG) + # + sed -i -e '/check_cxx_compiler_flag/s/XTOOLS_CXX_HAS_STDLIB_FLAG/NO_&/' \ + cmake/config-ix.cmake || die +} + src_configure() { CTARGET=${CTARGET:-${CHOST}} if [[ ${CTARGET} == ${CHOST} ]] ; then @@ -61,7 +69,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/" ) @@ -105,6 +113,8 @@ src_install() { dodir "${DATAPATH}" mv "${ED}"/usr/share/man "${ED}/${DATAPATH}/" || die + docompress "${DATAPATH}"/man + cd "${S}" insinto /etc/env.d/binutils cat <<-EOF > env.d diff --git a/sys-devel/binutils-apple/binutils-apple-8.2.1-r1.ebuild b/sys-devel/binutils-apple/binutils-apple-8.2.1-r2.ebuild index 3d5c7e8105dc..b1c82e7522e4 100644 --- a/sys-devel/binutils-apple/binutils-apple-8.2.1-r1.ebuild +++ b/sys-devel/binutils-apple/binutils-apple-8.2.1-r2.ebuild @@ -1,9 +1,20 @@ -# 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 eutils flag-o-matic toolchain-funcs llvm prefix +inherit flag-o-matic 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 @@ -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} @@ -54,12 +64,12 @@ src_prepare() { cp "${S}"/ld64-136-compile_stubs.h ld/compile_stubs.h cp "${S}"/ld64-274.2-Makefile Makefile - epatch "${S}"/ld64-274.1-nolto.patch - epatch "${S}"/ld64-236.3-crashreporter.patch - epatch "${S}"/ld64-264.3.102-bitcode-case.patch - epatch "${S}"/ld64-274.1-unknown-fixup.patch - epatch "${S}"/ld64-274.1-notapi.patch - epatch "${S}"/ld64-274.2-cfi-info-type.patch + eapply -p2 "${S}"/ld64-274.1-nolto.patch + eapply -p2 "${S}"/ld64-236.3-crashreporter.patch + eapply -p2 "${S}"/ld64-264.3.102-bitcode-case.patch + eapply -p2 "${S}"/ld64-274.1-unknown-fixup.patch + eapply -p2 "${S}"/ld64-274.1-notapi.patch + eapply -p2 "${S}"/ld64-274.2-cfi-info-type.patch # workound llvm-3.9.{0,1} issue # https://bugs.gentoo.org/show_bug.cgi?id=603580 @@ -77,27 +87,27 @@ src_prepare() { cp ../../${CCTOOLS}/include/mach/machine.h include/mach/machine.h # add alias for newer identifiers, because ld64 uses both but cctools # header only defines the older - epatch "${S}"/ld64-236.3-missing-cputypes.patch + eapply -p2 "${S}"/ld64-236.3-missing-cputypes.patch local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\"" echo "char ldVersionString[] = ${VER_STR};" > version.cpp - epatch "${S}"/ld64-123.2-debug-backtrace.patch + eapply -p0 "${S}"/ld64-123.2-debug-backtrace.patch 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}-7.3-no-developertools-dir.patch - epatch "${S}"/${PN}-8.2.1-llvm-prefix-3.patch - epatch "${S}"/${PN}-8.2.1-llvm-shim.patch + eapply -p1 "${S}"/${PN}-4.5-as.patch + eapply -p1 "${S}"/${PN}-5.1-as-dir.patch + eapply -p2 "${S}"/${PN}-5.1-ranlib.patch + eapply -p1 "${S}"/${PN}-3.1.1-libtool-ranlib.patch + eapply -p1 "${S}"/${PN}-3.1.1-no-headers.patch + eapply -p0 "${S}"/${PN}-4.0-no-oss-dir.patch + eapply -p1 "${S}"/cctools-839-intel-retf.patch + eapply -p2 "${S}"/${PN}-5.1-extraneous-includes.patch + eapply -p1 "${S}"/${PN}-5.1-strnlen.patch + eapply -p1 "${S}"/${PN}-7.3-make-j.patch + eapply -p1 "${S}"/${PN}-7.3-no-developertools-dir.patch + eapply -p1 "${S}"/${PN}-8.2.1-llvm-prefix-3.patch + eapply -p1 "${S}"/${PN}-8.2.1-llvm-shim.patch eprefixify libstuff/execute.c cp ../${LD64}/src/other/prune_trie.h include/mach-o/ || die @@ -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 @@ -253,19 +263,19 @@ install_cctools() { 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/ + 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} + 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 @@ -284,7 +294,7 @@ install_cctools() { # -> $EPREFIX/usr/lib/llvm/<major/bin/llvm-<tool> # -> $EPREFIX/usr/bin/llvm-<tool> # -> binutils-bin/<version>/<tool>-classic - budir=${D}/${EPREFIX}/${BINPATH} + budir="${D}"/${EPREFIX}/${BINPATH} for tool in nm size ; do use classic && \ ln -sfn ${tool}-classic "${budir}/${tool}" || \ @@ -304,7 +314,7 @@ install_cctools() { ln -sfn llvm-shim "${budir}/${tool}" done - cd "${ED}"${BINPATH} + cd "${ED}"/${BINPATH} insinto ${DATAPATH}/man/man1 local skips manpage # ar brings an up-to-date manpage with it @@ -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 @@ -351,6 +361,8 @@ src_install() { install_ld64 install_cctools + docompress /usr/share/binutils-data/${CTARGET}/${PV}/man + cd "${S}" insinto /etc/env.d/binutils cat <<-EOF > env.d diff --git a/sys-devel/binutils-apple/metadata.xml b/sys-devel/binutils-apple/metadata.xml index 93df0e9db7f7..d64768b87649 100644 --- a/sys-devel/binutils-apple/metadata.xml +++ b/sys-devel/binutils-apple/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>prefix@gentoo.org</email> @@ -9,6 +9,8 @@ <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> + <upstream> + <remote-id type="github">grobian/darwin-xtools</remote-id> + </upstream> </pkgmetadata> diff --git a/sys-devel/binutils-config/Manifest b/sys-devel/binutils-config/Manifest index 51ef8c16892b..de1dcd4ed1a2 100644 --- a/sys-devel/binutils-config/Manifest +++ b/sys-devel/binutils-config/Manifest @@ -1,2 +1 @@ -DIST binutils-config-5.3.2.tar.xz 6840 BLAKE2B 4f02b8d1f3f8d4adca811772edba6167fc0e739f8ff1e895f30745eca45b559da6622bb76a0cac6016d6e864fe7ad6c921c64c7ec1c18c130b3a64a1dd7b9cbc SHA512 03dfecf46fee941b7b9fc35b63ffd22c795ab54f0444f16fc00ed44d27c81f6baaca33170fb700cfc4d767be469f305890882839536363bc466ad200d28d2228 -DIST binutils-config-5.4.tar.xz 7332 BLAKE2B 1dd0fdebf028e9d95caa395948037d51ac1e627f370921b56fc99a6fe2e2100ddb202c8027ad1e67330306de8b4cbc6a03753105d401198e515b22fca94f760f SHA512 79411afcbec3a6cce960be1b06e4a6efdf55081992f6a92157737f7ef41fc61eaec0005078a4ce0cd78ad6af14583ab85f4f2b7b43808238088d521e1aa31af1 +DIST binutils-config-5.5.tar.xz 7344 BLAKE2B decef43013ca2f7c6d36c12d08d55f499d866b6b1b55ed58f8b2df3761077b5e2c4d09d1f2c40762d42c2d3b9827575833a502b79180ef13b845f1a39a5f2feb SHA512 6f6e21799b47e38cd61621e4ec018dc0db4811f363c0817025c3e3be651d3790b30a0cab233f35fe40b1d57c88daa246037f24a7488187f4e47cca589d87d45b diff --git a/sys-devel/binutils-config/binutils-config-5.4.ebuild b/sys-devel/binutils-config/binutils-config-5.4.ebuild deleted file mode 100644 index 5e39f373e5c4..000000000000 --- a/sys-devel/binutils-config/binutils-config-5.4.ebuild +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright 1999-2021 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/~slyfox/distfiles/${P}.tar.xz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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-5.3.2.ebuild b/sys-devel/binutils-config/binutils-config-5.5.ebuild index 20b16e75f89f..b6729edc8359 100644 --- a/sys-devel/binutils-config/binutils-config-5.3.2.ebuild +++ b/sys-devel/binutils-config/binutils-config-5.5.ebuild @@ -1,22 +1,20 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 - -inherit prefix +EAPI=8 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/~slyfox/distfiles/${P}.tar.xz" - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" + 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" +LICENSE="GPL-2 GPL-2+" SLOT="0" IUSE="+native-symlinks" @@ -29,8 +27,6 @@ src_compile() { src_install() { emake DESTDIR="${D}" PV="${PV}" install - - use prefix && eprefixify "${ED}"/usr/bin/${PN} } pkg_postinst() { diff --git a/sys-devel/binutils-config/binutils-config-9999.ebuild b/sys-devel/binutils-config/binutils-config-9999.ebuild index 5e39f373e5c4..c1bb9c114e91 100644 --- a/sys-devel/binutils-config/binutils-config-9999.ebuild +++ b/sys-devel/binutils-config/binutils-config-9999.ebuild @@ -1,22 +1,20 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 - -inherit prefix +EAPI=8 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/~slyfox/distfiles/${P}.tar.xz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + 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" +LICENSE="GPL-2 GPL-2+" SLOT="0" IUSE="+native-symlinks" @@ -29,8 +27,6 @@ src_compile() { src_install() { emake DESTDIR="${D}" PV="${PV}" install - - use prefix && eprefixify "${ED}"/usr/bin/${PN} } pkg_postinst() { diff --git a/sys-devel/binutils-config/metadata.xml b/sys-devel/binutils-config/metadata.xml index 393442d23fa4..b44ab6e35394 100644 --- a/sys-devel/binutils-config/metadata.xml +++ b/sys-devel/binutils-config/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>toolchain@gentoo.org</email> @@ -8,4 +8,8 @@ <use> <flag name="native-symlinks">Install native symlinks like 'as' or 'ar' to /usr/bin. Otherwise keep only ${CTARGET}-as and friends.</flag> </use> + <upstream> + <remote-id type="gentoo">proj/binutils-config</remote-id> + <remote-id type="github">gentoo/binutils-config</remote-id> + </upstream> </pkgmetadata> diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest index e6650c6b7a5b..253059918a79 100644 --- a/sys-devel/binutils-hppa64/Manifest +++ b/sys-devel/binutils-hppa64/Manifest @@ -1,10 +1,13 @@ -DIST binutils-2.32-patches-2.tar.xz 145672 BLAKE2B 8218e621f99cb4bcd1638c3011449b94480d207eaeb79cf75c0072e0f1a86bfd1603fc4515bc40d3ac1921a18b9a211b20568f59b11b13eb44e6cff1329c5af9 SHA512 55c25a603f6175af3ade6848e5c1faba06a147d72e9a4f53d44502d97db76499485a67b278a654d18884714a7bf7b360c77c9e42dba3cdc188f805bfe461f09f -DIST binutils-2.32.tar.xz 20774880 BLAKE2B d1bdbd9c8487c091665c197974ce4bdf520b7a67ed6997a81b87e6a0af9514a091458244f583acec5ae580ac2ee5e908f67f483b8e5263cd18ced794cb235da6 SHA512 d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a -DIST binutils-2.33.1-patches-1.tar.xz 17944 BLAKE2B 811ad416fe9c059f645856a3123ed32303afe1d0f166a15cb6de0673b5494fdcc4c165da4a68eb7ab73f007618e3a97a5578c4b47de21e57fe501d6a21b6d595 SHA512 63b439637206d21e46d2b79383b38da2b28365a0fdea1f5ac3b665cd05e0b55cd1d7763c05567a5f7ae2c645d2ae639a27e465d535b928d9f8f0e6b94f31e1f7 -DIST binutils-2.33.1.tar.xz 21490848 BLAKE2B c336a8412938dc8c224f40a763a8bea9937cca0462a8fb80e62f14aabe590107fc061a3f4b9327e1f4652cb026384d36a91b4766d4d469d2d0680932874b638c SHA512 b7a6767c6c7ca6b5cafa7080e6820b7bb3a53b7148348c438d99905defbdf0d30c9744a484ee01c9441a8153901808513366b15ba9533e20c9673c262ade36ac -DIST binutils-2.34-patches-6.tar.xz 103028 BLAKE2B d0e866d0941d2b550c7d7f23530c6ee393fa13b4f2f27832f07790989476f11d1beddb5ad5a9be5c65c1d4dff9d4598d21adcb00c1d0490f69a99127f4527447 SHA512 e05ed8886acb5cb95a3e97c5bc0564215f7d44b604610f5c4545997fd9625d6de909c37063127e819926cd1548a48d3529dd3e82e98ee6a5dbaced028c57355d -DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd -DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7ed8fbc43b60a58be1dfed05eae8a8fee857241d9e112ae673da6fc9778767675f536ece818cb85567367bb1c8f87a0693623f SHA512 35de5f227c745c5fb800784fe657b2a6216faf43e2498e8481e7b0dc79b0d2f86b3b6a10b896e060319a77a51c61d2e1b7a951ae962b3a6ef8c1a2a261d9bb6c -DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348 -DIST binutils-2.36.1-patches-3.tar.xz 32720 BLAKE2B 2a5a60168ec5ff612e7e58530092f306460cdb4a963320978dffcc22d73684486a14a5981f6eab2f7fc270def22cdc9954de455d680b2de4befc1ad4916347ba SHA512 e429cc82451675f14715d4e7640fe7b995495c8759a8e919c4291f8ca8358a663012f05c1ec6e60b1261114848379fefc9df723929770462dd676fa04fc7aa54 -DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9 +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-4.tar.xz 193852 BLAKE2B 5a83e20008e58464ed563a6817a367e50684c59d08c47345cc546054269c42463d1651441720f865851e4e182e917df1a095c68e64226e0351b64e975d524096 SHA512 6657e547bb02898632cc45a8f1894be098aa7472b6725b65f95393e621abb127e468b4e50310720bf03f7e8d0a68bc2c47af76fc43aaa8f32b2e4a149c0c6290 +DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d +DIST binutils-2.39-patches-6.tar.xz 92380 BLAKE2B 39f490f1134fb0e7dc80924a280d3113efe0ed094ee15de97c42ab751c83d2f5aa7448966d8cbbcde722b2af4999a36c1e5aa2f37ca6d2e3942b97b6d90ff152 SHA512 213cd7a86da83987966675f3195e843d898ca4ff412dfc29fd33ed80adb7bbf80a0b2919cd8e7dd49208c73a621ab7b720970f2259418bdc82ed2a568ff62064 +DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3 +DIST binutils-2.40-patches-6.tar.xz 299212 BLAKE2B 3a68a924e9747fdd0486327a5bd2490cb72376f2cb6c6a60030d8c6b71357150d956a1e71d91683d43b571cb5bf738270880f72ef175d6c8faa257b090abeb8b SHA512 984dab529276ab4f9d215f643c7c18bd1793f438aaad0be158d209787c9c4a6bb68b10bec2065d3fe14a1594d5f1c29f55b2e9bac34a6f489f4b466c02e24766 +DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925 +DIST binutils-2.41-patches-4.tar.xz 86580 BLAKE2B 32748fd0e81a7e323e9f56f0864f2a1755b8fe1b09c777075e31a292297e365c47b47003f8f1bffacc254ed8dccf1c655b7b13f61da751c9db090e56d819fbb2 SHA512 90dcf38c1ed2ae015eb9de922e946e2be62355bd51276075e7f1c0a06cd52408057c4151a2d2d4c07e33c1d2c5998001cba5509819e5722cce45f70172465ea5 +DIST binutils-2.41-patches-5.tar.xz 95176 BLAKE2B bbc94b3c7d70653a1056afe57a120b6eac9f0c8f51f05e95a1b5f80f2b7ef35e6355d740b49bc1ec2f3a13a838d5210ff4a205aa2bde5a72bc55c12100bce726 SHA512 ad293f97116f71322993f381c1af69fad1719a159f127ff16ddeca62f9b9b62aaf141abfa661985a61e9be7ae0639772148e69293a97364eebbf49182babb691 +DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba63dcd74c665fd834e858645c912ffd8245d848435288b938852830b482905606f55c40df4061215fd75c52ffc75 SHA512 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374 +DIST binutils-2.42-patches-3.tar.xz 34768 BLAKE2B e4bfaf3b42147408a8a3dcb00f50378a6b49aef8e939731a92598680cfbf42dfdf842c3f5bf3458867f79c534eb92385bc64f34f7b1d6462ec4182b5f424fbe5 SHA512 3d75e0684bbfa2cc3fc6dfcb5488ac571db58f1a5833fcc754f231664137001ccb0f2ec750947b8021fa12daf614eb2cd21b598bd962d71a34bb8ea38805850d +DIST binutils-2.42.tar.xz 27567160 BLAKE2B e67a5c028fba70e70088fd11b38ec8c9c4ed5a019badefda25abeb6275997b16f0891e7ff3424c4b82bbfae92e8992669826920dd53df61cd48469d8f7cd5bd1 SHA512 155f3ba14cd220102f4f29a4f1e5cfee3c48aa03b74603460d05afb73c70d6657a9d87eee6eb88bf13203fe6f31177a5c9addc04384e956e7da8069c8ecd20a6 diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild deleted file mode 100644 index d3887bea1c76..000000000000 --- a/sys-devel/binutils-hppa64/binutils-hppa64-2.32-r1.ebuild +++ /dev/null @@ -1,443 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -export CTARGET=hppa64-${CHOST#*-} - -inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs versionator - -DESCRIPTION="Tools necessary to build programs" -HOMEPAGE="https://sourceware.org/binutils/" -LICENSE="GPL-3+" -# USE="+cxx" is a transitional flag until llvm migrates to new flags: -# bug #677888 -IUSE="+cxx default-gold doc +gold multitarget +nls +plugins static-libs test" -REQUIRED_USE="cxx? ( gold plugins ) default-gold? ( gold )" - -# Variables that can be set here: -# 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 -# Default: slyfox - -PATCH_VER=2 -PATCH_DEV=dilfridge - -case ${PV} in - 9999) - EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" - inherit git-r3 - S=${WORKDIR}/binutils - EGIT_CHECKOUT_DIR=${S} - SLOT=${PV} - ;; - *.9999) - EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" - inherit git-r3 - S=${WORKDIR}/binutils - EGIT_CHECKOUT_DIR=${S} - EGIT_BRANCH=$(get_version_component_range 1-2) - EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch" - SLOT=$(get_version_component_range 1-2) - ;; - *) - SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz" - SLOT=$(get_version_component_range 1-2) - KEYWORDS="-* hppa" - ;; -esac - -# -# The Gentoo patchset -# -PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}} -PATCH_DEV=${PATCH_DEV:-slyfox} - -[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI} - https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz" - -# -# 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} - doc? ( sys-apps/texinfo ) - test? ( dev-util/dejagnu ) - nls? ( sys-devel/gettext ) - sys-devel/flex - virtual/yacc -" - -RESTRICT="!test? ( test )" - -MY_BUILDDIR=${WORKDIR}/build -S=${WORKDIR}/${P/-hppa64/} - -src_unpack() { - case ${PV} in - *9999) - git-r3_src_unpack - ;; - *) - ;; - esac - default - mkdir -p "${MY_BUILDDIR}" -} - -src_prepare() { - if [[ ! -z ${PATCH_VER} ]] ; then - # Use upstream patch to enable development mode - rm -v "${WORKDIR}/patch"/0000-Gentoo-Git-is-development.patch || die - einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}" - eapply "${WORKDIR}/patch"/*.patch - fi - - # This check should probably go somewhere else, like pkg_pretend. - if [[ ${CTARGET} == *-uclibc* ]] ; then - if grep -qs 'linux-gnu' "${S}"/ltconfig ; then - die "sorry, but this binutils doesn't yet support uClibc :(" - 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() { - # 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 #42033 - strip-linguas -u */po - - # Keep things sane - strip-flags - - 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+=( - --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 - --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) - ) - 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] - emake tooldir="${EPREFIX}${TOOLPATH}" all - - # only build info pages if the user wants them - if use doc ; then - emake 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 check -} - -src_install() { - local x d - - cd "${MY_BUILDDIR}" - # see Note [tooldir hack for ldscripts] - emake 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 - - # 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-hppa64/binutils-hppa64-2.33.1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.33.1.ebuild deleted file mode 100644 index ecd3f2f999b8..000000000000 --- a/sys-devel/binutils-hppa64/binutils-hppa64-2.33.1.ebuild +++ /dev/null @@ -1,438 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -export CTARGET=hppa64-${CHOST#*-} - -inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs - -DESCRIPTION="Tools necessary to build programs" -HOMEPAGE="https://sourceware.org/binutils/" -LICENSE="GPL-3+" -IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test" -REQUIRED_USE="default-gold? ( gold )" - -# Variables that can be set here: -# 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=1 -PATCH_DEV=dilfridge - -case ${PV} in - 9999) - EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" - inherit git-r3 - S=${WORKDIR}/binutils - EGIT_CHECKOUT_DIR=${S} - SLOT=${PV} - ;; - *.9999) - EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" - inherit git-r3 - S=${WORKDIR}/binutils - EGIT_CHECKOUT_DIR=${S} - EGIT_BRANCH=$(ver_cut 1-2) - EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch" - SLOT=$(ver_cut 1-2) - ;; - *) - SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz" - SLOT=$(ver_cut 1-2) - KEYWORDS="-* hppa" - ;; -esac - -# -# The Gentoo patchset -# -PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}} -PATCH_DEV=${PATCH_DEV:-slyfox} - -[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI} - https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz" - -# -# 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} - doc? ( sys-apps/texinfo ) - test? ( dev-util/dejagnu ) - nls? ( sys-devel/gettext ) - sys-devel/flex - virtual/yacc -" - -RESTRICT="!test? ( test )" - -MY_BUILDDIR=${WORKDIR}/build -S=${WORKDIR}/${P/-hppa64/} - -src_unpack() { - case ${PV} in - *9999) - git-r3_src_unpack - ;; - *) - ;; - esac - default - mkdir -p "${MY_BUILDDIR}" -} - -src_prepare() { - if [[ ! -z ${PATCH_VER} ]] ; then - einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}" - eapply "${WORKDIR}/patch"/*.patch - fi - - # This check should probably go somewhere else, like pkg_pretend. - if [[ ${CTARGET} == *-uclibc* ]] ; then - if grep -qs 'linux-gnu' "${S}"/ltconfig ; then - die "sorry, but this binutils doesn't yet support uClibc :(" - 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() { - # 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 #42033 - strip-linguas -u */po - - # Keep things sane - strip-flags - - 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+=( - --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 - --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) - ) - 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] - emake tooldir="${EPREFIX}${TOOLPATH}" all - - # only build info pages if the user wants them - if use doc ; then - emake 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 check -} - -src_install() { - local x d - - cd "${MY_BUILDDIR}" - # see Note [tooldir hack for ldscripts] - emake 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 - - # 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-hppa64/binutils-hppa64-2.35.2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild index 3da9b9ee993e..144ce57e1699 100644 --- a/sys-devel/binutils-hppa64/binutils-hppa64-2.35.2.ebuild +++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.37_p1-r2.ebuild @@ -1,19 +1,19 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 export CTARGET=hppa64-${CHOST#*-} -inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs +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 +plugins static-libs test" +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: +# 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 @@ -21,32 +21,21 @@ 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=2 PATCH_DEV=dilfridge -case ${PV} in - 9999) - EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" - inherit git-r3 - S=${WORKDIR}/binutils - EGIT_CHECKOUT_DIR=${S} - SLOT=${PV} - ;; - *) - SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz" - SLOT=$(ver_cut 1-2) - KEYWORDS="-* hppa" - ;; -esac - -# -# The Gentoo patchset -# -PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}} -PATCH_DEV=${PATCH_DEV:-slyfox} - -[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI} - https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz" +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 @@ -69,10 +58,13 @@ RDEPEND=" DEPEND="${RDEPEND}" BDEPEND=" doc? ( sys-apps/texinfo ) - test? ( dev-util/dejagnu ) + test? ( + dev-util/dejagnu + app-alternatives/bc + ) nls? ( sys-devel/gettext ) - sys-devel/flex - virtual/yacc + app-alternatives/lex + app-alternatives/yacc " RESTRICT="!test? ( test )" @@ -81,27 +73,46 @@ MY_BUILDDIR=${WORKDIR}/build S=${WORKDIR}/${P/-hppa64/} src_unpack() { - case ${PV} in - *9999) - git-r3_src_unpack - ;; - *) - ;; - esac - default - mkdir -p "${MY_BUILDDIR}" + if [[ ${PV} == 9999* ]] ; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git + git-r3_src_unpack + mv patches-git/9999 patch || die + + EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" + S=${WORKDIR}/binutils + EGIT_CHECKOUT_DIR=${S} + git-r3_src_unpack + else + unpack ${P/-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() { - if [[ ! -z ${PATCH_VER} ]] ; then - einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}" - eapply "${WORKDIR}/patch"/*.patch + local patchsetname + if [[ ${PV} == 9999* ]] ; then + patchsetname="from git master" + else + patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}" fi - # This check should probably go somewhere else, like pkg_pretend. - if [[ ${CTARGET} == *-uclibc* ]] ; then - if grep -qs 'linux-gnu' "${S}"/ltconfig ; then - die "sorry, but this binutils doesn't yet support uClibc :(" + if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then + if ! use vanilla; then + einfo "Applying binutils patchset ${patchsetname}" + eapply "${WORKDIR}/patch" + einfo "Done." fi fi @@ -111,17 +122,6 @@ src_prepare() { -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 @@ -162,6 +162,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 @@ -236,6 +238,10 @@ src_configure() { --enable-relro # Newer versions (>=2.24) make this an explicit option. #497268 --enable-install-libiberty + # Available from 2.35 on + --enable-textrel-check=warning + # Works better than vapier's patch... #808787 + --enable-new-dtags --disable-werror --with-bugurl="$(toolchain-binutils_bugurl)" --with-pkgversion="$(toolchain-binutils_pkgversion)" @@ -258,7 +264,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 @@ -287,8 +301,10 @@ src_compile() { src_test() { cd "${MY_BUILDDIR}" + # bug 637066 filter-flags -Wall -Wreturn-type + emake -k check } @@ -410,6 +426,7 @@ pkg_postrm() { binutils-config ${CTARGET}-${PV} fi } + # Note [slotting support] # ----------------------- # Gentoo's layout for binutils files is non-standard as Gentoo 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 000000000000..909ed7c262ce --- /dev/null +++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild @@ -0,0 +1,468 @@ +# Copyright 1999-2024 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 + app-alternatives/bc + ) + nls? ( sys-devel/gettext ) + app-alternatives/lex + app-alternatives/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 + + # 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-hppa64/binutils-hppa64-2.39-r5.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild new file mode 100644 index 000000000000..9b2ba15370d8 --- /dev/null +++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.39-r5.ebuild @@ -0,0 +1,492 @@ +# Copyright 1999-2024 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 gprofng 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=6 +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 + app-alternatives/bc + ) + nls? ( sys-devel/gettext ) + app-alternatives/lex + app-alternatives/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 + + # 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 + + # These hardening options are available from 2.39+ but + # they unconditionally enable the behaviour even on arches + # where e.g. execstacks can't be avoided. + # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592. + #--enable-warn-execstack + #--enable-warn-rwx-segments + #--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing) + + # 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) + # 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 + + # Avoid automagic dev-libs/msgpack dep, bug #865875 + --without-msgpack + + # 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 can enable this by default in future, but it's brand new + # in 2.39 with several bugs: + # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477) + # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521) + # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479) + # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113) + $(use_enable gprofng) + ) + + 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-hppa64/binutils-hppa64-2.40-r7.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild new file mode 100644 index 000000000000..9b2ba15370d8 --- /dev/null +++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.40-r7.ebuild @@ -0,0 +1,492 @@ +# Copyright 1999-2024 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 gprofng 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=6 +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 + app-alternatives/bc + ) + nls? ( sys-devel/gettext ) + app-alternatives/lex + app-alternatives/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 + + # 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 + + # These hardening options are available from 2.39+ but + # they unconditionally enable the behaviour even on arches + # where e.g. execstacks can't be avoided. + # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592. + #--enable-warn-execstack + #--enable-warn-rwx-segments + #--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing) + + # 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) + # 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 + + # Avoid automagic dev-libs/msgpack dep, bug #865875 + --without-msgpack + + # 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 can enable this by default in future, but it's brand new + # in 2.39 with several bugs: + # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477) + # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521) + # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479) + # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113) + $(use_enable gprofng) + ) + + 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-hppa64/binutils-hppa64-2.41-r3.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild new file mode 100644 index 000000000000..cfe58c7c1e4f --- /dev/null +++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r3.ebuild @@ -0,0 +1,497 @@ +# Copyright 1999-2024 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 gprofng 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 + app-alternatives/bc + ) + nls? ( sys-devel/gettext ) + app-alternatives/lex + app-alternatives/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 + + # 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} + # portage's econf() does not detect presence of --d-d-t + # because it greps only top-level ./configure. But not + # libiberty's or bfd's configure. + --disable-dependency-tracking + --disable-silent-rules + --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 + + # These hardening options are available from 2.39+ but + # they unconditionally enable the behaviour even on arches + # where e.g. execstacks can't be avoided. + # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592. + #--enable-warn-execstack + #--enable-warn-rwx-segments + #--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing) + + # 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) + # 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 + + # Avoid automagic dev-libs/msgpack dep, bug #865875 + --without-msgpack + + # 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 can enable this by default in future, but it's brand new + # in 2.39 with several bugs: + # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477) + # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521) + # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479) + # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113) + $(use_enable gprofng) + ) + + 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[@]}" + + # 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 tooldir="${EPREFIX}${TOOLPATH}" all + + # only build info pages if the user wants them + if use doc ; then + emake 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 check +} + +src_install() { + local x d + + cd "${MY_BUILDDIR}" || die + + # see Note [tooldir hack for ldscripts] + emake 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-hppa64/binutils-hppa64-2.41-r5.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r5.ebuild new file mode 100644 index 000000000000..c4fc096afca6 --- /dev/null +++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.41-r5.ebuild @@ -0,0 +1,497 @@ +# Copyright 1999-2024 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 gprofng 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=5 +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 + app-alternatives/bc + ) + nls? ( sys-devel/gettext ) + app-alternatives/lex + app-alternatives/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 + + # 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} + # portage's econf() does not detect presence of --d-d-t + # because it greps only top-level ./configure. But not + # libiberty's or bfd's configure. + --disable-dependency-tracking + --disable-silent-rules + --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 + + # These hardening options are available from 2.39+ but + # they unconditionally enable the behaviour even on arches + # where e.g. execstacks can't be avoided. + # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592. + #--enable-warn-execstack + #--enable-warn-rwx-segments + #--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing) + + # 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) + # 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 + + # Avoid automagic dev-libs/msgpack dep, bug #865875 + --without-msgpack + + # 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 can enable this by default in future, but it's brand new + # in 2.39 with several bugs: + # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477) + # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521) + # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479) + # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113) + $(use_enable gprofng) + ) + + 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[@]}" + + # 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 tooldir="${EPREFIX}${TOOLPATH}" all + + # only build info pages if the user wants them + if use doc ; then + emake 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 check +} + +src_install() { + local x d + + cd "${MY_BUILDDIR}" || die + + # see Note [tooldir hack for ldscripts] + emake 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-hppa64/binutils-hppa64-2.42-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild new file mode 100644 index 000000000000..53e91ed47268 --- /dev/null +++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.42-r1.ebuild @@ -0,0 +1,534 @@ +# Copyright 1999-2024 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 strip-linguas toolchain-funcs + +DESCRIPTION="Tools necessary to build programs" +HOMEPAGE="https://sourceware.org/binutils/" + +LICENSE="GPL-3+" +IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd" + +# 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=3 +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://sourceware.org/pub/binutils/releases/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 + debuginfod? ( + dev-libs/elfutils[debuginfod(-)] + ) + zstd? ( app-arch/zstd:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + doc? ( sys-apps/texinfo ) + test? ( + dev-util/dejagnu + app-alternatives/bc + ) + nls? ( sys-devel/gettext ) + zstd? ( virtual/pkgconfig ) + app-alternatives/lex + app-alternatives/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 + + 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." + + # This is applied conditionally for now just out of caution. + # It should be okay on non-prefix systems though. See bug #892549. + if [[ ${PN} != binutils-hppa64 ]] && { is_cross || use prefix; } ; then + eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch \ + "${FILESDIR}"/binutils-2.41-linker-prefix.patch + fi + 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 + + # 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 cet && filter-flags -mindirect-branch -mindirect-branch=* + use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + 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 ) + 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} + # portage's econf() does not detect presence of --d-d-t + # because it greps only top-level ./configure. But not + # libiberty's or bfd's configure. + --disable-dependency-tracking + --disable-silent-rules + --enable-obsolete + --enable-shared + --enable-threads + --enable-relro + --enable-install-libiberty + --enable-textrel-check=$(usex hardened error warning) + # Things to think about + #--enable-deterministic-archives + --enable-new-dtags + --disable-jansson + --disable-werror + --with-bugurl="$(toolchain-binutils_bugurl)" + --with-pkgversion="$(toolchain-binutils_pkgversion)" + $(use_enable static-libs static) + $(use_with zstd) + + # 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) + + $(use_with debuginfod) + + # Avoid automagic dev-libs/msgpack dep, bug #865875 + --without-msgpack + + # 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 can enable this by default in future, but it's brand new + # in 2.39 with several bugs: + # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477) + # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521) + # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479) + # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113) + $(use_enable gprofng) + ) + + case ${CTARGET} in + x86_64-*|aarch64*|arm64*|i[3456]*) + # These hardening options are available from 2.39+ but + # they unconditionally enable the behaviour even on arches + # where e.g. execstacks can't be avoided. + # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592. + # + # TODO: Get the logic for this fixed upstream so it doesn't + # create impossible broken combinations on some arches, like mips. + # + # TODO: Get the logic for this fixed upstream so --disable-* works + # as expected. + myconf+=( + --enable-warn-execstack=yes + --enable-warn-rwx-segments=yes + ) + + if use hardened ; then + myconf+=( + # TOOD: breaks glibc test suite + #--enable-error-execstack=yes + #--enable-error-rwx-segments=yes + --enable-default-execstack=no + ) + fi + ;; + *) + ;; + esac + + if use elibc_musl ; then + # Override our earlier setting for musl, as textrels don't + # work there at all. See bug #707660. + myconf+=( + --enable-textrel-check=error + ) + fi + + 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[@]}" + + # 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] + # see linker prefix patch + emake \ + tooldir="${EPREFIX}${TOOLPATH}" \ + gentoo_prefix=$(usex prefix-guest "${EPREFIX}"/usr /usr) \ + all + + # only build info pages if the user wants them + if use doc ; then + emake 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 check +} + +src_install() { + local x d + + cd "${MY_BUILDDIR}" || die + + # see Note [tooldir hack for ldscripts] + emake 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} + + docompress "${DATAPATH}"/{info,man} + + # 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-hppa64/files/binutils-hppa64-2.35.1-cet.patch b/sys-devel/binutils-hppa64/files/binutils-hppa64-2.35.1-cet.patch deleted file mode 100644 index 7477ff90ac95..000000000000 --- a/sys-devel/binutils-hppa64/files/binutils-hppa64-2.35.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/binutils-hppa64/files/binutils-hppa64-2.36.1-bfd-ctf.patch b/sys-devel/binutils-hppa64/files/binutils-hppa64-2.36.1-bfd-ctf.patch deleted file mode 100644 index d7daf683669d..000000000000 --- a/sys-devel/binutils-hppa64/files/binutils-hppa64-2.36.1-bfd-ctf.patch +++ /dev/null @@ -1,68 +0,0 @@ -https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=755ba58ebef02e1be9fc6770d00243ba6ed0223c -https://bugs.gentoo.org/783777 - -From 755ba58ebef02e1be9fc6770d00243ba6ed0223c Mon Sep 17 00:00:00 2001 -From: Nick Alcock <nick.alcock@oracle.com> -Date: Thu, 18 Mar 2021 12:37:52 +0000 -Subject: [PATCH] Add install dependencies for ld -> bfd and libctf -> bfd - -This stops problems parallel-installing if a relink of libctf is needed. - -Also adds corresponding install-strip dependencies. - -ChangeLog -2021-03-18 Nick Alcock <nick.alcock@oracle.com> - - PR libctf/27482 - * Makefile.def: Add install-bfd dependencies for install-libctf and - install-ld, and install-strip-bfd dependencies for - install-strip-libctf and install-strip-ld; move the install-ld - dependency on install-libctf to join it. - * Makefile.in: Regenerated. ---- ---- a/Makefile.def -+++ b/Makefile.def -@@ -448,7 +448,6 @@ dependencies = { module=all-binutils; on=all-intl; }; - dependencies = { module=all-binutils; on=all-gas; }; - dependencies = { module=all-binutils; on=all-libctf; }; - dependencies = { module=all-ld; on=all-libctf; }; --dependencies = { module=install-ld; on=install-libctf; }; - - // We put install-opcodes before install-binutils because the installed - // binutils might be on PATH, and they might need the shared opcodes -@@ -456,6 +455,14 @@ dependencies = { module=install-ld; on=install-libctf; }; - dependencies = { module=install-binutils; on=install-opcodes; }; - dependencies = { module=install-strip-binutils; on=install-strip-opcodes; }; - -+// Likewise for ld, libctf, and bfd. -+dependencies = { module=install-libctf; on=install-bfd; }; -+dependencies = { module=install-ld; on=install-bfd; }; -+dependencies = { module=install-ld; on=install-libctf; }; -+dependencies = { module=install-strip-libctf; on=install-strip-bfd; }; -+dependencies = { module=install-strip-ld; on=install-strip-bfd; }; -+dependencies = { module=install-strip-ld; on=install-strip-libctf; }; -+ - // libopcodes depends on libbfd - dependencies = { module=install-opcodes; on=install-bfd; }; - dependencies = { module=install-strip-opcodes; on=install-strip-bfd; }; ---- a/Makefile.in -+++ b/Makefile.in -@@ -52170,9 +52170,14 @@ all-stage3-ld: maybe-all-stage3-libctf - all-stage4-ld: maybe-all-stage4-libctf - all-stageprofile-ld: maybe-all-stageprofile-libctf - all-stagefeedback-ld: maybe-all-stagefeedback-libctf --install-ld: maybe-install-libctf - install-binutils: maybe-install-opcodes - install-strip-binutils: maybe-install-strip-opcodes -+install-libctf: maybe-install-bfd -+install-ld: maybe-install-bfd -+install-ld: maybe-install-libctf -+install-strip-libctf: maybe-install-strip-bfd -+install-strip-ld: maybe-install-strip-bfd -+install-strip-ld: maybe-install-strip-libctf - install-opcodes: maybe-install-bfd - install-strip-opcodes: maybe-install-strip-bfd - configure-gas: maybe-configure-intl --- -2.27.0 - diff --git a/sys-devel/binutils-hppa64/files/binutils-hppa64-2.36.1-ld-ctf.patch b/sys-devel/binutils-hppa64/files/binutils-hppa64-2.36.1-ld-ctf.patch deleted file mode 100644 index 012df3aed812..000000000000 --- a/sys-devel/binutils-hppa64/files/binutils-hppa64-2.36.1-ld-ctf.patch +++ /dev/null @@ -1,48 +0,0 @@ -https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=f04ce15e831b691d7610dba284e266919e757b10 -https://bugs.gentoo.org/783777 - -From f04ce15e831b691d7610dba284e266919e757b10 Mon Sep 17 00:00:00 2001 -From: Nick Alcock <nick.alcock@oracle.com> -Date: Tue, 26 Jan 2021 16:05:17 +0000 -Subject: [PATCH] ld: depend on libctf - -Since ld may depend on libctf (if present), and libctf may be relinked -by the installation process, libctf must be installed before ld is, -or the relink may fail if it calls on symbols or symbol versions that do -not exist in any libctf already present on the system. (If none is -present, the copy in the build tree will be automatically used, but -if one *is* present, it may take precedence and break things.) - -(This is a maybe- dependency, so it will work even if libctf is -disabled.) - -ChangeLog -2021-01-26 Nick Alcock <nick.alcock@oracle.com> - - PR 27250 - * Makefile.def: Add install-libctf dependency to install-ld. - * Makefile.in: Regenerated. ---- ---- a/Makefile.def -+++ b/Makefile.def -@@ -448,6 +448,7 @@ dependencies = { module=all-binutils; on=all-intl; }; - dependencies = { module=all-binutils; on=all-gas; }; - dependencies = { module=all-binutils; on=all-libctf; }; - dependencies = { module=all-ld; on=all-libctf; }; -+dependencies = { module=install-ld; on=install-libctf; }; - - // We put install-opcodes before install-binutils because the installed - // binutils might be on PATH, and they might need the shared opcodes ---- a/Makefile.in -+++ b/Makefile.in -@@ -52170,6 +52170,7 @@ all-stage3-ld: maybe-all-stage3-libctf - all-stage4-ld: maybe-all-stage4-libctf - all-stageprofile-ld: maybe-all-stageprofile-libctf - all-stagefeedback-ld: maybe-all-stagefeedback-libctf -+install-ld: maybe-install-libctf - install-binutils: maybe-install-opcodes - install-strip-binutils: maybe-install-strip-opcodes - install-opcodes: maybe-install-bfd --- -2.27.0 - diff --git a/sys-devel/binutils-hppa64/metadata.xml b/sys-devel/binutils-hppa64/metadata.xml index 35c85c00a3ae..5e566060dac2 100644 --- a/sys-devel/binutils-hppa64/metadata.xml +++ b/sys-devel/binutils-hppa64/metadata.xml @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>hppa@gentoo.org</email> - <name>Gentoo Linux HPPA Development</name> + <name>HPPA architecture team</name> </maintainer> <maintainer type="project"> <email>toolchain@gentoo.org</email> @@ -13,7 +13,13 @@ <flag name="cet">Enable Intel Control-flow Enforcement Technology.</flag> <flag name="default-gold">Set ld to point to ld.gold instead of ld.bfd</flag> <flag name="gold">Build ld.gold linker</flag> + <flag name="gprofng">Enable the next-generation gprofng profiler</flag> + <flag name="pgo">Build binutils with Profile Guided Optimization (PGO) and LTO</flag> <flag name="plugins">Enable plugin support in tools</flag> <flag name="multitarget">Adds support to binutils for cross compiling (does not work with gas)</flag> + <flag name="debuginfod">Enable debuginfod support via <pkg>dev-libs/elfutils</pkg> libdebuginfod</flag> </use> + <upstream> + <remote-id type="cpe">cpe:/a:gnu:binutils</remote-id> + </upstream> </pkgmetadata> diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest index 6db5ab7b3188..635b751d198d 100644 --- a/sys-devel/binutils/Manifest +++ b/sys-devel/binutils/Manifest @@ -1,4 +1,3 @@ -DIST binutils-2.32-patches-2.tar.xz 145672 BLAKE2B 8218e621f99cb4bcd1638c3011449b94480d207eaeb79cf75c0072e0f1a86bfd1603fc4515bc40d3ac1921a18b9a211b20568f59b11b13eb44e6cff1329c5af9 SHA512 55c25a603f6175af3ade6848e5c1faba06a147d72e9a4f53d44502d97db76499485a67b278a654d18884714a7bf7b360c77c9e42dba3cdc188f805bfe461f09f DIST binutils-2.32-patches-3.tar.xz 151372 BLAKE2B 70d5f78d9f3e3bf9ff096b6f24babcc35c63395a5e1155a981a5ceb4b7a5706ad2ee0c77c74e910fc0eefeaed19763113186deb9665eed538dc3b8e227bef12d SHA512 5e91eff63332c2aca86a82a287ca4959a6098065ed88078265a3d79a2c851abd113e9736b75d8102a208996ed1191b0e23569921217ece975f1d9005a55afd0d DIST binutils-2.32.tar.xz 20774880 BLAKE2B d1bdbd9c8487c091665c197974ce4bdf520b7a67ed6997a81b87e6a0af9514a091458244f583acec5ae580ac2ee5e908f67f483b8e5263cd18ced794cb235da6 SHA512 d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a DIST binutils-2.33.1-patches-2.tar.xz 18636 BLAKE2B 0e0757329b6a83aeff4f4c450c95e73fd48fcc89f83e63f294568632bee0972552cf2f57494352c5d9a7c16a51cdbc4108b38fa6028d4388c8e76046b3da9212 SHA512 d982f68d1f5fdb384309a2a1b7426bf840a90e7a85b37229b4223b62c36cab9dd9ec0c08382c85c68adf996dec21133df3180a2fc649363adae8645f8282f71d @@ -7,5 +6,19 @@ DIST binutils-2.34-patches-6.tar.xz 103028 BLAKE2B d0e866d0941d2b550c7d7f23530c6 DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7ed8fbc43b60a58be1dfed05eae8a8fee857241d9e112ae673da6fc9778767675f536ece818cb85567367bb1c8f87a0693623f SHA512 35de5f227c745c5fb800784fe657b2a6216faf43e2498e8481e7b0dc79b0d2f86b3b6a10b896e060319a77a51c61d2e1b7a951ae962b3a6ef8c1a2a261d9bb6c DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348 -DIST binutils-2.36.1-patches-3.tar.xz 32720 BLAKE2B 2a5a60168ec5ff612e7e58530092f306460cdb4a963320978dffcc22d73684486a14a5981f6eab2f7fc270def22cdc9954de455d680b2de4befc1ad4916347ba SHA512 e429cc82451675f14715d4e7640fe7b995495c8759a8e919c4291f8ca8358a663012f05c1ec6e60b1261114848379fefc9df723929770462dd676fa04fc7aa54 +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-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-4.tar.xz 193852 BLAKE2B 5a83e20008e58464ed563a6817a367e50684c59d08c47345cc546054269c42463d1651441720f865851e4e182e917df1a095c68e64226e0351b64e975d524096 SHA512 6657e547bb02898632cc45a8f1894be098aa7472b6725b65f95393e621abb127e468b4e50310720bf03f7e8d0a68bc2c47af76fc43aaa8f32b2e4a149c0c6290 +DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d +DIST binutils-2.39-patches-6.tar.xz 92380 BLAKE2B 39f490f1134fb0e7dc80924a280d3113efe0ed094ee15de97c42ab751c83d2f5aa7448966d8cbbcde722b2af4999a36c1e5aa2f37ca6d2e3942b97b6d90ff152 SHA512 213cd7a86da83987966675f3195e843d898ca4ff412dfc29fd33ed80adb7bbf80a0b2919cd8e7dd49208c73a621ab7b720970f2259418bdc82ed2a568ff62064 +DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3 +DIST binutils-2.40-patches-7.tar.xz 299188 BLAKE2B 170cd2432e0458889b240c3603461d0b4bfa62d5314634b101a629db455d87235ac14ad44c63920b713d5235fa8b73902960df1019153873ef06a33aa7050b4b SHA512 a60da163caee68fe1fa355385d404e8998ebed0e390d50e0713e95334733a8b4e37bc63d522817284c027953e43848dbc98042461a47131fb53bc69203b4ee87 +DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925 +DIST binutils-2.41-patches-2.tar.xz 20288 BLAKE2B 1cc29e868ded12845856c5da567f23798fe3017961ce079325c20f456b837cab11560d896065f70953b0bab55bf565288541579e9c3e0991a87083edf2a85fa5 SHA512 75619a5e17b75d72f9bdd9d5e5ee3b566c94de64410bfc074f1a9bfb9f08db9ecf8be216efa1053263468aa8ec99b8aa3b2b095e63cb95f3566500ac0c3b9432 +DIST binutils-2.41-patches-4.tar.xz 86580 BLAKE2B 32748fd0e81a7e323e9f56f0864f2a1755b8fe1b09c777075e31a292297e365c47b47003f8f1bffacc254ed8dccf1c655b7b13f61da751c9db090e56d819fbb2 SHA512 90dcf38c1ed2ae015eb9de922e946e2be62355bd51276075e7f1c0a06cd52408057c4151a2d2d4c07e33c1d2c5998001cba5509819e5722cce45f70172465ea5 +DIST binutils-2.41-patches-5.tar.xz 95176 BLAKE2B bbc94b3c7d70653a1056afe57a120b6eac9f0c8f51f05e95a1b5f80f2b7ef35e6355d740b49bc1ec2f3a13a838d5210ff4a205aa2bde5a72bc55c12100bce726 SHA512 ad293f97116f71322993f381c1af69fad1719a159f127ff16ddeca62f9b9b62aaf141abfa661985a61e9be7ae0639772148e69293a97364eebbf49182babb691 +DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba63dcd74c665fd834e858645c912ffd8245d848435288b938852830b482905606f55c40df4061215fd75c52ffc75 SHA512 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374 +DIST binutils-2.42-patches-3.tar.xz 34768 BLAKE2B e4bfaf3b42147408a8a3dcb00f50378a6b49aef8e939731a92598680cfbf42dfdf842c3f5bf3458867f79c534eb92385bc64f34f7b1d6462ec4182b5f424fbe5 SHA512 3d75e0684bbfa2cc3fc6dfcb5488ac571db58f1a5833fcc754f231664137001ccb0f2ec750947b8021fa12daf614eb2cd21b598bd962d71a34bb8ea38805850d +DIST binutils-2.42.tar.xz 27567160 BLAKE2B e67a5c028fba70e70088fd11b38ec8c9c4ed5a019badefda25abeb6275997b16f0891e7ff3424c4b82bbfae92e8992669826920dd53df61cd48469d8f7cd5bd1 SHA512 155f3ba14cd220102f4f29a4f1e5cfee3c48aa03b74603460d05afb73c70d6657a9d87eee6eb88bf13203fe6f31177a5c9addc04384e956e7da8069c8ecd20a6 diff --git a/sys-devel/binutils/binutils-2.32-r1.ebuild b/sys-devel/binutils/binutils-2.32-r1.ebuild deleted file mode 100644 index 7bd6b4fbdc07..000000000000 --- a/sys-devel/binutils/binutils-2.32-r1.ebuild +++ /dev/null @@ -1,434 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs versionator - -DESCRIPTION="Tools necessary to build programs" -HOMEPAGE="https://sourceware.org/binutils/" -LICENSE="GPL-3+" -# USE="+cxx" is a transitional flag until llvm migrates to new flags: -# bug #677888 -IUSE="+cxx default-gold doc +gold multitarget +nls +plugins static-libs test" -REQUIRED_USE="cxx? ( gold plugins ) default-gold? ( gold )" - -# Variables that can be set here: -# 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 -# Default: dilfridge :) - -PATCH_VER=2 -PATCH_DEV=dilfridge - -case ${PV} in - 9999) - EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" - inherit git-r3 - S=${WORKDIR}/binutils - EGIT_CHECKOUT_DIR=${S} - SLOT=${PV} - ;; - *) - SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz" - SLOT=$(get_version_component_range 1-2) - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" - ;; -esac - -# -# The Gentoo patchset -# -PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}} -PATCH_DEV=${PATCH_DEV:-slyfox} - -[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI} - https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz" - -# Disable gold testsuite since it always fails. -PATCHES=( "${FILESDIR}/${PN}-2.29.1-nogoldtest.patch" ) - -# -# 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} - doc? ( sys-apps/texinfo ) - test? ( dev-util/dejagnu ) - nls? ( sys-devel/gettext ) - sys-devel/flex - virtual/yacc -" - -RESTRICT="!test? ( test )" - -MY_BUILDDIR=${WORKDIR}/build - -src_unpack() { - case ${PV} in - *9999) - git-r3_src_unpack - ;; - *) - ;; - esac - default - mkdir -p "${MY_BUILDDIR}" -} - -src_prepare() { - if [[ ! -z ${PATCH_VER} ]] ; then - # Use upstream patch to enable development mode - rm -v "${WORKDIR}/patch"/0000-Gentoo-Git-is-development.patch || die - - einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}" - eapply "${WORKDIR}/patch"/*.patch - fi - - # This check should probably go somewhere else, like pkg_pretend. - if [[ ${CTARGET} == *-uclibc* ]] ; then - if grep -qs 'linux-gnu' "${S}"/ltconfig ; then - die "sorry, but this binutils doesn't yet support uClibc :(" - 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() { - # 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 #42033 - strip-linguas -u */po - - # Keep things sane - strip-flags - - 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+=( - --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 - --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) - ) - 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] - emake tooldir="${EPREFIX}${TOOLPATH}" all - - # only build info pages if the user wants them - if use doc ; then - emake 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 - - # enable verbose test run and result logging - emake -k check RUNTESTFLAGS='-a -v' VERBOSE=1 -} - -src_install() { - local x d - - cd "${MY_BUILDDIR}" - # see Note [tooldir hack for ldscripts] - emake 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} diff --git a/sys-devel/binutils/binutils-2.32-r2.ebuild b/sys-devel/binutils/binutils-2.32-r2.ebuild index d4de5f2ce4b3..606d5951eec2 100644 --- a/sys-devel/binutils/binutils-2.32-r2.ebuild +++ b/sys-devel/binutils/binutils-2.32-r2.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -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/" @@ -76,8 +76,8 @@ DEPEND="${RDEPEND} doc? ( sys-apps/texinfo ) test? ( dev-util/dejagnu ) nls? ( sys-devel/gettext ) - sys-devel/flex - virtual/yacc + app-alternatives/lex + app-alternatives/yacc " RESTRICT="!test? ( test )" @@ -97,7 +97,7 @@ src_unpack() { } src_prepare() { - if [[ ! -z ${PATCH_VER} ]] ; then + if [[ -n ${PATCH_VER} ]] ; then # Use upstream patch to enable development mode rm -v "${WORKDIR}/patch"/0000-Gentoo-Git-is-development.patch || die @@ -105,30 +105,12 @@ src_prepare() { eapply "${WORKDIR}/patch"/*.patch fi - # This check should probably go somewhere else, like pkg_pretend. - if [[ ${CTARGET} == *-uclibc* ]] ; then - if grep -qs 'linux-gnu' "${S}"/ltconfig ; then - die "sorry, but this binutils doesn't yet support uClibc :(" - 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 @@ -169,6 +151,8 @@ src_configure() { # Keep things sane strip-flags + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + local x echo for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do @@ -286,6 +270,10 @@ src_compile() { src_test() { cd "${MY_BUILDDIR}" + # https://sourceware.org/PR31327 + local -x XZ_OPT="-T1" + local -x XZ_DEFAULTS="-T1" + # bug 637066 filter-flags -Wall -Wreturn-type diff --git a/sys-devel/binutils/binutils-2.33.1-r1.ebuild b/sys-devel/binutils/binutils-2.33.1-r1.ebuild index 50ec9616243c..29def533ca06 100644 --- a/sys-devel/binutils/binutils-2.33.1-r1.ebuild +++ b/sys-devel/binutils/binutils-2.33.1-r1.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -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/" @@ -68,8 +68,8 @@ DEPEND="${RDEPEND} doc? ( sys-apps/texinfo ) test? ( dev-util/dejagnu ) nls? ( sys-devel/gettext ) - sys-devel/flex - virtual/yacc + app-alternatives/lex + app-alternatives/yacc " RESTRICT="!test? ( test )" @@ -93,35 +93,17 @@ src_unpack() { } src_prepare() { - if [[ ! -z ${PATCH_VER} ]] ; then + if [[ -n ${PATCH_VER} ]] ; then einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}" eapply "${WORKDIR}/patch"/*.patch fi - # This check should probably go somewhere else, like pkg_pretend. - if [[ ${CTARGET} == *-uclibc* ]] ; then - if grep -qs 'linux-gnu' "${S}"/ltconfig ; then - die "sorry, but this binutils doesn't yet support uClibc :(" - 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 @@ -162,6 +144,8 @@ src_configure() { # Keep things sane strip-flags + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + local x echo for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do @@ -279,6 +263,10 @@ src_compile() { src_test() { cd "${MY_BUILDDIR}" + # https://sourceware.org/PR31327 + local -x XZ_OPT="-T1" + local -x XZ_DEFAULTS="-T1" + # bug 637066 filter-flags -Wall -Wreturn-type diff --git a/sys-devel/binutils/binutils-2.34-r2.ebuild b/sys-devel/binutils/binutils-2.34-r2.ebuild index d9683b91ae79..009154a560d0 100644 --- a/sys-devel/binutils/binutils-2.34-r2.ebuild +++ b/sys-devel/binutils/binutils-2.34-r2.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -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/" @@ -69,8 +69,8 @@ BDEPEND=" doc? ( sys-apps/texinfo ) test? ( dev-util/dejagnu ) nls? ( sys-devel/gettext ) - sys-devel/flex - virtual/yacc + app-alternatives/lex + app-alternatives/yacc " RESTRICT="!test? ( test )" @@ -90,35 +90,17 @@ src_unpack() { } src_prepare() { - if [[ ! -z ${PATCH_VER} ]] ; then + if [[ -n ${PATCH_VER} ]] ; then einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}" eapply "${WORKDIR}/patch"/*.patch fi - # This check should probably go somewhere else, like pkg_pretend. - if [[ ${CTARGET} == *-uclibc* ]] ; then - if grep -qs 'linux-gnu' "${S}"/ltconfig ; then - die "sorry, but this binutils doesn't yet support uClibc :(" - 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 @@ -159,6 +141,8 @@ src_configure() { # Keep things sane strip-flags + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + local x echo for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do @@ -280,6 +264,10 @@ src_compile() { src_test() { cd "${MY_BUILDDIR}" + # https://sourceware.org/PR31327 + local -x XZ_OPT="-T1" + local -x XZ_DEFAULTS="-T1" + # bug 637066 filter-flags -Wall -Wreturn-type diff --git a/sys-devel/binutils/binutils-2.35.2.ebuild b/sys-devel/binutils/binutils-2.35.2.ebuild index 63ef9e389bbf..2e7d17a37bea 100644 --- a/sys-devel/binutils/binutils-2.35.2.ebuild +++ b/sys-devel/binutils/binutils-2.35.2.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -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/" @@ -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 # @@ -58,16 +58,19 @@ BDEPEND=" doc? ( sys-apps/texinfo ) test? ( dev-util/dejagnu - sys-devel/bc + app-alternatives/bc ) nls? ( sys-devel/gettext ) - sys-devel/flex - virtual/yacc + app-alternatives/lex + app-alternatives/yacc " RESTRICT="!test? ( test )" -PATCHES=("${FILESDIR}"/${PN}-2.35.1-cet.patch) +PATCHES=( + "${FILESDIR}"/${PN}-2.35.1-cet.patch + "${FILESDIR}"/${PN}-2.35.2-powerpc-tests.patch +) MY_BUILDDIR=${WORKDIR}/build @@ -101,7 +104,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" @@ -109,30 +112,12 @@ src_prepare() { fi fi - # This check should probably go somewhere else, like pkg_pretend. - if [[ ${CTARGET} == *-uclibc* ]] ; then - if grep -qs 'linux-gnu' "${S}"/ltconfig ; then - die "sorry, but this binutils doesn't yet support uClibc :(" - 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 @@ -173,6 +158,8 @@ src_configure() { # Keep things sane strip-flags + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + local x echo for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do @@ -301,6 +288,10 @@ src_compile() { src_test() { cd "${MY_BUILDDIR}" + # https://sourceware.org/PR31327 + local -x XZ_OPT="-T1" + local -x XZ_DEFAULTS="-T1" + # bug 637066 filter-flags -Wall -Wreturn-type diff --git a/sys-devel/binutils/binutils-2.36.1-r1.ebuild b/sys-devel/binutils/binutils-2.36.1-r2.ebuild index 15efa169b382..243182b97a8a 100644 --- a/sys-devel/binutils/binutils-2.36.1-r1.ebuild +++ b/sys-devel/binutils/binutils-2.36.1-r2.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -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/" @@ -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=3 +PATCH_VER=5 PATCH_DEV=dilfridge if [[ ${PV} == 9999* ]]; then @@ -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 # @@ -58,11 +58,11 @@ BDEPEND=" doc? ( sys-apps/texinfo ) test? ( dev-util/dejagnu - sys-devel/bc + app-alternatives/bc ) nls? ( sys-devel/gettext ) - sys-devel/flex - virtual/yacc + app-alternatives/lex + app-alternatives/yacc " RESTRICT="!test? ( test )" @@ -99,7 +99,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" @@ -107,30 +107,12 @@ src_prepare() { fi fi - # This check should probably go somewhere else, like pkg_pretend. - if [[ ${CTARGET} == *-uclibc* ]] ; then - if grep -qs 'linux-gnu' "${S}"/ltconfig ; then - die "sorry, but this binutils doesn't yet support uClibc :(" - 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 @@ -171,6 +153,8 @@ src_configure() { # Keep things sane strip-flags + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + local x echo for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do @@ -299,6 +283,10 @@ src_compile() { src_test() { cd "${MY_BUILDDIR}" + # https://sourceware.org/PR31327 + local -x XZ_OPT="-T1" + local -x XZ_DEFAULTS="-T1" + # bug 637066 filter-flags -Wall -Wreturn-type diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r1.ebuild b/sys-devel/binutils/binutils-2.37_p1-r2.ebuild index d4683f9f8172..c7faa17c7bed 100644 --- a/sys-devel/binutils-hppa64/binutils-hppa64-2.36.1-r1.ebuild +++ b/sys-devel/binutils/binutils-2.37_p1-r2.ebuild @@ -1,19 +1,17 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 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" +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: +# 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 @@ -21,32 +19,21 @@ REQUIRED_USE="default-gold? ( gold )" # PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/... # for the patchsets -PATCH_VER=3 +PATCH_VER=2 PATCH_DEV=dilfridge -case ${PV} in - 9999) - EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" - inherit git-r3 - S=${WORKDIR}/binutils - EGIT_CHECKOUT_DIR=${S} - SLOT=${PV} - ;; - *) - SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz" - SLOT=$(ver_cut 1-2) - KEYWORDS="-* ~hppa" - ;; -esac - -# -# The Gentoo patchset -# -PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}} -PATCH_DEV=${PATCH_DEV:-slyfox} - -[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI} - https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz" +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 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +fi # # The cross-compile logic @@ -69,39 +56,60 @@ RDEPEND=" DEPEND="${RDEPEND}" BDEPEND=" doc? ( sys-apps/texinfo ) - test? ( dev-util/dejagnu ) + test? ( + dev-util/dejagnu + app-alternatives/bc + ) nls? ( sys-devel/gettext ) - sys-devel/flex - virtual/yacc + app-alternatives/lex + app-alternatives/yacc " RESTRICT="!test? ( test )" MY_BUILDDIR=${WORKDIR}/build -S=${WORKDIR}/${P/-hppa64/} src_unpack() { - case ${PV} in - *9999) - git-r3_src_unpack - ;; - *) - ;; - esac - default - mkdir -p "${MY_BUILDDIR}" + if [[ ${PV} == 9999* ]] ; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git + git-r3_src_unpack + mv patches-git/9999 patch || die + + EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" + S=${WORKDIR}/binutils + EGIT_CHECKOUT_DIR=${S} + git-r3_src_unpack + else + unpack ${P/-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() { - if [[ ! -z ${PATCH_VER} ]] ; then - einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}" - eapply "${WORKDIR}/patch"/*.patch + local patchsetname + if [[ ${PV} == 9999* ]] ; then + patchsetname="from git master" + else + patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}" fi - # This check should probably go somewhere else, like pkg_pretend. - if [[ ${CTARGET} == *-uclibc* ]] ; then - if grep -qs 'linux-gnu' "${S}"/ltconfig ; then - die "sorry, but this binutils doesn't yet support uClibc :(" + if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then + if ! use vanilla; then + einfo "Applying binutils patchset ${patchsetname}" + eapply "${WORKDIR}/patch" + einfo "Done." fi fi @@ -111,17 +119,6 @@ src_prepare() { -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 @@ -162,6 +159,10 @@ src_configure() { # Keep things sane strip-flags + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + local x echo for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do @@ -236,6 +237,10 @@ src_configure() { --enable-relro # Newer versions (>=2.24) make this an explicit option. #497268 --enable-install-libiberty + # Available from 2.35 on + --enable-textrel-check=warning + # Works better than vapier's patch... #808787 + --enable-new-dtags --disable-werror --with-bugurl="$(toolchain-binutils_bugurl)" --with-pkgversion="$(toolchain-binutils_pkgversion)" @@ -259,6 +264,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 @@ -287,8 +301,14 @@ src_compile() { src_test() { cd "${MY_BUILDDIR}" + + # https://sourceware.org/PR31327 + local -x XZ_OPT="-T1" + local -x XZ_DEFAULTS="-T1" + # bug 637066 filter-flags -Wall -Wreturn-type + emake -k check } @@ -375,11 +395,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() { @@ -410,6 +425,7 @@ pkg_postrm() { binutils-config ${CTARGET}-${PV} fi } + # Note [slotting support] # ----------------------- # Gentoo's layout for binutils files is non-standard as Gentoo diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.34-r2.ebuild b/sys-devel/binutils/binutils-2.38-r2.ebuild index 9eace9459ce4..c384b5f5ae0b 100644 --- a/sys-devel/binutils-hppa64/binutils-hppa64-2.34-r2.ebuild +++ b/sys-devel/binutils/binutils-2.38-r2.ebuild @@ -1,19 +1,17 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 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="default-gold doc +gold multitarget +nls +plugins static-libs test" +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: +# 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 @@ -21,41 +19,21 @@ REQUIRED_USE="default-gold? ( gold )" # PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/... # for the patchsets -PATCH_VER=6 +PATCH_VER=4 PATCH_DEV=dilfridge -case ${PV} in - 9999) - EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" - inherit git-r3 - S=${WORKDIR}/binutils - EGIT_CHECKOUT_DIR=${S} - SLOT=${PV} - ;; - *.9999) - EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" - inherit git-r3 - S=${WORKDIR}/binutils - EGIT_CHECKOUT_DIR=${S} - EGIT_BRANCH=$(ver_cut 1-2) - EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch" - SLOT=$(ver_cut 1-2) - ;; - *) - SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz" - SLOT=$(ver_cut 1-2) - KEYWORDS="-* hppa" - ;; -esac - -# -# The Gentoo patchset -# -PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}} -PATCH_DEV=${PATCH_DEV:-slyfox} - -[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI} - https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz" +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 @@ -78,39 +56,60 @@ RDEPEND=" DEPEND="${RDEPEND}" BDEPEND=" doc? ( sys-apps/texinfo ) - test? ( dev-util/dejagnu ) + test? ( + dev-util/dejagnu + app-alternatives/bc + ) nls? ( sys-devel/gettext ) - sys-devel/flex - virtual/yacc + app-alternatives/lex + app-alternatives/yacc " RESTRICT="!test? ( test )" MY_BUILDDIR=${WORKDIR}/build -S=${WORKDIR}/${P/-hppa64/} src_unpack() { - case ${PV} in - *9999) - git-r3_src_unpack - ;; - *) - ;; - esac - default - mkdir -p "${MY_BUILDDIR}" + if [[ ${PV} == 9999* ]] ; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git + git-r3_src_unpack + mv patches-git/9999 patch || die + + EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" + S=${WORKDIR}/binutils + EGIT_CHECKOUT_DIR=${S} + git-r3_src_unpack + else + unpack ${P/-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() { - if [[ ! -z ${PATCH_VER} ]] ; then - einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}" - eapply "${WORKDIR}/patch"/*.patch + local patchsetname + if [[ ${PV} == 9999* ]] ; then + patchsetname="from git master" + else + patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}" fi - # This check should probably go somewhere else, like pkg_pretend. - if [[ ${CTARGET} == *-uclibc* ]] ; then - if grep -qs 'linux-gnu' "${S}"/ltconfig ; then - die "sorry, but this binutils doesn't yet support uClibc :(" + if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then + if ! use vanilla; then + einfo "Applying binutils patchset ${patchsetname}" + eapply "${WORKDIR}/patch" + einfo "Done." fi fi @@ -120,17 +119,6 @@ src_prepare() { -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 @@ -153,6 +141,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 +164,10 @@ src_configure() { # Keep things sane strip-flags + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + 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 +224,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} @@ -245,6 +245,10 @@ src_configure() { --enable-relro # Newer versions (>=2.24) make this an explicit option. #497268 --enable-install-libiberty + # Available from 2.35 on + --enable-textrel-check=warning + # Works better than vapier's patch... #808787 + --enable-new-dtags --disable-werror --with-bugurl="$(toolchain-binutils_bugurl)" --with-pkgversion="$(toolchain-binutils_pkgversion)" @@ -262,7 +266,21 @@ src_configure() { # 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 @@ -277,11 +295,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 @@ -291,9 +309,15 @@ src_compile() { src_test() { cd "${MY_BUILDDIR}" + + # https://sourceware.org/PR31327 + local -x XZ_OPT="-T1" + local -x XZ_DEFAULTS="-T1" + # bug 637066 filter-flags -Wall -Wreturn-type - emake -k check + + emake -k V=1 check } src_install() { @@ -301,7 +325,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 @@ -379,11 +403,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() { @@ -414,6 +433,7 @@ pkg_postrm() { binutils-config ${CTARGET}-${PV} fi } + # Note [slotting support] # ----------------------- # Gentoo's layout for binutils files is non-standard as Gentoo diff --git a/sys-devel/binutils/binutils-2.39-r5.ebuild b/sys-devel/binutils/binutils-2.39-r5.ebuild new file mode 100644 index 000000000000..efeadfc827de --- /dev/null +++ b/sys-devel/binutils/binutils-2.39-r5.ebuild @@ -0,0 +1,487 @@ +# Copyright 1999-2024 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 gprofng 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=6 +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 + app-alternatives/bc + ) + nls? ( sys-devel/gettext ) + app-alternatives/lex + app-alternatives/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, bug #562460 + sed -i \ + -e 's:@bfdlibdir@:@libdir@:g' \ + -e 's:@bfdincludedir@:@includedir@:g' \ + {bfd,opcodes}/Makefile.in || die + + # 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 + + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + 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 + + # These hardening options are available from 2.39+ but + # they unconditionally enable the behaviour even on arches + # where e.g. execstacks can't be avoided. + # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592. + #--enable-warn-execstack + #--enable-warn-rwx-segments + #--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing) + + # 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) + # 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 + + # Avoid automagic dev-libs/msgpack dep, bug #865875 + --without-msgpack + + # 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 can enable this by default in future, but it's brand new + # in 2.39 with several bugs: + # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477) + # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521) + # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479) + # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113) + $(use_enable gprofng) + ) + + if ! is_cross ; then + myconf+=( $(use_enable pgo pgo-build lto) ) + + 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 + + # https://sourceware.org/PR31327 + local -x XZ_OPT="-T1" + local -x XZ_DEFAULTS="-T1" + + # 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 + 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}/ || die + rm -r "${ED}"/${LIBPATH}/lib || die + 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} + + # 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} diff --git a/sys-devel/binutils/binutils-2.40-r9.ebuild b/sys-devel/binutils/binutils-2.40-r9.ebuild new file mode 100644 index 000000000000..a8b13b594c74 --- /dev/null +++ b/sys-devel/binutils/binutils-2.40-r9.ebuild @@ -0,0 +1,499 @@ +# Copyright 1999-2024 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 debuginfod doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla zstd" + +# 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=7 +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://sourceware.org/pub/binutils/releases/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 + debuginfod? ( + dev-libs/elfutils[debuginfod(-)] + ) + zstd? ( app-arch/zstd:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + doc? ( sys-apps/texinfo ) + test? ( + dev-util/dejagnu + app-alternatives/bc + ) + nls? ( sys-devel/gettext ) + zstd? ( virtual/pkgconfig ) + app-alternatives/lex + app-alternatives/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." + + # This is applied conditionally for now just out of caution. + # It should be okay on non-prefix systems though. See bug #892549. + if is_cross || use prefix; then + eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch + fi + 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 + + # 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 cet && filter-flags -mindirect-branch -mindirect-branch=* + use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + 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 ) + 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} + # portage's econf() does not detect presence of --d-d-t + # because it greps only top-level ./configure. But not + # libiberty's or bfd's configure. + --disable-dependency-tracking + --disable-silent-rules + --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 + + # These hardening options are available from 2.39+ but + # they unconditionally enable the behaviour even on arches + # where e.g. execstacks can't be avoided. + # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592. + #--enable-warn-execstack + #--enable-warn-rwx-segments + #--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing) + + # 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) + $(use_with zstd) + + # 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) + + $(use_with debuginfod) + + # Avoid automagic dev-libs/msgpack dep, bug #865875 + --without-msgpack + + # 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 can enable this by default in future, but it's brand new + # in 2.39 with several bugs: + # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477) + # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521) + # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479) + # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113) + $(use_enable gprofng) + ) + + if ! is_cross ; then + myconf+=( $(use_enable pgo pgo-build lto) ) + + 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 tooldir="${EPREFIX}${TOOLPATH}" all + + # only build info pages if the user wants them + if use doc ; then + emake 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 + + # https://sourceware.org/PR31327 + local -x XZ_OPT="-T1" + local -x XZ_DEFAULTS="-T1" + + # bug #637066 + filter-flags -Wall -Wreturn-type + + emake -k check +} + +src_install() { + local x d + + cd "${MY_BUILDDIR}" || die + + # see Note [tooldir hack for ldscripts] + emake 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 + 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}/ || die + rm -r "${ED}"/${LIBPATH}/lib || die + 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} + + # 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} diff --git a/sys-devel/binutils/binutils-2.41-r2.ebuild b/sys-devel/binutils/binutils-2.41-r2.ebuild new file mode 100644 index 000000000000..c787465a3200 --- /dev/null +++ b/sys-devel/binutils/binutils-2.41-r2.ebuild @@ -0,0 +1,517 @@ +# Copyright 1999-2024 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 debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd" + +# 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=2 +PATCH_DEV=dilfridge + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 + SLOT=${PV} +else + PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}} + PATCH_DEV=${PATCH_DEV:-dilfridge} + SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://sourceware.org/pub/binutils/releases/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 + debuginfod? ( + dev-libs/elfutils[debuginfod(-)] + ) + zstd? ( app-arch/zstd:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + doc? ( sys-apps/texinfo ) + test? ( + dev-util/dejagnu + app-alternatives/bc + ) + nls? ( sys-devel/gettext ) + zstd? ( virtual/pkgconfig ) + app-alternatives/lex + app-alternatives/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." + + # This is applied conditionally for now just out of caution. + # It should be okay on non-prefix systems though. See bug #892549. + if is_cross || use prefix; then + eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch + fi + 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 + + # 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 cet && filter-flags -mindirect-branch -mindirect-branch=* + use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + 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 ) + 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} + # portage's econf() does not detect presence of --d-d-t + # because it greps only top-level ./configure. But not + # libiberty's or bfd's configure. + --disable-dependency-tracking + --disable-silent-rules + --enable-obsolete + --enable-shared + --enable-threads + --enable-relro + --enable-install-libiberty + --enable-textrel-check=$(usex hardened error warning) + # Things to think about + #--enable-deterministic-archives + --enable-new-dtags + --disable-jansson + --disable-werror + --with-bugurl="$(toolchain-binutils_bugurl)" + --with-pkgversion="$(toolchain-binutils_pkgversion)" + $(use_enable static-libs static) + $(use_with zstd) + + # 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) + + $(use_with debuginfod) + + # Avoid automagic dev-libs/msgpack dep, bug #865875 + --without-msgpack + + # 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 can enable this by default in future, but it's brand new + # in 2.39 with several bugs: + # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477) + # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521) + # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479) + # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113) + $(use_enable gprofng) + ) + + case ${CTARGET} in + x86_64-*|aarch64*|arm64*|i[3456]*) + # These hardening options are available from 2.39+ but + # they unconditionally enable the behaviour even on arches + # where e.g. execstacks can't be avoided. + # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592. + # + # TODO: Get the logic for this fixed upstream so it doesn't + # create impossible broken combinations on some arches, like mips. + # + # TODO: Get the logic for this fixed upstream so --disable-* works + # as expected. + myconf+=( + --enable-warn-execstack=yes + --enable-warn-rwx-segments=yes + ) + + if use hardened ; then + myconf+=( + --enable-default-execstack=no + ) + fi + ;; + *) + ;; + esac + + if use elibc_musl ; then + # Override our earlier setting for musl, as textrels don't + # work there at all. See bug #707660. + myconf+=( + --enable-textrel-check=error + ) + fi + + if ! is_cross ; then + myconf+=( $(use_enable pgo pgo-build lto) ) + + if use pgo ; then + export BUILD_CFLAGS="${CFLAGS}" + fi + fi + + ECONF_SOURCE="${S}" econf "${myconf[@]}" + + # 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 tooldir="${EPREFIX}${TOOLPATH}" all + + # only build info pages if the user wants them + if use doc ; then + emake 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 + + # https://sourceware.org/PR31327 + local -x XZ_OPT="-T1" + local -x XZ_DEFAULTS="-T1" + + # bug #637066 + filter-flags -Wall -Wreturn-type + + emake -k check +} + +src_install() { + local x d + + cd "${MY_BUILDDIR}" || die + + # see Note [tooldir hack for ldscripts] + emake 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 + 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}/ || die + rm -r "${ED}"/${LIBPATH}/lib || die + 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} + + # 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} diff --git a/sys-devel/binutils/binutils-2.41-r3.ebuild b/sys-devel/binutils/binutils-2.41-r3.ebuild new file mode 100644 index 000000000000..a0cc21bab946 --- /dev/null +++ b/sys-devel/binutils/binutils-2.41-r3.ebuild @@ -0,0 +1,517 @@ +# Copyright 1999-2024 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 debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd" + +# 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://sourceware.org/pub/binutils/releases/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 + debuginfod? ( + dev-libs/elfutils[debuginfod(-)] + ) + zstd? ( app-arch/zstd:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + doc? ( sys-apps/texinfo ) + test? ( + dev-util/dejagnu + app-alternatives/bc + ) + nls? ( sys-devel/gettext ) + zstd? ( virtual/pkgconfig ) + app-alternatives/lex + app-alternatives/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." + + # This is applied conditionally for now just out of caution. + # It should be okay on non-prefix systems though. See bug #892549. + if is_cross || use prefix; then + eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch + fi + 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 + + # 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 cet && filter-flags -mindirect-branch -mindirect-branch=* + use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + 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 ) + 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} + # portage's econf() does not detect presence of --d-d-t + # because it greps only top-level ./configure. But not + # libiberty's or bfd's configure. + --disable-dependency-tracking + --disable-silent-rules + --enable-obsolete + --enable-shared + --enable-threads + --enable-relro + --enable-install-libiberty + --enable-textrel-check=$(usex hardened error warning) + # Things to think about + #--enable-deterministic-archives + --enable-new-dtags + --disable-jansson + --disable-werror + --with-bugurl="$(toolchain-binutils_bugurl)" + --with-pkgversion="$(toolchain-binutils_pkgversion)" + $(use_enable static-libs static) + $(use_with zstd) + + # 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) + + $(use_with debuginfod) + + # Avoid automagic dev-libs/msgpack dep, bug #865875 + --without-msgpack + + # 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 can enable this by default in future, but it's brand new + # in 2.39 with several bugs: + # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477) + # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521) + # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479) + # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113) + $(use_enable gprofng) + ) + + case ${CTARGET} in + x86_64-*|aarch64*|arm64*|i[3456]*) + # These hardening options are available from 2.39+ but + # they unconditionally enable the behaviour even on arches + # where e.g. execstacks can't be avoided. + # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592. + # + # TODO: Get the logic for this fixed upstream so it doesn't + # create impossible broken combinations on some arches, like mips. + # + # TODO: Get the logic for this fixed upstream so --disable-* works + # as expected. + myconf+=( + --enable-warn-execstack=yes + --enable-warn-rwx-segments=yes + ) + + if use hardened ; then + myconf+=( + --enable-default-execstack=no + ) + fi + ;; + *) + ;; + esac + + if use elibc_musl ; then + # Override our earlier setting for musl, as textrels don't + # work there at all. See bug #707660. + myconf+=( + --enable-textrel-check=error + ) + fi + + if ! is_cross ; then + myconf+=( $(use_enable pgo pgo-build lto) ) + + if use pgo ; then + export BUILD_CFLAGS="${CFLAGS}" + fi + fi + + ECONF_SOURCE="${S}" econf "${myconf[@]}" + + # 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 tooldir="${EPREFIX}${TOOLPATH}" all + + # only build info pages if the user wants them + if use doc ; then + emake 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 + + # https://sourceware.org/PR31327 + local -x XZ_OPT="-T1" + local -x XZ_DEFAULTS="-T1" + + # bug #637066 + filter-flags -Wall -Wreturn-type + + emake -k check +} + +src_install() { + local x d + + cd "${MY_BUILDDIR}" || die + + # see Note [tooldir hack for ldscripts] + emake 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 + 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}/ || die + rm -r "${ED}"/${LIBPATH}/lib || die + 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} + + # 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} diff --git a/sys-devel/binutils/binutils-2.41-r4.ebuild b/sys-devel/binutils/binutils-2.41-r4.ebuild new file mode 100644 index 000000000000..9cac9d6928b7 --- /dev/null +++ b/sys-devel/binutils/binutils-2.41-r4.ebuild @@ -0,0 +1,524 @@ +# Copyright 1999-2024 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 debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd" + +# 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://sourceware.org/pub/binutils/releases/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 + debuginfod? ( + dev-libs/elfutils[debuginfod(-)] + ) + zstd? ( app-arch/zstd:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + doc? ( sys-apps/texinfo ) + test? ( + dev-util/dejagnu + app-alternatives/bc + ) + nls? ( sys-devel/gettext ) + zstd? ( virtual/pkgconfig ) + app-alternatives/lex + app-alternatives/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." + + # This is applied conditionally for now just out of caution. + # It should be okay on non-prefix systems though. See bug #892549. + if is_cross || use prefix; then + eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch \ + "${FILESDIR}"/binutils-2.41-linker-prefix.patch + fi + 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 + + # 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 cet && filter-flags -mindirect-branch -mindirect-branch=* + use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + 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 ) + 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} + # portage's econf() does not detect presence of --d-d-t + # because it greps only top-level ./configure. But not + # libiberty's or bfd's configure. + --disable-dependency-tracking + --disable-silent-rules + --enable-obsolete + --enable-shared + --enable-threads + --enable-relro + --enable-install-libiberty + --enable-textrel-check=$(usex hardened error warning) + # Things to think about + #--enable-deterministic-archives + --enable-new-dtags + --disable-jansson + --disable-werror + --with-bugurl="$(toolchain-binutils_bugurl)" + --with-pkgversion="$(toolchain-binutils_pkgversion)" + $(use_enable static-libs static) + $(use_with zstd) + + # 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) + + $(use_with debuginfod) + + # Avoid automagic dev-libs/msgpack dep, bug #865875 + --without-msgpack + + # 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 can enable this by default in future, but it's brand new + # in 2.39 with several bugs: + # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477) + # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521) + # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479) + # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113) + $(use_enable gprofng) + ) + + case ${CTARGET} in + x86_64-*|aarch64*|arm64*|i[3456]*) + # These hardening options are available from 2.39+ but + # they unconditionally enable the behaviour even on arches + # where e.g. execstacks can't be avoided. + # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592. + # + # TODO: Get the logic for this fixed upstream so it doesn't + # create impossible broken combinations on some arches, like mips. + # + # TODO: Get the logic for this fixed upstream so --disable-* works + # as expected. + myconf+=( + --enable-warn-execstack=yes + --enable-warn-rwx-segments=yes + ) + + if use hardened ; then + myconf+=( + --enable-default-execstack=no + ) + fi + ;; + *) + ;; + esac + + if use elibc_musl ; then + # Override our earlier setting for musl, as textrels don't + # work there at all. See bug #707660. + myconf+=( + --enable-textrel-check=error + ) + fi + + if ! is_cross ; then + myconf+=( $(use_enable pgo pgo-build lto) ) + + if use pgo ; then + export BUILD_CFLAGS="${CFLAGS}" + fi + fi + + ECONF_SOURCE="${S}" econf "${myconf[@]}" + + # 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] + # see linker prefix patch + emake \ + tooldir="${EPREFIX}${TOOLPATH}" \ + gentoo_prefix=$(usex prefix-guest "${EPREFIX}"/usr /usr) \ + all + + # only build info pages if the user wants them + if use doc ; then + emake 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 + + # https://sourceware.org/PR31327 + local -x XZ_OPT="-T1" + local -x XZ_DEFAULTS="-T1" + + # bug #637066 + filter-flags -Wall -Wreturn-type + + emake -k check +} + +src_install() { + local x d + + cd "${MY_BUILDDIR}" || die + + # see Note [tooldir hack for ldscripts] + emake 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 + 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}/ || die + rm -r "${ED}"/${LIBPATH}/lib || die + 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} + + docompress "${DATAPATH}"/{info,man} + + # 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} diff --git a/sys-devel/binutils/binutils-2.41-r5.ebuild b/sys-devel/binutils/binutils-2.41-r5.ebuild new file mode 100644 index 000000000000..219a22bdca12 --- /dev/null +++ b/sys-devel/binutils/binutils-2.41-r5.ebuild @@ -0,0 +1,524 @@ +# Copyright 1999-2024 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 debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd" + +# 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=5 +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://sourceware.org/pub/binutils/releases/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 + debuginfod? ( + dev-libs/elfutils[debuginfod(-)] + ) + zstd? ( app-arch/zstd:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + doc? ( sys-apps/texinfo ) + test? ( + dev-util/dejagnu + app-alternatives/bc + ) + nls? ( sys-devel/gettext ) + zstd? ( virtual/pkgconfig ) + app-alternatives/lex + app-alternatives/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." + + # This is applied conditionally for now just out of caution. + # It should be okay on non-prefix systems though. See bug #892549. + if is_cross || use prefix; then + eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch \ + "${FILESDIR}"/binutils-2.41-linker-prefix.patch + fi + 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 + + # 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 cet && filter-flags -mindirect-branch -mindirect-branch=* + use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + 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 ) + 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} + # portage's econf() does not detect presence of --d-d-t + # because it greps only top-level ./configure. But not + # libiberty's or bfd's configure. + --disable-dependency-tracking + --disable-silent-rules + --enable-obsolete + --enable-shared + --enable-threads + --enable-relro + --enable-install-libiberty + --enable-textrel-check=$(usex hardened error warning) + # Things to think about + #--enable-deterministic-archives + --enable-new-dtags + --disable-jansson + --disable-werror + --with-bugurl="$(toolchain-binutils_bugurl)" + --with-pkgversion="$(toolchain-binutils_pkgversion)" + $(use_enable static-libs static) + $(use_with zstd) + + # 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) + + $(use_with debuginfod) + + # Avoid automagic dev-libs/msgpack dep, bug #865875 + --without-msgpack + + # 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 can enable this by default in future, but it's brand new + # in 2.39 with several bugs: + # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477) + # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521) + # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479) + # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113) + $(use_enable gprofng) + ) + + case ${CTARGET} in + x86_64-*|aarch64*|arm64*|i[3456]*) + # These hardening options are available from 2.39+ but + # they unconditionally enable the behaviour even on arches + # where e.g. execstacks can't be avoided. + # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592. + # + # TODO: Get the logic for this fixed upstream so it doesn't + # create impossible broken combinations on some arches, like mips. + # + # TODO: Get the logic for this fixed upstream so --disable-* works + # as expected. + myconf+=( + --enable-warn-execstack=yes + --enable-warn-rwx-segments=yes + ) + + if use hardened ; then + myconf+=( + --enable-default-execstack=no + ) + fi + ;; + *) + ;; + esac + + if use elibc_musl ; then + # Override our earlier setting for musl, as textrels don't + # work there at all. See bug #707660. + myconf+=( + --enable-textrel-check=error + ) + fi + + if ! is_cross ; then + myconf+=( $(use_enable pgo pgo-build lto) ) + + if use pgo ; then + export BUILD_CFLAGS="${CFLAGS}" + fi + fi + + ECONF_SOURCE="${S}" econf "${myconf[@]}" + + # 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] + # see linker prefix patch + emake \ + tooldir="${EPREFIX}${TOOLPATH}" \ + gentoo_prefix=$(usex prefix-guest "${EPREFIX}"/usr /usr) \ + all + + # only build info pages if the user wants them + if use doc ; then + emake 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 + + # https://sourceware.org/PR31327 + local -x XZ_OPT="-T1" + local -x XZ_DEFAULTS="-T1" + + # bug #637066 + filter-flags -Wall -Wreturn-type + + emake -k check +} + +src_install() { + local x d + + cd "${MY_BUILDDIR}" || die + + # see Note [tooldir hack for ldscripts] + emake 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 + 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}/ || die + rm -r "${ED}"/${LIBPATH}/lib || die + 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} + + docompress "${DATAPATH}"/{info,man} + + # 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} diff --git a/sys-devel/binutils/binutils-2.42-r1.ebuild b/sys-devel/binutils/binutils-2.42-r1.ebuild new file mode 100644 index 000000000000..cf195f441b89 --- /dev/null +++ b/sys-devel/binutils/binutils-2.42-r1.ebuild @@ -0,0 +1,551 @@ +# Copyright 1999-2024 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 debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd" + +# 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=3 +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://sourceware.org/pub/binutils/releases/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 + debuginfod? ( + dev-libs/elfutils[debuginfod(-)] + ) + zstd? ( app-arch/zstd:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + doc? ( sys-apps/texinfo ) + test? ( + dev-util/dejagnu + app-alternatives/bc + ) + nls? ( sys-devel/gettext ) + zstd? ( virtual/pkgconfig ) + app-alternatives/lex + app-alternatives/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." + + # This is applied conditionally for now just out of caution. + # It should be okay on non-prefix systems though. See bug #892549. + if is_cross || use prefix; then + eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch \ + "${FILESDIR}"/binutils-2.41-linker-prefix.patch + fi + 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 + + # 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 cet && filter-flags -mindirect-branch -mindirect-branch=* + use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + 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 ) + 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} + # portage's econf() does not detect presence of --d-d-t + # because it greps only top-level ./configure. But not + # libiberty's or bfd's configure. + --disable-dependency-tracking + --disable-silent-rules + --enable-obsolete + --enable-shared + --enable-threads + --enable-relro + --enable-install-libiberty + --enable-textrel-check=$(usex hardened error warning) + # Things to think about + #--enable-deterministic-archives + --enable-new-dtags + --disable-jansson + --disable-werror + --with-bugurl="$(toolchain-binutils_bugurl)" + --with-pkgversion="$(toolchain-binutils_pkgversion)" + $(use_enable static-libs static) + $(use_with zstd) + + # Disable modules that are in a combined binutils/gdb tree, bug #490566 + --disable-{gdb,gdbserver,libbacktrace,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) + + $(use_with debuginfod) + + # Avoid automagic dev-libs/msgpack dep, bug #865875 + --without-msgpack + + # 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 can enable this by default in future, but it's brand new + # in 2.39 with several bugs: + # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477) + # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521) + # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479) + # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113) + $(use_enable gprofng) + ) + + case ${CTARGET} in + x86_64-*|aarch64*|arm64*|i[3456]*) + # These hardening options are available from 2.39+ but + # they unconditionally enable the behaviour even on arches + # where e.g. execstacks can't be avoided. + # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592. + # + # TODO: Get the logic for this fixed upstream so it doesn't + # create impossible broken combinations on some arches, like mips. + # + # TODO: Get the logic for this fixed upstream so --disable-* works + # as expected. + myconf+=( + --enable-warn-execstack=yes + --enable-warn-rwx-segments=yes + ) + + if use hardened ; then + myconf+=( + # TOOD: breaks glibc test suite + #--enable-error-execstack=yes + #--enable-error-rwx-segments=yes + --enable-default-execstack=no + ) + fi + ;; + *) + ;; + esac + + if use elibc_musl ; then + # Override our earlier setting for musl, as textrels don't + # work there at all. See bug #707660. + myconf+=( + --enable-textrel-check=error + ) + fi + + if use test || { use pgo && tc-is-lto ; } ; then + # -Wa,* needs to be consistent everywhere or lto-wrapper will complain + filter-flags '-Wa,*' + fi + + if ! is_cross ; then + myconf+=( $(use_enable pgo pgo-build $(tc-is-lto && echo "lto" || echo "yes")) ) + + if use pgo ; then + # We let configure handle it for us because it has to run + # the testsuite later on for profiling, and LTO isn't compatible + # with the testsuite. + filter-lto + + export BUILD_CFLAGS="${CFLAGS}" + fi + fi + + ECONF_SOURCE="${S}" econf "${myconf[@]}" + + # 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] + # see linker prefix patch + emake \ + tooldir="${EPREFIX}${TOOLPATH}" \ + gentoo_prefix=$(usex prefix-guest "${EPREFIX}"/usr /usr) \ + all + + # only build info pages if the user wants them + if use doc ; then + emake 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 + + # https://sourceware.org/PR31327 + local -x XZ_OPT="-T1" + local -x XZ_DEFAULTS="-T1" + + ( + # Tests don't expect LTO + filter-lto + + # lto-wrapper warnings which confuse tests + filter-flags '-Wa,*' + + # bug #637066 + filter-flags -Wall -Wreturn-type + + emake -k check \ + CFLAGS_FOR_TARGET="${CFLAGS_FOR_TARGET:-${CFLAGS}}" \ + CXXFLAGS_FOR_TARGET="${CXXFLAGS_FOR_TARGET:-${CXXFLAGS}}" \ + LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET:-${LDFLAGS}}" \ + CFLAGS="${CFLAGS}" \ + CXXFLAGS="${CXXFLAGS}" \ + LDFLAGS="${LDFLAGS}" + ) +} + +src_install() { + local x d + + cd "${MY_BUILDDIR}" || die + + # see Note [tooldir hack for ldscripts] + emake 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 + 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}/ || die + rm -r "${ED}"/${LIBPATH}/lib || die + 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} + + docompress "${DATAPATH}"/{info,man} + + # 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} diff --git a/sys-devel/binutils/binutils-9999.ebuild b/sys-devel/binutils/binutils-9999.ebuild index 014a2d716125..8576f0e43ff0 100644 --- a/sys-devel/binutils/binutils-9999.ebuild +++ b/sys-devel/binutils/binutils-9999.ebuild @@ -1,15 +1,15 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -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" -REQUIRED_USE="default-gold? ( gold )" +IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd" # Variables that can be set here (ignored for live ebuilds) # PATCH_VER - the patchset version @@ -27,13 +27,12 @@ if [[ ${PV} == 9999* ]]; then SLOT=${PV} else PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}} - PATCH_DEV=${PATCH_DEV:-slyfox} - SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz" + PATCH_DEV=${PATCH_DEV:-dilfridge} + SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://sourceware.org/pub/binutils/releases/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) - # 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 # @@ -53,17 +52,22 @@ is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } RDEPEND=" >=sys-devel/binutils-config-3 sys-libs/zlib + debuginfod? ( + dev-libs/elfutils[debuginfod(-)] + ) + zstd? ( app-arch/zstd:= ) " DEPEND="${RDEPEND}" BDEPEND=" doc? ( sys-apps/texinfo ) test? ( dev-util/dejagnu - sys-devel/bc + app-alternatives/bc ) nls? ( sys-devel/gettext ) - sys-devel/flex - virtual/yacc + zstd? ( virtual/pkgconfig ) + app-alternatives/lex + app-alternatives/yacc " RESTRICT="!test? ( test )" @@ -82,10 +86,16 @@ src_unpack() { EGIT_CHECKOUT_DIR=${S} git-r3_src_unpack else - unpack ${P}.tar.xz + 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 @@ -100,43 +110,27 @@ 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" einfo "Done." - fi - fi - # This check should probably go somewhere else, like pkg_pretend. - if [[ ${CTARGET} == *-uclibc* ]] ; then - if grep -qs 'linux-gnu' "${S}"/ltconfig ; then - die "sorry, but this binutils doesn't yet support uClibc :(" + # This is applied conditionally for now just out of caution. + # It should be okay on non-prefix systems though. See bug #892549. + if is_cross || use prefix; then + eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch \ + "${FILESDIR}"/binutils-2.41-linker-prefix.patch + fi 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 - 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 @@ -154,6 +148,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 @@ -166,11 +165,15 @@ src_configure() { 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 strip-flags + use cet && filter-flags -mindirect-branch -mindirect-branch=* + use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) local x echo @@ -179,7 +182,7 @@ src_configure() { done echo - cd "${MY_BUILDDIR}" + cd "${MY_BUILDDIR}" || die local myconf=() if use plugins ; then @@ -188,9 +191,6 @@ src_configure() { # 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 @@ -201,9 +201,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 @@ -217,10 +218,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 @@ -239,40 +237,110 @@ src_configure() { --libdir="${EPREFIX}"${LIBPATH} --libexecdir="${EPREFIX}"${LIBPATH} --includedir="${EPREFIX}"${INCPATH} + # portage's econf() does not detect presence of --d-d-t + # because it greps only top-level ./configure. But not + # libiberty's or bfd's configure. + --disable-dependency-tracking + --disable-silent-rules --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 + --enable-textrel-check=$(usex hardened error warning) + # Things to think about + #--enable-deterministic-archives + --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-{gdb,libdecnumber,readline,sim} - # Strip out broken static link flags. - # https://gcc.gnu.org/PR56750 + $(use_with zstd) + + # Disable modules that are in a combined binutils/gdb tree, bug #490566 + --disable-{gdb,gdbserver,libbacktrace,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 + # 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 + $(use_with debuginfod) + + # Avoid automagic dev-libs/msgpack dep, bug #865875 + --without-msgpack # 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 can enable this by default in future, but it's brand new + # in 2.39 with several bugs: + # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477) + # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521) + # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479) + # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113) + $(use_enable gprofng) ) - echo ./configure "${myconf[@]}" - "${S}"/configure "${myconf[@]}" || die + + case ${CTARGET} in + x86_64-*|aarch64*|arm64*|i[3456]*) + # These hardening options are available from 2.39+ but + # they unconditionally enable the behaviour even on arches + # where e.g. execstacks can't be avoided. + # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592. + # + # TODO: Get the logic for this fixed upstream so it doesn't + # create impossible broken combinations on some arches, like mips. + # + # TODO: Get the logic for this fixed upstream so --disable-* works + # as expected. + myconf+=( + --enable-warn-execstack=yes + --enable-warn-rwx-segments=yes + ) + + if use hardened ; then + myconf+=( + # TOOD: breaks glibc test suite + #--enable-error-execstack=yes + #--enable-error-rwx-segments=yes + --enable-default-execstack=no + ) + fi + ;; + *) + ;; + esac + + if use elibc_musl ; then + # Override our earlier setting for musl, as textrels don't + # work there at all. See bug #707660. + myconf+=( + --enable-textrel-check=error + ) + fi + + if use test || { use pgo && tc-is-lto ; } ; then + # -Wa,* needs to be consistent everywhere or lto-wrapper will complain + filter-flags '-Wa,*' + fi + + if ! is_cross ; then + myconf+=( $(use_enable pgo pgo-build $(tc-is-lto && echo "lto" || echo "yes")) ) + + if use pgo ; then + # We let configure handle it for us because it has to run + # the testsuite later on for profiling, and LTO isn't compatible + # with the testsuite. + filter-lto + + export BUILD_CFLAGS="${CFLAGS}" + fi + fi + + ECONF_SOURCE="${S}" econf "${myconf[@]}" # Prevent makeinfo from running if doc is unset. if ! use doc ; then @@ -283,9 +351,14 @@ src_configure() { } src_compile() { - cd "${MY_BUILDDIR}" + cd "${MY_BUILDDIR}" || die + # see Note [tooldir hack for ldscripts] - emake tooldir="${EPREFIX}${TOOLPATH}" all + # see linker prefix patch + emake \ + tooldir="${EPREFIX}${TOOLPATH}" \ + gentoo_prefix=$(usex prefix-guest "${EPREFIX}"/usr /usr) \ + all # only build info pages if the user wants them if use doc ; then @@ -298,25 +371,44 @@ src_compile() { } src_test() { - cd "${MY_BUILDDIR}" + cd "${MY_BUILDDIR}" || die + + # https://sourceware.org/PR31327 + local -x XZ_OPT="-T1" + local -x XZ_DEFAULTS="-T1" + + ( + # Tests don't expect LTO + filter-lto + + # lto-wrapper warnings which confuse tests + filter-flags '-Wa,*' - # bug 637066 - filter-flags -Wall -Wreturn-type + # bug #637066 + filter-flags -Wall -Wreturn-type - emake -k check + emake -k check \ + CFLAGS_FOR_TARGET="${CFLAGS_FOR_TARGET:-${CFLAGS}}" \ + CXXFLAGS_FOR_TARGET="${CXXFLAGS_FOR_TARGET:-${CXXFLAGS}}" \ + LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET:-${LDFLAGS}}" \ + CFLAGS="${CFLAGS}" \ + CXXFLAGS="${CXXFLAGS}" \ + LDFLAGS="${LDFLAGS}" + ) } 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 + 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 @@ -327,9 +419,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 @@ -338,6 +430,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. @@ -351,8 +444,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 @@ -366,20 +459,27 @@ 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 @@ -387,6 +487,8 @@ src_install() { # Remove shared info pages rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} + docompress "${DATAPATH}"/{info,man} + # Trim all empty dirs find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null } diff --git a/sys-devel/binutils/files/binutils-2.35.2-powerpc-tests.patch b/sys-devel/binutils/files/binutils-2.35.2-powerpc-tests.patch new file mode 100644 index 000000000000..711194b1eae6 --- /dev/null +++ b/sys-devel/binutils/files/binutils-2.35.2-powerpc-tests.patch @@ -0,0 +1,136 @@ +From: Alan Modra <amodra@gmail.com> +Date: Mon, 16 Nov 2020 22:08:05 +0000 (+1030) +Subject: PR26882, --enable-textrel-check=warning test failures on powerpc +X-Git-Tag: binutils-2_36~578 +X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=7cc340055d3993a25ded914aef88f784f16d46bc;hp=6f2643dbd2192e6fff77a5e6fec5141d209fd7d0 + +PR26882, --enable-textrel-check=warning test failures on powerpc + + PR 26882 + * testsuite/ld-powerpc/dotsym3.d: Add "-z notext" to ld options. + * testsuite/ld-powerpc/dotsym4.d: Likewise. + * testsuite/ld-powerpc/ppc476-shared.d: Likewise. + * testsuite/ld-powerpc/ppc476-shared2.d: Likewise. + * testsuite/ld-powerpc/powerpc.exp: Likewise for various tests. + * testsuite/ld-undefined/weak-fundef.s: Add BLPLT variant. + * testsuite/ld-undefined/weak-undef.exp: Define BLPLT for ppc32. +--- + +diff --git a/ld/testsuite/ld-powerpc/dotsym3.d b/ld/testsuite/ld-powerpc/dotsym3.d +index fac2f8ec732..215a9c2a6c1 100644 +--- a/ld/testsuite/ld-powerpc/dotsym3.d ++++ b/ld/testsuite/ld-powerpc/dotsym3.d +@@ -1,7 +1,7 @@ + #source: nodotsym.s + #source: dotsymref.s + #as: -a64 +-#ld: -melf64ppc -Ttext=0x1000 -shared ++#ld: -melf64ppc -Ttext=0x1000 -shared -z notext + #objdump: -dR + + .*: file format .* +diff --git a/ld/testsuite/ld-powerpc/dotsym4.d b/ld/testsuite/ld-powerpc/dotsym4.d +index fdd92f3da76..d774e83bcf6 100644 +--- a/ld/testsuite/ld-powerpc/dotsym4.d ++++ b/ld/testsuite/ld-powerpc/dotsym4.d +@@ -1,7 +1,7 @@ + #source: dotsymref.s + #source: nodotsym.s + #as: -a64 +-#ld: -melf64ppc -Ttext=0x1000 -shared ++#ld: -melf64ppc -Ttext=0x1000 -shared -z notext + #objdump: -dR + + .*: file format .* +diff --git a/ld/testsuite/ld-powerpc/powerpc.exp b/ld/testsuite/ld-powerpc/powerpc.exp +index 74af28d7421..2cbefb841c2 100644 +--- a/ld/testsuite/ld-powerpc/powerpc.exp ++++ b/ld/testsuite/ld-powerpc/powerpc.exp +@@ -99,7 +99,7 @@ proc supports_ppc64 { } { + # readelf: Apply readelf options on result. Compare with regex (last arg). + + set ppcelftests { +- {"Reloc section order" "-melf32ppc -shared -z nocombreloc" "" "-a32" {reloc.s} ++ {"Reloc section order" "-melf32ppc -shared -z nocombreloc -z notext" "" "-a32" {reloc.s} + {{objdump -hw reloc.d}} "reloc.so"} + {"APUinfo section processing" "-melf32ppc" "" + "-a32 -me500" {apuinfo1.s apuinfo-nul.s apuinfo2.s} +@@ -134,7 +134,7 @@ set ppcelftests { + {{readelf -WSsrl tlsexe32no.r} {objdump -dr tlsexe32no.d} + {objdump -sj.got tlsexe32no.g} {objdump -sj.tdata tlsexe32.t}} + "tlsexe32no"} +- {"TLS32 shared" "-shared -melf32ppc --no-plt-align --no-ld-generated-unwind-info --hash-style=sysv tmpdir/tls32.o" "" "" {} ++ {"TLS32 shared" "-shared -melf32ppc --no-plt-align --no-ld-generated-unwind-info --hash-style=sysv -z notext tmpdir/tls32.o" "" "" {} + {{readelf -WSsrl tlsso32.r} {objdump -dr tlsso32.d} + {objdump -sj.got tlsso32.g} {objdump -sj.tdata tlsso32.t}} + "tls32.so"} +@@ -202,7 +202,7 @@ set ppc64elftests { + {{readelf -WSsrl tlsexeno.r} {objdump -dr tlsexeno.d} + {objdump -sj.got tlsexeno.g} {objdump -sj.tdata tlsexe.t}} + "tlsexeno"} +- {"TLS shared" "-shared -melf64ppc --no-plt-align --no-ld-generated-unwind-info --hash-style=sysv tmpdir/tls.o" "" "" {} ++ {"TLS shared" "-shared -melf64ppc --no-plt-align --no-ld-generated-unwind-info --hash-style=sysv -z notext tmpdir/tls.o" "" "" {} + {{readelf -WSsrl tlsso.r} {objdump -dr tlsso.d} + {objdump -sj.got tlsso.g} {objdump -sj.tdata tlsso.t}} + "tls.so"} +@@ -229,7 +229,7 @@ set ppc64elftests { + {{readelf -WSsrl tlsexetoc.r} {objdump -dr tlsexetocno.d} + {objdump -sj.got tlsexetocno.g} {objdump -sj.tdata tlsexetoc.t}} + "tlsexetocno"} +- {"TLSTOC shared" "-shared -melf64ppc --no-plt-align --no-ld-generated-unwind-info --hash-style=sysv tmpdir/tlstoc.o" "" "" {} ++ {"TLSTOC shared" "-shared -melf64ppc --no-plt-align --no-ld-generated-unwind-info --hash-style=sysv -z notext tmpdir/tlstoc.o" "" "" {} + {{readelf -WSsrl tlstocso.r} {objdump -dr tlstocso.d} + {objdump -sj.got tlstocso.g} {objdump -sj.tdata tlstocso.t}} + "tlstoc.so"} +diff --git a/ld/testsuite/ld-powerpc/ppc476-shared.d b/ld/testsuite/ld-powerpc/ppc476-shared.d +index 7953cb44e25..3b2cc8a155c 100644 +--- a/ld/testsuite/ld-powerpc/ppc476-shared.d ++++ b/ld/testsuite/ld-powerpc/ppc476-shared.d +@@ -1,6 +1,6 @@ + #source: ppc476-shared.s + #as: -a32 +-#ld: -melf32ppc -q -shared -z common-page-size=0x10000 --ppc476-workaround -T ppc476-shared.lnk ++#ld: -melf32ppc -q -shared -z common-page-size=0x10000 -z notext --ppc476-workaround -T ppc476-shared.lnk + #objdump: -dr + #target: powerpc*-*-* + +diff --git a/ld/testsuite/ld-powerpc/ppc476-shared2.d b/ld/testsuite/ld-powerpc/ppc476-shared2.d +index 26a5c41f988..48917fd4d92 100644 +--- a/ld/testsuite/ld-powerpc/ppc476-shared2.d ++++ b/ld/testsuite/ld-powerpc/ppc476-shared2.d +@@ -1,6 +1,6 @@ + #source: ppc476-shared.s + #as: -a32 +-#ld: -melf32ppc -shared -z common-page-size=0x10000 --ppc476-workaround -T ppc476-shared.lnk ++#ld: -melf32ppc -shared -z common-page-size=0x10000 -z notext --ppc476-workaround -T ppc476-shared.lnk + #objdump: -R + #target: powerpc*-*-* + +diff --git a/ld/testsuite/ld-undefined/weak-fundef.s b/ld/testsuite/ld-undefined/weak-fundef.s +index 2c20f799417..de8f641b6c2 100644 +--- a/ld/testsuite/ld-undefined/weak-fundef.s ++++ b/ld/testsuite/ld-undefined/weak-fundef.s +@@ -5,6 +5,9 @@ + bl undef_weak_fun + nop + .endif ++ .ifdef BLPLT ++ bl undef_weak_fun@plt ++ .endif + .ifdef CALLPLT + call undef_weak_fun@plt + .endif +diff --git a/ld/testsuite/ld-undefined/weak-undef.exp b/ld/testsuite/ld-undefined/weak-undef.exp +index 50c8e1483e3..14b6774c5bc 100644 +--- a/ld/testsuite/ld-undefined/weak-undef.exp ++++ b/ld/testsuite/ld-undefined/weak-undef.exp +@@ -105,7 +105,8 @@ set asflags "" + switch -glob $target_triplet { + aarch64* - + arm* - +- powerpc* { set asflags "--defsym BL=1" } ++ powerpc64* { set asflags "--defsym BL=1" } ++ powerpc* { set asflags "--defsym BLPLT=1" } + hppa* { set asflags "--defsym HPPA=1" } + i\[3-7\]86* - + x86_64* { set asflags "--defsym CALLPLT=1" } diff --git a/sys-devel/binutils/files/binutils-2.36.1-bfd-ctf.patch b/sys-devel/binutils/files/binutils-2.36.1-bfd-ctf.patch deleted file mode 100644 index d7daf683669d..000000000000 --- a/sys-devel/binutils/files/binutils-2.36.1-bfd-ctf.patch +++ /dev/null @@ -1,68 +0,0 @@ -https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=755ba58ebef02e1be9fc6770d00243ba6ed0223c -https://bugs.gentoo.org/783777 - -From 755ba58ebef02e1be9fc6770d00243ba6ed0223c Mon Sep 17 00:00:00 2001 -From: Nick Alcock <nick.alcock@oracle.com> -Date: Thu, 18 Mar 2021 12:37:52 +0000 -Subject: [PATCH] Add install dependencies for ld -> bfd and libctf -> bfd - -This stops problems parallel-installing if a relink of libctf is needed. - -Also adds corresponding install-strip dependencies. - -ChangeLog -2021-03-18 Nick Alcock <nick.alcock@oracle.com> - - PR libctf/27482 - * Makefile.def: Add install-bfd dependencies for install-libctf and - install-ld, and install-strip-bfd dependencies for - install-strip-libctf and install-strip-ld; move the install-ld - dependency on install-libctf to join it. - * Makefile.in: Regenerated. ---- ---- a/Makefile.def -+++ b/Makefile.def -@@ -448,7 +448,6 @@ dependencies = { module=all-binutils; on=all-intl; }; - dependencies = { module=all-binutils; on=all-gas; }; - dependencies = { module=all-binutils; on=all-libctf; }; - dependencies = { module=all-ld; on=all-libctf; }; --dependencies = { module=install-ld; on=install-libctf; }; - - // We put install-opcodes before install-binutils because the installed - // binutils might be on PATH, and they might need the shared opcodes -@@ -456,6 +455,14 @@ dependencies = { module=install-ld; on=install-libctf; }; - dependencies = { module=install-binutils; on=install-opcodes; }; - dependencies = { module=install-strip-binutils; on=install-strip-opcodes; }; - -+// Likewise for ld, libctf, and bfd. -+dependencies = { module=install-libctf; on=install-bfd; }; -+dependencies = { module=install-ld; on=install-bfd; }; -+dependencies = { module=install-ld; on=install-libctf; }; -+dependencies = { module=install-strip-libctf; on=install-strip-bfd; }; -+dependencies = { module=install-strip-ld; on=install-strip-bfd; }; -+dependencies = { module=install-strip-ld; on=install-strip-libctf; }; -+ - // libopcodes depends on libbfd - dependencies = { module=install-opcodes; on=install-bfd; }; - dependencies = { module=install-strip-opcodes; on=install-strip-bfd; }; ---- a/Makefile.in -+++ b/Makefile.in -@@ -52170,9 +52170,14 @@ all-stage3-ld: maybe-all-stage3-libctf - all-stage4-ld: maybe-all-stage4-libctf - all-stageprofile-ld: maybe-all-stageprofile-libctf - all-stagefeedback-ld: maybe-all-stagefeedback-libctf --install-ld: maybe-install-libctf - install-binutils: maybe-install-opcodes - install-strip-binutils: maybe-install-strip-opcodes -+install-libctf: maybe-install-bfd -+install-ld: maybe-install-bfd -+install-ld: maybe-install-libctf -+install-strip-libctf: maybe-install-strip-bfd -+install-strip-ld: maybe-install-strip-bfd -+install-strip-ld: maybe-install-strip-libctf - install-opcodes: maybe-install-bfd - install-strip-opcodes: maybe-install-strip-bfd - configure-gas: maybe-configure-intl --- -2.27.0 - diff --git a/sys-devel/binutils/files/binutils-2.36.1-ld-ctf.patch b/sys-devel/binutils/files/binutils-2.36.1-ld-ctf.patch deleted file mode 100644 index 012df3aed812..000000000000 --- a/sys-devel/binutils/files/binutils-2.36.1-ld-ctf.patch +++ /dev/null @@ -1,48 +0,0 @@ -https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=f04ce15e831b691d7610dba284e266919e757b10 -https://bugs.gentoo.org/783777 - -From f04ce15e831b691d7610dba284e266919e757b10 Mon Sep 17 00:00:00 2001 -From: Nick Alcock <nick.alcock@oracle.com> -Date: Tue, 26 Jan 2021 16:05:17 +0000 -Subject: [PATCH] ld: depend on libctf - -Since ld may depend on libctf (if present), and libctf may be relinked -by the installation process, libctf must be installed before ld is, -or the relink may fail if it calls on symbols or symbol versions that do -not exist in any libctf already present on the system. (If none is -present, the copy in the build tree will be automatically used, but -if one *is* present, it may take precedence and break things.) - -(This is a maybe- dependency, so it will work even if libctf is -disabled.) - -ChangeLog -2021-01-26 Nick Alcock <nick.alcock@oracle.com> - - PR 27250 - * Makefile.def: Add install-libctf dependency to install-ld. - * Makefile.in: Regenerated. ---- ---- a/Makefile.def -+++ b/Makefile.def -@@ -448,6 +448,7 @@ dependencies = { module=all-binutils; on=all-intl; }; - dependencies = { module=all-binutils; on=all-gas; }; - dependencies = { module=all-binutils; on=all-libctf; }; - dependencies = { module=all-ld; on=all-libctf; }; -+dependencies = { module=install-ld; on=install-libctf; }; - - // We put install-opcodes before install-binutils because the installed - // binutils might be on PATH, and they might need the shared opcodes ---- a/Makefile.in -+++ b/Makefile.in -@@ -52170,6 +52170,7 @@ all-stage3-ld: maybe-all-stage3-libctf - all-stage4-ld: maybe-all-stage4-libctf - all-stageprofile-ld: maybe-all-stageprofile-libctf - all-stagefeedback-ld: maybe-all-stagefeedback-libctf -+install-ld: maybe-install-libctf - install-binutils: maybe-install-opcodes - install-strip-binutils: maybe-install-strip-opcodes - install-opcodes: maybe-install-bfd --- -2.27.0 - diff --git a/sys-devel/binutils/files/binutils-2.40-linker-search-path.patch b/sys-devel/binutils/files/binutils-2.40-linker-search-path.patch new file mode 100644 index 000000000000..bddfa1ec6eb5 --- /dev/null +++ b/sys-devel/binutils/files/binutils-2.40-linker-search-path.patch @@ -0,0 +1,38 @@ +https://bugs.gentoo.org/892549 +https://github.com/gentoo/binutils-gdb/pull/4 + +From 1601840f9f2397edd56177871527a198a14277bd Mon Sep 17 00:00:00 2001 +From: James Le Cuirot <chewi@gentoo.org> +Date: Sat, 11 Feb 2023 15:15:20 +0000 +Subject: [PATCH 1/2] ldelf.c: Always consider -L arguments when handling + DT_NEEDED + +This is for consistency with other linkers, including gold. Without +this, we typically rely on ld.so.conf to find libraries such as +libstdc++.so.6, while other linkers do not use this file at all. +--- a/ld/ldelf.c ++++ b/ld/ldelf.c +@@ -1090,8 +1090,8 @@ ldelf_handle_dt_needed (struct elf_link_hash_table *htab, + linker will search. That means that we want to use + rpath_link, rpath, then the environment variable + LD_LIBRARY_PATH (native only), then the DT_RPATH/DT_RUNPATH +- entries (native only), then the linker script LIB_SEARCH_DIRS. +- We do not search using the -L arguments. ++ entries (native only), then the linker script LIB_SEARCH_DIRS, ++ then the -L arguments. + + We search twice. The first time, we skip objects which may + introduce version mismatches. The second time, we force +@@ -1165,11 +1165,7 @@ ldelf_handle_dt_needed (struct elf_link_hash_table *htab, + len = strlen (l->name); + for (search = search_head; search != NULL; search = search->next) + { +- char *filename; +- +- if (search->cmdline) +- continue; +- filename = (char *) xmalloc (strlen (search->name) + len + 2); ++ char *filename = (char *) xmalloc (strlen (search->name) + len + 2); + sprintf (filename, "%s/%s", search->name, l->name); + nn.name = filename; + if (ldelf_try_needed (&nn, force, is_linux)) diff --git a/sys-devel/binutils/files/binutils-2.41-linker-prefix.patch b/sys-devel/binutils/files/binutils-2.41-linker-prefix.patch new file mode 100644 index 000000000000..d97a15599209 --- /dev/null +++ b/sys-devel/binutils/files/binutils-2.41-linker-prefix.patch @@ -0,0 +1,56 @@ +https://bugs.gentoo.org/892549 +https://github.com/gentoo/binutils-gdb/pull/5 + +From 531bc1536dfc3070c1f7d03e98fa14bcb81fdcd0 Mon Sep 17 00:00:00 2001 +From: James Le Cuirot <chewi@gentoo.org> +Date: Sat, 23 Dec 2023 13:48:10 +0000 +Subject: [PATCH 2/2] ld: Allow a Gentoo-specific prefix to override the prefix + used by ld.bfd + +This prefix is only used to locate $prefix/etc/ld.so.conf, with $prefix +usually being /usr. This file is important on Gentoo Prefix systems, +where the /usr prefix is within another directory. The problem is that +Gentoo already passes the same directory as the sysroot, and ld.bfd +therefore looks for /myprefix/myprefix/usr/etc/ld.so.conf. + +The sysroot is dynamic, while the prefix is hardcoded. A hardcoded +prefix that isn't just /usr is unhelpful, not just because of the +doubled prefix issue above, but also because it prevents ld.bfd from +working effectively outside its native environment. We will therefore +hardcode it to just /usr. + +This change does not simply do that though and sets up a $gentoo_prefix +variable instead, with $prefix as a fallback. This is necessary because +Gentoo prefix-guest systems, which use the host's libc, do not apply a +sysroot like RAP prefix systems do. In that case, we must preserve the +existing behaviour. The binutils ebuild will be responsible for setting +this variable appropriately. +--- + ld/emultempl/elf.em | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ld/emultempl/elf.em b/ld/emultempl/elf.em +index 3f67f8b09d9..78c8e909b6c 100644 +--- a/ld/emultempl/elf.em ++++ b/ld/emultempl/elf.em +@@ -138,7 +138,7 @@ gld${EMULATION_NAME}_before_plugin_all_symbols_read (void) + ldelf_before_plugin_all_symbols_read ($IS_LIBPATH, $IS_NATIVE, + $IS_LINUX_TARGET, + $IS_FREEBSD_TARGET, +- $ELFSIZE, "$prefix"); ++ $ELFSIZE, "${gentoo_prefix-${prefix}}"); + } + + /* This is called after all the input files have been opened. */ +@@ -147,7 +147,7 @@ static void + gld${EMULATION_NAME}_after_open (void) + { + ldelf_after_open ($IS_LIBPATH, $IS_NATIVE, +- $IS_LINUX_TARGET, $IS_FREEBSD_TARGET, $ELFSIZE, "$prefix"); ++ $IS_LINUX_TARGET, $IS_FREEBSD_TARGET, $ELFSIZE, "${gentoo_prefix-${prefix}}"); + } + + EOF +-- +2.43.0 + diff --git a/sys-devel/binutils/files/binutils-configure-LANG.patch b/sys-devel/binutils/files/binutils-configure-LANG.patch deleted file mode 100644 index 5521d196cf4a..000000000000 --- a/sys-devel/binutils/files/binutils-configure-LANG.patch +++ /dev/null @@ -1,65 +0,0 @@ -The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in -option parsing, it may break. - -http://bugs.gentoo.org/103483 -http://bugs.gentoo.org/122216 - ---- configure -+++ configure -@@ -54,6 +54,19 @@ - infodir='${prefix}/info' - mandir='${prefix}/man' - -+# NLS nuisances. -+for as_var in \ -+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ -+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ -+ LC_TELEPHONE LC_TIME -+do -+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then -+ eval $as_var=C; export $as_var -+ else -+ unset $as_var -+ fi -+done -+ - # Initialize some other variables. - subdirs= - MFLAGS= MAKEFLAGS= -@@ -452,16 +463,6 @@ - esac - done - --# NLS nuisances. --# Only set these to C if already set. These must not be set unconditionally --# because not all systems understand e.g. LANG=C (notably SCO). --# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! --# Non-C LC_CTYPE values break the ctype check. --if test "${LANG+set}" = set; then LANG=C; export LANG; fi --if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi --if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi --if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi -- - # confdefs.h avoids OS command line length limits that DEFS can exceed. - rm -rf conftest* confdefs.h - # AIX cpp loses on an empty file, so make sure it contains at least a newline. -@@ -1850,6 +1850,19 @@ - # Compiler output produced by configure, useful for debugging - # configure, is in ./config.log if it exists. - -+# NLS nuisances. -+for as_var in \ -+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ -+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ -+ LC_TELEPHONE LC_TIME -+do -+ if (set +x; test -z "`(eval \$as_var=C; export \$as_var) 2>&1`"); then -+ eval \$as_var=C; export \$as_var -+ else -+ unset \$as_var -+ fi -+done -+ - ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" - for ac_option - do diff --git a/sys-devel/binutils/metadata.xml b/sys-devel/binutils/metadata.xml index 165a135caf69..3cc106863437 100644 --- a/sys-devel/binutils/metadata.xml +++ b/sys-devel/binutils/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>toolchain@gentoo.org</email> @@ -9,8 +9,11 @@ <flag name="cet">Enable Intel Control-flow Enforcement Technology.</flag> <flag name="default-gold">Set ld to point to ld.gold instead of ld.bfd</flag> <flag name="gold">Build ld.gold linker</flag> + <flag name="gprofng">Enable the next-generation gprofng profiler</flag> + <flag name="pgo">Build binutils with Profile Guided Optimization (PGO) and LTO</flag> <flag name="plugins">Enable plugin support in tools</flag> <flag name="multitarget">Adds support to binutils for cross compiling (does not work with gas)</flag> + <flag name="debuginfod">Enable debuginfod support via <pkg>dev-libs/elfutils</pkg> libdebuginfod</flag> </use> <upstream> <remote-id type="cpe">cpe:/a:gnu:binutils</remote-id> diff --git a/sys-devel/bison/Manifest b/sys-devel/bison/Manifest index 67e2907b00e3..b6104c4e11c0 100644 --- a/sys-devel/bison/Manifest +++ b/sys-devel/bison/Manifest @@ -1,7 +1,2 @@ -DIST bison-3.6.3-patches-01.tar.xz 10316 BLAKE2B a99e12e69334371316e5841f8c86ed716a9fed108800a33099e99f8fe432374259bf5477188d054b6d474bc905f821939691fc97f0c891d17a79968466f0c7e3 SHA512 5c97a183232ad31f231580193ed1853aba18010703b0c22105eaf6834241c9828d180eaafbc5d1da751b2d45a7e8195493e10ca2321b35680b2b3cd4ec39e3ca -DIST bison-3.6.4.tar.xz 2472456 BLAKE2B d2efe7ff1a349efe5a8c79eb69aa296dbc7eb9fde549afc91986460f27976e033dd793e904dda2f919f11e011ff6c458805288dff4939dcd1ee20e2b316cb9e6 SHA512 041cd87f4ca6b012031719a49aa81e62d3c0817c6364289732e6a3cb9a0762498760e0f2ce84c03ca9e9b74eb74bdffd1b8b86d2b4a6e4a0d8c8a4b864b672dc -DIST bison-3.7.3-patches-01.tar.xz 11336 BLAKE2B 2648dacd99c64c366946dad34f9e5fd838b43257df47bf74e3a3b63b03099152b4884d9b1c5943ee5c47afb090369278874c5f2b40dfa69b3abfa4eaa556843f SHA512 a53d541a550cc45f6c677fb6fa830640b64ba2c9a4ab4e6aef1f52ecd5fa38501e2391707d66c2958dd7a139dfba74ae5734e80d15360a3aa544fdea8ecf5500 -DIST bison-3.7.3.tar.xz 2613028 BLAKE2B a6f1063fb9441ae9102b29dc2786b7eb7104f7f13288d537080c26e7982e63f7a954abf1903f2a79a88578d88e9f3c30da8dcf12b7d6c89de0b60943186332c7 SHA512 34fe630749dc015f15a830ad13742c4b0b9163143a11e987c16954bee0451e819ec2fa7b43bd34c867e5ce72c758eb9070348d1d581c9435b9531a99caa46eed -DIST bison-3.7.5.tar.xz 2622228 BLAKE2B 4787af645197bfbc4c0439e98bbc98030a726ca185ec3375b2fe7f49aeee6517e2155e242a9829f93de931cf3217a7a3ede520fa1d562b25e2d34915677c1747 SHA512 98cdfaf114b8f8eb0927b29fe999dc9629336333d85bd2f87c4c558125500c44ee6fbfff453e3121c7e9e239a632f8c72e08c39be7dfb045361d35ec59d31811 -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.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.6.4.ebuild b/sys-devel/bison/bison-3.6.4.ebuild deleted file mode 100644 index b725646217b4..000000000000 --- a/sys-devel/bison/bison-3.6.4.ebuild +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit flag-o-matic - -PATCHES="${PN}-3.6.3-patches-01.tar.xz" - -DESCRIPTION="A general-purpose (yacc-compatible) parser generator" -HOMEPAGE="https://www.gnu.org/software/bison/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.xz - https://dev.gentoo.org/~whissi/dist/bison/${PATCHES} - https://dev.gentoo.org/~polynomial-c/dist/bison/${PATCHES}" - -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 )" - -RDEPEND=">=sys-devel/m4-1.4.16" -DEPEND="${RDEPEND}" -BDEPEND=" - sys-devel/flex - examples? ( dev-lang/perl ) - nls? ( sys-devel/gettext ) - test? ( dev-lang/perl ) -" - -DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) # ChangeLog-2012 ChangeLog-1998 PACKAGING README-alpha README-release - -PATCHES=( - "${WORKDIR}"/patches/${PN}-3.5-optional-perl.patch #538300 - "${WORKDIR}"/patches/${PN}-3.6.3-avoid_autoreconf.patch -) - -src_prepare() { - # 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 - - 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 - - # 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 examples) - $(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 -} - -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.7.3.ebuild b/sys-devel/bison/bison-3.7.3.ebuild deleted file mode 100644 index 29b8d4641091..000000000000 --- a/sys-devel/bison/bison-3.7.3.ebuild +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit flag-o-matic - -PATCH_TAR="${PN}-3.7.3-patches-01.tar.xz" - -DESCRIPTION="A general-purpose (yacc-compatible) parser generator" -HOMEPAGE="https://www.gnu.org/software/bison/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.xz - https://dev.gentoo.org/~whissi/dist/bison/${PATCH_TAR} - https://dev.gentoo.org/~polynomial-c/dist/bison/${PATCH_TAR}" - -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 - examples? ( dev-lang/perl ) - test? ( dev-lang/perl ) -" - -DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) # ChangeLog-2012 ChangeLog-1998 PACKAGING README-alpha README-release - -src_prepare() { - # 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 - - # 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 examples) - $(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 -} - -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.7.5.ebuild b/sys-devel/bison/bison-3.7.5.ebuild deleted file mode 100644 index 61db0e9ab17a..000000000000 --- a/sys-devel/bison/bison-3.7.5.ebuild +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit flag-o-matic - -PATCH_TAR="${PN}-3.7.3-patches-01.tar.xz" - -DESCRIPTION="A general-purpose (yacc-compatible) parser generator" -HOMEPAGE="https://www.gnu.org/software/bison/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.xz - https://dev.gentoo.org/~whissi/dist/bison/${PATCH_TAR} - https://dev.gentoo.org/~polynomial-c/dist/bison/${PATCH_TAR}" - -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 - examples? ( dev-lang/perl ) - test? ( dev-lang/perl ) -" - -DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) # ChangeLog-2012 ChangeLog-1998 PACKAGING README-alpha README-release - -src_prepare() { - # 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 - - # 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 examples) - $(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 -} - -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.7.6.ebuild b/sys-devel/bison/bison-3.7.6.ebuild deleted file mode 100644 index 64245f3c89ce..000000000000 --- a/sys-devel/bison/bison-3.7.6.ebuild +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit flag-o-matic - -PATCH_TAR="${PN}-3.7.6-patches-01.tar.xz" - -DESCRIPTION="A general-purpose (yacc-compatible) parser generator" -HOMEPAGE="https://www.gnu.org/software/bison/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.xz - https://dev.gentoo.org/~whissi/dist/bison/${PATCH_TAR} - https://dev.gentoo.org/~polynomial-c/dist/bison/${PATCH_TAR}" - -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 - examples? ( dev-lang/perl ) - test? ( dev-lang/perl ) -" - -DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) # ChangeLog-2012 ChangeLog-1998 PACKAGING README-alpha README-release - -src_prepare() { - # 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 - - # 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 examples) - $(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 -} - -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-r2.ebuild b/sys-devel/bison/bison-3.8.2-r2.ebuild new file mode 100644 index 000000000000..b778f945857a --- /dev/null +++ b/sys-devel/bison/bison-3.8.2-r2.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/bison.asc +inherit flag-o-matic multiprocessing 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-3+" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-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=" + app-alternatives/lex + test? ( dev-lang/perl ) + verify-sig? ( sec-keys/openpgp-keys-bison ) +" +PDEPEND="app-alternatives/yacc" + +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_test() { + emake check TESTSUITEFLAGS="--jobs=$(get_makeopts_jobs)" +} + +src_install() { + default + + # These are owned by app-alternatives/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() { + # ensure to preserve the symlinks before app-alternatives/yacc + # is installed + if [[ ! -h ${EROOT}/usr/bin/yacc ]]; then + if [[ -e ${EROOT}/usr/bin/yacc ]] ; then + # bug #886123 + ewarn "${EROOT}/usr/bin/yacc exists but is not a symlink." + ewarn "This is expected during Prefix bootstrap and unusual otherwise." + ewarn "Moving away unexpected ${EROOT}/usr/bin/yacc to .bak." + mv "${EROOT}/usr/bin/yacc" "${EROOT}/usr/bin/yacc.bak" || die + fi + + ln -s yacc.bison "${EROOT}/usr/bin/yacc" || die + fi +} diff --git a/sys-devel/bison/metadata.xml b/sys-devel/bison/metadata.xml index 56c124413057..2e9f3654b407 100644 --- a/sys-devel/bison/metadata.xml +++ b/sys-devel/bison/metadata.xml @@ -1,8 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!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> + <upstream> + <remote-id type="cpe">cpe:/a:gnu:bison</remote-id> + <remote-id type="github">akimd/bison</remote-id> + </upstream> </pkgmetadata> diff --git a/sys-devel/bmake/Manifest b/sys-devel/bmake/Manifest deleted file mode 100644 index 4f09dd970032..000000000000 --- a/sys-devel/bmake/Manifest +++ /dev/null @@ -1,4 +0,0 @@ -DIST bmake-20210206.tar.gz 740065 BLAKE2B 2482b980ad4e4aac4292e0244020eeb3699148d84b0f493865a8317673eddb20ed48219f1319c490c6a88c6f1c50a44bd95af5de43f5853876bd10c1aef9b4bd SHA512 abda3aadd49abfe0e7801f4c37539a9172c3bb2d6ed542e0dec5b6177a799774a4b513041ff6167409c69ac6af35f506b1d6e585694259192a65a8575c232839 -DIST bmake-20210314.tar.gz 749343 BLAKE2B 765b06577d8b06924627de7c2551e4fa25bdf533f2ce96db09a63af01d965e2bc29001e2c07df98a15d72b3c57a11e99974df82b9ec12257c9340baf563c3faf SHA512 d27c3787102d32ccd541909aaf76083ff9d2f704b938ba64d234c5d29d2e7dea320e99bbee53d3594aa830ced59d512d8701487ec5b0c277339e705d6e64f97d -DIST mk-20191111.tar.gz 102361 BLAKE2B 6a542c41e2a2153bd3c812aa9bcdc78a47bf2e9121835279afa2e57ec9cdd44f72a1cd7b48a7647d56b0586c547656f45359821cd2013c5a90532568e12086b5 SHA512 4a3e2344e7ada0666bcb147fcd4627030ba9b928acab6876215c8529b23909be4ced802bea177b078a6b4457370d2d0070114c0d69979622274be74336778861 -DIST mk-20210330.tar.gz 107380 BLAKE2B 9ac30a117d9ba31635cf8d8d29fdba76f148611f47628403ca8f807081c32509f10498d3c30fd24985e5420af4710fe59fc6315d71f2d0c1cfed93263a06553a SHA512 6acd3ee911442934082f4f877d795b07c5e23022eaa9c0874799d97e92a2f5a663cb45f94b7f9745c49cbbce6b7e755a29e381ccfb9e68a0be1eedbd22fd5d3b diff --git a/sys-devel/bmake/bmake-20210206-r1.ebuild b/sys-devel/bmake/bmake-20210206-r1.ebuild deleted file mode 100644 index 3b3e54fcda20..000000000000 --- a/sys-devel/bmake/bmake-20210206-r1.ebuild +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -MK_VER=20191111 - -DESCRIPTION="NetBSD's portable make" -HOMEPAGE="http://www.crufty.net/help/sjg/bmake.html" -SRC_URI=" - http://void.crufty.net/ftp/pub/sjg/${P}.tar.gz - http://void.crufty.net/ftp/pub/sjg/mk-${MK_VER}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="amd64 ~ppc ~x86" - -S="${WORKDIR}/${PN}" - -# Skip failing test (sandbox and csh) -PATCHES=( "${FILESDIR}"/${P}-tests.patch ) - -src_prepare() { - default - cd "${WORKDIR}" || die - eapply "${FILESDIR}"/${P}-lib-mk.patch -} - -src_configure() { - econf \ - --with-mksrc=../mk \ - --with-default-sys-path="${EPREFIX}"/usr/share/mk/${PN} \ - --with-machine_arch=${ARCH} -} - -src_compile() { - sh make-bootstrap.sh || die "bootstrap failed" -} - -src_test() { - cd unit-tests || die - - # the 'ternary' test uses ${A} internally, which - # conflicts with Gentoo's ${A}, hence unset it for - # the tests temporarily. - env -u A MAKEFLAGS= \ - "${S}"/bmake -r -m / TEST_MAKE="${S}"/bmake test || die "tests compilation failed" -} - -src_install() { - dobin ${PN} - doman ${PN}.1 - FORCE_BSD_MK=1 SYS_MK_DIR=. \ - sh ../mk/install-mk -v -m 644 "${ED}"/usr/share/mk/${PN} \ - || die "failed to install mk files" -} diff --git a/sys-devel/bmake/bmake-20210314-r1.ebuild b/sys-devel/bmake/bmake-20210314-r1.ebuild deleted file mode 100644 index b68c5fb35989..000000000000 --- a/sys-devel/bmake/bmake-20210314-r1.ebuild +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -MK_VER=20210330 - -DESCRIPTION="NetBSD's portable make" -HOMEPAGE="http://www.crufty.net/help/sjg/bmake.html" -SRC_URI=" - http://void.crufty.net/ftp/pub/sjg/${P}.tar.gz - http://void.crufty.net/ftp/pub/sjg/mk-${MK_VER}.tar.gz" -S="${WORKDIR}/${PN}" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~x86" - -# Skip failing test (sandbox and csh) -PATCHES=( "${FILESDIR}"/${PN}-20210206-tests.patch ) - -src_prepare() { - default - cd "${WORKDIR}" || die - eapply "${FILESDIR}"/${P}-mk-fixes.patch -} - -src_configure() { - econf \ - --with-mksrc=../mk \ - --with-default-sys-path="${EPREFIX}"/usr/share/mk/${PN} \ - --with-machine_arch=${ARCH} -} - -src_compile() { - sh make-bootstrap.sh || die "bootstrap failed" -} - -src_test() { - cd unit-tests || die - - # the 'ternary' test uses ${A} internally, which - # conflicts with Gentoo's ${A}, hence unset it for - # the tests temporarily. - env -u A MAKEFLAGS= \ - "${S}"/bmake -r -m / TEST_MAKE="${S}"/bmake test || die "tests compilation failed" -} - -src_install() { - dobin ${PN} - doman ${PN}.1 - FORCE_BSD_MK=1 SYS_MK_DIR=. \ - sh ../mk/install-mk -v -m 644 "${ED}"/usr/share/mk/${PN} \ - || die "failed to install mk files" -} diff --git a/sys-devel/bmake/bmake-20210314.ebuild b/sys-devel/bmake/bmake-20210314.ebuild deleted file mode 100644 index cccbf6666ec7..000000000000 --- a/sys-devel/bmake/bmake-20210314.ebuild +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -MK_VER=20191111 - -DESCRIPTION="NetBSD's portable make" -HOMEPAGE="http://www.crufty.net/help/sjg/bmake.html" -SRC_URI=" - http://void.crufty.net/ftp/pub/sjg/${P}.tar.gz - http://void.crufty.net/ftp/pub/sjg/mk-${MK_VER}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~x86" - -S="${WORKDIR}/${PN}" - -# Skip failing test (sandbox and csh) -PATCHES=( "${FILESDIR}"/${PN}-20210206-tests.patch ) - -src_prepare() { - default - cd "${WORKDIR}" || die - eapply "${FILESDIR}"/${PN}-20210206-lib-mk.patch -} - -src_configure() { - econf \ - --with-mksrc=../mk \ - --with-default-sys-path="${EPREFIX}"/usr/share/mk/${PN} \ - --with-machine_arch=${ARCH} -} - -src_compile() { - sh make-bootstrap.sh || die "bootstrap failed" -} - -src_test() { - cd unit-tests || die - - # the 'ternary' test uses ${A} internally, which - # conflicts with Gentoo's ${A}, hence unset it for - # the tests temporarily. - env -u A MAKEFLAGS= \ - "${S}"/bmake -r -m / TEST_MAKE="${S}"/bmake test || die "tests compilation failed" -} - -src_install() { - dobin ${PN} - doman ${PN}.1 - FORCE_BSD_MK=1 SYS_MK_DIR=. \ - sh ../mk/install-mk -v -m 644 "${ED}"/usr/share/mk/${PN} \ - || die "failed to install mk files" -} diff --git a/sys-devel/bmake/files/bmake-20210206-lib-mk.patch b/sys-devel/bmake/files/bmake-20210206-lib-mk.patch deleted file mode 100644 index 5f860b6f15aa..000000000000 --- a/sys-devel/bmake/files/bmake-20210206-lib-mk.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/mk/lib.mk -+++ b/mk/lib.mk -@@ -170,7 +170,7 @@ LD_solib= lib${LIB}_pic.a - .elif ${TARGET_OSNAME} == "Linux" - SHLIB_LD = ${CC} - # this is ambiguous of course --LD_shared=-shared -Wl,"-soname lib${LIB}.so.${SHLIB_MAJOR}" -+LD_shared=-shared -Wl,-soname,lib${LIB}.so.${SHLIB_MAJOR} - LD_solib= -Wl,--whole-archive lib${LIB}_pic.a -Wl,--no-whole-archive - .if ${COMPILER_TYPE} == "gcc" - # Linux uses GNU ld, which is a multi-pass linker diff --git a/sys-devel/bmake/files/bmake-20210206-tests.patch b/sys-devel/bmake/files/bmake-20210206-tests.patch deleted file mode 100644 index 49e5f258e91a..000000000000 --- a/sys-devel/bmake/files/bmake-20210206-tests.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/unit-tests/Makefile -+++ b/unit-tests/Makefile -@@ -191,7 +191,6 @@ TESTS+= dotwait - TESTS+= envfirst - TESTS+= error - TESTS+= # escape # broken by reverting POSIX changes --TESTS+= export - TESTS+= export-all - TESTS+= export-env - TESTS+= export-variants -@@ -290,7 +289,6 @@ TESTS+= sh-leading-plus - TESTS+= sh-meta-chars - TESTS+= sh-multi-line - TESTS+= sh-single-line --TESTS+= shell-csh - TESTS+= shell-custom - .if exists(/bin/ksh) - TESTS+= shell-ksh diff --git a/sys-devel/bmake/files/bmake-20210314-mk-fixes.patch b/sys-devel/bmake/files/bmake-20210314-mk-fixes.patch deleted file mode 100644 index 6dd935863be1..000000000000 --- a/sys-devel/bmake/files/bmake-20210314-mk-fixes.patch +++ /dev/null @@ -1,66 +0,0 @@ -# https://bugs.gentoo.org/779340 -# https://bugs.gentoo.org/778458 -# - Fix incorrect linking of shared libraries -# - Respect LDFLAGS -# - Do not strip prog binaries ---- a/mk/lib.mk -+++ b/mk/lib.mk -@@ -170,7 +170,7 @@ LD_solib= lib${LIB}_pic.a - .elif ${TARGET_OSNAME} == "Linux" - SHLIB_LD = ${CC} - # this is ambiguous of course --LD_shared=-shared -Wl,"-soname lib${LIB}.so.${SHLIB_MAJOR}" -+LD_shared=-shared -Wl,-soname,lib${LIB}.so.${SHLIB_MAJOR} - LD_solib= -Wl,--whole-archive lib${LIB}_pic.a -Wl,--no-whole-archive - .if ${COMPILER_TYPE} == "gcc" - # Linux uses GNU ld, which is a multi-pass linker -@@ -455,11 +455,11 @@ lib${LIB}.${LD_so}: ${SOLIB} ${DPADD} - --whole-archive ${SOLIB} --no-whole-archive ${SHLIB_LDADD} \ - ${SHLIB_LDENDFILE} - .else -- ${SHLIB_LD} ${LD_x} ${LD_shared} \ -+ ${SHLIB_LD} ${LD_x} ${LD_shared} ${LDFLAGS} \ - -o ${.TARGET} ${SOLIB} ${SHLIB_LDADD} - .endif - .else -- ${SHLIB_LD} -o ${.TARGET} ${LD_shared} ${LD_solib} ${DLLIB} ${SHLIB_LDADD} -+ ${SHLIB_LD} -o ${.TARGET} ${LD_shared} ${LDFLAGS} ${LD_solib} ${DLLIB} ${SHLIB_LDADD} - .endif - .endif - .if !empty(SHLIB_LINKS) ---- a/mk/prog.mk -+++ b/mk/prog.mk -@@ -178,7 +178,7 @@ proginstall: - .if defined(PROG) - [ -d ${DESTDIR}${BINDIR} ] || \ - ${INSTALL} -d ${PROG_INSTALL_OWN} -m 775 ${DESTDIR}${BINDIR} -- ${INSTALL} ${COPY} ${STRIP_FLAG} ${PROG_INSTALL_OWN} -m ${BINMODE} \ -+ ${INSTALL} ${COPY} ${PROG_INSTALL_OWN} -m ${BINMODE} \ - ${PROG} ${DESTDIR}${BINDIR}/${PROG_NAME} - .endif - .if defined(HIDEGAME) ---- a/mk/sys/Linux.mk -+++ b/mk/sys/Linux.mk -@@ -19,12 +19,13 @@ NEED_SOLINKS ?=yes - AR ?= ar - ARFLAGS ?= rl - RANLIB ?= ranlib -+LDFLAGS ?= - - AS ?= as - AFLAGS= - COMPILE.s ?= ${AS} ${AFLAGS} - LINK.s ?= ${CC} ${AFLAGS} ${LDFLAGS} --COMPILE.S ?= ${CC} ${AFLAGS} ${CPPFLAGS} -c -+COMPILE.S ?= ${CC} ${AFLAGS} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -c - LINK.S ?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS} - .if exists(/usr/local/bin/gcc) - CC ?= gcc -pipe -@@ -65,7 +66,6 @@ LFLAGS= - LEX.l ?= ${LEX} ${LFLAGS} - - LD ?= ld --LDFLAGS= - - LINT ?= lint - LINTFLAGS ?= -chapbx diff --git a/sys-devel/bmake/metadata.xml b/sys-devel/bmake/metadata.xml deleted file mode 100644 index 97c59ff25556..000000000000 --- a/sys-devel/bmake/metadata.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="person"> - <email>jakov.smolic@sartura.hr</email> - <name>Jakov Smolic</name> - </maintainer> - <maintainer type="person"> - <email>soap@gentoo.org</email> - <name>David Seifert</name> - </maintainer> -</pkgmetadata> diff --git a/sys-devel/boost-m4/Manifest b/sys-devel/boost-m4/Manifest deleted file mode 100644 index 2c9cc88c4c1b..000000000000 --- a/sys-devel/boost-m4/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST boost-m4-0.4_p20160328.tar.gz 41253 BLAKE2B 47ad17f652560dce4e276b295e55e7daa8752f1c932a6c0d1bad9e4bc2ff72eb0adfaf8abc4e7c57f179f08857de255935fc530f0a4d8a26d3f6a2a0711417ac SHA512 4aecd311b21ced4a3d62fc706a9fa731c375ea490482f78756892243b5af6909cd8841c249632b37820be7f1bde41c290e842edd933d0c727e1dca76d30eb506 diff --git a/sys-devel/boost-m4/boost-m4-0.4_p20160328.ebuild b/sys-devel/boost-m4/boost-m4-0.4_p20160328.ebuild deleted file mode 100644 index abe648762767..000000000000 --- a/sys-devel/boost-m4/boost-m4-0.4_p20160328.ebuild +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -DESCRIPTION="Another set of autoconf macros for compiling against boost" -HOMEPAGE="https://github.com/tsuna/boost.m4" -SRC_URI="https://dev.gentoo.org/~soap/distfiles/${P}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" -IUSE="" -S="${WORKDIR}/boost.m4-1489691f65aecb593e33abc3e56ac482dd67da7b" - -# boost.m4 has a buildsystem, but the distributer didn't use make dist -# so we'd have to eautoreconf to use it. Also, its ./configure script -# DEPENDs on boost. For installing one file, bootstrapping the -# buildsystem isn't worth it. -src_configure() { :; } - -src_compile() { :; } - -src_install() { - insinto /usr/share/aclocal - doins build-aux/boost.m4 - - dodoc AUTHORS NEWS README THANKS -} diff --git a/sys-devel/boost-m4/metadata.xml b/sys-devel/boost-m4/metadata.xml deleted file mode 100644 index 15d6b7598b9f..000000000000 --- a/sys-devel/boost-m4/metadata.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <!--maintainer-needed--> - <upstream> - <remote-id type="github">tsuna/boost.m4</remote-id> - </upstream> -</pkgmetadata> diff --git a/sys-devel/clang-common/Manifest b/sys-devel/clang-common/Manifest index 09cfebc27697..bd71f2e58a68 100644 --- a/sys-devel/clang-common/Manifest +++ b/sys-devel/clang-common/Manifest @@ -1,5 +1,10 @@ -DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151 -DIST llvmorg-11.0.0.tar.gz 122743665 BLAKE2B 3f95570240789fd68ddb747df817f5c6cdc9da40911bbe9ee3531c15ada9165e5002b1c2f778cf8735858485ea05a8754e3d3a5f4b15bdd6cb33d64a14692984 SHA512 b6d38871ccce0e086e27d35e42887618d68e57d8274735c59e3eabc42dee352412489296293f8d5169fe0044936345915ee7da61ebdc64ec10f7737f6ecd90f2 -DIST llvmorg-11.0.1.tar.gz 122790338 BLAKE2B 0130996b4a8c4d9f757136fd7fb318068c9bfdc565060dec0d4336480c4ab66c4ae3185a7fdb05f13cf9ee8fd4123b09df938881b75d6e5d3689595114b7e32a SHA512 f5e6ef0b3111aae08a89cd01adb2ff4abfa9ef779c68b9190421d0447efd25c2cc00e5aae9f4764805f5fa31434866043d1510ae7389817e28ae53a5442e2fdf -DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81 -DIST llvmorg-12.0.0.tar.gz 134226215 BLAKE2B f9c3ba8c58571855caa4f206fd285c9b5be66672fb0814cb8bc0964a051f57f5d35013aa1e27cbda502652b37df1ec23474129109e76a42066847860db441dbe SHA512 0cff02155c5ac0d6db2b72d60d9819d5b5dd859663b45f721b1c7540239c2fceb1f57d9173f6870c49de851c242ed8e85c5c6d6577a1f8092a7c5dcd12513b26 +DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52 +DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2 +DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d SHA512 89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7 +DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a SHA512 ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447 +DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30 +DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340 +DIST llvm-project-18.1.4.src.tar.xz 132054668 BLAKE2B 94bbad3b185fd07cbace4eff79aba80fbdd5e072739250e3927fe1848bcf3f8d355eb1f384e57306707eb702acc7ab01b732590735be7950221607664d04b0a6 SHA512 b1b214ae91f3705d8ea345547ad53f1e5d7d884c1eb6958bc41c14ac4b3e407771ccc2b693686ff103c8232c2c3942731d6db9a9cb4f735e6c6a0674739d0b29 +DIST llvm-project-18.1.4.src.tar.xz.sig 566 BLAKE2B b74fd219d7bcdf197b4e711cfbb25c40e9d8d2c7341de0215d8c31f330f396e9c166ff63513829cdc9cef349f08238f66a4dc949fa97958a7af496abae369eaa SHA512 4f456edf4fb454815acaef6855b1a0991f229810a32e9369af83388e37f0ef8964308e1e93bd6216024cdd67e86caaadc8d5794467857cc6fe561c9fa6ca7386 +DIST llvm-project-ee284d2da0720dc21191d6f545504cbfcf5dcbcf.tar.gz 208883034 BLAKE2B e37c9f1a6a4d0caa9a3091f979dd09f509d458f8b7b30286c77dd2385aea748b7aac6dd488c79573f82feb655aa321717bd2fb46bba4a12b388b52064f6e13bf SHA512 1335ade87cd2accc47ac47ed2ab302999e375808b158b6c9d31fac9059cbb992d2bdaaadf1fd9a1b37268c1123d43346ea4d150894d6d2e6f80ba790b65b93b1 +DIST llvm-project-f03cd2db91956456f1c5e2da86d3c50183eebd28.tar.gz 209375254 BLAKE2B 1d7e043d04323edb64b2ef2309fbcb4f82a959f45391e815133cc0891d5a497bbb81101aab460e9bf67e75aa906e13ad1877c3850829dcad397ed626dc8f2792 SHA512 6775e03a44b2133bd4a4b473ab007599321daa19dc7f3cc47f95cf9d110e83e982bf48a6b1d43038b0f0a2c0fef2f689aefd20132b25a90ef19342683e2d2e50 diff --git a/sys-devel/clang-common/clang-common-10.0.1.ebuild b/sys-devel/clang-common/clang-common-10.0.1.ebuild deleted file mode 100644 index 02b1ebd789ae..000000000000 --- a/sys-devel/clang-common/clang-common-10.0.1.ebuild +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit bash-completion-r1 llvm.org - -DESCRIPTION="Common files shared between multiple slots of clang" -HOMEPAGE="https://llvm.org/" -LLVM_COMPONENTS=( clang/utils/bash-autocomplete.sh ) -llvm.org_set_globals -S=${WORKDIR}/clang/utils - -LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" -SLOT="0" -KEYWORDS="amd64 arm arm64 ppc64 x86 ~amd64-linux ~ppc-macos ~x64-macos" -IUSE="" - -PDEPEND="sys-devel/clang:*" - -src_install() { - newbashcomp bash-autocomplete.sh clang -} diff --git a/sys-devel/clang-common/clang-common-11.0.0.ebuild b/sys-devel/clang-common/clang-common-11.0.0.ebuild deleted file mode 100644 index 07e7bbfb813c..000000000000 --- a/sys-devel/clang-common/clang-common-11.0.0.ebuild +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit bash-completion-r1 llvm.org - -DESCRIPTION="Common files shared between multiple slots of clang" -HOMEPAGE="https://llvm.org/" -LLVM_COMPONENTS=( clang/utils/bash-autocomplete.sh ) -llvm.org_set_globals -S=${WORKDIR}/clang/utils - -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="" - -PDEPEND="sys-devel/clang:*" - -src_install() { - newbashcomp bash-autocomplete.sh clang -} diff --git a/sys-devel/clang-common/clang-common-11.0.1.ebuild b/sys-devel/clang-common/clang-common-11.0.1.ebuild deleted file mode 100644 index 5defffd7cec3..000000000000 --- a/sys-devel/clang-common/clang-common-11.0.1.ebuild +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -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 ~ppc64 ~riscv x86 ~amd64-linux ~ppc-macos ~x64-macos" -IUSE="" - -PDEPEND="sys-devel/clang:*" - -LLVM_COMPONENTS=( clang/utils/bash-autocomplete.sh ) -llvm.org_set_globals -S=${WORKDIR}/clang/utils - -src_install() { - newbashcomp bash-autocomplete.sh clang -} diff --git a/sys-devel/clang-common/clang-common-11.1.0.ebuild b/sys-devel/clang-common/clang-common-11.1.0.ebuild deleted file mode 100644 index 5defffd7cec3..000000000000 --- a/sys-devel/clang-common/clang-common-11.1.0.ebuild +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -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 ~ppc64 ~riscv x86 ~amd64-linux ~ppc-macos ~x64-macos" -IUSE="" - -PDEPEND="sys-devel/clang:*" - -LLVM_COMPONENTS=( clang/utils/bash-autocomplete.sh ) -llvm.org_set_globals -S=${WORKDIR}/clang/utils - -src_install() { - newbashcomp bash-autocomplete.sh clang -} diff --git a/sys-devel/clang-common/clang-common-12.0.0.9999.ebuild b/sys-devel/clang-common/clang-common-12.0.0.9999.ebuild deleted file mode 100644 index c9abcb48cca8..000000000000 --- a/sys-devel/clang-common/clang-common-12.0.0.9999.ebuild +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -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="" -IUSE="" - -PDEPEND="sys-devel/clang:*" - -LLVM_COMPONENTS=( clang/utils/bash-autocomplete.sh ) -llvm.org_set_globals -S=${WORKDIR}/clang/utils - -src_install() { - newbashcomp bash-autocomplete.sh clang -} diff --git a/sys-devel/clang-common/clang-common-12.0.0.ebuild b/sys-devel/clang-common/clang-common-12.0.0.ebuild deleted file mode 100644 index 6dfe0fb8ce8f..000000000000 --- a/sys-devel/clang-common/clang-common-12.0.0.ebuild +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -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 ~ppc64 ~riscv ~x86 ~amd64-linux ~ppc-macos ~x64-macos" -IUSE="" - -PDEPEND="sys-devel/clang:*" - -LLVM_COMPONENTS=( clang/utils/bash-autocomplete.sh ) -llvm.org_set_globals -S=${WORKDIR}/clang/utils - -src_install() { - newbashcomp bash-autocomplete.sh clang -} diff --git a/sys-devel/clang-common/clang-common-13.0.0.9999.ebuild b/sys-devel/clang-common/clang-common-13.0.0.9999.ebuild deleted file mode 100644 index 03e4441b91b9..000000000000 --- a/sys-devel/clang-common/clang-common-13.0.0.9999.ebuild +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -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="" -IUSE="" - -PDEPEND="sys-devel/clang:*" - -LLVM_COMPONENTS=( clang/utils/bash-autocomplete.sh ) -llvm.org_set_globals -S=${WORKDIR}/clang/utils - -src_install() { - newbashcomp bash-autocomplete.sh clang -} diff --git a/sys-devel/clang-common/clang-common-15.0.7-r8.ebuild b/sys-devel/clang-common/clang-common-15.0.7-r8.ebuild new file mode 100644 index 000000000000..4d200fba7af7 --- /dev/null +++ b/sys-devel/clang-common/clang-common-15.0.7-r8.ebuild @@ -0,0 +1,185 @@ +# Copyright 1999-2024 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" +IUSE=" + default-compiler-rt default-libcxx default-lld llvm-libunwind + hardened stricter +" + +PDEPEND=" + sys-devel/clang:* + default-compiler-rt? ( + sys-devel/clang-runtime[compiler-rt] + llvm-libunwind? ( sys-libs/llvm-libunwind[static-libs] ) + !llvm-libunwind? ( sys-libs/libunwind[static-libs] ) + ) + !default-compiler-rt? ( sys-devel/gcc ) + default-libcxx? ( >=sys-libs/libcxx-${PV}[static-libs] ) + !default-libcxx? ( sys-devel/gcc ) + default-lld? ( >=sys-devel/lld-${PV} ) + !default-lld? ( sys-devel/binutils ) +" +IDEPEND=" + !default-compiler-rt? ( sys-devel/gcc-config ) + !default-libcxx? ( sys-devel/gcc-config ) +" + +LLVM_COMPONENTS=( clang/utils ) +llvm.org_set_globals + +pkg_pretend() { + [[ ${CLANG_IGNORE_DEFAULT_RUNTIMES} ]] && return + + local flag missing_flags=() + for flag in default-{compiler-rt,libcxx,lld}; do + if ! use "${flag}" && has_version "sys-devel/clang[${flag}]"; then + missing_flags+=( "${flag}" ) + fi + done + + if [[ ${missing_flags[@]} ]]; then + eerror "It seems that you have the following flags set on sys-devel/clang:" + eerror + eerror " ${missing_flags[*]}" + eerror + eerror "The default runtimes are now set via flags on sys-devel/clang-common." + eerror "The build is being aborted to prevent breakage. Please either set" + eerror "the respective flags on this ebuild, e.g.:" + eerror + eerror " sys-devel/clang-common ${missing_flags[*]}" + eerror + eerror "or build with CLANG_IGNORE_DEFAULT_RUNTIMES=1." + die "Mismatched defaults detected between sys-devel/clang and sys-devel/clang-common" + fi +} + +src_install() { + newbashcomp bash-autocomplete.sh clang + + insinto /etc/clang + newins - gentoo-runtimes.cfg <<-EOF + # This file is initially generated by sys-devel/clang-runtime. + # It is used to control the default runtimes using by clang. + + --rtlib=$(usex default-compiler-rt compiler-rt libgcc) + --unwindlib=$(usex default-compiler-rt libunwind libgcc) + --stdlib=$(usex default-libcxx libc++ libstdc++) + -fuse-ld=$(usex default-lld lld bfd) + EOF + + newins - gentoo-gcc-install.cfg <<-EOF + # This file is maintained by gcc-config. + # It is used to specify the selected GCC installation. + EOF + + newins - gentoo-common.cfg <<-EOF + # This file contains flags common to clang, clang++ and clang-cpp. + @gentoo-runtimes.cfg + @gentoo-gcc-install.cfg + @gentoo-hardened.cfg + # bug #870001 + -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h" + EOF + + # Baseline hardening (bug #851111) + # (-fstack-clash-protection is omitted because of a possible Clang bug, + # see bug #892537 and bug #865339.) + newins - gentoo-hardened.cfg <<-EOF + # Some of these options are added unconditionally, regardless of + # USE=hardened, for parity with sys-devel/gcc. + -Xarch_host -fstack-protector-strong + -fPIE + -include "${EPREFIX}/usr/include/gentoo/fortify.h" + EOF + + dodir /usr/include/gentoo + + cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die + /* __has_include is an extension, but it's fine, because this is only + for Clang anyway. */ + #if defined __has_include && __has_include (<stdc-predef.h>) && !defined(__GLIBC__) + # include <stdc-predef.h> + #endif + EOF + + local fortify_level=$(usex hardened 3 2) + # We have to do this because glibc's headers warn if F_S is set + # without optimization and that would at the very least be very noisy + # during builds and at worst trigger many -Werror builds. + cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die + #ifdef __clang__ + # pragma clang system_header + #endif + #ifndef _FORTIFY_SOURCE + # if defined(__has_feature) + # define __GENTOO_HAS_FEATURE(x) __has_feature(x) + # else + # define __GENTOO_HAS_FEATURE(x) 0 + # endif + # + # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 + # if !defined(__SANITIZE_ADDRESS__) && !__GENTOO_HAS_FEATURE(address_sanitizer) && !__GENTOO_HAS_FEATURE(memory_sanitizer) + # define _FORTIFY_SOURCE ${fortify_level} + # endif + # endif + # undef __GENTOO_HAS_FEATURE + #endif + EOF + + if use hardened ; then + cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die + # Options below are conditional on USE=hardened. + -D_GLIBCXX_ASSERTIONS + + # Analogue to GLIBCXX_ASSERTIONS + # https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode + -D_LIBCPP_ENABLE_ASSERTIONS=1 + EOF + fi + + if use stricter; then + newins - gentoo-stricter.cfg <<-EOF + # This file increases the strictness of older clang versions + # to match the newest upstream version. + + # clang-16 defaults + -Werror=implicit-function-declaration + -Werror=implicit-int + -Werror=incompatible-function-pointer-types + EOF + + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + @gentoo-stricter.cfg + EOF + fi + + local tool + for tool in clang{,++,-cpp}; do + newins - "${tool}.cfg" <<-EOF + # This configuration file is used by ${tool} driver. + @gentoo-common.cfg + EOF + done +} + +pkg_preinst() { + if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc + then + local gcc_path=$(gcc-config --get-lib-path 2>/dev/null) + if [[ -n ${gcc_path} ]]; then + cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF + --gcc-install-dir="${gcc_path%%:*}" + EOF + fi + fi +} diff --git a/sys-devel/clang-common/clang-common-16.0.6-r4.ebuild b/sys-devel/clang-common/clang-common-16.0.6-r4.ebuild new file mode 100644 index 000000000000..8185d75d346e --- /dev/null +++ b/sys-devel/clang-common/clang-common-16.0.6-r4.ebuild @@ -0,0 +1,191 @@ +# Copyright 1999-2024 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 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" +IUSE=" + default-compiler-rt default-libcxx default-lld + bootstrap-prefix hardened llvm-libunwind +" + +PDEPEND=" + sys-devel/clang:* + default-compiler-rt? ( + sys-devel/clang-runtime[compiler-rt] + llvm-libunwind? ( sys-libs/llvm-libunwind[static-libs] ) + !llvm-libunwind? ( sys-libs/libunwind[static-libs] ) + ) + !default-compiler-rt? ( sys-devel/gcc ) + default-libcxx? ( >=sys-libs/libcxx-${PV}[static-libs] ) + !default-libcxx? ( sys-devel/gcc ) + default-lld? ( >=sys-devel/lld-${PV} ) + !default-lld? ( sys-devel/binutils ) +" +IDEPEND=" + !default-compiler-rt? ( sys-devel/gcc-config ) + !default-libcxx? ( sys-devel/gcc-config ) +" + +LLVM_COMPONENTS=( clang/utils ) +llvm.org_set_globals + +pkg_pretend() { + [[ ${CLANG_IGNORE_DEFAULT_RUNTIMES} ]] && return + + local flag missing_flags=() + for flag in default-{compiler-rt,libcxx,lld}; do + if ! use "${flag}" && has_version "sys-devel/clang[${flag}]"; then + missing_flags+=( "${flag}" ) + fi + done + + if [[ ${missing_flags[@]} ]]; then + eerror "It seems that you have the following flags set on sys-devel/clang:" + eerror + eerror " ${missing_flags[*]}" + eerror + eerror "The default runtimes are now set via flags on sys-devel/clang-common." + eerror "The build is being aborted to prevent breakage. Please either set" + eerror "the respective flags on this ebuild, e.g.:" + eerror + eerror " sys-devel/clang-common ${missing_flags[*]}" + eerror + eerror "or build with CLANG_IGNORE_DEFAULT_RUNTIMES=1." + die "Mismatched defaults detected between sys-devel/clang and sys-devel/clang-common" + fi +} + +src_install() { + newbashcomp bash-autocomplete.sh clang + + insinto /etc/clang + newins - gentoo-runtimes.cfg <<-EOF + # This file is initially generated by sys-devel/clang-runtime. + # It is used to control the default runtimes using by clang. + + --rtlib=$(usex default-compiler-rt compiler-rt libgcc) + --unwindlib=$(usex default-compiler-rt libunwind libgcc) + --stdlib=$(usex default-libcxx libc++ libstdc++) + -fuse-ld=$(usex default-lld lld bfd) + EOF + + newins - gentoo-gcc-install.cfg <<-EOF + # This file is maintained by gcc-config. + # It is used to specify the selected GCC installation. + EOF + + newins - gentoo-common.cfg <<-EOF + # This file contains flags common to clang, clang++ and clang-cpp. + @gentoo-runtimes.cfg + @gentoo-gcc-install.cfg + @gentoo-hardened.cfg + # bug #870001 + -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h" + EOF + + # Baseline hardening (bug #851111) + newins - gentoo-hardened.cfg <<-EOF + # Some of these options are added unconditionally, regardless of + # USE=hardened, for parity with sys-devel/gcc. + -Xarch_host -fstack-clash-protection + -Xarch_host -fstack-protector-strong + -fPIE + -include "${EPREFIX}/usr/include/gentoo/fortify.h" + EOF + + dodir /usr/include/gentoo + + cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die + /* __has_include is an extension, but it's fine, because this is only + for Clang anyway. */ + #if defined __has_include && __has_include (<stdc-predef.h>) && !defined(__GLIBC__) + # include <stdc-predef.h> + #endif + EOF + + local fortify_level=$(usex hardened 3 2) + # We have to do this because glibc's headers warn if F_S is set + # without optimization and that would at the very least be very noisy + # during builds and at worst trigger many -Werror builds. + cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die + #ifdef __clang__ + # pragma clang system_header + #endif + #ifndef _FORTIFY_SOURCE + # if defined(__has_feature) + # define __GENTOO_HAS_FEATURE(x) __has_feature(x) + # else + # define __GENTOO_HAS_FEATURE(x) 0 + # endif + # + # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 + # if !defined(__SANITIZE_ADDRESS__) && !__GENTOO_HAS_FEATURE(address_sanitizer) && !__GENTOO_HAS_FEATURE(memory_sanitizer) + # define _FORTIFY_SOURCE ${fortify_level} + # endif + # endif + # undef __GENTOO_HAS_FEATURE + #endif + EOF + + if use hardened ; then + cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die + # Options below are conditional on USE=hardened. + -D_GLIBCXX_ASSERTIONS + + # Analogue to GLIBCXX_ASSERTIONS + # https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode + -D_LIBCPP_ENABLE_ASSERTIONS=1 + EOF + fi + + local tool + for tool in clang{,++,-cpp}; do + newins - "${tool}.cfg" <<-EOF + # This configuration file is used by ${tool} driver. + @gentoo-common.cfg + EOF + done + + if use kernel_Darwin; then + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + # Gentoo Prefix on Darwin + -Wl,-search_paths_first + -Wl,-rpath,${EPREFIX}/usr/lib + -L ${EPREFIX}/usr/lib + -isystem ${EPREFIX}/usr/include + -isysroot ${EPREFIX}/MacOSX.sdk + EOF + if use bootstrap-prefix ; then + # bootstrap-prefix is only set during stage2 of bootstrapping + # Prefix, where EPREFIX is set to EPREFIX/tmp. + # Here we need to point it at the future lib dir of the stage3's + # EPREFIX. + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + -Wl,-rpath,${EPREFIX}/../usr/lib + EOF + fi + cat >> "${ED}/etc/clang/clang++.cfg" <<-EOF || die + -lc++abi + EOF + fi +} + +pkg_preinst() { + if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc + then + local gcc_path=$(gcc-config --get-lib-path 2>/dev/null) + if [[ -n ${gcc_path} ]]; then + cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF + --gcc-install-dir="${gcc_path%%:*}" + EOF + fi + fi +} diff --git a/sys-devel/clang-common/clang-common-17.0.6-r5.ebuild b/sys-devel/clang-common/clang-common-17.0.6-r5.ebuild new file mode 100644 index 000000000000..e736620feb37 --- /dev/null +++ b/sys-devel/clang-common/clang-common-17.0.6-r5.ebuild @@ -0,0 +1,303 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit bash-completion-r1 llvm.org multilib + +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 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" +IUSE=" + default-compiler-rt default-libcxx default-lld + bootstrap-prefix cet hardened llvm-libunwind +" + +PDEPEND=" + sys-devel/clang:* + default-compiler-rt? ( + sys-devel/clang-runtime[compiler-rt] + llvm-libunwind? ( sys-libs/llvm-libunwind[static-libs] ) + !llvm-libunwind? ( sys-libs/libunwind[static-libs] ) + ) + !default-compiler-rt? ( sys-devel/gcc ) + default-libcxx? ( >=sys-libs/libcxx-${PV}[static-libs] ) + !default-libcxx? ( sys-devel/gcc ) + default-lld? ( >=sys-devel/lld-${PV} ) + !default-lld? ( sys-devel/binutils ) +" +IDEPEND=" + !default-compiler-rt? ( sys-devel/gcc-config ) + !default-libcxx? ( sys-devel/gcc-config ) +" + +LLVM_COMPONENTS=( clang/utils ) +llvm.org_set_globals + +pkg_pretend() { + [[ ${CLANG_IGNORE_DEFAULT_RUNTIMES} ]] && return + + local flag missing_flags=() + for flag in default-{compiler-rt,libcxx,lld}; do + if ! use "${flag}" && has_version "sys-devel/clang[${flag}]"; then + missing_flags+=( "${flag}" ) + fi + done + + if [[ ${missing_flags[@]} ]]; then + eerror "It seems that you have the following flags set on sys-devel/clang:" + eerror + eerror " ${missing_flags[*]}" + eerror + eerror "The default runtimes are now set via flags on sys-devel/clang-common." + eerror "The build is being aborted to prevent breakage. Please either set" + eerror "the respective flags on this ebuild, e.g.:" + eerror + eerror " sys-devel/clang-common ${missing_flags[*]}" + eerror + eerror "or build with CLANG_IGNORE_DEFAULT_RUNTIMES=1." + die "Mismatched defaults detected between sys-devel/clang and sys-devel/clang-common" + fi +} + +_doclang_cfg() { + local triple="${1}" + + local tool + for tool in ${triple}-clang{,++}; do + newins - "${tool}.cfg" <<-EOF + # This configuration file is used by ${tool} driver. + @gentoo-common.cfg + @gentoo-common-ld.cfg + EOF + if [[ ${triple} == x86_64* ]]; then + cat >> "${ED}/etc/clang/${tool}.cfg" <<-EOF || die + @gentoo-cet.cfg + EOF + fi + done + + if use kernel_Darwin; then + cat >> "${ED}/etc/clang/${triple}-clang++.cfg" <<-EOF || die + -lc++abi + EOF + fi + + newins - "${triple}-clang-cpp.cfg" <<-EOF + # This configuration file is used by the ${triple}-clang-cpp driver. + @gentoo-common.cfg + EOF + if [[ ${triple} == x86_64* ]]; then + cat >> "${ED}/etc/clang/${triple}-clang-cpp.cfg" <<-EOF || die + @gentoo-cet.cfg + EOF + fi + + # Install symlinks for triples with other vendor strings since some + # programs insist on mangling the triple. + local vendor + for vendor in gentoo pc unknown; do + local vendor_triple="${triple%%-*}-${vendor}-${triple#*-*-}" + for tool in clang{,++,-cpp}; do + if [[ ! -f "${ED}/etc/clang/${vendor_triple}-${tool}.cfg" ]]; then + dosym "${triple}-${tool}.cfg" "/etc/clang/${vendor_triple}-${tool}.cfg" + fi + done + done +} + +doclang_cfg() { + local triple="${1}" + + _doclang_cfg ${triple} + + # LLVM may have different arch names in some cases. For example in x86 + # profiles the triple uses i686, but llvm will prefer i386 if invoked + # with "clang" on x86 or "clang -m32" on x86_64. The gentoo triple will + # be used if invoked through ${CHOST}-clang{,++,-cpp} though. + # + # To make sure the correct triples are installed, + # see Triple::getArchTypeName() in llvm/lib/TargetParser/Triple.cpp + # and compare with CHOST values in profiles. + + local abi=${triple%%-*} + case ${abi} in + armv4l|armv4t|armv5tel|armv6j|armv7a) + _doclang_cfg ${triple/${abi}/arm} + ;; + i686) + _doclang_cfg ${triple/${abi}/i386} + ;; + sparc) + _doclang_cfg ${triple/${abi}/sparcel} + ;; + sparc64) + _doclang_cfg ${triple/${abi}/sparcv9} + ;; + esac +} + +src_install() { + newbashcomp bash-autocomplete.sh clang + + insinto /etc/clang + newins - gentoo-runtimes.cfg <<-EOF + # This file is initially generated by sys-devel/clang-runtime. + # It is used to control the default runtimes using by clang. + + --rtlib=$(usex default-compiler-rt compiler-rt libgcc) + --unwindlib=$(usex default-compiler-rt libunwind libgcc) + --stdlib=$(usex default-libcxx libc++ libstdc++) + -fuse-ld=$(usex default-lld lld bfd) + EOF + + newins - gentoo-gcc-install.cfg <<-EOF + # This file is maintained by gcc-config. + # It is used to specify the selected GCC installation. + EOF + + newins - gentoo-common.cfg <<-EOF + # This file contains flags common to clang, clang++ and clang-cpp. + @gentoo-runtimes.cfg + @gentoo-gcc-install.cfg + @gentoo-hardened.cfg + # bug #870001 + -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h" + EOF + + # clang-cpp does not like link args being passed to it when directly + # invoked, so use a separate configuration file. + newins - gentoo-common-ld.cfg <<-EOF + # This file contains flags common to clang and clang++ + @gentoo-hardened-ld.cfg + EOF + + # Baseline hardening (bug #851111) + newins - gentoo-hardened.cfg <<-EOF + # Some of these options are added unconditionally, regardless of + # USE=hardened, for parity with sys-devel/gcc. + -Xarch_host -fstack-clash-protection + -Xarch_host -fstack-protector-strong + -fPIE + -include "${EPREFIX}/usr/include/gentoo/fortify.h" + EOF + + newins - gentoo-cet.cfg <<-EOF + -Xarch_host -fcf-protection=$(usex cet full none) + EOF + + if use kernel_Darwin; then + newins - gentoo-hardened-ld.cfg <<-EOF + # There was -Wl,-z,relro here, but it's not supported on Mac + # TODO: investigate whether -bind_at_load or -read_only_stubs will do the job + EOF + else + newins - gentoo-hardened-ld.cfg <<-EOF + # Some of these options are added unconditionally, regardless of + # USE=hardened, for parity with sys-devel/gcc. + -Wl,-z,relro + -Wl,-z,now + EOF + fi + + dodir /usr/include/gentoo + + cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die + /* __has_include is an extension, but it's fine, because this is only + for Clang anyway. */ + #if defined __has_include && __has_include (<stdc-predef.h>) && !defined(__GLIBC__) + # include <stdc-predef.h> + #endif + EOF + + local fortify_level=$(usex hardened 3 2) + # We have to do this because glibc's headers warn if F_S is set + # without optimization and that would at the very least be very noisy + # during builds and at worst trigger many -Werror builds. + cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die + #ifdef __clang__ + # pragma clang system_header + #endif + #ifndef _FORTIFY_SOURCE + # if defined(__has_feature) + # define __GENTOO_HAS_FEATURE(x) __has_feature(x) + # else + # define __GENTOO_HAS_FEATURE(x) 0 + # endif + # + # if defined(__STDC_HOSTED__) && __STDC_HOSTED__ == 1 + # define __GENTOO_NOT_FREESTANDING 1 + # else + # define __GENTOO_NOT_FREESTANDING 0 + # endif + # + # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 && __GENTOO_NOT_FREESTANDING > 0 + # if !defined(__SANITIZE_ADDRESS__) && !__GENTOO_HAS_FEATURE(address_sanitizer) && !__GENTOO_HAS_FEATURE(memory_sanitizer) + # define _FORTIFY_SOURCE ${fortify_level} + # endif + # endif + # undef __GENTOO_HAS_FEATURE + # undef __GENTOO_NOT_FREESTANDING + #endif + EOF + + if use hardened ; then + cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die + # Options below are conditional on USE=hardened. + -D_GLIBCXX_ASSERTIONS + + # Analogue to GLIBCXX_ASSERTIONS + # https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode + # https://libcxx.llvm.org/Hardening.html#using-hardened-mode + -D_LIBCPP_ENABLE_ASSERTIONS=1 + EOF + + cat >> "${ED}/etc/clang/gentoo-hardened-ld.cfg" <<-EOF || die + # Options below are conditional on USE=hardened. + EOF + fi + + # We only install config files for supported ABIs because unprefixed tools + # might be used for crosscompilation where e.g. PIE may not be supported. + # See bug #912237 and bug #901247. Just ${CHOST} won't do due to bug #912685. + local abi + for abi in $(get_all_abis); do + local abi_chost=$(get_abi_CHOST "${abi}") + doclang_cfg "${abi_chost}" + done + + if use kernel_Darwin; then + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + # Gentoo Prefix on Darwin + -Wl,-search_paths_first + -Wl,-rpath,${EPREFIX}/usr/lib + -L ${EPREFIX}/usr/lib + -isystem ${EPREFIX}/usr/include + -isysroot ${EPREFIX}/MacOSX.sdk + EOF + if use bootstrap-prefix ; then + # bootstrap-prefix is only set during stage2 of bootstrapping + # Prefix, where EPREFIX is set to EPREFIX/tmp. + # Here we need to point it at the future lib dir of the stage3's + # EPREFIX. + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + -Wl,-rpath,${EPREFIX}/../usr/lib + EOF + fi + fi +} + +pkg_preinst() { + if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc + then + local gcc_path=$(gcc-config --get-lib-path 2>/dev/null) + if [[ -n ${gcc_path} ]]; then + cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF + --gcc-install-dir="${gcc_path%%:*}" + EOF + fi + fi +} diff --git a/sys-devel/clang-common/clang-common-18.1.4-r3.ebuild b/sys-devel/clang-common/clang-common-18.1.4-r3.ebuild new file mode 100644 index 000000000000..fff63838526d --- /dev/null +++ b/sys-devel/clang-common/clang-common-18.1.4-r3.ebuild @@ -0,0 +1,297 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit bash-completion-r1 llvm.org multilib + +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 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" +IUSE=" + default-compiler-rt default-libcxx default-lld + bootstrap-prefix cet hardened llvm-libunwind +" + +PDEPEND=" + sys-devel/clang:* + default-compiler-rt? ( + sys-devel/clang-runtime[compiler-rt] + llvm-libunwind? ( sys-libs/llvm-libunwind[static-libs] ) + !llvm-libunwind? ( sys-libs/libunwind[static-libs] ) + ) + !default-compiler-rt? ( sys-devel/gcc ) + default-libcxx? ( >=sys-libs/libcxx-${PV}[static-libs] ) + !default-libcxx? ( sys-devel/gcc ) + default-lld? ( >=sys-devel/lld-${PV} ) + !default-lld? ( sys-devel/binutils ) +" +IDEPEND=" + !default-compiler-rt? ( sys-devel/gcc-config ) + !default-libcxx? ( sys-devel/gcc-config ) +" + +LLVM_COMPONENTS=( clang/utils ) +llvm.org_set_globals + +pkg_pretend() { + [[ ${CLANG_IGNORE_DEFAULT_RUNTIMES} ]] && return + + local flag missing_flags=() + for flag in default-{compiler-rt,libcxx,lld}; do + if ! use "${flag}" && has_version "sys-devel/clang[${flag}]"; then + missing_flags+=( "${flag}" ) + fi + done + + if [[ ${missing_flags[@]} ]]; then + eerror "It seems that you have the following flags set on sys-devel/clang:" + eerror + eerror " ${missing_flags[*]}" + eerror + eerror "The default runtimes are now set via flags on sys-devel/clang-common." + eerror "The build is being aborted to prevent breakage. Please either set" + eerror "the respective flags on this ebuild, e.g.:" + eerror + eerror " sys-devel/clang-common ${missing_flags[*]}" + eerror + eerror "or build with CLANG_IGNORE_DEFAULT_RUNTIMES=1." + die "Mismatched defaults detected between sys-devel/clang and sys-devel/clang-common" + fi +} + +_doclang_cfg() { + local triple="${1}" + + local tool + for tool in ${triple}-clang{,++}; do + newins - "${tool}.cfg" <<-EOF + # This configuration file is used by ${tool} driver. + @gentoo-common.cfg + @gentoo-common-ld.cfg + EOF + done + + if use kernel_Darwin; then + cat >> "${ED}/etc/clang/${triple}-clang++.cfg" <<-EOF || die + -lc++abi + EOF + fi + + newins - "${triple}-clang-cpp.cfg" <<-EOF + # This configuration file is used by the ${triple}-clang-cpp driver. + @gentoo-common.cfg + EOF + + # Install symlinks for triples with other vendor strings since some + # programs insist on mangling the triple. + local vendor + for vendor in gentoo pc unknown; do + local vendor_triple="${triple%%-*}-${vendor}-${triple#*-*-}" + for tool in clang{,++,-cpp}; do + if [[ ! -f "${ED}/etc/clang/${vendor_triple}-${tool}.cfg" ]]; then + dosym "${triple}-${tool}.cfg" "/etc/clang/${vendor_triple}-${tool}.cfg" + fi + done + done +} + +doclang_cfg() { + local triple="${1}" + + _doclang_cfg ${triple} + + # LLVM may have different arch names in some cases. For example in x86 + # profiles the triple uses i686, but llvm will prefer i386 if invoked + # with "clang" on x86 or "clang -m32" on x86_64. The gentoo triple will + # be used if invoked through ${CHOST}-clang{,++,-cpp} though. + # + # To make sure the correct triples are installed, + # see Triple::getArchTypeName() in llvm/lib/TargetParser/Triple.cpp + # and compare with CHOST values in profiles. + + local abi=${triple%%-*} + case ${abi} in + armv4l|armv4t|armv5tel|armv6j|armv7a) + _doclang_cfg ${triple/${abi}/arm} + ;; + i686) + _doclang_cfg ${triple/${abi}/i386} + ;; + sparc) + _doclang_cfg ${triple/${abi}/sparcel} + ;; + sparc64) + _doclang_cfg ${triple/${abi}/sparcv9} + ;; + esac +} + +src_install() { + newbashcomp bash-autocomplete.sh clang + + insinto /etc/clang + newins - gentoo-runtimes.cfg <<-EOF + # This file is initially generated by sys-devel/clang-runtime. + # It is used to control the default runtimes using by clang. + + --rtlib=$(usex default-compiler-rt compiler-rt libgcc) + --unwindlib=$(usex default-compiler-rt libunwind libgcc) + --stdlib=$(usex default-libcxx libc++ libstdc++) + -fuse-ld=$(usex default-lld lld bfd) + EOF + + newins - gentoo-gcc-install.cfg <<-EOF + # This file is maintained by gcc-config. + # It is used to specify the selected GCC installation. + EOF + + newins - gentoo-common.cfg <<-EOF + # This file contains flags common to clang, clang++ and clang-cpp. + @gentoo-runtimes.cfg + @gentoo-gcc-install.cfg + @gentoo-hardened.cfg + # bug #870001 + -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h" + EOF + + # clang-cpp does not like link args being passed to it when directly + # invoked, so use a separate configuration file. + newins - gentoo-common-ld.cfg <<-EOF + # This file contains flags common to clang and clang++ + @gentoo-hardened-ld.cfg + EOF + + # Baseline hardening (bug #851111) + newins - gentoo-hardened.cfg <<-EOF + # Some of these options are added unconditionally, regardless of + # USE=hardened, for parity with sys-devel/gcc. + -Xarch_host -fstack-clash-protection + -Xarch_host -fstack-protector-strong + -fPIE + -include "${EPREFIX}/usr/include/gentoo/fortify.h" + EOF + + if use amd64; then + cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die + -Xarch_host -fcf-protection=$(usex cet full none) + EOF + fi + + if use kernel_Darwin; then + newins - gentoo-hardened-ld.cfg <<-EOF + # There was -Wl,-z,relro here, but it's not supported on Mac + # TODO: investigate whether -bind_at_load or -read_only_stubs will do the job + EOF + else + newins - gentoo-hardened-ld.cfg <<-EOF + # Some of these options are added unconditionally, regardless of + # USE=hardened, for parity with sys-devel/gcc. + -Wl,-z,relro + -Wl,-z,now + EOF + fi + + dodir /usr/include/gentoo + + cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die + /* __has_include is an extension, but it's fine, because this is only + for Clang anyway. */ + #if defined __has_include && __has_include (<stdc-predef.h>) && !defined(__GLIBC__) + # include <stdc-predef.h> + #endif + EOF + + local fortify_level=$(usex hardened 3 2) + # We have to do this because glibc's headers warn if F_S is set + # without optimization and that would at the very least be very noisy + # during builds and at worst trigger many -Werror builds. + cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die + #ifdef __clang__ + # pragma clang system_header + #endif + #ifndef _FORTIFY_SOURCE + # if defined(__has_feature) + # define __GENTOO_HAS_FEATURE(x) __has_feature(x) + # else + # define __GENTOO_HAS_FEATURE(x) 0 + # endif + # + # if defined(__STDC_HOSTED__) && __STDC_HOSTED__ == 1 + # define __GENTOO_NOT_FREESTANDING 1 + # else + # define __GENTOO_NOT_FREESTANDING 0 + # endif + # + # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 && __GENTOO_NOT_FREESTANDING > 0 + # if !defined(__SANITIZE_ADDRESS__) && !__GENTOO_HAS_FEATURE(address_sanitizer) && !__GENTOO_HAS_FEATURE(memory_sanitizer) + # define _FORTIFY_SOURCE ${fortify_level} + # endif + # endif + # undef __GENTOO_HAS_FEATURE + # undef __GENTOO_NOT_FREESTANDING + #endif + EOF + + # TODO: Maybe -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST for + # non-hardened? + if use hardened ; then + cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die + # Options below are conditional on USE=hardened. + -D_GLIBCXX_ASSERTIONS + + # Analogue to GLIBCXX_ASSERTIONS + # https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode + # https://libcxx.llvm.org/Hardening.html#using-hardened-mode + -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE + EOF + + cat >> "${ED}/etc/clang/gentoo-hardened-ld.cfg" <<-EOF || die + # Options below are conditional on USE=hardened. + EOF + fi + + # We only install config files for supported ABIs because unprefixed tools + # might be used for crosscompilation where e.g. PIE may not be supported. + # See bug #912237 and bug #901247. Just ${CHOST} won't do due to bug #912685. + local abi + for abi in $(get_all_abis); do + local abi_chost=$(get_abi_CHOST "${abi}") + doclang_cfg "${abi_chost}" + done + + if use kernel_Darwin; then + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + # Gentoo Prefix on Darwin + -Wl,-search_paths_first + -Wl,-rpath,${EPREFIX}/usr/lib + -L ${EPREFIX}/usr/lib + -isystem ${EPREFIX}/usr/include + -isysroot ${EPREFIX}/MacOSX.sdk + EOF + if use bootstrap-prefix ; then + # bootstrap-prefix is only set during stage2 of bootstrapping + # Prefix, where EPREFIX is set to EPREFIX/tmp. + # Here we need to point it at the future lib dir of the stage3's + # EPREFIX. + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + -Wl,-rpath,${EPREFIX}/../usr/lib + EOF + fi + fi +} + +pkg_preinst() { + if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc + then + local gcc_path=$(gcc-config --get-lib-path 2>/dev/null) + if [[ -n ${gcc_path} ]]; then + cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF + --gcc-install-dir="${gcc_path%%:*}" + EOF + fi + fi +} diff --git a/sys-devel/clang-common/clang-common-19.0.0.9999.ebuild b/sys-devel/clang-common/clang-common-19.0.0.9999.ebuild new file mode 100644 index 000000000000..f260391ba4ab --- /dev/null +++ b/sys-devel/clang-common/clang-common-19.0.0.9999.ebuild @@ -0,0 +1,304 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit bash-completion-r1 llvm.org multilib + +DESCRIPTION="Common files shared between multiple slots of clang" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="0" +IUSE=" + default-compiler-rt default-libcxx default-lld + bootstrap-prefix cet hardened llvm-libunwind +" + +PDEPEND=" + sys-devel/clang:* + default-compiler-rt? ( + sys-devel/clang-runtime[compiler-rt] + llvm-libunwind? ( sys-libs/llvm-libunwind[static-libs] ) + !llvm-libunwind? ( sys-libs/libunwind[static-libs] ) + ) + !default-compiler-rt? ( sys-devel/gcc ) + default-libcxx? ( >=sys-libs/libcxx-${PV}[static-libs] ) + !default-libcxx? ( sys-devel/gcc ) + default-lld? ( >=sys-devel/lld-${PV} ) + !default-lld? ( sys-devel/binutils ) +" +IDEPEND=" + !default-compiler-rt? ( sys-devel/gcc-config ) + !default-libcxx? ( sys-devel/gcc-config ) +" + +LLVM_COMPONENTS=( clang/utils ) +llvm.org_set_globals + +pkg_pretend() { + [[ ${CLANG_IGNORE_DEFAULT_RUNTIMES} ]] && return + + local flag missing_flags=() + for flag in default-{compiler-rt,libcxx,lld}; do + if ! use "${flag}" && has_version "sys-devel/clang[${flag}]"; then + missing_flags+=( "${flag}" ) + fi + done + + if [[ ${missing_flags[@]} ]]; then + eerror "It seems that you have the following flags set on sys-devel/clang:" + eerror + eerror " ${missing_flags[*]}" + eerror + eerror "The default runtimes are now set via flags on sys-devel/clang-common." + eerror "The build is being aborted to prevent breakage. Please either set" + eerror "the respective flags on this ebuild, e.g.:" + eerror + eerror " sys-devel/clang-common ${missing_flags[*]}" + eerror + eerror "or build with CLANG_IGNORE_DEFAULT_RUNTIMES=1." + die "Mismatched defaults detected between sys-devel/clang and sys-devel/clang-common" + fi +} + +_doclang_cfg() { + local triple="${1}" + + local tool + for tool in ${triple}-clang{,++}; do + newins - "${tool}.cfg" <<-EOF + # This configuration file is used by ${tool} driver. + @gentoo-common.cfg + @gentoo-common-ld.cfg + EOF + if [[ ${triple} == x86_64* ]]; then + cat >> "${ED}/etc/clang/${tool}.cfg" <<-EOF || die + @gentoo-cet.cfg + EOF + fi + done + + if use kernel_Darwin; then + cat >> "${ED}/etc/clang/${triple}-clang++.cfg" <<-EOF || die + -lc++abi + EOF + fi + + newins - "${triple}-clang-cpp.cfg" <<-EOF + # This configuration file is used by the ${triple}-clang-cpp driver. + @gentoo-common.cfg + EOF + if [[ ${triple} == x86_64* ]]; then + cat >> "${ED}/etc/clang/${triple}-clang-cpp.cfg" <<-EOF || die + @gentoo-cet.cfg + EOF + fi + + # Install symlinks for triples with other vendor strings since some + # programs insist on mangling the triple. + local vendor + for vendor in gentoo pc unknown; do + local vendor_triple="${triple%%-*}-${vendor}-${triple#*-*-}" + for tool in clang{,++,-cpp}; do + if [[ ! -f "${ED}/etc/clang/${vendor_triple}-${tool}.cfg" ]]; then + dosym "${triple}-${tool}.cfg" "/etc/clang/${vendor_triple}-${tool}.cfg" + fi + done + done +} + +doclang_cfg() { + local triple="${1}" + + _doclang_cfg ${triple} + + # LLVM may have different arch names in some cases. For example in x86 + # profiles the triple uses i686, but llvm will prefer i386 if invoked + # with "clang" on x86 or "clang -m32" on x86_64. The gentoo triple will + # be used if invoked through ${CHOST}-clang{,++,-cpp} though. + # + # To make sure the correct triples are installed, + # see Triple::getArchTypeName() in llvm/lib/TargetParser/Triple.cpp + # and compare with CHOST values in profiles. + + local abi=${triple%%-*} + case ${abi} in + armv4l|armv4t|armv5tel|armv6j|armv7a) + _doclang_cfg ${triple/${abi}/arm} + ;; + i686) + _doclang_cfg ${triple/${abi}/i386} + ;; + sparc) + _doclang_cfg ${triple/${abi}/sparcel} + ;; + sparc64) + _doclang_cfg ${triple/${abi}/sparcv9} + ;; + esac +} + +src_install() { + newbashcomp bash-autocomplete.sh clang + + insinto /etc/clang + newins - gentoo-runtimes.cfg <<-EOF + # This file is initially generated by sys-devel/clang-runtime. + # It is used to control the default runtimes using by clang. + + --rtlib=$(usex default-compiler-rt compiler-rt libgcc) + --unwindlib=$(usex default-compiler-rt libunwind libgcc) + --stdlib=$(usex default-libcxx libc++ libstdc++) + -fuse-ld=$(usex default-lld lld bfd) + EOF + + newins - gentoo-gcc-install.cfg <<-EOF + # This file is maintained by gcc-config. + # It is used to specify the selected GCC installation. + EOF + + newins - gentoo-common.cfg <<-EOF + # This file contains flags common to clang, clang++ and clang-cpp. + @gentoo-runtimes.cfg + @gentoo-gcc-install.cfg + @gentoo-hardened.cfg + # bug #870001 + -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h" + EOF + + # clang-cpp does not like link args being passed to it when directly + # invoked, so use a separate configuration file. + newins - gentoo-common-ld.cfg <<-EOF + # This file contains flags common to clang and clang++ + @gentoo-hardened-ld.cfg + EOF + + # Baseline hardening (bug #851111) + newins - gentoo-hardened.cfg <<-EOF + # Some of these options are added unconditionally, regardless of + # USE=hardened, for parity with sys-devel/gcc. + -Xarch_host -fstack-clash-protection + -Xarch_host -fstack-protector-strong + -fPIE + -include "${EPREFIX}/usr/include/gentoo/fortify.h" + EOF + + newins - gentoo-cet.cfg <<-EOF + -Xarch_host -fcf-protection=$(usex cet full none) + EOF + + if use kernel_Darwin; then + newins - gentoo-hardened-ld.cfg <<-EOF + # There was -Wl,-z,relro here, but it's not supported on Mac + # TODO: investigate whether -bind_at_load or -read_only_stubs will do the job + EOF + else + newins - gentoo-hardened-ld.cfg <<-EOF + # Some of these options are added unconditionally, regardless of + # USE=hardened, for parity with sys-devel/gcc. + -Wl,-z,relro + -Wl,-z,now + EOF + fi + + dodir /usr/include/gentoo + + cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die + /* __has_include is an extension, but it's fine, because this is only + for Clang anyway. */ + #if defined __has_include && __has_include (<stdc-predef.h>) && !defined(__GLIBC__) + # include <stdc-predef.h> + #endif + EOF + + local fortify_level=$(usex hardened 3 2) + # We have to do this because glibc's headers warn if F_S is set + # without optimization and that would at the very least be very noisy + # during builds and at worst trigger many -Werror builds. + cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die + #ifdef __clang__ + # pragma clang system_header + #endif + #ifndef _FORTIFY_SOURCE + # if defined(__has_feature) + # define __GENTOO_HAS_FEATURE(x) __has_feature(x) + # else + # define __GENTOO_HAS_FEATURE(x) 0 + # endif + # + # if defined(__STDC_HOSTED__) && __STDC_HOSTED__ == 1 + # define __GENTOO_NOT_FREESTANDING 1 + # else + # define __GENTOO_NOT_FREESTANDING 0 + # endif + # + # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 && __GENTOO_NOT_FREESTANDING > 0 + # if !defined(__SANITIZE_ADDRESS__) && !__GENTOO_HAS_FEATURE(address_sanitizer) && !__GENTOO_HAS_FEATURE(memory_sanitizer) + # define _FORTIFY_SOURCE ${fortify_level} + # endif + # endif + # undef __GENTOO_HAS_FEATURE + # undef __GENTOO_NOT_FREESTANDING + #endif + EOF + + # TODO: Maybe -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST for + # non-hardened? + if use hardened ; then + cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die + # Options below are conditional on USE=hardened. + -D_GLIBCXX_ASSERTIONS + + # Analogue to GLIBCXX_ASSERTIONS + # https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode + # https://libcxx.llvm.org/Hardening.html#using-hardened-mode + -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE + EOF + + cat >> "${ED}/etc/clang/gentoo-hardened-ld.cfg" <<-EOF || die + # Options below are conditional on USE=hardened. + EOF + fi + + # We only install config files for supported ABIs because unprefixed tools + # might be used for crosscompilation where e.g. PIE may not be supported. + # See bug #912237 and bug #901247. Just ${CHOST} won't do due to bug #912685. + local abi + for abi in $(get_all_abis); do + local abi_chost=$(get_abi_CHOST "${abi}") + doclang_cfg "${abi_chost}" + done + + if use kernel_Darwin; then + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + # Gentoo Prefix on Darwin + -Wl,-search_paths_first + -Wl,-rpath,${EPREFIX}/usr/lib + -L ${EPREFIX}/usr/lib + -isystem ${EPREFIX}/usr/include + -isysroot ${EPREFIX}/MacOSX.sdk + EOF + if use bootstrap-prefix ; then + # bootstrap-prefix is only set during stage2 of bootstrapping + # Prefix, where EPREFIX is set to EPREFIX/tmp. + # Here we need to point it at the future lib dir of the stage3's + # EPREFIX. + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + -Wl,-rpath,${EPREFIX}/../usr/lib + EOF + fi + fi +} + +pkg_preinst() { + if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc + then + local gcc_path=$(gcc-config --get-lib-path 2>/dev/null) + if [[ -n ${gcc_path} ]]; then + cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF + --gcc-install-dir="${gcc_path%%:*}" + EOF + fi + fi +} diff --git a/sys-devel/clang-common/clang-common-19.0.0_pre20240410.ebuild b/sys-devel/clang-common/clang-common-19.0.0_pre20240410.ebuild new file mode 100644 index 000000000000..f260391ba4ab --- /dev/null +++ b/sys-devel/clang-common/clang-common-19.0.0_pre20240410.ebuild @@ -0,0 +1,304 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit bash-completion-r1 llvm.org multilib + +DESCRIPTION="Common files shared between multiple slots of clang" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="0" +IUSE=" + default-compiler-rt default-libcxx default-lld + bootstrap-prefix cet hardened llvm-libunwind +" + +PDEPEND=" + sys-devel/clang:* + default-compiler-rt? ( + sys-devel/clang-runtime[compiler-rt] + llvm-libunwind? ( sys-libs/llvm-libunwind[static-libs] ) + !llvm-libunwind? ( sys-libs/libunwind[static-libs] ) + ) + !default-compiler-rt? ( sys-devel/gcc ) + default-libcxx? ( >=sys-libs/libcxx-${PV}[static-libs] ) + !default-libcxx? ( sys-devel/gcc ) + default-lld? ( >=sys-devel/lld-${PV} ) + !default-lld? ( sys-devel/binutils ) +" +IDEPEND=" + !default-compiler-rt? ( sys-devel/gcc-config ) + !default-libcxx? ( sys-devel/gcc-config ) +" + +LLVM_COMPONENTS=( clang/utils ) +llvm.org_set_globals + +pkg_pretend() { + [[ ${CLANG_IGNORE_DEFAULT_RUNTIMES} ]] && return + + local flag missing_flags=() + for flag in default-{compiler-rt,libcxx,lld}; do + if ! use "${flag}" && has_version "sys-devel/clang[${flag}]"; then + missing_flags+=( "${flag}" ) + fi + done + + if [[ ${missing_flags[@]} ]]; then + eerror "It seems that you have the following flags set on sys-devel/clang:" + eerror + eerror " ${missing_flags[*]}" + eerror + eerror "The default runtimes are now set via flags on sys-devel/clang-common." + eerror "The build is being aborted to prevent breakage. Please either set" + eerror "the respective flags on this ebuild, e.g.:" + eerror + eerror " sys-devel/clang-common ${missing_flags[*]}" + eerror + eerror "or build with CLANG_IGNORE_DEFAULT_RUNTIMES=1." + die "Mismatched defaults detected between sys-devel/clang and sys-devel/clang-common" + fi +} + +_doclang_cfg() { + local triple="${1}" + + local tool + for tool in ${triple}-clang{,++}; do + newins - "${tool}.cfg" <<-EOF + # This configuration file is used by ${tool} driver. + @gentoo-common.cfg + @gentoo-common-ld.cfg + EOF + if [[ ${triple} == x86_64* ]]; then + cat >> "${ED}/etc/clang/${tool}.cfg" <<-EOF || die + @gentoo-cet.cfg + EOF + fi + done + + if use kernel_Darwin; then + cat >> "${ED}/etc/clang/${triple}-clang++.cfg" <<-EOF || die + -lc++abi + EOF + fi + + newins - "${triple}-clang-cpp.cfg" <<-EOF + # This configuration file is used by the ${triple}-clang-cpp driver. + @gentoo-common.cfg + EOF + if [[ ${triple} == x86_64* ]]; then + cat >> "${ED}/etc/clang/${triple}-clang-cpp.cfg" <<-EOF || die + @gentoo-cet.cfg + EOF + fi + + # Install symlinks for triples with other vendor strings since some + # programs insist on mangling the triple. + local vendor + for vendor in gentoo pc unknown; do + local vendor_triple="${triple%%-*}-${vendor}-${triple#*-*-}" + for tool in clang{,++,-cpp}; do + if [[ ! -f "${ED}/etc/clang/${vendor_triple}-${tool}.cfg" ]]; then + dosym "${triple}-${tool}.cfg" "/etc/clang/${vendor_triple}-${tool}.cfg" + fi + done + done +} + +doclang_cfg() { + local triple="${1}" + + _doclang_cfg ${triple} + + # LLVM may have different arch names in some cases. For example in x86 + # profiles the triple uses i686, but llvm will prefer i386 if invoked + # with "clang" on x86 or "clang -m32" on x86_64. The gentoo triple will + # be used if invoked through ${CHOST}-clang{,++,-cpp} though. + # + # To make sure the correct triples are installed, + # see Triple::getArchTypeName() in llvm/lib/TargetParser/Triple.cpp + # and compare with CHOST values in profiles. + + local abi=${triple%%-*} + case ${abi} in + armv4l|armv4t|armv5tel|armv6j|armv7a) + _doclang_cfg ${triple/${abi}/arm} + ;; + i686) + _doclang_cfg ${triple/${abi}/i386} + ;; + sparc) + _doclang_cfg ${triple/${abi}/sparcel} + ;; + sparc64) + _doclang_cfg ${triple/${abi}/sparcv9} + ;; + esac +} + +src_install() { + newbashcomp bash-autocomplete.sh clang + + insinto /etc/clang + newins - gentoo-runtimes.cfg <<-EOF + # This file is initially generated by sys-devel/clang-runtime. + # It is used to control the default runtimes using by clang. + + --rtlib=$(usex default-compiler-rt compiler-rt libgcc) + --unwindlib=$(usex default-compiler-rt libunwind libgcc) + --stdlib=$(usex default-libcxx libc++ libstdc++) + -fuse-ld=$(usex default-lld lld bfd) + EOF + + newins - gentoo-gcc-install.cfg <<-EOF + # This file is maintained by gcc-config. + # It is used to specify the selected GCC installation. + EOF + + newins - gentoo-common.cfg <<-EOF + # This file contains flags common to clang, clang++ and clang-cpp. + @gentoo-runtimes.cfg + @gentoo-gcc-install.cfg + @gentoo-hardened.cfg + # bug #870001 + -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h" + EOF + + # clang-cpp does not like link args being passed to it when directly + # invoked, so use a separate configuration file. + newins - gentoo-common-ld.cfg <<-EOF + # This file contains flags common to clang and clang++ + @gentoo-hardened-ld.cfg + EOF + + # Baseline hardening (bug #851111) + newins - gentoo-hardened.cfg <<-EOF + # Some of these options are added unconditionally, regardless of + # USE=hardened, for parity with sys-devel/gcc. + -Xarch_host -fstack-clash-protection + -Xarch_host -fstack-protector-strong + -fPIE + -include "${EPREFIX}/usr/include/gentoo/fortify.h" + EOF + + newins - gentoo-cet.cfg <<-EOF + -Xarch_host -fcf-protection=$(usex cet full none) + EOF + + if use kernel_Darwin; then + newins - gentoo-hardened-ld.cfg <<-EOF + # There was -Wl,-z,relro here, but it's not supported on Mac + # TODO: investigate whether -bind_at_load or -read_only_stubs will do the job + EOF + else + newins - gentoo-hardened-ld.cfg <<-EOF + # Some of these options are added unconditionally, regardless of + # USE=hardened, for parity with sys-devel/gcc. + -Wl,-z,relro + -Wl,-z,now + EOF + fi + + dodir /usr/include/gentoo + + cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die + /* __has_include is an extension, but it's fine, because this is only + for Clang anyway. */ + #if defined __has_include && __has_include (<stdc-predef.h>) && !defined(__GLIBC__) + # include <stdc-predef.h> + #endif + EOF + + local fortify_level=$(usex hardened 3 2) + # We have to do this because glibc's headers warn if F_S is set + # without optimization and that would at the very least be very noisy + # during builds and at worst trigger many -Werror builds. + cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die + #ifdef __clang__ + # pragma clang system_header + #endif + #ifndef _FORTIFY_SOURCE + # if defined(__has_feature) + # define __GENTOO_HAS_FEATURE(x) __has_feature(x) + # else + # define __GENTOO_HAS_FEATURE(x) 0 + # endif + # + # if defined(__STDC_HOSTED__) && __STDC_HOSTED__ == 1 + # define __GENTOO_NOT_FREESTANDING 1 + # else + # define __GENTOO_NOT_FREESTANDING 0 + # endif + # + # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 && __GENTOO_NOT_FREESTANDING > 0 + # if !defined(__SANITIZE_ADDRESS__) && !__GENTOO_HAS_FEATURE(address_sanitizer) && !__GENTOO_HAS_FEATURE(memory_sanitizer) + # define _FORTIFY_SOURCE ${fortify_level} + # endif + # endif + # undef __GENTOO_HAS_FEATURE + # undef __GENTOO_NOT_FREESTANDING + #endif + EOF + + # TODO: Maybe -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST for + # non-hardened? + if use hardened ; then + cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die + # Options below are conditional on USE=hardened. + -D_GLIBCXX_ASSERTIONS + + # Analogue to GLIBCXX_ASSERTIONS + # https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode + # https://libcxx.llvm.org/Hardening.html#using-hardened-mode + -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE + EOF + + cat >> "${ED}/etc/clang/gentoo-hardened-ld.cfg" <<-EOF || die + # Options below are conditional on USE=hardened. + EOF + fi + + # We only install config files for supported ABIs because unprefixed tools + # might be used for crosscompilation where e.g. PIE may not be supported. + # See bug #912237 and bug #901247. Just ${CHOST} won't do due to bug #912685. + local abi + for abi in $(get_all_abis); do + local abi_chost=$(get_abi_CHOST "${abi}") + doclang_cfg "${abi_chost}" + done + + if use kernel_Darwin; then + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + # Gentoo Prefix on Darwin + -Wl,-search_paths_first + -Wl,-rpath,${EPREFIX}/usr/lib + -L ${EPREFIX}/usr/lib + -isystem ${EPREFIX}/usr/include + -isysroot ${EPREFIX}/MacOSX.sdk + EOF + if use bootstrap-prefix ; then + # bootstrap-prefix is only set during stage2 of bootstrapping + # Prefix, where EPREFIX is set to EPREFIX/tmp. + # Here we need to point it at the future lib dir of the stage3's + # EPREFIX. + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + -Wl,-rpath,${EPREFIX}/../usr/lib + EOF + fi + fi +} + +pkg_preinst() { + if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc + then + local gcc_path=$(gcc-config --get-lib-path 2>/dev/null) + if [[ -n ${gcc_path} ]]; then + cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF + --gcc-install-dir="${gcc_path%%:*}" + EOF + fi + fi +} diff --git a/sys-devel/clang-common/clang-common-19.0.0_pre20240420.ebuild b/sys-devel/clang-common/clang-common-19.0.0_pre20240420.ebuild new file mode 100644 index 000000000000..f260391ba4ab --- /dev/null +++ b/sys-devel/clang-common/clang-common-19.0.0_pre20240420.ebuild @@ -0,0 +1,304 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit bash-completion-r1 llvm.org multilib + +DESCRIPTION="Common files shared between multiple slots of clang" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="0" +IUSE=" + default-compiler-rt default-libcxx default-lld + bootstrap-prefix cet hardened llvm-libunwind +" + +PDEPEND=" + sys-devel/clang:* + default-compiler-rt? ( + sys-devel/clang-runtime[compiler-rt] + llvm-libunwind? ( sys-libs/llvm-libunwind[static-libs] ) + !llvm-libunwind? ( sys-libs/libunwind[static-libs] ) + ) + !default-compiler-rt? ( sys-devel/gcc ) + default-libcxx? ( >=sys-libs/libcxx-${PV}[static-libs] ) + !default-libcxx? ( sys-devel/gcc ) + default-lld? ( >=sys-devel/lld-${PV} ) + !default-lld? ( sys-devel/binutils ) +" +IDEPEND=" + !default-compiler-rt? ( sys-devel/gcc-config ) + !default-libcxx? ( sys-devel/gcc-config ) +" + +LLVM_COMPONENTS=( clang/utils ) +llvm.org_set_globals + +pkg_pretend() { + [[ ${CLANG_IGNORE_DEFAULT_RUNTIMES} ]] && return + + local flag missing_flags=() + for flag in default-{compiler-rt,libcxx,lld}; do + if ! use "${flag}" && has_version "sys-devel/clang[${flag}]"; then + missing_flags+=( "${flag}" ) + fi + done + + if [[ ${missing_flags[@]} ]]; then + eerror "It seems that you have the following flags set on sys-devel/clang:" + eerror + eerror " ${missing_flags[*]}" + eerror + eerror "The default runtimes are now set via flags on sys-devel/clang-common." + eerror "The build is being aborted to prevent breakage. Please either set" + eerror "the respective flags on this ebuild, e.g.:" + eerror + eerror " sys-devel/clang-common ${missing_flags[*]}" + eerror + eerror "or build with CLANG_IGNORE_DEFAULT_RUNTIMES=1." + die "Mismatched defaults detected between sys-devel/clang and sys-devel/clang-common" + fi +} + +_doclang_cfg() { + local triple="${1}" + + local tool + for tool in ${triple}-clang{,++}; do + newins - "${tool}.cfg" <<-EOF + # This configuration file is used by ${tool} driver. + @gentoo-common.cfg + @gentoo-common-ld.cfg + EOF + if [[ ${triple} == x86_64* ]]; then + cat >> "${ED}/etc/clang/${tool}.cfg" <<-EOF || die + @gentoo-cet.cfg + EOF + fi + done + + if use kernel_Darwin; then + cat >> "${ED}/etc/clang/${triple}-clang++.cfg" <<-EOF || die + -lc++abi + EOF + fi + + newins - "${triple}-clang-cpp.cfg" <<-EOF + # This configuration file is used by the ${triple}-clang-cpp driver. + @gentoo-common.cfg + EOF + if [[ ${triple} == x86_64* ]]; then + cat >> "${ED}/etc/clang/${triple}-clang-cpp.cfg" <<-EOF || die + @gentoo-cet.cfg + EOF + fi + + # Install symlinks for triples with other vendor strings since some + # programs insist on mangling the triple. + local vendor + for vendor in gentoo pc unknown; do + local vendor_triple="${triple%%-*}-${vendor}-${triple#*-*-}" + for tool in clang{,++,-cpp}; do + if [[ ! -f "${ED}/etc/clang/${vendor_triple}-${tool}.cfg" ]]; then + dosym "${triple}-${tool}.cfg" "/etc/clang/${vendor_triple}-${tool}.cfg" + fi + done + done +} + +doclang_cfg() { + local triple="${1}" + + _doclang_cfg ${triple} + + # LLVM may have different arch names in some cases. For example in x86 + # profiles the triple uses i686, but llvm will prefer i386 if invoked + # with "clang" on x86 or "clang -m32" on x86_64. The gentoo triple will + # be used if invoked through ${CHOST}-clang{,++,-cpp} though. + # + # To make sure the correct triples are installed, + # see Triple::getArchTypeName() in llvm/lib/TargetParser/Triple.cpp + # and compare with CHOST values in profiles. + + local abi=${triple%%-*} + case ${abi} in + armv4l|armv4t|armv5tel|armv6j|armv7a) + _doclang_cfg ${triple/${abi}/arm} + ;; + i686) + _doclang_cfg ${triple/${abi}/i386} + ;; + sparc) + _doclang_cfg ${triple/${abi}/sparcel} + ;; + sparc64) + _doclang_cfg ${triple/${abi}/sparcv9} + ;; + esac +} + +src_install() { + newbashcomp bash-autocomplete.sh clang + + insinto /etc/clang + newins - gentoo-runtimes.cfg <<-EOF + # This file is initially generated by sys-devel/clang-runtime. + # It is used to control the default runtimes using by clang. + + --rtlib=$(usex default-compiler-rt compiler-rt libgcc) + --unwindlib=$(usex default-compiler-rt libunwind libgcc) + --stdlib=$(usex default-libcxx libc++ libstdc++) + -fuse-ld=$(usex default-lld lld bfd) + EOF + + newins - gentoo-gcc-install.cfg <<-EOF + # This file is maintained by gcc-config. + # It is used to specify the selected GCC installation. + EOF + + newins - gentoo-common.cfg <<-EOF + # This file contains flags common to clang, clang++ and clang-cpp. + @gentoo-runtimes.cfg + @gentoo-gcc-install.cfg + @gentoo-hardened.cfg + # bug #870001 + -include "${EPREFIX}/usr/include/gentoo/maybe-stddefs.h" + EOF + + # clang-cpp does not like link args being passed to it when directly + # invoked, so use a separate configuration file. + newins - gentoo-common-ld.cfg <<-EOF + # This file contains flags common to clang and clang++ + @gentoo-hardened-ld.cfg + EOF + + # Baseline hardening (bug #851111) + newins - gentoo-hardened.cfg <<-EOF + # Some of these options are added unconditionally, regardless of + # USE=hardened, for parity with sys-devel/gcc. + -Xarch_host -fstack-clash-protection + -Xarch_host -fstack-protector-strong + -fPIE + -include "${EPREFIX}/usr/include/gentoo/fortify.h" + EOF + + newins - gentoo-cet.cfg <<-EOF + -Xarch_host -fcf-protection=$(usex cet full none) + EOF + + if use kernel_Darwin; then + newins - gentoo-hardened-ld.cfg <<-EOF + # There was -Wl,-z,relro here, but it's not supported on Mac + # TODO: investigate whether -bind_at_load or -read_only_stubs will do the job + EOF + else + newins - gentoo-hardened-ld.cfg <<-EOF + # Some of these options are added unconditionally, regardless of + # USE=hardened, for parity with sys-devel/gcc. + -Wl,-z,relro + -Wl,-z,now + EOF + fi + + dodir /usr/include/gentoo + + cat >> "${ED}/usr/include/gentoo/maybe-stddefs.h" <<-EOF || die + /* __has_include is an extension, but it's fine, because this is only + for Clang anyway. */ + #if defined __has_include && __has_include (<stdc-predef.h>) && !defined(__GLIBC__) + # include <stdc-predef.h> + #endif + EOF + + local fortify_level=$(usex hardened 3 2) + # We have to do this because glibc's headers warn if F_S is set + # without optimization and that would at the very least be very noisy + # during builds and at worst trigger many -Werror builds. + cat >> "${ED}/usr/include/gentoo/fortify.h" <<- EOF || die + #ifdef __clang__ + # pragma clang system_header + #endif + #ifndef _FORTIFY_SOURCE + # if defined(__has_feature) + # define __GENTOO_HAS_FEATURE(x) __has_feature(x) + # else + # define __GENTOO_HAS_FEATURE(x) 0 + # endif + # + # if defined(__STDC_HOSTED__) && __STDC_HOSTED__ == 1 + # define __GENTOO_NOT_FREESTANDING 1 + # else + # define __GENTOO_NOT_FREESTANDING 0 + # endif + # + # if defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 && __GENTOO_NOT_FREESTANDING > 0 + # if !defined(__SANITIZE_ADDRESS__) && !__GENTOO_HAS_FEATURE(address_sanitizer) && !__GENTOO_HAS_FEATURE(memory_sanitizer) + # define _FORTIFY_SOURCE ${fortify_level} + # endif + # endif + # undef __GENTOO_HAS_FEATURE + # undef __GENTOO_NOT_FREESTANDING + #endif + EOF + + # TODO: Maybe -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST for + # non-hardened? + if use hardened ; then + cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die + # Options below are conditional on USE=hardened. + -D_GLIBCXX_ASSERTIONS + + # Analogue to GLIBCXX_ASSERTIONS + # https://libcxx.llvm.org/UsingLibcxx.html#assertions-mode + # https://libcxx.llvm.org/Hardening.html#using-hardened-mode + -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE + EOF + + cat >> "${ED}/etc/clang/gentoo-hardened-ld.cfg" <<-EOF || die + # Options below are conditional on USE=hardened. + EOF + fi + + # We only install config files for supported ABIs because unprefixed tools + # might be used for crosscompilation where e.g. PIE may not be supported. + # See bug #912237 and bug #901247. Just ${CHOST} won't do due to bug #912685. + local abi + for abi in $(get_all_abis); do + local abi_chost=$(get_abi_CHOST "${abi}") + doclang_cfg "${abi_chost}" + done + + if use kernel_Darwin; then + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + # Gentoo Prefix on Darwin + -Wl,-search_paths_first + -Wl,-rpath,${EPREFIX}/usr/lib + -L ${EPREFIX}/usr/lib + -isystem ${EPREFIX}/usr/include + -isysroot ${EPREFIX}/MacOSX.sdk + EOF + if use bootstrap-prefix ; then + # bootstrap-prefix is only set during stage2 of bootstrapping + # Prefix, where EPREFIX is set to EPREFIX/tmp. + # Here we need to point it at the future lib dir of the stage3's + # EPREFIX. + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + -Wl,-rpath,${EPREFIX}/../usr/lib + EOF + fi + fi +} + +pkg_preinst() { + if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc + then + local gcc_path=$(gcc-config --get-lib-path 2>/dev/null) + if [[ -n ${gcc_path} ]]; then + cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF + --gcc-install-dir="${gcc_path%%:*}" + EOF + fi + fi +} diff --git a/sys-devel/clang-common/metadata.xml b/sys-devel/clang-common/metadata.xml index 89c4bdb96049..da45c87b0e27 100644 --- a/sys-devel/clang-common/metadata.xml +++ b/sys-devel/clang-common/metadata.xml @@ -1,7 +1,27 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>llvm@gentoo.org</email> </maintainer> + <upstream> + <remote-id type="github">llvm/llvm-project</remote-id> + </upstream> + <use> + <flag name="bootstrap-prefix">!!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used for bootstrapping Gentoo Prefix</flag> + <flag name="cet"> + Enable support for control flow hijacking protection. + + On amd64, this provides Intel Control Flow Enforcement Technology (CET). + + Only provides benefits on newer CPUs. For Intel, the CPU + must be at least as new as Tiger Lake. For AMD, it must be + at least as new as Zen 3. This is harmless on older CPUs, + but provides no benefit either. + </flag> + <flag name="default-compiler-rt">Use compiler-rt + libunwind instead of libgcc as the default rtlib for clang</flag> + <flag name="default-libcxx">Use libc++ instead of libstdc++ as the default stdlib for clang</flag> + <flag name="default-lld">Use lld as the default linker for clang</flag> + <flag name="stricter">Default to stricter behavior known from newer clang versions, turning more warnings into errors</flag> + </use> </pkgmetadata> diff --git a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-16.ebuild b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-16.ebuild new file mode 100644 index 000000000000..2a6e3cd5239e --- /dev/null +++ b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-16.ebuild @@ -0,0 +1,43 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit crossdev + +DESCRIPTION="Symlinks to a Clang crosscompiler" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" +SRC_URI="" +S=${WORKDIR} + +LICENSE="public-domain" +SLOT="${PV}" +KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x64-macos" + +RDEPEND=" + sys-devel/clang:${SLOT} + sys-devel/lld:${SLOT} +" + +src_install() { + local llvm_path="${EPREFIX}/usr/lib/llvm/${SLOT}" + into "${llvm_path}" + + for exe in "clang" "clang++" "clang-cpp"; do + newbin - "${CTARGET}-${exe}" <<-EOF + #!/bin/sh + exec ${exe}-${SLOT} --no-default-config --config="/etc/clang/cross/${CTARGET}.cfg" \${@} + EOF + done + + local tools=( + ${CTARGET}-clang-${SLOT}:${CTARGET}-clang + ${CTARGET}-clang-cpp-${SLOT}:${CTARGET}-clang-cpp + ${CTARGET}-clang++-${SLOT}:${CTARGET}-clang++ + ) + + local t + for t in "${tools[@]}"; do + dosym "${t#*:}" "${llvm_path}/bin/${t%:*}" + done +} diff --git a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-17.ebuild b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-17.ebuild new file mode 100644 index 000000000000..4c77cf55e7da --- /dev/null +++ b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-17.ebuild @@ -0,0 +1,43 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit crossdev + +DESCRIPTION="Symlinks to a Clang crosscompiler" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" +SRC_URI="" +S=${WORKDIR} + +LICENSE="public-domain" +SLOT="${PV}" +KEYWORDS="amd64 ~arm arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc x86 ~amd64-linux ~x64-macos" + +RDEPEND=" + sys-devel/clang:${SLOT} + sys-devel/lld:${SLOT} +" + +src_install() { + local llvm_path="${EPREFIX}/usr/lib/llvm/${SLOT}" + into "${llvm_path}" + + for exe in "clang" "clang++" "clang-cpp"; do + newbin - "${CTARGET}-${exe}" <<-EOF + #!/bin/sh + exec ${exe}-${SLOT} --no-default-config --config="/etc/clang/cross/${CTARGET}.cfg" \${@} + EOF + done + + local tools=( + ${CTARGET}-clang-${SLOT}:${CTARGET}-clang + ${CTARGET}-clang-cpp-${SLOT}:${CTARGET}-clang-cpp + ${CTARGET}-clang++-${SLOT}:${CTARGET}-clang++ + ) + + local t + for t in "${tools[@]}"; do + dosym "${t#*:}" "${llvm_path}/bin/${t%:*}" + done +} diff --git a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-18.ebuild b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-18.ebuild new file mode 100644 index 000000000000..7604a7a58de0 --- /dev/null +++ b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-18.ebuild @@ -0,0 +1,44 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit crossdev + +DESCRIPTION="Symlinks to a Clang crosscompiler" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" +SRC_URI="" +S=${WORKDIR} + +LICENSE="public-domain" +SLOT="${PV}" +KEYWORDS="" +PROPERTIES="live" + +RDEPEND=" + sys-devel/clang:${SLOT} + sys-devel/lld:${SLOT} +" + +src_install() { + local llvm_path="${EPREFIX}/usr/lib/llvm/${SLOT}" + into "${llvm_path}" + + for exe in "clang" "clang++" "clang-cpp"; do + newbin - "${CTARGET}-${exe}" <<-EOF + #!/bin/sh + exec ${exe}-${SLOT} --no-default-config --config="/etc/clang/cross/${CTARGET}.cfg" \${@} + EOF + done + + local tools=( + ${CTARGET}-clang-${SLOT}:${CTARGET}-clang + ${CTARGET}-clang-cpp-${SLOT}:${CTARGET}-clang-cpp + ${CTARGET}-clang++-${SLOT}:${CTARGET}-clang++ + ) + + local t + for t in "${tools[@]}"; do + dosym "${t#*:}" "${llvm_path}/bin/${t%:*}" + done +} diff --git a/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-19.ebuild b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-19.ebuild new file mode 100644 index 000000000000..7604a7a58de0 --- /dev/null +++ b/sys-devel/clang-crossdev-wrappers/clang-crossdev-wrappers-19.ebuild @@ -0,0 +1,44 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit crossdev + +DESCRIPTION="Symlinks to a Clang crosscompiler" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" +SRC_URI="" +S=${WORKDIR} + +LICENSE="public-domain" +SLOT="${PV}" +KEYWORDS="" +PROPERTIES="live" + +RDEPEND=" + sys-devel/clang:${SLOT} + sys-devel/lld:${SLOT} +" + +src_install() { + local llvm_path="${EPREFIX}/usr/lib/llvm/${SLOT}" + into "${llvm_path}" + + for exe in "clang" "clang++" "clang-cpp"; do + newbin - "${CTARGET}-${exe}" <<-EOF + #!/bin/sh + exec ${exe}-${SLOT} --no-default-config --config="/etc/clang/cross/${CTARGET}.cfg" \${@} + EOF + done + + local tools=( + ${CTARGET}-clang-${SLOT}:${CTARGET}-clang + ${CTARGET}-clang-cpp-${SLOT}:${CTARGET}-clang-cpp + ${CTARGET}-clang++-${SLOT}:${CTARGET}-clang++ + ) + + local t + for t in "${tools[@]}"; do + dosym "${t#*:}" "${llvm_path}/bin/${t%:*}" + done +} diff --git a/sys-devel/clang-crossdev-wrappers/metadata.xml b/sys-devel/clang-crossdev-wrappers/metadata.xml new file mode 100644 index 000000000000..83615f23a338 --- /dev/null +++ b/sys-devel/clang-crossdev-wrappers/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM 'https://www.gentoo.org/dtd/metadata.dtd'> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>cat@catcream.org</email> + </maintainer> + <maintainer type="project"> + <email>llvm@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/sys-devel/clang-runtime/clang-runtime-11.0.0.ebuild b/sys-devel/clang-runtime/clang-runtime-11.0.0.ebuild deleted file mode 100644 index c7b7ec0ae636..000000000000 --- a/sys-devel/clang-runtime/clang-runtime-11.0.0.ebuild +++ /dev/null @@ -1,24 +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="amd64 arm arm64 ppc64 ~riscv 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} ) - ) - libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] ) - openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] )" diff --git a/sys-devel/clang-runtime/clang-runtime-11.0.1.ebuild b/sys-devel/clang-runtime/clang-runtime-11.0.1.ebuild deleted file mode 100644 index 43bbae3d0abf..000000000000 --- a/sys-devel/clang-runtime/clang-runtime-11.0.1.ebuild +++ /dev/null @@ -1,24 +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="amd64 arm arm64 ~ppc64 ~riscv 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} ) - ) - 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-11.1.0.ebuild deleted file mode 100644 index 43bbae3d0abf..000000000000 --- a/sys-devel/clang-runtime/clang-runtime-11.1.0.ebuild +++ /dev/null @@ -1,24 +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="amd64 arm arm64 ~ppc64 ~riscv 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} ) - ) - libcxx? ( >=sys-libs/libcxx-${PV}[${MULTILIB_USEDEP}] ) - openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] )" diff --git a/sys-devel/clang-runtime/clang-runtime-12.0.0.9999.ebuild b/sys-devel/clang-runtime/clang-runtime-12.0.0.9999.ebuild deleted file mode 100644 index 2713d1f397ff..000000000000 --- a/sys-devel/clang-runtime/clang-runtime-12.0.0.9999.ebuild +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 1999-2020 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-12.0.0.ebuild b/sys-devel/clang-runtime/clang-runtime-12.0.0.ebuild deleted file mode 100644 index 961a678da4d2..000000000000 --- a/sys-devel/clang-runtime/clang-runtime-12.0.0.ebuild +++ /dev/null @@ -1,24 +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="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~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} ) - ) - 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.0.9999.ebuild b/sys-devel/clang-runtime/clang-runtime-13.0.0.9999.ebuild deleted file mode 100644 index 218cdb1426f6..000000000000 --- a/sys-devel/clang-runtime/clang-runtime-13.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-10.0.1.ebuild b/sys-devel/clang-runtime/clang-runtime-15.0.7.ebuild index be71ca31a5a4..c4f7620e1212 100644 --- a/sys-devel/clang-runtime/clang-runtime-10.0.1.ebuild +++ b/sys-devel/clang-runtime/clang-runtime-15.0.7.ebuild @@ -1,24 +1,26 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 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="amd64 arm arm64 ppc64 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}] )" + openmp? ( >=sys-libs/libomp-${PV}[${MULTILIB_USEDEP}] ) +" diff --git a/sys-devel/clang-runtime/clang-runtime-16.0.6.ebuild b/sys-devel/clang-runtime/clang-runtime-16.0.6.ebuild new file mode 100644 index 000000000000..25889f60d661 --- /dev/null +++ b/sys-devel/clang-runtime/clang-runtime-16.0.6.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-build toolchain-funcs + +DESCRIPTION="Meta-ebuild for clang runtime libraries" +HOMEPAGE="https://clang.llvm.org/" + +LICENSE="metapackage" +SLOT="${PV%%.*}" +KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~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}] ) +" + +pkg_pretend() { + if tc-is-clang; then + ewarn "You seem to be using clang as a system compiler. As of clang-16," + ewarn "upstream has turned a few warnings that commonly occur during" + ewarn "configure script runs into errors by default. This causes some" + ewarn "configure tests to start failing, sometimes resulting in silent" + ewarn "breakage, missing functionality or runtime misbehavior. It is" + ewarn "not yet clear whether the change will remain or be reverted." + ewarn + ewarn "For more information, please see:" + ewarn "https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213" + fi +} diff --git a/sys-devel/clang-runtime/clang-runtime-17.0.6.ebuild b/sys-devel/clang-runtime/clang-runtime-17.0.6.ebuild new file mode 100644 index 000000000000..25889f60d661 --- /dev/null +++ b/sys-devel/clang-runtime/clang-runtime-17.0.6.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-build toolchain-funcs + +DESCRIPTION="Meta-ebuild for clang runtime libraries" +HOMEPAGE="https://clang.llvm.org/" + +LICENSE="metapackage" +SLOT="${PV%%.*}" +KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~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}] ) +" + +pkg_pretend() { + if tc-is-clang; then + ewarn "You seem to be using clang as a system compiler. As of clang-16," + ewarn "upstream has turned a few warnings that commonly occur during" + ewarn "configure script runs into errors by default. This causes some" + ewarn "configure tests to start failing, sometimes resulting in silent" + ewarn "breakage, missing functionality or runtime misbehavior. It is" + ewarn "not yet clear whether the change will remain or be reverted." + ewarn + ewarn "For more information, please see:" + ewarn "https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213" + fi +} diff --git a/sys-devel/clang-runtime/clang-runtime-18.1.4.ebuild b/sys-devel/clang-runtime/clang-runtime-18.1.4.ebuild new file mode 100644 index 000000000000..38042f073a24 --- /dev/null +++ b/sys-devel/clang-runtime/clang-runtime-18.1.4.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-build toolchain-funcs + +DESCRIPTION="Meta-ebuild for clang runtime libraries" +HOMEPAGE="https://clang.llvm.org/" + +LICENSE="metapackage" +SLOT="${PV%%.*}" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~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}] ) +" + +pkg_pretend() { + if tc-is-clang; then + ewarn "You seem to be using clang as a system compiler. As of clang-16," + ewarn "upstream has turned a few warnings that commonly occur during" + ewarn "configure script runs into errors by default. This causes some" + ewarn "configure tests to start failing, sometimes resulting in silent" + ewarn "breakage, missing functionality or runtime misbehavior. It is" + ewarn "not yet clear whether the change will remain or be reverted." + ewarn + ewarn "For more information, please see:" + ewarn "https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213" + fi +} diff --git a/sys-devel/clang-runtime/clang-runtime-19.0.0.9999.ebuild b/sys-devel/clang-runtime/clang-runtime-19.0.0.9999.ebuild new file mode 100644 index 000000000000..323c0b62c062 --- /dev/null +++ b/sys-devel/clang-runtime/clang-runtime-19.0.0.9999.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-build toolchain-funcs + +DESCRIPTION="Meta-ebuild for clang runtime libraries" +HOMEPAGE="https://clang.llvm.org/" + +LICENSE="metapackage" +SLOT="${PV%%.*}" +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}] ) +" + +pkg_pretend() { + if tc-is-clang; then + ewarn "You seem to be using clang as a system compiler. As of clang-16," + ewarn "upstream has turned a few warnings that commonly occur during" + ewarn "configure script runs into errors by default. This causes some" + ewarn "configure tests to start failing, sometimes resulting in silent" + ewarn "breakage, missing functionality or runtime misbehavior. It is" + ewarn "not yet clear whether the change will remain or be reverted." + ewarn + ewarn "For more information, please see:" + ewarn "https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213" + fi +} diff --git a/sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240410.ebuild b/sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240410.ebuild new file mode 100644 index 000000000000..323c0b62c062 --- /dev/null +++ b/sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240410.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-build toolchain-funcs + +DESCRIPTION="Meta-ebuild for clang runtime libraries" +HOMEPAGE="https://clang.llvm.org/" + +LICENSE="metapackage" +SLOT="${PV%%.*}" +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}] ) +" + +pkg_pretend() { + if tc-is-clang; then + ewarn "You seem to be using clang as a system compiler. As of clang-16," + ewarn "upstream has turned a few warnings that commonly occur during" + ewarn "configure script runs into errors by default. This causes some" + ewarn "configure tests to start failing, sometimes resulting in silent" + ewarn "breakage, missing functionality or runtime misbehavior. It is" + ewarn "not yet clear whether the change will remain or be reverted." + ewarn + ewarn "For more information, please see:" + ewarn "https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213" + fi +} diff --git a/sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240420.ebuild b/sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240420.ebuild new file mode 100644 index 000000000000..323c0b62c062 --- /dev/null +++ b/sys-devel/clang-runtime/clang-runtime-19.0.0_pre20240420.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-build toolchain-funcs + +DESCRIPTION="Meta-ebuild for clang runtime libraries" +HOMEPAGE="https://clang.llvm.org/" + +LICENSE="metapackage" +SLOT="${PV%%.*}" +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}] ) +" + +pkg_pretend() { + if tc-is-clang; then + ewarn "You seem to be using clang as a system compiler. As of clang-16," + ewarn "upstream has turned a few warnings that commonly occur during" + ewarn "configure script runs into errors by default. This causes some" + ewarn "configure tests to start failing, sometimes resulting in silent" + ewarn "breakage, missing functionality or runtime misbehavior. It is" + ewarn "not yet clear whether the change will remain or be reverted." + ewarn + ewarn "For more information, please see:" + ewarn "https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213" + fi +} diff --git a/sys-devel/clang-runtime/metadata.xml b/sys-devel/clang-runtime/metadata.xml index f761b620168e..83929061543f 100644 --- a/sys-devel/clang-runtime/metadata.xml +++ b/sys-devel/clang-runtime/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>llvm@gentoo.org</email> @@ -10,4 +10,7 @@ <flag name="openmp">Install <pkg>sys-libs/libomp</pkg> for -fopenmp support</flag> <flag name="sanitize">Enable compiler-rt sanitizer (-fsanitize*) support</flag> </use> + <upstream> + <remote-id type="github">llvm/llvm-project</remote-id> + </upstream> </pkgmetadata> diff --git a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-15-r2.ebuild b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-15-r2.ebuild new file mode 100644 index 000000000000..988214f580c9 --- /dev/null +++ b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-15-r2.ebuild @@ -0,0 +1,59 @@ +# Copyright 2022-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib + +DESCRIPTION="Symlinks to use Clang on GCC-free system" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" +S=${WORKDIR} + +LICENSE="public-domain" +SLOT="${PV}" +KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x64-macos" +IUSE="gcc-symlinks multilib-symlinks +native-symlinks" + +# Blocker for bug #872416 +RDEPEND=" + !<sys-devel/gcc-config-2.6 + sys-devel/clang:${SLOT} +" + +src_install() { + local tools=() + + if use native-symlinks; then + tools+=( + cc:clang + cpp:clang-cpp + c++:clang++ + ) + fi + if use gcc-symlinks; then + tools+=( + gcc:clang + g++:clang++ + ) + fi + + local chosts=( "${CHOST}" ) + if use multilib-symlinks; then + local abi + for abi in $(get_all_abis); do + chosts+=( "$(get_abi_CHOST "${abi}")" ) + done + fi + + local chost t + local dest=/usr/lib/llvm/${SLOT}/bin + dodir "${dest}" + for t in "${tools[@]}"; do + dosym "${t#*:}" "${dest}/${t%:*}" + done + for chost in "${chosts[@]}"; do + for t in "${tools[@]}"; do + dosym "${t#*:}" "${dest}/${chost}-${t%:*}" + done + done +} diff --git a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-16-r2.ebuild b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-16-r2.ebuild new file mode 100644 index 000000000000..436e2673639f --- /dev/null +++ b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-16-r2.ebuild @@ -0,0 +1,59 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib + +DESCRIPTION="Symlinks to use Clang on GCC-free system" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" +S=${WORKDIR} + +LICENSE="public-domain" +SLOT="${PV}" +KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~x64-macos" +IUSE="gcc-symlinks multilib-symlinks +native-symlinks" + +# Blocker for bug #872416 +RDEPEND=" + !<sys-devel/gcc-config-2.6 + sys-devel/clang:${SLOT} +" + +src_install() { + local tools=() + + if use native-symlinks; then + tools+=( + cc:clang + cpp:clang-cpp + c++:clang++ + ) + fi + if use gcc-symlinks; then + tools+=( + gcc:clang + g++:clang++ + ) + fi + + local chosts=( "${CHOST}" ) + if use multilib-symlinks; then + local abi + for abi in $(get_all_abis); do + chosts+=( "$(get_abi_CHOST "${abi}")" ) + done + fi + + local chost t + local dest=/usr/lib/llvm/${SLOT}/bin + dodir "${dest}" + for t in "${tools[@]}"; do + dosym "${t#*:}" "${dest}/${t%:*}" + done + for chost in "${chosts[@]}"; do + for t in "${tools[@]}"; do + dosym "${t#*:}" "${dest}/${chost}-${t%:*}" + done + done +} diff --git a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-17.ebuild b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-17.ebuild new file mode 100644 index 000000000000..436e2673639f --- /dev/null +++ b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-17.ebuild @@ -0,0 +1,59 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib + +DESCRIPTION="Symlinks to use Clang on GCC-free system" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" +S=${WORKDIR} + +LICENSE="public-domain" +SLOT="${PV}" +KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~x64-macos" +IUSE="gcc-symlinks multilib-symlinks +native-symlinks" + +# Blocker for bug #872416 +RDEPEND=" + !<sys-devel/gcc-config-2.6 + sys-devel/clang:${SLOT} +" + +src_install() { + local tools=() + + if use native-symlinks; then + tools+=( + cc:clang + cpp:clang-cpp + c++:clang++ + ) + fi + if use gcc-symlinks; then + tools+=( + gcc:clang + g++:clang++ + ) + fi + + local chosts=( "${CHOST}" ) + if use multilib-symlinks; then + local abi + for abi in $(get_all_abis); do + chosts+=( "$(get_abi_CHOST "${abi}")" ) + done + fi + + local chost t + local dest=/usr/lib/llvm/${SLOT}/bin + dodir "${dest}" + for t in "${tools[@]}"; do + dosym "${t#*:}" "${dest}/${t%:*}" + done + for chost in "${chosts[@]}"; do + for t in "${tools[@]}"; do + dosym "${t#*:}" "${dest}/${chost}-${t%:*}" + done + done +} diff --git a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-18.ebuild b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-18.ebuild new file mode 100644 index 000000000000..5cfe92aa27da --- /dev/null +++ b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-18.ebuild @@ -0,0 +1,59 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib + +DESCRIPTION="Symlinks to use Clang on GCC-free system" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" +S=${WORKDIR} + +LICENSE="public-domain" +SLOT="${PV}" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~x64-macos" +IUSE="gcc-symlinks multilib-symlinks +native-symlinks" + +# Blocker for bug #872416 +RDEPEND=" + !<sys-devel/gcc-config-2.6 + sys-devel/clang:${SLOT} +" + +src_install() { + local tools=() + + if use native-symlinks; then + tools+=( + cc:clang + cpp:clang-cpp + c++:clang++ + ) + fi + if use gcc-symlinks; then + tools+=( + gcc:clang + g++:clang++ + ) + fi + + local chosts=( "${CHOST}" ) + if use multilib-symlinks; then + local abi + for abi in $(get_all_abis); do + chosts+=( "$(get_abi_CHOST "${abi}")" ) + done + fi + + local chost t + local dest=/usr/lib/llvm/${SLOT}/bin + dodir "${dest}" + for t in "${tools[@]}"; do + dosym "${t#*:}" "${dest}/${t%:*}" + done + for chost in "${chosts[@]}"; do + for t in "${tools[@]}"; do + dosym "${t#*:}" "${dest}/${chost}-${t%:*}" + done + done +} diff --git a/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-19.ebuild b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-19.ebuild new file mode 100644 index 000000000000..3496a0f89b67 --- /dev/null +++ b/sys-devel/clang-toolchain-symlinks/clang-toolchain-symlinks-19.ebuild @@ -0,0 +1,58 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib + +DESCRIPTION="Symlinks to use Clang on GCC-free system" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" +S=${WORKDIR} + +LICENSE="public-domain" +SLOT="${PV}" +IUSE="gcc-symlinks multilib-symlinks +native-symlinks" + +# Blocker for bug #872416 +RDEPEND=" + !<sys-devel/gcc-config-2.6 + sys-devel/clang:${SLOT} +" + +src_install() { + local tools=() + + if use native-symlinks; then + tools+=( + cc:clang + cpp:clang-cpp + c++:clang++ + ) + fi + if use gcc-symlinks; then + tools+=( + gcc:clang + g++:clang++ + ) + fi + + local chosts=( "${CHOST}" ) + if use multilib-symlinks; then + local abi + for abi in $(get_all_abis); do + chosts+=( "$(get_abi_CHOST "${abi}")" ) + done + fi + + local chost t + local dest=/usr/lib/llvm/${SLOT}/bin + dodir "${dest}" + for t in "${tools[@]}"; do + dosym "${t#*:}" "${dest}/${t%:*}" + done + for chost in "${chosts[@]}"; do + for t in "${tools[@]}"; do + dosym "${t#*:}" "${dest}/${chost}-${t%:*}" + done + done +} diff --git a/sys-devel/clang-toolchain-symlinks/metadata.xml b/sys-devel/clang-toolchain-symlinks/metadata.xml new file mode 100644 index 000000000000..bf4e9fc6a6ca --- /dev/null +++ b/sys-devel/clang-toolchain-symlinks/metadata.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>llvm@gentoo.org</email> + </maintainer> + <use> + <flag name="gcc-symlinks"> + Install symlinks for 'gcc' and 'g++' for extra + compatibility. + </flag> + <flag name="multilib-symlinks"> + Install symlinks for all ABI CHOSTs. Note that this can + result in gcc being overrode for native builds, as well + as conflict with crossdev if used for the same targets. + </flag> + <flag name="native-symlinks"> + Install generic tool symlinks like 'cc' and 'c++', + as well as ${CTARGET}-*. These symlinks are installed + into slotted LLVM bindir, so they should not take precedence + over symlinks installed into /usr/bin + by <pkg>sys-devel/gcc-config</pkg> but they can be helpful + for GCC-free setups. + </flag> + </use> +</pkgmetadata> diff --git a/sys-devel/clang/Manifest b/sys-devel/clang/Manifest index 57eb19d6fa7c..ca97e13c826f 100644 --- a/sys-devel/clang/Manifest +++ b/sys-devel/clang/Manifest @@ -1,15 +1,17 @@ -DIST llvm-10.0.1-manpages.tar.bz2 180157 BLAKE2B ddf5951c8f5a2a8a80726fd713e6c818c852851a2261e904b484afdb67ac55f2ce10976ca2ca5d81fe2bf4806a72cc7b59f4068741306491a4f39065ca8fb56e SHA512 d3c2470dbd0f3143d64b380f7534ebcacdcf4bc4f140a6014283150007fe615ebd86247cf13b2432165a681614849e8eaab69a8d077f7a51e4e040e28ed33ebc -DIST llvm-11.0.0-manpages.tar.bz2 179592 BLAKE2B d03dff5e7426f4c648d6112dee0fa7a91edf41584290c94c3f738fc65fa82fc6ef47b49c245fb0e741bdf267fc64534311194c476ece4b447649ba2250e61430 SHA512 1cf598f50c99a85a35b03398e4768cd1eafec9d602f788d401120adb91b3b59965216ed7102da26b7c2af7e1bbca4bca8f1d43bb687fcd8ed418e2f7076bdce4 -DIST llvm-11.0.1-manpages.tar.bz2 180888 BLAKE2B 9d70e83704d77aa5007cc8eb8e667fbb1f4dd3a8df607d0bbf4f3f5049ac04263e6e01bf8da0d212f456a49c90b853485746af68f0a1e2b5f3b704914bd45aaf SHA512 c67df394dd1a94ae632ce55ff1b1aa4cc4aa8b59b17521cd91932c1b44efe90f29e84233a0ebe882d39f54a5b28edf4ef40769e7ecc1a5f1021d64c5f99e33ad -DIST llvm-11.1.0-manpages.tar.bz2 191571 BLAKE2B d6f8e1390dd3e6e8bbcd66c0079ef89f2ff3479743499c36ab32f8bc8281631a96113df9a87f6284058365950f4df3c75dacfcc11920fc5ea7ef0233ba842b77 SHA512 2543e519f51cc7ecb51a732c658ec5d35c5225e30a677f24ead75e81fb1ab793a030e79f21d0b702a2cf6ab6da1a2cba839b49a98e1b0a36384e98076ed5c4b1 -DIST llvm-12.0.0-manpages.tar.bz2 191228 BLAKE2B 60cc736de2512b9368d55cc8c73e8b537c0fb8f0cb923b0c5c9e5866785013df93efc6cb448c91b7635e856a8d663278a3ba40620a2e4c05c006b6fc5b482b4e SHA512 4a4f55da8da0cb7d4d9281b13168864a3c0b10000b3e750b22b93d9b4f68a2d9a2e1da10c94d27081a0bce9694fa55a9d5e723676f9066393dc8001382d1d6da -DIST llvm-gentoo-patchset-10.0.1-1.tar.xz 8320 BLAKE2B 1b7ea7669586e08fece0efcf02b392feed4b7f3e6e9cdd10ab7dcc30082cae5bb1daa6d3314a7b0329c4d70f3c736d0c57ed408c838601dc737d558d2a0a0f26 SHA512 75898a8d719657177bbf587d848be8e53135c09e50603660c19edab00f80b6c2f29e7b6fda2bef381b38df6e24a690d694029a38c525763408322573275fc9f0 -DIST llvm-gentoo-patchset-11.0.0-1.tar.xz 6100 BLAKE2B 6f8fc9b7daa703f04b1283caaeb3665d4bec56ff80b1c5db35917c578fdd92617222bd2d2b83020144b8abdeaa261142b68aa3dee24350133f6721e41a167b78 SHA512 debdd92e6aa3133f474dfbd79f267e76d9d979e4e5d464c8d4343c6e6816b46376ca8080a9ee916152861907af9d0645ce71cf3582ef3dc31ec4ca3410fde9f6 -DIST llvm-gentoo-patchset-11.1.0-1.tar.xz 4032 BLAKE2B e69138a422e315b31a3d9c11faa4ae1ddf1bf9092cee2db0de4d2adef81fd802973488293aab48b764402b51996893b17ca03249ef4620848a576d1f6cdb9698 SHA512 e1c5504dab6c5db9fdf4addfeb12316f22d0258717ba551a9b7b3ba37919491fb6011ac5cca1e793b7509d5c1c186bc6bc4213f7d6155d190612492b216f979b -DIST llvm-gentoo-patchset-12.0.0-1.tar.xz 6364 BLAKE2B bcf96dad8300cdc3e1f416cb90935ae3b1359efc5687118b5a9bbee25de7087a266250f50c6f2abd18f4efeeec19354f59513c8fdd1d61c2cfc8cc2f0115e514 SHA512 76201e169f71a8d568365ffeafcfd37138e74b0536826f47eb6ce89c2280586f10426917e851f99bfb20477cd828cc40daa8cb7a62959981620fbd81e1b22ee1 -DIST llvm-gentoo-patchset-9999-1.tar.xz 4032 BLAKE2B b9413484dafed8ae0c68c2c164b45fd07bb8d5d0898f03abe118fd2120ffcb1fb6c949de9649a97c2e8105f24b9d131a725c67c0a502ca4d4d192c1a0d65f49d SHA512 e64449eeaf756c5bd945109937b84ba4bd8a015222bd792d39cf3947871e87571a4ca57814790e51544cb05ad4c2d1f044e818e4caaac7c2e2a02cb1aa290fcc -DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151 -DIST llvmorg-11.0.0.tar.gz 122743665 BLAKE2B 3f95570240789fd68ddb747df817f5c6cdc9da40911bbe9ee3531c15ada9165e5002b1c2f778cf8735858485ea05a8754e3d3a5f4b15bdd6cb33d64a14692984 SHA512 b6d38871ccce0e086e27d35e42887618d68e57d8274735c59e3eabc42dee352412489296293f8d5169fe0044936345915ee7da61ebdc64ec10f7737f6ecd90f2 -DIST llvmorg-11.0.1.tar.gz 122790338 BLAKE2B 0130996b4a8c4d9f757136fd7fb318068c9bfdc565060dec0d4336480c4ab66c4ae3185a7fdb05f13cf9ee8fd4123b09df938881b75d6e5d3689595114b7e32a SHA512 f5e6ef0b3111aae08a89cd01adb2ff4abfa9ef779c68b9190421d0447efd25c2cc00e5aae9f4764805f5fa31434866043d1510ae7389817e28ae53a5442e2fdf -DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81 -DIST llvmorg-12.0.0.tar.gz 134226215 BLAKE2B f9c3ba8c58571855caa4f206fd285c9b5be66672fb0814cb8bc0964a051f57f5d35013aa1e27cbda502652b37df1ec23474129109e76a42066847860db441dbe SHA512 0cff02155c5ac0d6db2b72d60d9819d5b5dd859663b45f721b1c7540239c2fceb1f57d9173f6870c49de851c242ed8e85c5c6d6577a1f8092a7c5dcd12513b26 +DIST llvm-15.0.7-manpages.tar.bz2 228425 BLAKE2B 573b030a32407cfe241fb2c8c62bed8e7c54f9daf4b8cffdd2d4e5ca2e40b5ec5ed3724475aedf77119be1a4d9de847a989e933d315e6d94908e407a19c98047 SHA512 86d5eeea2757b0a627c8d2d6e70a3265fc0207085f4e473cdd6e8b624c719625dead23fd1737742a1bea27b1c4631ef3e8e3041a1122a85fcb49859e5bfbee49 +DIST llvm-16.0.4-manpages.tar.bz2 243154 BLAKE2B 69308e3ec19d750e7249b7c8cd79224c466b879c67dd900e201339486fa7fa4dd6ef9ef5b033b2443b32c3530cc76564fe2856a76f9b466fdab2b5c64148f089 SHA512 2d2b711adbd20a233d0611f81393faa29a2f32f0e64799a9a48185876045023ca1320becd2da110fbcbfce019a38df0d7c13fcaea3770b4fc23aa732eb11321b +DIST llvm-17.0.1-manpages.tar.bz2 263148 BLAKE2B 6485a261e356eacc4a274f9b8d329b53f11a37a23effea41a12322f6908bbe702dc1a97bfd10293061f01f1dbff8693e9324ab3dce2551e78eab128dbd7fea30 SHA512 963ff1b7aa0cb01ed0c0356a0adc3a315d94e78035e928dc81464f553e722633a17596e421c248968e87e22ae66f1ab9cccda5fd3388d1a6d34b5e9c6140ebcb +DIST llvm-18.1.0-manpages.tar.bz2 270429 BLAKE2B d85d6e23197184dc512019c25805af0aa145eefb4c36215807c1ba70ad47943c05c06dbaafd84a7e6487bdd83814e03277374e095d97b129e3fc8d468c10741c SHA512 5f492c85fad4e04e0148ea509f4b6520de9e2765c51e617363a11aa8e47c2d847f6b0897958ca1d93bccf0f6a9150868b7e04c728bd430c05bf2da30bdeba6cc +DIST llvm-gentoo-patchset-15.0.7-r3.tar.xz 24268 BLAKE2B 6531ae385ecea87bc26dba8ce19b4cde8ff224c80fd81f04c6ded131e305ecfdeb8d29ebd3b68a641d240805dc83eb0ebc7cc85124f02ad0ee66e0f201b91d7e SHA512 66cb33f8b423736b990fb75d4f2d1e5f14c0b03308f403297204dd1a352d72f85f34220fd66d3de5d6df328cdf2ffce03c2a111cb0bb57791cf68a88069ac7df +DIST llvm-gentoo-patchset-16.0.6.tar.xz 17340 BLAKE2B 37cdf4b38367b4256d4f7a25d1b4f41758e5f81be8e20a1c94a10d6c5e36642e9672121b455e73a0bac2eb40467ef2db4b43789b2912a6790593d97b8b5c27e3 SHA512 2c02b9d8a4c5af9fddcd26c95dc66fffae32cb5b7f85c65a1aa4ed00dd8cd5b01cc1975a711aee63c0b8b11e9dc20f2bc05ea753904eb516892b820f02aff825 +DIST llvm-gentoo-patchset-17.0.6-r1.tar.xz 2792 BLAKE2B b4e9014179edd96add0c932b16d3a95a5d7a905298052164ff668590108c83cd4f938d42b6d801efedae28a959b03b2bc3c7cd2a4cad20ef2b3c7aa9a3d0c15d SHA512 73a46aa9f6f2ac6334a073733aa082a12f97fb6a2750d5930af4eb1639cd192f3a17ea87c2f17947f04c68a5f60e37d9bc27ede8bab75531599edfb4c3aa8ffe +DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52 +DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2 +DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d SHA512 89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7 +DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a SHA512 ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447 +DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30 +DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340 +DIST llvm-project-18.1.4.src.tar.xz 132054668 BLAKE2B 94bbad3b185fd07cbace4eff79aba80fbdd5e072739250e3927fe1848bcf3f8d355eb1f384e57306707eb702acc7ab01b732590735be7950221607664d04b0a6 SHA512 b1b214ae91f3705d8ea345547ad53f1e5d7d884c1eb6958bc41c14ac4b3e407771ccc2b693686ff103c8232c2c3942731d6db9a9cb4f735e6c6a0674739d0b29 +DIST llvm-project-18.1.4.src.tar.xz.sig 566 BLAKE2B b74fd219d7bcdf197b4e711cfbb25c40e9d8d2c7341de0215d8c31f330f396e9c166ff63513829cdc9cef349f08238f66a4dc949fa97958a7af496abae369eaa SHA512 4f456edf4fb454815acaef6855b1a0991f229810a32e9369af83388e37f0ef8964308e1e93bd6216024cdd67e86caaadc8d5794467857cc6fe561c9fa6ca7386 +DIST llvm-project-ee284d2da0720dc21191d6f545504cbfcf5dcbcf.tar.gz 208883034 BLAKE2B e37c9f1a6a4d0caa9a3091f979dd09f509d458f8b7b30286c77dd2385aea748b7aac6dd488c79573f82feb655aa321717bd2fb46bba4a12b388b52064f6e13bf SHA512 1335ade87cd2accc47ac47ed2ab302999e375808b158b6c9d31fac9059cbb992d2bdaaadf1fd9a1b37268c1123d43346ea4d150894d6d2e6f80ba790b65b93b1 +DIST llvm-project-f03cd2db91956456f1c5e2da86d3c50183eebd28.tar.gz 209375254 BLAKE2B 1d7e043d04323edb64b2ef2309fbcb4f82a959f45391e815133cc0891d5a497bbb81101aab460e9bf67e75aa906e13ad1877c3850829dcad397ed626dc8f2792 SHA512 6775e03a44b2133bd4a4b473ab007599321daa19dc7f3cc47f95cf9d110e83e982bf48a6b1d43038b0f0a2c0fef2f689aefd20132b25a90ef19342683e2d2e50 diff --git a/sys-devel/clang/clang-10.0.1.ebuild b/sys-devel/clang/clang-10.0.1.ebuild deleted file mode 100644 index 216a296796ec..000000000000 --- a/sys-devel/clang/clang-10.0.1.ebuild +++ /dev/null @@ -1,427 +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 multilib-minimal pax-utils \ - python-single-r1 toolchain-funcs - -DESCRIPTION="C language family frontend for LLVM" -HOMEPAGE="https://llvm.org/" -LLVM_COMPONENTS=( clang clang-tools-extra ) -LLVM_MANPAGES=pregenerated -LLVM_TEST_COMPONENTS=( - llvm/lib/Testing/Support - llvm/utils/{lit,llvm-lit,unittest} -) -LLVM_PATCHSET=10.0.1-1 -llvm.org_set_globals - -# Keep in sync with sys-devel/llvm -ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC AVR ) -ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM 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)" -KEYWORDS="amd64 arm arm64 ppc64 x86 ~amd64-linux" -IUSE="debug default-compiler-rt default-libcxx default-lld doc - +static-analyzer test xml kernel_FreeBSD ${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=" - doc? ( dev-python/sphinx ) - xml? ( virtual/pkgconfig ) - ${PYTHON_DEPS}" -RDEPEND="${RDEPEND} - !<sys-devel/llvm-4.0.0_rc:0 - !sys-devel/clang:0" -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 )" - -# 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 -} - -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 - ;; - # headers for clang-tidy static library - clang-tidy-headers) - 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-import-test - 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) - ) - 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_src_compile - - # 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 - - # Remove unnecessary headers on FreeBSD, bug #417171 - if use kernel_FreeBSD; then - rm "${ED}"/usr/lib/clang/${clang_full_version}/include/{std,float,iso,limits,tgmath,varargs}*.h || die - fi -} - -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-11.0.0.ebuild b/sys-devel/clang/clang-11.0.0.ebuild deleted file mode 100644 index ef1644eb8bc0..000000000000 --- a/sys-devel/clang/clang-11.0.0.ebuild +++ /dev/null @@ -1,435 +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 multilib-minimal pax-utils \ - prefix python-single-r1 toolchain-funcs - -DESCRIPTION="C language family frontend for LLVM" -HOMEPAGE="https://llvm.org/" -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.0.0-1 -llvm.org_set_globals - -# 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)" -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 kernel_FreeBSD ${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}" -RDEPEND="${RDEPEND} - !<sys-devel/llvm-4.0.0_rc:0 - !sys-devel/clang:0" -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 )" - -# 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 - - # Remove unnecessary headers on FreeBSD, bug #417171 - if use kernel_FreeBSD; then - rm "${ED}"/usr/lib/clang/${clang_full_version}/include/{std,float,iso,limits,tgmath,varargs}*.h || die - fi -} - -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-11.0.1.ebuild b/sys-devel/clang/clang-11.0.1.ebuild deleted file mode 100644 index abcafbb66518..000000000000 --- a/sys-devel/clang/clang-11.0.1.ebuild +++ /dev/null @@ -1,436 +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 multilib-minimal pax-utils \ - 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)" -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 kernel_FreeBSD ${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}" -RDEPEND="${RDEPEND} - !<sys-devel/llvm-4.0.0_rc:0 - !sys-devel/clang:0" -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 - - # Remove unnecessary headers on FreeBSD, bug #417171 - if use kernel_FreeBSD; then - rm "${ED}"/usr/lib/clang/${clang_full_version}/include/{std,float,iso,limits,tgmath,varargs}*.h || die - fi -} - -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.0.9999.ebuild b/sys-devel/clang/clang-15.0.7-r3.ebuild index 74d03d6bde4f..131afb227f0e 100644 --- a/sys-devel/clang/clang-12.0.0.9999.ebuild +++ b/sys-devel/clang/clang-15.0.7-r3.ebuild @@ -1,69 +1,61 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{7..9} ) -inherit cmake llvm llvm.org multilib-minimal pax-utils \ +PYTHON_COMPAT=( python3_{10..11} ) +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 CSKY 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)" -KEYWORDS="" -IUSE="debug default-compiler-rt default-libcxx default-lld - doc +static-analyzer test xml kernel_FreeBSD ${ALL_LLVM_TARGETS[*]}" -REQUIRED_USE="${PYTHON_REQUIRED_USE} - || ( ${ALL_LLVM_TARGETS[*]} )" +SLOT="${LLVM_MAJOR}/${LLVM_SOABI}g1" +KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x64-macos" +IUSE="debug doc +extra ieee-long-double +pie +static-analyzer test xml" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" RESTRICT="!test? ( test )" -RDEPEND=" - ~sys-devel/llvm-${PV}:${SLOT}=[debug=,${MULTILIB_USEDEP}] +DEPEND=" + ~sys-devel/llvm-${PV}:${LLVM_MAJOR}=[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}" +" + +RDEPEND=" + ${PYTHON_DEPS} + ${DEPEND} + >=sys-devel/clang-common-${PV} +" BDEPEND=" - >=dev-util/cmake-3.16 - doc? ( dev-python/sphinx ) + ${PYTHON_DEPS} + doc? ( $(python_gen_cond_dep ' + dev-python/recommonmark[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') ) xml? ( virtual/pkgconfig ) - ${PYTHON_DEPS}" -RDEPEND="${RDEPEND} - !<sys-devel/llvm-4.0.0_rc:0 - !sys-devel/clang:0" +" PDEPEND=" - sys-devel/clang-common + sys-devel/clang-toolchain-symlinks:${LLVM_MAJOR} ~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=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-1 +LLVM_PATCHSET=${PV/_/-}-r3 +LLVM_USE_TARGETS=llvm llvm.org_set_globals # Multilib notes: @@ -78,7 +70,7 @@ llvm.org_set_globals # multilib clang* libraries (not runtime, not wrappers). pkg_setup() { - LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup + LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup python-single-r1_pkg_setup } @@ -91,8 +83,12 @@ 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 + + if ! use prefix-guest && [[ -n ${EPREFIX} ]]; then + sed -i "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" lib/Driver/ToolChains/Linux.cpp || die + fi } check_distribution_components() { @@ -110,10 +106,6 @@ check_distribution_components() { clang-libraries|distribution) continue ;; - # headers for clang-tidy static library - clang-tidy-headers) - continue - ;; # tools clang|clangd|clang-*) ;; @@ -129,7 +121,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}" ) @@ -166,6 +158,27 @@ get_distribution_components() { clang-resource-headers libclang-headers + aarch64-resource-headers + arm-common-resource-headers + arm-resource-headers + core-resource-headers + cuda-resource-headers + hexagon-resource-headers + hip-resource-headers + hlsl-resource-headers + mips-resource-headers + opencl-resource-headers + openmp-resource-headers + ppc-htm-resource-headers + ppc-resource-headers + riscv-resource-headers + systemz-resource-headers + utility-resource-headers + ve-resource-headers + webassembly-resource-headers + windows-resource-headers + x86-resource-headers + # libs clang-cpp libclang @@ -182,45 +195,54 @@ get_distribution_components() { clang clang-format clang-offload-bundler + clang-offload-packager 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 - clangd - find-all-symbols - modularize - pp-trace + # needed for cross-compiling Clang + clang-tblgen ) - if llvm_are_manpages_built; then + if use extra; then out+=( - # manpages - docs-clang-man - docs-clang-tools-man + # extra tools + clang-apply-replacements + clang-change-namespace + clang-doc + clang-include-fixer + clang-move + clang-pseudo + clang-query + clang-reorder-fields + clang-tidy + clang-tidy-headers + clangd + find-all-symbols + modularize + pp-trace ) fi - use doc && out+=( - docs-clang-html - docs-clang-tools-html - ) + if llvm_are_manpages_built; then + out+=( docs-clang-man ) + use extra && out+=( docs-clang-tools-man ) + fi + + if use doc; then + out+=( docs-clang-html ) + use extra && out+=( docs-clang-tools-html ) + fi use static-analyzer && out+=( clang-check clang-extdef-mapping scan-build + scan-build-py scan-view ) fi @@ -229,15 +251,13 @@ get_distribution_components() { } 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" + -DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}") + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" + -DCLANG_CONFIG_FILE_SYSTEM_DIR="${EPREFIX}/etc/clang" # relative to bindir - -DCLANG_RESOURCE_DIR="../../../../lib/clang/${clang_version}" + -DCLANG_RESOURCE_DIR="../../../../lib/clang/${LLVM_VERSION}" -DBUILD_SHARED_LIBS=OFF -DCLANG_LINK_CLANG_DYLIB=ON @@ -258,18 +278,23 @@ multilib_src_configure() { # 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_ENABLE_ARCMT=$(usex static-analyzer) -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) -DPython3_EXECUTABLE="${PYTHON}" ) + + if ! use elibc_musl; then + mycmakeargs+=( + -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=$(usex ieee-long-double) + ) + fi + use test && mycmakeargs+=( -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" + -DLLVM_EXTERNAL_LIT="${BUILD_DIR}/bin/llvm-lit" -DLLVM_LIT_ARGS="$(get_lit_flags)" ) @@ -281,13 +306,21 @@ multilib_src_configure() { -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 ) + if use extra; then + mycmakeargs+=( + -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra" + ) + fi fi mycmakeargs+=( - -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra -DCLANG_INCLUDE_DOCS=${build_docs} + ) + fi + if multilib_native_use extra; then + mycmakeargs+=( + -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra -DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs} ) else @@ -303,11 +336,12 @@ multilib_src_configure() { fi if tc-is-cross-compiler; then - [[ -x "/usr/bin/clang-tblgen" ]] \ - || die "/usr/bin/clang-tblgen not found or usable" + has_version -b sys-devel/clang:${LLVM_MAJOR} || + die "sys-devel/clang:${LLVM_MAJOR} is required on the build host." + local tools_bin=${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin mycmakeargs+=( - -DCMAKE_CROSSCOMPILING=ON - -DCLANG_TABLEGEN=/usr/bin/clang-tblgen + -DLLVM_TOOLS_BINARY_DIR="${tools_bin}" + -DCLANG_TABLEGEN="${tools_bin}"/clang-tblgen ) fi @@ -335,9 +369,14 @@ multilib_src_compile() { 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 + local test_targets=( check-clang ) + if multilib_native_use extra; then + test_targets+=( + check-clang-tools + check-clangd + ) + fi + cmake_build "${test_targets[@]}" } src_install() { @@ -350,13 +389,12 @@ 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 + if use extra; then + mv "${T}"/clang-tidy "${ED}"/usr/include/ || die + fi + mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/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 @@ -370,50 +408,57 @@ src_install() { # - 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}" + rm "${ED}/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}" || die + dosym "clang-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}-${LLVM_MAJOR}" + dosym "${i}-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/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}" + dosym "${i}-${LLVM_MAJOR}" \ + "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}-${LLVM_MAJOR}" + dosym "${abi_chost}-${i}-${LLVM_MAJOR}" \ + "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}" done done - - # Remove unnecessary headers on FreeBSD, bug #417171 - if use kernel_FreeBSD; then - rm "${ED}"/usr/lib/clang/${clang_full_version}/include/{std,float,iso,limits,tgmath,varargs}*.h || die - fi } multilib_src_install() { DESTDIR=${D} cmake_build install-distribution + if multilib_is_native_abi; then + # install clang-*-wrapper tools + # https://bugs.gentoo.org/904143 + exeinto "/usr/lib/llvm/${LLVM_MAJOR}/bin" + doexe "${BUILD_DIR}"/bin/clang-{linker,nvlink}-wrapper + fi + # 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 + mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die + mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die + if multilib_native_use extra; 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 + python_optimize "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/share/scan-view fi - docompress "/usr/lib/llvm/${SLOT}/share/man" + docompress "/usr/lib/llvm/${LLVM_MAJOR}/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" + use static-analyzer && fperms a-x "/usr/lib/llvm/${LLVM_MAJOR}/share/man/man1/scan-build.1" } pkg_postinst() { @@ -422,10 +467,12 @@ pkg_postinst() { 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" + elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/clang" + if use extra; then + 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" + fi } pkg_postrm() { diff --git a/sys-devel/clang/clang-12.0.0-r1.ebuild b/sys-devel/clang/clang-16.0.6.ebuild index c6dfa3e4fb4c..bd1e86a5edd7 100644 --- a/sys-devel/clang/clang-12.0.0-r1.ebuild +++ b/sys-devel/clang/clang-16.0.6.ebuild @@ -1,69 +1,62 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{7..9} ) -inherit cmake llvm llvm.org multilib-minimal pax-utils \ - prefix python-single-r1 toolchain-funcs +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake flag-o-matic llvm llvm.org multilib multilib-minimal +inherit 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 CSKY 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)" -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 kernel_FreeBSD ${ALL_LLVM_TARGETS[*]}" -REQUIRED_USE="${PYTHON_REQUIRED_USE} - || ( ${ALL_LLVM_TARGETS[*]} )" +SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" +KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~x64-macos" +IUSE="debug doc +extra ieee-long-double +pie +static-analyzer test xml" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" RESTRICT="!test? ( test )" -RDEPEND=" - ~sys-devel/llvm-${PV}:${SLOT}=[debug=,${MULTILIB_USEDEP}] +DEPEND=" + ~sys-devel/llvm-${PV}:${LLVM_MAJOR}=[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}" +" + +RDEPEND=" + ${PYTHON_DEPS} + ${DEPEND} + >=sys-devel/clang-common-${PV} +" BDEPEND=" - >=dev-util/cmake-3.16 - doc? ( dev-python/sphinx ) + ${PYTHON_DEPS} + doc? ( $(python_gen_cond_dep ' + dev-python/recommonmark[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') ) xml? ( virtual/pkgconfig ) - ${PYTHON_DEPS}" -RDEPEND="${RDEPEND} - !<sys-devel/llvm-4.0.0_rc:0 - !sys-devel/clang:0" +" 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 )" + sys-devel/clang-toolchain-symlinks:${LLVM_MAJOR} +" -LLVM_COMPONENTS=( clang clang-tools-extra ) -LLVM_MANPAGES=pregenerated +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/lib/Testing + llvm/utils + third-party ) -LLVM_PATCHSET=12.0.0-1 +LLVM_PATCHSET=${PV} +LLVM_USE_TARGETS=llvm llvm.org_set_globals # Multilib notes: @@ -78,7 +71,7 @@ llvm.org_set_globals # multilib clang* libraries (not runtime, not wrappers). pkg_setup() { - LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup + LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup python-single-r1_pkg_setup } @@ -91,8 +84,12 @@ 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 + + if ! use prefix-guest && [[ -n ${EPREFIX} ]]; then + sed -i "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" lib/Driver/ToolChains/Linux.cpp || die + fi } check_distribution_components() { @@ -110,10 +107,6 @@ check_distribution_components() { clang-libraries|distribution) continue ;; - # headers for clang-tidy static library - clang-tidy-headers) - continue - ;; # tools clang|clangd|clang-*) ;; @@ -129,7 +122,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}" ) @@ -166,6 +159,27 @@ get_distribution_components() { clang-resource-headers libclang-headers + aarch64-resource-headers + arm-common-resource-headers + arm-resource-headers + core-resource-headers + cuda-resource-headers + hexagon-resource-headers + hip-resource-headers + hlsl-resource-headers + mips-resource-headers + opencl-resource-headers + openmp-resource-headers + ppc-htm-resource-headers + ppc-resource-headers + riscv-resource-headers + systemz-resource-headers + utility-resource-headers + ve-resource-headers + webassembly-resource-headers + windows-resource-headers + x86-resource-headers + # libs clang-cpp libclang @@ -178,49 +192,61 @@ get_distribution_components() { libclang-python-bindings # tools + amdgpu-arch c-index-test clang clang-format + clang-linker-wrapper clang-offload-bundler - clang-offload-wrapper + clang-offload-packager clang-refactor + clang-repl clang-rename clang-scan-deps diagtool hmaptool + nvptx-arch - # 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 + # needed for cross-compiling Clang + clang-tblgen ) - if llvm_are_manpages_built; then + if use extra; then out+=( - # manpages - docs-clang-man - docs-clang-tools-man + # extra tools + clang-apply-replacements + clang-change-namespace + clang-doc + clang-include-cleaner + clang-include-fixer + clang-move + clang-pseudo + clang-query + clang-reorder-fields + clang-tidy + clang-tidy-headers + clangd + find-all-symbols + modularize + pp-trace ) fi - use doc && out+=( - docs-clang-html - docs-clang-tools-html - ) + if llvm_are_manpages_built; then + out+=( docs-clang-man ) + use extra && out+=( docs-clang-tools-man ) + fi + + if use doc; then + out+=( docs-clang-html ) + use extra && out+=( docs-clang-tools-html ) + fi use static-analyzer && out+=( clang-check clang-extdef-mapping scan-build + scan-build-py scan-view ) fi @@ -229,22 +255,22 @@ get_distribution_components() { } multilib_src_configure() { - local llvm_version=$(llvm-config --version) || die - local clang_version=$(ver_cut 1-3 "${llvm_version}") + tc-is-gcc && filter-lto # GCC miscompiles LLVM, bug #873670 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" + -DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}") + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" + -DCLANG_CONFIG_FILE_SYSTEM_DIR="${EPREFIX}/etc/clang" # relative to bindir - -DCLANG_RESOURCE_DIR="../../../../lib/clang/${clang_version}" + -DCLANG_RESOURCE_DIR="../../../../lib/clang/${LLVM_MAJOR}" -DBUILD_SHARED_LIBS=OFF -DCLANG_LINK_CLANG_DYLIB=ON -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components) + -DCLANG_INCLUDE_TESTS=$(usex test) -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" - -DLLVM_BUILD_TESTS=$(usex test) # these are not propagated reliably, so redefine them -DLLVM_ENABLE_EH=ON @@ -257,19 +283,26 @@ multilib_src_configure() { # disable using CUDA to autodetect GPU, just build for all -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON + # disable linking to HSA to avoid automagic dep, + # load it dynamically instead + -DCMAKE_DISABLE_FIND_PACKAGE_hsa-runtime64=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_ENABLE_ARCMT=$(usex static-analyzer) -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) -DPython3_EXECUTABLE="${PYTHON}" ) + + if ! use elibc_musl; then + mycmakeargs+=( + -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=$(usex ieee-long-double) + ) + fi + use test && mycmakeargs+=( - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" + -DLLVM_BUILD_TESTS=ON -DLLVM_LIT_ARGS="$(get_lit_flags)" ) @@ -281,13 +314,21 @@ multilib_src_configure() { -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 ) + if use extra; then + mycmakeargs+=( + -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra" + ) + fi fi mycmakeargs+=( - -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra -DCLANG_INCLUDE_DOCS=${build_docs} + ) + fi + if multilib_native_use extra; then + mycmakeargs+=( + -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra -DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs} ) else @@ -303,11 +344,12 @@ multilib_src_configure() { fi if tc-is-cross-compiler; then - [[ -x "/usr/bin/clang-tblgen" ]] \ - || die "/usr/bin/clang-tblgen not found or usable" + has_version -b sys-devel/clang:${LLVM_MAJOR} || + die "sys-devel/clang:${LLVM_MAJOR} is required on the build host." + local tools_bin=${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin mycmakeargs+=( - -DCMAKE_CROSSCOMPILING=ON - -DCLANG_TABLEGEN=/usr/bin/clang-tblgen + -DLLVM_TOOLS_BINARY_DIR="${tools_bin}" + -DCLANG_TABLEGEN="${tools_bin}"/clang-tblgen ) fi @@ -335,9 +377,14 @@ multilib_src_compile() { 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 + local test_targets=( check-clang ) + if multilib_native_use extra; then + test_targets+=( + check-clang-tools + check-clangd + ) + fi + cmake_build "${test_targets[@]}" } src_install() { @@ -350,13 +397,12 @@ 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 + if use extra; then + mv "${T}"/clang-tidy "${ED}"/usr/include/ || die + fi + mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/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 @@ -370,26 +416,21 @@ src_install() { # - 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}" + rm "${ED}/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}" || die + dosym "clang-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}-${LLVM_MAJOR}" + dosym "${i}-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/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}" + dosym "${i}-${LLVM_MAJOR}" \ + "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}-${LLVM_MAJOR}" + dosym "${abi_chost}-${i}-${LLVM_MAJOR}" \ + "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}" done done - - # Remove unnecessary headers on FreeBSD, bug #417171 - if use kernel_FreeBSD; then - rm "${ED}"/usr/lib/clang/${clang_full_version}/include/{std,float,iso,limits,tgmath,varargs}*.h || die - fi } multilib_src_install() { @@ -398,22 +439,27 @@ multilib_src_install() { # 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 + mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die + mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die + if multilib_native_use extra; 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 + python_optimize "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/share/scan-view fi - docompress "/usr/lib/llvm/${SLOT}/share/man" + docompress "/usr/lib/llvm/${LLVM_MAJOR}/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" + use static-analyzer && fperms a-x "/usr/lib/llvm/${LLVM_MAJOR}/share/man/man1/scan-build.1" } pkg_postinst() { @@ -422,10 +468,12 @@ pkg_postinst() { 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" + elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/clang" + if use extra; then + 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" + fi } pkg_postrm() { diff --git a/sys-devel/clang/clang-13.0.0.9999.ebuild b/sys-devel/clang/clang-17.0.6.ebuild index 94348bbca42d..71d4d04a4823 100644 --- a/sys-devel/clang/clang-13.0.0.9999.ebuild +++ b/sys-devel/clang/clang-17.0.6.ebuild @@ -1,69 +1,60 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{7..9} ) -inherit cmake llvm llvm.org multilib-minimal pax-utils \ - prefix python-single-r1 toolchain-funcs +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake llvm llvm.org multilib multilib-minimal +inherit 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 CSKY M68k 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)" -KEYWORDS="" -IUSE="debug default-compiler-rt default-libcxx default-lld - doc +static-analyzer test xml kernel_FreeBSD ${ALL_LLVM_TARGETS[*]}" -REQUIRED_USE="${PYTHON_REQUIRED_USE} - || ( ${ALL_LLVM_TARGETS[*]} )" +SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" +KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~x64-macos" +IUSE="debug doc +extra ieee-long-double +pie +static-analyzer test xml" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" RESTRICT="!test? ( test )" -RDEPEND=" - ~sys-devel/llvm-${PV}:${SLOT}=[debug=,${MULTILIB_USEDEP}] +DEPEND=" + ~sys-devel/llvm-${PV}:${LLVM_MAJOR}=[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}" +" + +RDEPEND=" + ${PYTHON_DEPS} + ${DEPEND} + >=sys-devel/clang-common-${PV} +" BDEPEND=" - >=dev-util/cmake-3.16 - doc? ( dev-python/sphinx ) + ${PYTHON_DEPS} + doc? ( $(python_gen_cond_dep ' + dev-python/recommonmark[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') ) xml? ( virtual/pkgconfig ) - ${PYTHON_DEPS}" -RDEPEND="${RDEPEND} - !<sys-devel/llvm-4.0.0_rc:0 - !sys-devel/clang:0" +" 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 )" + sys-devel/clang-toolchain-symlinks:${LLVM_MAJOR} +" -LLVM_COMPONENTS=( clang clang-tools-extra ) -LLVM_MANPAGES=build +LLVM_COMPONENTS=( + clang clang-tools-extra cmake + llvm/lib/Transforms/Hello +) +LLVM_MANPAGES=1 +LLVM_PATCHSET=${PV}-r1 LLVM_TEST_COMPONENTS=( - llvm/lib/Testing/Support - llvm/utils/{lit,llvm-lit,unittest} - llvm/utils/{UpdateTestChecks,update_cc_test_checks.py} + llvm/utils ) -LLVM_PATCHSET=9999-1 +LLVM_USE_TARGETS=llvm llvm.org_set_globals # Multilib notes: @@ -78,7 +69,7 @@ llvm.org_set_globals # multilib clang* libraries (not runtime, not wrappers). pkg_setup() { - LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup + LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup python-single-r1_pkg_setup } @@ -91,8 +82,12 @@ 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 + + if ! use prefix-guest && [[ -n ${EPREFIX} ]]; then + sed -i "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" lib/Driver/ToolChains/Linux.cpp || die + fi } check_distribution_components() { @@ -110,10 +105,6 @@ check_distribution_components() { clang-libraries|distribution) continue ;; - # headers for clang-tidy static library - clang-tidy-headers) - continue - ;; # tools clang|clangd|clang-*) ;; @@ -129,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}" ) @@ -166,6 +157,27 @@ get_distribution_components() { clang-resource-headers libclang-headers + aarch64-resource-headers + arm-common-resource-headers + arm-resource-headers + core-resource-headers + cuda-resource-headers + hexagon-resource-headers + hip-resource-headers + hlsl-resource-headers + mips-resource-headers + opencl-resource-headers + openmp-resource-headers + ppc-htm-resource-headers + ppc-resource-headers + riscv-resource-headers + systemz-resource-headers + utility-resource-headers + ve-resource-headers + webassembly-resource-headers + windows-resource-headers + x86-resource-headers + # libs clang-cpp libclang @@ -178,49 +190,61 @@ get_distribution_components() { libclang-python-bindings # tools + amdgpu-arch c-index-test clang clang-format + clang-linker-wrapper clang-offload-bundler - clang-offload-wrapper + clang-offload-packager clang-refactor + clang-repl clang-rename clang-scan-deps diagtool hmaptool + nvptx-arch - # 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 + # needed for cross-compiling Clang + clang-tblgen ) - if llvm_are_manpages_built; then + if use extra; then out+=( - # manpages - docs-clang-man - docs-clang-tools-man + # extra tools + clang-apply-replacements + clang-change-namespace + clang-doc + clang-include-cleaner + clang-include-fixer + clang-move + clang-pseudo + clang-query + clang-reorder-fields + clang-tidy + clang-tidy-headers + clangd + find-all-symbols + modularize + pp-trace ) fi - use doc && out+=( - docs-clang-html - docs-clang-tools-html - ) + if llvm_are_manpages_built; then + out+=( docs-clang-man ) + use extra && out+=( docs-clang-tools-man ) + fi + + if use doc; then + out+=( docs-clang-html ) + use extra && out+=( docs-clang-tools-html ) + fi use static-analyzer && out+=( clang-check clang-extdef-mapping scan-build + scan-build-py scan-view ) fi @@ -229,47 +253,53 @@ get_distribution_components() { } 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" + -DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}") + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" + -DCLANG_CONFIG_FILE_SYSTEM_DIR="${EPREFIX}/etc/clang" # relative to bindir - -DCLANG_RESOURCE_DIR="../../../../lib/clang/${clang_version}" + -DCLANG_RESOURCE_DIR="../../../../lib/clang/${LLVM_MAJOR}" -DBUILD_SHARED_LIBS=OFF -DCLANG_LINK_CLANG_DYLIB=ON -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components) + -DCLANG_INCLUDE_TESTS=$(usex test) -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 + -DCMAKE_DISABLE_FIND_PACKAGE_CUDAToolkit=ON + # disable linking to HSA to avoid automagic dep, + # load it dynamically instead + -DCMAKE_DISABLE_FIND_PACKAGE_hsa-runtime64=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_ENABLE_LIBXML2=$(usex xml) -DCLANG_ENABLE_ARCMT=$(usex static-analyzer) -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) + # TODO: CLANG_ENABLE_HLSL? -DPython3_EXECUTABLE="${PYTHON}" ) + + if ! use elibc_musl; then + mycmakeargs+=( + -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=$(usex ieee-long-double) + ) + fi + use test && mycmakeargs+=( - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" + -DLLVM_BUILD_TESTS=ON -DLLVM_LIT_ARGS="$(get_lit_flags)" ) @@ -281,13 +311,21 @@ multilib_src_configure() { -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 ) + if use extra; then + mycmakeargs+=( + -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra" + ) + fi fi mycmakeargs+=( - -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra -DCLANG_INCLUDE_DOCS=${build_docs} + ) + fi + if multilib_native_use extra; then + mycmakeargs+=( + -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra -DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs} ) else @@ -303,11 +341,12 @@ multilib_src_configure() { fi if tc-is-cross-compiler; then - [[ -x "/usr/bin/clang-tblgen" ]] \ - || die "/usr/bin/clang-tblgen not found or usable" + has_version -b sys-devel/clang:${LLVM_MAJOR} || + die "sys-devel/clang:${LLVM_MAJOR} is required on the build host." + local tools_bin=${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin mycmakeargs+=( - -DCMAKE_CROSSCOMPILING=ON - -DCLANG_TABLEGEN=/usr/bin/clang-tblgen + -DLLVM_TOOLS_BINARY_DIR="${tools_bin}" + -DCLANG_TABLEGEN="${tools_bin}"/clang-tblgen ) fi @@ -324,20 +363,19 @@ multilib_src_configure() { 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 + local test_targets=( check-clang ) + if multilib_native_use extra; then + test_targets+=( + check-clang-tools + check-clangd + ) + fi + cmake_build "${test_targets[@]}" } src_install() { @@ -350,13 +388,12 @@ 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 + if use extra; then + mv "${T}"/clang-tidy "${ED}"/usr/include/ || die + fi + mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/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 @@ -370,26 +407,21 @@ src_install() { # - 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}" + rm "${ED}/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}" || die + dosym "clang-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}-${LLVM_MAJOR}" + dosym "${i}-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/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}" + dosym "${i}-${LLVM_MAJOR}" \ + "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}-${LLVM_MAJOR}" + dosym "${abi_chost}-${i}-${LLVM_MAJOR}" \ + "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}" done done - - # Remove unnecessary headers on FreeBSD, bug #417171 - if use kernel_FreeBSD; then - rm "${ED}"/usr/lib/clang/${clang_full_version}/include/{std,float,iso,limits,tgmath,varargs}*.h || die - fi } multilib_src_install() { @@ -398,22 +430,27 @@ multilib_src_install() { # 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 + mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die + mv "${ED}"/usr/lib/clang "${ED}"/usr/include/clangrt || die + if multilib_native_use extra; 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 + python_optimize "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/share/scan-view fi - docompress "/usr/lib/llvm/${SLOT}/share/man" + docompress "/usr/lib/llvm/${LLVM_MAJOR}/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" + use static-analyzer && fperms a-x "/usr/lib/llvm/${LLVM_MAJOR}/share/man/man1/scan-build.1" } pkg_postinst() { @@ -422,10 +459,12 @@ pkg_postinst() { 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" + elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/clang" + if use extra; then + 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" + fi } pkg_postrm() { diff --git a/sys-devel/clang/clang-18.1.4.ebuild b/sys-devel/clang/clang-18.1.4.ebuild new file mode 100644 index 000000000000..142fc3861de3 --- /dev/null +++ b/sys-devel/clang/clang-18.1.4.ebuild @@ -0,0 +1,476 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake llvm.org llvm-utils multilib multilib-minimal +inherit 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="${LLVM_MAJOR}/${LLVM_SOABI}" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~x64-macos" +IUSE="debug doc +extra ieee-long-double +pie +static-analyzer test xml" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +DEPEND=" + ~sys-devel/llvm-${PV}:${LLVM_MAJOR}=[debug=,${MULTILIB_USEDEP}] + static-analyzer? ( dev-lang/perl:* ) + xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) +" + +RDEPEND=" + ${PYTHON_DEPS} + ${DEPEND} + >=sys-devel/clang-common-${PV} +" +BDEPEND=" + ${PYTHON_DEPS} + test? ( ~sys-devel/lld-${PV} ) + xml? ( virtual/pkgconfig ) +" +PDEPEND=" + ~sys-devel/clang-runtime-${PV} + sys-devel/clang-toolchain-symlinks:${LLVM_MAJOR} +" + +LLVM_COMPONENTS=( + clang clang-tools-extra cmake + llvm/lib/Transforms/Hello +) +LLVM_MANPAGES=1 +LLVM_TEST_COMPONENTS=( + llvm/utils +) +LLVM_USE_TARGETS=llvm +llvm.org_set_globals + +[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" doc? ( " +BDEPEND+=" + $(python_gen_cond_dep ' + dev-python/myst-parser[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') +" +[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" ) " + +# 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). + +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 + + if ! use prefix-guest && [[ -n ${EPREFIX} ]]; then + sed -i "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" lib/Driver/ToolChains/Linux.cpp || die + 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 + # 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 + + aarch64-resource-headers + arm-common-resource-headers + arm-resource-headers + core-resource-headers + cuda-resource-headers + hexagon-resource-headers + hip-resource-headers + hlsl-resource-headers + mips-resource-headers + opencl-resource-headers + openmp-resource-headers + ppc-htm-resource-headers + ppc-resource-headers + riscv-resource-headers + systemz-resource-headers + utility-resource-headers + ve-resource-headers + webassembly-resource-headers + windows-resource-headers + x86-resource-headers + + # libs + clang-cpp + libclang + ) + + if multilib_is_native_abi; then + out+=( + # common stuff + bash-autocomplete + libclang-python-bindings + + # tools + amdgpu-arch + c-index-test + clang + clang-format + clang-linker-wrapper + clang-offload-bundler + clang-offload-packager + clang-refactor + clang-repl + clang-rename + clang-scan-deps + diagtool + hmaptool + nvptx-arch + + # needed for cross-compiling Clang + clang-tblgen + ) + + if use extra; then + out+=( + # extra tools + clang-apply-replacements + clang-change-namespace + clang-doc + clang-include-cleaner + clang-include-fixer + clang-move + clang-pseudo + clang-query + clang-reorder-fields + clang-tidy + clang-tidy-headers + clangd + find-all-symbols + modularize + pp-trace + ) + fi + + if llvm_are_manpages_built; then + out+=( docs-clang-man ) + use extra && out+=( docs-clang-tools-man ) + fi + + if use doc; then + out+=( docs-clang-html ) + use extra && out+=( docs-clang-tools-html ) + fi + + use static-analyzer && out+=( + clang-check + clang-extdef-mapping + scan-build + scan-build-py + scan-view + ) + fi + + printf "%s${sep}" "${out[@]}" +} + +multilib_src_configure() { + llvm_prepend_path "${LLVM_MAJOR}" + + local mycmakeargs=( + -DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}") + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" + -DCLANG_CONFIG_FILE_SYSTEM_DIR="${EPREFIX}/etc/clang" + # relative to bindir + -DCLANG_RESOURCE_DIR="../../../../lib/clang/${LLVM_MAJOR}" + + -DBUILD_SHARED_LIBS=OFF + -DCLANG_LINK_CLANG_DYLIB=ON + -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components) + -DCLANG_INCLUDE_TESTS=$(usex test) + + -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" + + # these are not propagated reliably, so redefine them + -DLLVM_ENABLE_EH=ON + -DLLVM_ENABLE_RTTI=ON + + # 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_CUDAToolkit=ON + # disable linking to HSA to avoid automagic dep, + # load it dynamically instead + -DCMAKE_DISABLE_FIND_PACKAGE_hsa-runtime64=ON + + -DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie) + + -DCLANG_ENABLE_LIBXML2=$(usex xml) + -DCLANG_ENABLE_ARCMT=$(usex static-analyzer) + -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) + # TODO: CLANG_ENABLE_HLSL? + + -DPython3_EXECUTABLE="${PYTHON}" + ) + + if ! use elibc_musl; then + mycmakeargs+=( + -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=$(usex ieee-long-double) + ) + fi + + use test && mycmakeargs+=( + -DLLVM_BUILD_TESTS=ON + -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" + -DSPHINX_WARNINGS_AS_ERRORS=OFF + ) + if use extra; then + mycmakeargs+=( + -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra" + ) + fi + fi + mycmakeargs+=( + -DCLANG_INCLUDE_DOCS=${build_docs} + ) + fi + if multilib_native_use extra; then + mycmakeargs+=( + -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra + -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 + has_version -b sys-devel/clang:${LLVM_MAJOR} || + die "sys-devel/clang:${LLVM_MAJOR} is required on the build host." + local tools_bin=${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin + mycmakeargs+=( + -DLLVM_TOOLS_BINARY_DIR="${tools_bin}" + -DCLANG_TABLEGEN="${tools_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 +} + +multilib_src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + local test_targets=( check-clang ) + if multilib_native_use extra; then + test_targets+=( + check-clang-tools + check-clangd + ) + fi + cmake_build "${test_targets[@]}" +} + +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 + if use extra; then + mv "${T}"/clang-tidy "${ED}"/usr/include/ || die + fi + mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die + + # Apply CHOST and version suffix to clang tools + 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/${LLVM_MAJOR}/bin/${i}" || die + dosym "clang-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}-${LLVM_MAJOR}" + dosym "${i}-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/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}-${LLVM_MAJOR}" \ + "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}-${LLVM_MAJOR}" + dosym "${abi_chost}-${i}-${LLVM_MAJOR}" \ + "/usr/lib/llvm/${LLVM_MAJOR}/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/${LLVM_MAJOR}/include "${ED}"/usr/include || die + mv "${ED}"/usr/lib/clang "${ED}"/usr/include/clangrt || die + if multilib_native_use extra; 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/${LLVM_MAJOR}/share/scan-view + fi + + docompress "/usr/lib/llvm/${LLVM_MAJOR}/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/${LLVM_MAJOR}/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/${LLVM_MAJOR}/share/clang" + if use extra; then + 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" + fi +} + +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-11.1.0.ebuild b/sys-devel/clang/clang-19.0.0.9999.ebuild index ba76e14ffdba..79df96923121 100644 --- a/sys-devel/clang/clang-11.1.0.ebuild +++ b/sys-devel/clang/clang-19.0.0.9999.ebuild @@ -1,71 +1,66 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{7..9} ) -inherit cmake llvm llvm.org multilib-minimal pax-utils \ - prefix python-single-r1 toolchain-funcs +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake llvm.org llvm-utils multilib multilib-minimal +inherit 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 kernel_FreeBSD ${ALL_LLVM_TARGETS[*]}" -REQUIRED_USE="${PYTHON_REQUIRED_USE} - || ( ${ALL_LLVM_TARGETS[*]} )" +SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" +IUSE="+debug doc +extra ieee-long-double +pie +static-analyzer test xml" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" RESTRICT="!test? ( test )" -RDEPEND=" - ~sys-devel/llvm-${PV}:${SLOT%/*}=[debug=,${MULTILIB_USEDEP}] +DEPEND=" + ~sys-devel/llvm-${PV}:${LLVM_MAJOR}=[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}" +" + +RDEPEND=" + ${PYTHON_DEPS} + ${DEPEND} + >=sys-devel/clang-common-${PV} +" BDEPEND=" - >=dev-util/cmake-3.16 - doc? ( dev-python/sphinx ) + ${PYTHON_DEPS} + test? ( ~sys-devel/lld-${PV} ) xml? ( virtual/pkgconfig ) - ${PYTHON_DEPS}" -RDEPEND="${RDEPEND} - !<sys-devel/llvm-4.0.0_rc:0 - !sys-devel/clang:0" +" 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 )" + sys-devel/clang-toolchain-symlinks:${LLVM_MAJOR} +" -LLVM_COMPONENTS=( clang clang-tools-extra ) -LLVM_MANPAGES=pregenerated +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/utils ) -LLVM_PATCHSET=11.1.0-1 +LLVM_USE_TARGETS=llvm llvm.org_set_globals +[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" doc? ( " +BDEPEND+=" + $(python_gen_cond_dep ' + dev-python/myst-parser[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') +" +[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" ) " + # 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 @@ -77,11 +72,6 @@ llvm.org_set_globals # 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 @@ -89,12 +79,14 @@ src_prepare() { 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/Lex/InitHeaderSearch.cpp \ lib/Driver/ToolChains/Darwin.cpp || die + + if ! use prefix-guest && [[ -n ${EPREFIX} ]]; then + sed -i "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" lib/Driver/ToolChains/Linux.cpp || die + fi } check_distribution_components() { @@ -112,10 +104,6 @@ check_distribution_components() { clang-libraries|distribution) continue ;; - # headers for clang-tidy static library - clang-tidy-headers) - continue - ;; # tools clang|clangd|clang-*) ;; @@ -131,7 +119,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}" ) @@ -168,6 +156,27 @@ get_distribution_components() { clang-resource-headers libclang-headers + aarch64-resource-headers + arm-common-resource-headers + arm-resource-headers + core-resource-headers + cuda-resource-headers + hexagon-resource-headers + hip-resource-headers + hlsl-resource-headers + mips-resource-headers + opencl-resource-headers + openmp-resource-headers + ppc-htm-resource-headers + ppc-resource-headers + riscv-resource-headers + systemz-resource-headers + utility-resource-headers + ve-resource-headers + webassembly-resource-headers + windows-resource-headers + x86-resource-headers + # libs clang-cpp libclang @@ -180,49 +189,61 @@ get_distribution_components() { libclang-python-bindings # tools + amdgpu-arch c-index-test clang clang-format + clang-linker-wrapper clang-offload-bundler - clang-offload-wrapper + clang-offload-packager clang-refactor + clang-repl clang-rename clang-scan-deps diagtool hmaptool + nvptx-arch - # 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 + # needed for cross-compiling Clang + clang-tblgen ) - if llvm_are_manpages_built; then + if use extra; then out+=( - # manpages - docs-clang-man - docs-clang-tools-man + # extra tools + clang-apply-replacements + clang-change-namespace + clang-doc + clang-include-cleaner + clang-include-fixer + clang-move + clang-pseudo + clang-query + clang-reorder-fields + clang-tidy + clang-tidy-headers + clangd + find-all-symbols + modularize + pp-trace ) fi - use doc && out+=( - docs-clang-html - docs-clang-tools-html - ) + if llvm_are_manpages_built; then + out+=( docs-clang-man ) + use extra && out+=( docs-clang-tools-man ) + fi + + if use doc; then + out+=( docs-clang-html ) + use extra && out+=( docs-clang-tools-html ) + fi use static-analyzer && out+=( clang-check clang-extdef-mapping scan-build + scan-build-py scan-view ) fi @@ -231,44 +252,55 @@ get_distribution_components() { } multilib_src_configure() { - local llvm_version=$(llvm-config --version) || die - local clang_version=$(ver_cut 1-3 "${llvm_version}") + llvm_prepend_path "${LLVM_MAJOR}" 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" + -DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}") + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" + -DCLANG_CONFIG_FILE_SYSTEM_DIR="${EPREFIX}/etc/clang" # relative to bindir - -DCLANG_RESOURCE_DIR="../../../../lib/clang/${clang_version}" + -DCLANG_RESOURCE_DIR="../../../../lib/clang/${LLVM_MAJOR}" -DBUILD_SHARED_LIBS=OFF -DCLANG_LINK_CLANG_DYLIB=ON -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components) + -DCLANG_INCLUDE_TESTS=$(usex test) -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 "") + # disable using CUDA to autodetect GPU, just build for all + -DCMAKE_DISABLE_FIND_PACKAGE_CUDAToolkit=ON + # disable linking to HSA to avoid automagic dep, + # load it dynamically instead + -DCMAKE_DISABLE_FIND_PACKAGE_hsa-runtime64=ON + -DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie) + + -DCLANG_ENABLE_LIBXML2=$(usex xml) -DCLANG_ENABLE_ARCMT=$(usex static-analyzer) -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) + # TODO: CLANG_ENABLE_HLSL? -DPython3_EXECUTABLE="${PYTHON}" ) + + if ! use elibc_musl; then + mycmakeargs+=( + -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=$(usex ieee-long-double) + ) + fi + use test && mycmakeargs+=( - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" + -DLLVM_BUILD_TESTS=ON -DLLVM_LIT_ARGS="$(get_lit_flags)" ) @@ -280,15 +312,21 @@ multilib_src_configure() { -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 ) + if use extra; then + mycmakeargs+=( + -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra" + ) + fi fi - mycmakeargs+=( - # normally copied from LLVM_INCLUDE_DOCS but the latter - # is lacking value in stand-alone builds -DCLANG_INCLUDE_DOCS=${build_docs} + ) + fi + if multilib_native_use extra; then + mycmakeargs+=( + -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra -DCLANG_TOOLS_EXTRA_INCLUDE_DOCS=${build_docs} ) else @@ -304,11 +342,12 @@ multilib_src_configure() { fi if tc-is-cross-compiler; then - [[ -x "/usr/bin/clang-tblgen" ]] \ - || die "/usr/bin/clang-tblgen not found or usable" + has_version -b sys-devel/clang:${LLVM_MAJOR} || + die "sys-devel/clang:${LLVM_MAJOR} is required on the build host." + local tools_bin=${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin mycmakeargs+=( - -DCMAKE_CROSSCOMPILING=ON - -DCLANG_TABLEGEN=/usr/bin/clang-tblgen + -DLLVM_TOOLS_BINARY_DIR="${tools_bin}" + -DCLANG_TABLEGEN="${tools_bin}"/clang-tblgen ) fi @@ -325,20 +364,19 @@ multilib_src_configure() { 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 + local test_targets=( check-clang ) + if multilib_native_use extra; then + test_targets+=( + check-clang-tools + check-clangd + ) + fi + cmake_build "${test_targets[@]}" } src_install() { @@ -351,13 +389,12 @@ 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 + if use extra; then + mv "${T}"/clang-tidy "${ED}"/usr/include/ || die + fi + mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/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 @@ -371,26 +408,21 @@ src_install() { # - 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}" + rm "${ED}/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}" || die + dosym "clang-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}-${LLVM_MAJOR}" + dosym "${i}-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/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}" + dosym "${i}-${LLVM_MAJOR}" \ + "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}-${LLVM_MAJOR}" + dosym "${abi_chost}-${i}-${LLVM_MAJOR}" \ + "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}" done done - - # Remove unnecessary headers on FreeBSD, bug #417171 - if use kernel_FreeBSD; then - rm "${ED}"/usr/lib/clang/${clang_full_version}/include/{std,float,iso,limits,tgmath,varargs}*.h || die - fi } multilib_src_install() { @@ -399,22 +431,27 @@ multilib_src_install() { # 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 + mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die + mv "${ED}"/usr/lib/clang "${ED}"/usr/include/clangrt || die + if multilib_native_use extra; 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 + python_optimize "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/share/scan-view fi - docompress "/usr/lib/llvm/${SLOT%/*}/share/man" + docompress "/usr/lib/llvm/${LLVM_MAJOR}/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" + use static-analyzer && fperms a-x "/usr/lib/llvm/${LLVM_MAJOR}/share/man/man1/scan-build.1" } pkg_postinst() { @@ -423,10 +460,12 @@ pkg_postinst() { 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" + elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/share/clang" + if use extra; then + 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" + fi } pkg_postrm() { diff --git a/sys-devel/clang/clang-19.0.0_pre20240410.ebuild b/sys-devel/clang/clang-19.0.0_pre20240410.ebuild new file mode 100644 index 000000000000..79df96923121 --- /dev/null +++ b/sys-devel/clang/clang-19.0.0_pre20240410.ebuild @@ -0,0 +1,475 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake llvm.org llvm-utils multilib multilib-minimal +inherit 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="${LLVM_MAJOR}/${LLVM_SOABI}" +IUSE="+debug doc +extra ieee-long-double +pie +static-analyzer test xml" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +DEPEND=" + ~sys-devel/llvm-${PV}:${LLVM_MAJOR}=[debug=,${MULTILIB_USEDEP}] + static-analyzer? ( dev-lang/perl:* ) + xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) +" + +RDEPEND=" + ${PYTHON_DEPS} + ${DEPEND} + >=sys-devel/clang-common-${PV} +" +BDEPEND=" + ${PYTHON_DEPS} + test? ( ~sys-devel/lld-${PV} ) + xml? ( virtual/pkgconfig ) +" +PDEPEND=" + ~sys-devel/clang-runtime-${PV} + sys-devel/clang-toolchain-symlinks:${LLVM_MAJOR} +" + +LLVM_COMPONENTS=( + clang clang-tools-extra cmake + llvm/lib/Transforms/Hello +) +LLVM_MANPAGES=1 +LLVM_TEST_COMPONENTS=( + llvm/utils +) +LLVM_USE_TARGETS=llvm +llvm.org_set_globals + +[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" doc? ( " +BDEPEND+=" + $(python_gen_cond_dep ' + dev-python/myst-parser[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') +" +[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" ) " + +# 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). + +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 + + if ! use prefix-guest && [[ -n ${EPREFIX} ]]; then + sed -i "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" lib/Driver/ToolChains/Linux.cpp || die + 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 + # 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 + + aarch64-resource-headers + arm-common-resource-headers + arm-resource-headers + core-resource-headers + cuda-resource-headers + hexagon-resource-headers + hip-resource-headers + hlsl-resource-headers + mips-resource-headers + opencl-resource-headers + openmp-resource-headers + ppc-htm-resource-headers + ppc-resource-headers + riscv-resource-headers + systemz-resource-headers + utility-resource-headers + ve-resource-headers + webassembly-resource-headers + windows-resource-headers + x86-resource-headers + + # libs + clang-cpp + libclang + ) + + if multilib_is_native_abi; then + out+=( + # common stuff + bash-autocomplete + libclang-python-bindings + + # tools + amdgpu-arch + c-index-test + clang + clang-format + clang-linker-wrapper + clang-offload-bundler + clang-offload-packager + clang-refactor + clang-repl + clang-rename + clang-scan-deps + diagtool + hmaptool + nvptx-arch + + # needed for cross-compiling Clang + clang-tblgen + ) + + if use extra; then + out+=( + # extra tools + clang-apply-replacements + clang-change-namespace + clang-doc + clang-include-cleaner + clang-include-fixer + clang-move + clang-pseudo + clang-query + clang-reorder-fields + clang-tidy + clang-tidy-headers + clangd + find-all-symbols + modularize + pp-trace + ) + fi + + if llvm_are_manpages_built; then + out+=( docs-clang-man ) + use extra && out+=( docs-clang-tools-man ) + fi + + if use doc; then + out+=( docs-clang-html ) + use extra && out+=( docs-clang-tools-html ) + fi + + use static-analyzer && out+=( + clang-check + clang-extdef-mapping + scan-build + scan-build-py + scan-view + ) + fi + + printf "%s${sep}" "${out[@]}" +} + +multilib_src_configure() { + llvm_prepend_path "${LLVM_MAJOR}" + + local mycmakeargs=( + -DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}") + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" + -DCLANG_CONFIG_FILE_SYSTEM_DIR="${EPREFIX}/etc/clang" + # relative to bindir + -DCLANG_RESOURCE_DIR="../../../../lib/clang/${LLVM_MAJOR}" + + -DBUILD_SHARED_LIBS=OFF + -DCLANG_LINK_CLANG_DYLIB=ON + -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components) + -DCLANG_INCLUDE_TESTS=$(usex test) + + -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" + + # these are not propagated reliably, so redefine them + -DLLVM_ENABLE_EH=ON + -DLLVM_ENABLE_RTTI=ON + + # 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_CUDAToolkit=ON + # disable linking to HSA to avoid automagic dep, + # load it dynamically instead + -DCMAKE_DISABLE_FIND_PACKAGE_hsa-runtime64=ON + + -DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie) + + -DCLANG_ENABLE_LIBXML2=$(usex xml) + -DCLANG_ENABLE_ARCMT=$(usex static-analyzer) + -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) + # TODO: CLANG_ENABLE_HLSL? + + -DPython3_EXECUTABLE="${PYTHON}" + ) + + if ! use elibc_musl; then + mycmakeargs+=( + -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=$(usex ieee-long-double) + ) + fi + + use test && mycmakeargs+=( + -DLLVM_BUILD_TESTS=ON + -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" + -DSPHINX_WARNINGS_AS_ERRORS=OFF + ) + if use extra; then + mycmakeargs+=( + -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra" + ) + fi + fi + mycmakeargs+=( + -DCLANG_INCLUDE_DOCS=${build_docs} + ) + fi + if multilib_native_use extra; then + mycmakeargs+=( + -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra + -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 + has_version -b sys-devel/clang:${LLVM_MAJOR} || + die "sys-devel/clang:${LLVM_MAJOR} is required on the build host." + local tools_bin=${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin + mycmakeargs+=( + -DLLVM_TOOLS_BINARY_DIR="${tools_bin}" + -DCLANG_TABLEGEN="${tools_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 +} + +multilib_src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + local test_targets=( check-clang ) + if multilib_native_use extra; then + test_targets+=( + check-clang-tools + check-clangd + ) + fi + cmake_build "${test_targets[@]}" +} + +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 + if use extra; then + mv "${T}"/clang-tidy "${ED}"/usr/include/ || die + fi + mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die + + # Apply CHOST and version suffix to clang tools + 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/${LLVM_MAJOR}/bin/${i}" || die + dosym "clang-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}-${LLVM_MAJOR}" + dosym "${i}-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/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}-${LLVM_MAJOR}" \ + "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}-${LLVM_MAJOR}" + dosym "${abi_chost}-${i}-${LLVM_MAJOR}" \ + "/usr/lib/llvm/${LLVM_MAJOR}/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/${LLVM_MAJOR}/include "${ED}"/usr/include || die + mv "${ED}"/usr/lib/clang "${ED}"/usr/include/clangrt || die + if multilib_native_use extra; 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/${LLVM_MAJOR}/share/scan-view + fi + + docompress "/usr/lib/llvm/${LLVM_MAJOR}/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/${LLVM_MAJOR}/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/${LLVM_MAJOR}/share/clang" + if use extra; then + 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" + fi +} + +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-19.0.0_pre20240420.ebuild b/sys-devel/clang/clang-19.0.0_pre20240420.ebuild new file mode 100644 index 000000000000..79df96923121 --- /dev/null +++ b/sys-devel/clang/clang-19.0.0_pre20240420.ebuild @@ -0,0 +1,475 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake llvm.org llvm-utils multilib multilib-minimal +inherit 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="${LLVM_MAJOR}/${LLVM_SOABI}" +IUSE="+debug doc +extra ieee-long-double +pie +static-analyzer test xml" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +DEPEND=" + ~sys-devel/llvm-${PV}:${LLVM_MAJOR}=[debug=,${MULTILIB_USEDEP}] + static-analyzer? ( dev-lang/perl:* ) + xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) +" + +RDEPEND=" + ${PYTHON_DEPS} + ${DEPEND} + >=sys-devel/clang-common-${PV} +" +BDEPEND=" + ${PYTHON_DEPS} + test? ( ~sys-devel/lld-${PV} ) + xml? ( virtual/pkgconfig ) +" +PDEPEND=" + ~sys-devel/clang-runtime-${PV} + sys-devel/clang-toolchain-symlinks:${LLVM_MAJOR} +" + +LLVM_COMPONENTS=( + clang clang-tools-extra cmake + llvm/lib/Transforms/Hello +) +LLVM_MANPAGES=1 +LLVM_TEST_COMPONENTS=( + llvm/utils +) +LLVM_USE_TARGETS=llvm +llvm.org_set_globals + +[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" doc? ( " +BDEPEND+=" + $(python_gen_cond_dep ' + dev-python/myst-parser[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') +" +[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" ) " + +# 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). + +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 + + if ! use prefix-guest && [[ -n ${EPREFIX} ]]; then + sed -i "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" lib/Driver/ToolChains/Linux.cpp || die + 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 + # 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 + + aarch64-resource-headers + arm-common-resource-headers + arm-resource-headers + core-resource-headers + cuda-resource-headers + hexagon-resource-headers + hip-resource-headers + hlsl-resource-headers + mips-resource-headers + opencl-resource-headers + openmp-resource-headers + ppc-htm-resource-headers + ppc-resource-headers + riscv-resource-headers + systemz-resource-headers + utility-resource-headers + ve-resource-headers + webassembly-resource-headers + windows-resource-headers + x86-resource-headers + + # libs + clang-cpp + libclang + ) + + if multilib_is_native_abi; then + out+=( + # common stuff + bash-autocomplete + libclang-python-bindings + + # tools + amdgpu-arch + c-index-test + clang + clang-format + clang-linker-wrapper + clang-offload-bundler + clang-offload-packager + clang-refactor + clang-repl + clang-rename + clang-scan-deps + diagtool + hmaptool + nvptx-arch + + # needed for cross-compiling Clang + clang-tblgen + ) + + if use extra; then + out+=( + # extra tools + clang-apply-replacements + clang-change-namespace + clang-doc + clang-include-cleaner + clang-include-fixer + clang-move + clang-pseudo + clang-query + clang-reorder-fields + clang-tidy + clang-tidy-headers + clangd + find-all-symbols + modularize + pp-trace + ) + fi + + if llvm_are_manpages_built; then + out+=( docs-clang-man ) + use extra && out+=( docs-clang-tools-man ) + fi + + if use doc; then + out+=( docs-clang-html ) + use extra && out+=( docs-clang-tools-html ) + fi + + use static-analyzer && out+=( + clang-check + clang-extdef-mapping + scan-build + scan-build-py + scan-view + ) + fi + + printf "%s${sep}" "${out[@]}" +} + +multilib_src_configure() { + llvm_prepend_path "${LLVM_MAJOR}" + + local mycmakeargs=( + -DDEFAULT_SYSROOT=$(usex prefix-guest "" "${EPREFIX}") + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" + -DCLANG_CONFIG_FILE_SYSTEM_DIR="${EPREFIX}/etc/clang" + # relative to bindir + -DCLANG_RESOURCE_DIR="../../../../lib/clang/${LLVM_MAJOR}" + + -DBUILD_SHARED_LIBS=OFF + -DCLANG_LINK_CLANG_DYLIB=ON + -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components) + -DCLANG_INCLUDE_TESTS=$(usex test) + + -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" + + # these are not propagated reliably, so redefine them + -DLLVM_ENABLE_EH=ON + -DLLVM_ENABLE_RTTI=ON + + # 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_CUDAToolkit=ON + # disable linking to HSA to avoid automagic dep, + # load it dynamically instead + -DCMAKE_DISABLE_FIND_PACKAGE_hsa-runtime64=ON + + -DCLANG_DEFAULT_PIE_ON_LINUX=$(usex pie) + + -DCLANG_ENABLE_LIBXML2=$(usex xml) + -DCLANG_ENABLE_ARCMT=$(usex static-analyzer) + -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) + # TODO: CLANG_ENABLE_HLSL? + + -DPython3_EXECUTABLE="${PYTHON}" + ) + + if ! use elibc_musl; then + mycmakeargs+=( + -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=$(usex ieee-long-double) + ) + fi + + use test && mycmakeargs+=( + -DLLVM_BUILD_TESTS=ON + -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" + -DSPHINX_WARNINGS_AS_ERRORS=OFF + ) + if use extra; then + mycmakeargs+=( + -DCLANG-TOOLS_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/tools-extra" + ) + fi + fi + mycmakeargs+=( + -DCLANG_INCLUDE_DOCS=${build_docs} + ) + fi + if multilib_native_use extra; then + mycmakeargs+=( + -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR="${WORKDIR}"/clang-tools-extra + -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 + has_version -b sys-devel/clang:${LLVM_MAJOR} || + die "sys-devel/clang:${LLVM_MAJOR} is required on the build host." + local tools_bin=${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin + mycmakeargs+=( + -DLLVM_TOOLS_BINARY_DIR="${tools_bin}" + -DCLANG_TABLEGEN="${tools_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 +} + +multilib_src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + local test_targets=( check-clang ) + if multilib_native_use extra; then + test_targets+=( + check-clang-tools + check-clangd + ) + fi + cmake_build "${test_targets[@]}" +} + +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 + if use extra; then + mv "${T}"/clang-tidy "${ED}"/usr/include/ || die + fi + mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die + + # Apply CHOST and version suffix to clang tools + 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/${LLVM_MAJOR}/bin/${i}" || die + dosym "clang-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/bin/${i}-${LLVM_MAJOR}" + dosym "${i}-${LLVM_MAJOR}" "/usr/lib/llvm/${LLVM_MAJOR}/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}-${LLVM_MAJOR}" \ + "/usr/lib/llvm/${LLVM_MAJOR}/bin/${abi_chost}-${i}-${LLVM_MAJOR}" + dosym "${abi_chost}-${i}-${LLVM_MAJOR}" \ + "/usr/lib/llvm/${LLVM_MAJOR}/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/${LLVM_MAJOR}/include "${ED}"/usr/include || die + mv "${ED}"/usr/lib/clang "${ED}"/usr/include/clangrt || die + if multilib_native_use extra; 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/${LLVM_MAJOR}/share/scan-view + fi + + docompress "/usr/lib/llvm/${LLVM_MAJOR}/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/${LLVM_MAJOR}/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/${LLVM_MAJOR}/share/clang" + if use extra; then + 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" + fi +} + +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/metadata.xml b/sys-devel/clang/metadata.xml index 8ccb21d3a05f..07d06647c9a6 100644 --- a/sys-devel/clang/metadata.xml +++ b/sys-devel/clang/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>llvm@gentoo.org</email> @@ -27,9 +27,11 @@ A simple and hackable code base A single unified parser for C, Objective C, C++, and Objective C++ Conformance with C/C++/ObjC and their variants</longdescription> <use> - <flag name="default-compiler-rt">Use compiler-rt instead of libgcc as the default rtlib for clang</flag> - <flag name="default-libcxx">Use libc++ instead of libstdc++ as the default stdlib for clang</flag> - <flag name="default-lld">Use lld as the default linker for clang</flag> + <flag name="extra">Build extra tools (clangd, clang-tidy and a few more)</flag> + <flag name="ieee-long-double">Use accelerated 128-bit IEEE long double ABI (ppc64le only)</flag> <flag name="static-analyzer">Install the Clang static analyzer</flag> </use> + <upstream> + <remote-id type="github">llvm/llvm-project</remote-id> + </upstream> </pkgmetadata> diff --git a/sys-devel/cons/Manifest b/sys-devel/cons/Manifest deleted file mode 100644 index 167672cc3290..000000000000 --- a/sys-devel/cons/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST cons-2.3.0.tgz 235895 BLAKE2B 766b00824ede528c5d356eda40d3b2929b472720340c0f85add95ba13a5b172afaaa50c779e664cca1b5e74f9ed1d26cce8405f7994d9464a0693e5828963863 SHA512 a42b7537fa8c8cc179ff9e608e6cecfaec1ee0b2e1efb9b9b5992ced15867ca05155e87221e5fde6d912b94eac0d1a411c7feb528e882ed65ce9fb2a2d46be12 diff --git a/sys-devel/cons/cons-2.3.0.ebuild b/sys-devel/cons/cons-2.3.0.ebuild deleted file mode 100644 index 717660db880b..000000000000 --- a/sys-devel/cons/cons-2.3.0.ebuild +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -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} - !sci-biology/emboss" - -src_install() { - dobin cons - dodoc CHANGES INSTALL MANIFEST README RELEASE TODO - docinto html - dodoc *.html - doman cons.1.gz -} diff --git a/sys-devel/cons/metadata.xml b/sys-devel/cons/metadata.xml deleted file mode 100644 index 56c124413057..000000000000 --- a/sys-devel/cons/metadata.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<maintainer type="project"> - <email>base-system@gentoo.org</email> - <name>Gentoo Base System</name> -</maintainer> -</pkgmetadata> diff --git a/sys-devel/cproc/Manifest b/sys-devel/cproc/Manifest new file mode 100644 index 000000000000..3bb5cf1ed1d2 --- /dev/null +++ b/sys-devel/cproc/Manifest @@ -0,0 +1 @@ +DIST cproc-6fabc79d81de56b6c1cdcc2242933fd792e2ddf9.tar.gz 80893 BLAKE2B f708649714f0fbc3e7b60dc87585603970eb350de4ce1f02fe9b5783714ef09fa38b4b4ec7a8b0553047e84edc0f752963c84df32dacd9585c435098e57be47c SHA512 355e3ca8fb481d9e32d0621787beee7b0e6f53f107bbb9512f89382c599daa581b89e7da3957c09b81a994ebce9f06df08df0833b010b055a8ff947c8cc8d02e diff --git a/sys-devel/cproc/cproc-0_pre20220805.ebuild b/sys-devel/cproc/cproc-0_pre20220805.ebuild new file mode 100644 index 000000000000..163ffe80afba --- /dev/null +++ b/sys-devel/cproc/cproc-0_pre20220805.ebuild @@ -0,0 +1,39 @@ +# Copyright 2021-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit edo toolchain-funcs + +if [[ ${PV} = 9999 ]]; then + EGIT_REPO_URI="https://git.sr.ht/~mcf/cproc" + inherit git-r3 +else + CPROC_COMMIT="6fabc79d81de56b6c1cdcc2242933fd792e2ddf9" + CPROC_P="${PN}-${CPROC_COMMIT}" + SRC_URI="https://git.sr.ht/~mcf/cproc/archive/${CPROC_COMMIT}.tar.gz -> ${CPROC_P}.tar.gz" + S="${WORKDIR}/${CPROC_P}" + + KEYWORDS="~amd64 ~arm64 ~riscv" +fi + +DESCRIPTION="C11 compiler using QBE as backend" +HOMEPAGE="https://sr.ht/~mcf/cproc/" + +LICENSE="ISC" +SLOT="0" + +DEPEND="sys-devel/qbe" +RDEPEND="${DEPEND}" + +src_prepare() { + default + + rm -r "${S}/qbe" || die +} + +src_configure() { + tc-export CC + + edo ./configure --prefix=/usr +} diff --git a/sys-devel/cproc/cproc-9999.ebuild b/sys-devel/cproc/cproc-9999.ebuild new file mode 100644 index 000000000000..163ffe80afba --- /dev/null +++ b/sys-devel/cproc/cproc-9999.ebuild @@ -0,0 +1,39 @@ +# Copyright 2021-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit edo toolchain-funcs + +if [[ ${PV} = 9999 ]]; then + EGIT_REPO_URI="https://git.sr.ht/~mcf/cproc" + inherit git-r3 +else + CPROC_COMMIT="6fabc79d81de56b6c1cdcc2242933fd792e2ddf9" + CPROC_P="${PN}-${CPROC_COMMIT}" + SRC_URI="https://git.sr.ht/~mcf/cproc/archive/${CPROC_COMMIT}.tar.gz -> ${CPROC_P}.tar.gz" + S="${WORKDIR}/${CPROC_P}" + + KEYWORDS="~amd64 ~arm64 ~riscv" +fi + +DESCRIPTION="C11 compiler using QBE as backend" +HOMEPAGE="https://sr.ht/~mcf/cproc/" + +LICENSE="ISC" +SLOT="0" + +DEPEND="sys-devel/qbe" +RDEPEND="${DEPEND}" + +src_prepare() { + default + + rm -r "${S}/qbe" || die +} + +src_configure() { + tc-export CC + + edo ./configure --prefix=/usr +} diff --git a/sys-devel/slibtool/metadata.xml b/sys-devel/cproc/metadata.xml index d104f4e708fd..507ef71566c5 100644 --- a/sys-devel/slibtool/metadata.xml +++ b/sys-devel/cproc/metadata.xml @@ -2,19 +2,15 @@ <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person" proxied="yes"> - <email>felix.janda@posteo.de</email> - <name>Felix Janda</name> - </maintainer> - <maintainer type="person"> - <email>sam@gentoo.org</email> - <name>Sam James</name> - </maintainer> - <maintainer type="person"> - <email>polynomial-c@gentoo.org</email> - <name>Lars Wendler</name> + <email>contact@hacktivis.me</email> + <name>Haelwenn (lanodan) Monnier</name> </maintainer> <maintainer type="project" proxied="proxy"> <email>proxy-maint@gentoo.org</email> <name>Proxy Maintainers</name> </maintainer> + <upstream> + <remote-id type="sourcehut">~mcf/cproc</remote-id> + <remote-id type="github">michaelforney/cproc</remote-id> + </upstream> </pkgmetadata> diff --git a/sys-devel/crossdev/Manifest b/sys-devel/crossdev/Manifest index d49f6f227540..b2e88d73c28e 100644 --- a/sys-devel/crossdev/Manifest +++ b/sys-devel/crossdev/Manifest @@ -1 +1 @@ -DIST crossdev-20201129.tar.xz 28372 BLAKE2B b59d94a69b83f8db9193bd54ff6059b20617b6dd60c0f9a0ec5acdf4b93adf747886598b9af7d69d2fd9705fab709041a96c149286e623b6557ea709bf2f840a SHA512 7b49795ea266d90e45c48b092bffa485a7207c66550d797297cb7e0756f7c497d045b3cb9b90f50b80a3ada4916a3ba273b2c19b9d02c834fb47d906efe3a8ba +DIST crossdev-20240209.tar.xz 30904 BLAKE2B b23c6c86796ce37968ce23a9399b068ecb78d6beb8e9b02ac11cd9e8b2f1c82f8905e615417525aa94d51f5da763841a8b9fc7cdc9b64d087a52b077adc92635 SHA512 5834cad934707f173529d7258f8230222e8d18903dea723b0051e06a8d974cab92f6aa7bbeef3a64aec0efd2d0b01f80b63503e78e30ddc1ba7e9a6a4ff08977 diff --git a/sys-devel/crossdev/crossdev-20201129.ebuild b/sys-devel/crossdev/crossdev-20201129.ebuild deleted file mode 100644 index 710a287c866c..000000000000 --- a/sys-devel/crossdev/crossdev-20201129.ebuild +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -if [[ ${PV} == "99999999" ]] ; then - inherit git-r3 - EGIT_REPO_URI="git://anongit.gentoo.org/proj/crossdev.git" -else - SRC_URI="mirror://gentoo/${P}.tar.xz - https://dev.gentoo.org/~slyfox/distfiles/${P}.tar.xz" - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" -fi - -DESCRIPTION="Gentoo Cross-toolchain generator" -HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Crossdev" - -LICENSE="GPL-2" -SLOT="0" - -RDEPEND=" - >=sys-apps/portage-2.1 - >=app-portage/portage-utils-0.55 - app-shells/bash - sys-apps/gentoo-functions -" -BDEPEND="app-arch/xz-utils" - -src_install() { - default - - if [[ "${PV}" == "99999999" ]] ; then - sed -i "s:@CDEVPV@:${EGIT_VERSION}:" "${ED}"/usr/bin/crossdev || die - fi -} diff --git a/sys-devel/crossdev/crossdev-20240209.ebuild b/sys-devel/crossdev/crossdev-20240209.ebuild new file mode 100644 index 000000000000..060ebf803d66 --- /dev/null +++ b/sys-devel/crossdev/crossdev-20240209.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +if [[ ${PV} == "99999999" ]] ; then + inherit git-r3 + EGIT_REPO_URI=" + https://anongit.gentoo.org/git/proj/crossdev.git + https://github.com/gentoo/crossdev + " +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="Gentoo Cross-toolchain generator" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Crossdev" + +LICENSE="GPL-2" +SLOT="0" + +RDEPEND=" + >=sys-apps/portage-2.1 + app-shells/bash + sys-apps/gentoo-functions + sys-apps/config-site +" +BDEPEND="app-arch/xz-utils" + +src_install() { + default + + if [[ ${PV} == "99999999" ]] ; then + sed -i "s:@CDEVPV@:${EGIT_VERSION}:" "${ED}"/usr/bin/crossdev || die + fi + + dodir /usr/share/config.site.d + mv "${ED}"/usr/share/config.site{,.d/80crossdev.conf} || die +} diff --git a/sys-devel/crossdev/crossdev-99999999.ebuild b/sys-devel/crossdev/crossdev-99999999.ebuild index e04a77bf18a1..8938d96f9d54 100644 --- a/sys-devel/crossdev/crossdev-99999999.ebuild +++ b/sys-devel/crossdev/crossdev-99999999.ebuild @@ -1,15 +1,17 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 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="https://anongit.gentoo.org/git/proj/crossdev.git" + EGIT_REPO_URI=" + https://anongit.gentoo.org/git/proj/crossdev.git + https://github.com/gentoo/crossdev + " else - SRC_URI="mirror://gentoo/${P}.tar.xz - https://dev.gentoo.org/~slyfox/distfiles/${P}.tar.xz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + 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="Gentoo Cross-toolchain generator" @@ -20,16 +22,19 @@ SLOT="0" RDEPEND=" >=sys-apps/portage-2.1 - >=app-portage/portage-utils-0.55 app-shells/bash sys-apps/gentoo-functions + sys-apps/config-site " 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 + + dodir /usr/share/config.site.d + mv "${ED}"/usr/share/config.site{,.d/80crossdev.conf} || die } diff --git a/sys-devel/crossdev/metadata.xml b/sys-devel/crossdev/metadata.xml index 1721f3415795..d4d3daf6c1ae 100644 --- a/sys-devel/crossdev/metadata.xml +++ b/sys-devel/crossdev/metadata.xml @@ -1,12 +1,20 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!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> + <upstream> + <remote-id type="gentoo">proj/crossdev</remote-id> + <remote-id type="github">gentoo/crossdev</remote-id> + </upstream> </pkgmetadata> diff --git a/sys-devel/crosstool-ng/Manifest b/sys-devel/crosstool-ng/Manifest new file mode 100644 index 000000000000..f02be9aa507f --- /dev/null +++ b/sys-devel/crosstool-ng/Manifest @@ -0,0 +1,3 @@ +DIST crosstool-ng-1.24.0.tar.xz 1622432 BLAKE2B e0f3f26083dd10a35ac79fc78debe98db7914f5d7fd710ed6b4c788a7a0d56e22d22966f186e8315ae99a6141d1d5b80686e86ad8b0549514a07dfda5913a348 SHA512 89b8794a4184ad4928750e29712ed4f194aa1d0b93768d67ff64f30c30f1b1e165647cafc6de94d68d3ef70e50446e544dad65aa36137511a32ee7a667dddfb4 +DIST crosstool-ng-1.25.0.tar.xz 1075688 BLAKE2B 4484b1a0b9ee65a927c1fc76e86087e48c4f27397c8ebc5a94cc1bbf78a66f4ab94fb54239943a9c710350bd65056e9f63c4138ff3c8f750a35b2a1bfaca6080 SHA512 e25b6fb577ce439592a889fe73bbde4109309e7fe154e7133fefaeb5522c97e3f96958941aa1bc86448fcecb6b4021ff793c595048f5ef8e5ecc75e9a48c0c45 +DIST crosstool-ng-1.26.0.tar.xz 1144720 BLAKE2B 68c38dca58a239bd2a7a4e0f0adfa0069d97aba632c8a8a70594a67bf1049f0576db2d20b8a6ac90b170c1a3d8245f952a949e4fd006abe1d5e54effbb8e100b SHA512 7834184ae5792fd347455f9f48fee826248dcb82d271954ed4304b1a18f63995ff8a2c3b817564dcf147ac7e16e02d779195b26d97eb57db27f1118a1837002a diff --git a/sys-devel/crosstool-ng/crosstool-ng-1.24.0-r3.ebuild b/sys-devel/crosstool-ng/crosstool-ng-1.24.0-r3.ebuild new file mode 100644 index 000000000000..943dbb3f1893 --- /dev/null +++ b/sys-devel/crosstool-ng/crosstool-ng-1.24.0-r3.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +inherit python-single-r1 + +DESCRIPTION="Versatile (cross-)toolchain generator" +HOMEPAGE="https://crosstool-ng.github.io/" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/crosstool-ng/crosstool-ng.git" + inherit git-r3 +else + SRC_URI=" + https://github.com/crosstool-ng/crosstool-ng/releases/download/${PN}-${PV/_rc/-rc}/${P}.tar.xz + http://crosstool-ng.org/download/crosstool-ng/${P}.tar.xz + " + + if [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~amd64 ~x86" + fi +fi + +LICENSE="GPL-2 doc? ( CC-BY-SA-2.5 )" +SLOT="0" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +IUSE="curl cvs doc dtc git lzip meson ninja python rsync subversion wget" + +# TODO: Consider dropping these USE (optfeature), but configure does check for them +BDEPEND=" + app-arch/unzip + >=app-shells/bash-3.1 + sys-apps/help2man + >=sys-apps/sed-4.0 + sys-apps/gawk + sys-apps/texinfo + sys-devel/bison + sys-devel/flex + curl? ( net-misc/curl ) + cvs? ( dev-vcs/cvs ) + dtc? ( sys-apps/dtc ) + git? ( dev-vcs/git ) + lzip? ( app-arch/lzip ) + meson? ( dev-build/meson ) + python? ( ${PYTHON_DEPS} ) + ninja? ( app-alternatives/ninja ) + rsync? ( net-misc/rsync ) + subversion? ( dev-vcs/subversion ) + wget? ( net-misc/wget ) +" +RDEPEND=" + ${BDEPEND} +" + +src_configure() { + # Needs bison+flex + unset YACC LEX + + default +} + +src_install() { + emake DESTDIR="${D}" install + + if use doc ; then + mv "${ED}"/usr/share/doc/crosstool-ng/crosstool-ng-${PVR} "${ED}"/usr/share/doc/ || die + fi + + rm -rf "${ED}"/usr/share/doc/crosstool-ng || die + rm -rf "${ED}"/usr/share/man/man1/ct-ng.1.gz || die + doman docs/ct-ng.1 +} diff --git a/sys-devel/crosstool-ng/crosstool-ng-1.25.0-r1.ebuild b/sys-devel/crosstool-ng/crosstool-ng-1.25.0-r1.ebuild new file mode 100644 index 000000000000..943dbb3f1893 --- /dev/null +++ b/sys-devel/crosstool-ng/crosstool-ng-1.25.0-r1.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +inherit python-single-r1 + +DESCRIPTION="Versatile (cross-)toolchain generator" +HOMEPAGE="https://crosstool-ng.github.io/" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/crosstool-ng/crosstool-ng.git" + inherit git-r3 +else + SRC_URI=" + https://github.com/crosstool-ng/crosstool-ng/releases/download/${PN}-${PV/_rc/-rc}/${P}.tar.xz + http://crosstool-ng.org/download/crosstool-ng/${P}.tar.xz + " + + if [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~amd64 ~x86" + fi +fi + +LICENSE="GPL-2 doc? ( CC-BY-SA-2.5 )" +SLOT="0" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +IUSE="curl cvs doc dtc git lzip meson ninja python rsync subversion wget" + +# TODO: Consider dropping these USE (optfeature), but configure does check for them +BDEPEND=" + app-arch/unzip + >=app-shells/bash-3.1 + sys-apps/help2man + >=sys-apps/sed-4.0 + sys-apps/gawk + sys-apps/texinfo + sys-devel/bison + sys-devel/flex + curl? ( net-misc/curl ) + cvs? ( dev-vcs/cvs ) + dtc? ( sys-apps/dtc ) + git? ( dev-vcs/git ) + lzip? ( app-arch/lzip ) + meson? ( dev-build/meson ) + python? ( ${PYTHON_DEPS} ) + ninja? ( app-alternatives/ninja ) + rsync? ( net-misc/rsync ) + subversion? ( dev-vcs/subversion ) + wget? ( net-misc/wget ) +" +RDEPEND=" + ${BDEPEND} +" + +src_configure() { + # Needs bison+flex + unset YACC LEX + + default +} + +src_install() { + emake DESTDIR="${D}" install + + if use doc ; then + mv "${ED}"/usr/share/doc/crosstool-ng/crosstool-ng-${PVR} "${ED}"/usr/share/doc/ || die + fi + + rm -rf "${ED}"/usr/share/doc/crosstool-ng || die + rm -rf "${ED}"/usr/share/man/man1/ct-ng.1.gz || die + doman docs/ct-ng.1 +} diff --git a/sys-devel/crosstool-ng/crosstool-ng-1.26.0.ebuild b/sys-devel/crosstool-ng/crosstool-ng-1.26.0.ebuild new file mode 100644 index 000000000000..943dbb3f1893 --- /dev/null +++ b/sys-devel/crosstool-ng/crosstool-ng-1.26.0.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +inherit python-single-r1 + +DESCRIPTION="Versatile (cross-)toolchain generator" +HOMEPAGE="https://crosstool-ng.github.io/" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/crosstool-ng/crosstool-ng.git" + inherit git-r3 +else + SRC_URI=" + https://github.com/crosstool-ng/crosstool-ng/releases/download/${PN}-${PV/_rc/-rc}/${P}.tar.xz + http://crosstool-ng.org/download/crosstool-ng/${P}.tar.xz + " + + if [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~amd64 ~x86" + fi +fi + +LICENSE="GPL-2 doc? ( CC-BY-SA-2.5 )" +SLOT="0" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +IUSE="curl cvs doc dtc git lzip meson ninja python rsync subversion wget" + +# TODO: Consider dropping these USE (optfeature), but configure does check for them +BDEPEND=" + app-arch/unzip + >=app-shells/bash-3.1 + sys-apps/help2man + >=sys-apps/sed-4.0 + sys-apps/gawk + sys-apps/texinfo + sys-devel/bison + sys-devel/flex + curl? ( net-misc/curl ) + cvs? ( dev-vcs/cvs ) + dtc? ( sys-apps/dtc ) + git? ( dev-vcs/git ) + lzip? ( app-arch/lzip ) + meson? ( dev-build/meson ) + python? ( ${PYTHON_DEPS} ) + ninja? ( app-alternatives/ninja ) + rsync? ( net-misc/rsync ) + subversion? ( dev-vcs/subversion ) + wget? ( net-misc/wget ) +" +RDEPEND=" + ${BDEPEND} +" + +src_configure() { + # Needs bison+flex + unset YACC LEX + + default +} + +src_install() { + emake DESTDIR="${D}" install + + if use doc ; then + mv "${ED}"/usr/share/doc/crosstool-ng/crosstool-ng-${PVR} "${ED}"/usr/share/doc/ || die + fi + + rm -rf "${ED}"/usr/share/doc/crosstool-ng || die + rm -rf "${ED}"/usr/share/man/man1/ct-ng.1.gz || die + doman docs/ct-ng.1 +} diff --git a/sys-devel/crosstool-ng/crosstool-ng-9999.ebuild b/sys-devel/crosstool-ng/crosstool-ng-9999.ebuild new file mode 100644 index 000000000000..943dbb3f1893 --- /dev/null +++ b/sys-devel/crosstool-ng/crosstool-ng-9999.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +inherit python-single-r1 + +DESCRIPTION="Versatile (cross-)toolchain generator" +HOMEPAGE="https://crosstool-ng.github.io/" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/crosstool-ng/crosstool-ng.git" + inherit git-r3 +else + SRC_URI=" + https://github.com/crosstool-ng/crosstool-ng/releases/download/${PN}-${PV/_rc/-rc}/${P}.tar.xz + http://crosstool-ng.org/download/crosstool-ng/${P}.tar.xz + " + + if [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~amd64 ~x86" + fi +fi + +LICENSE="GPL-2 doc? ( CC-BY-SA-2.5 )" +SLOT="0" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +IUSE="curl cvs doc dtc git lzip meson ninja python rsync subversion wget" + +# TODO: Consider dropping these USE (optfeature), but configure does check for them +BDEPEND=" + app-arch/unzip + >=app-shells/bash-3.1 + sys-apps/help2man + >=sys-apps/sed-4.0 + sys-apps/gawk + sys-apps/texinfo + sys-devel/bison + sys-devel/flex + curl? ( net-misc/curl ) + cvs? ( dev-vcs/cvs ) + dtc? ( sys-apps/dtc ) + git? ( dev-vcs/git ) + lzip? ( app-arch/lzip ) + meson? ( dev-build/meson ) + python? ( ${PYTHON_DEPS} ) + ninja? ( app-alternatives/ninja ) + rsync? ( net-misc/rsync ) + subversion? ( dev-vcs/subversion ) + wget? ( net-misc/wget ) +" +RDEPEND=" + ${BDEPEND} +" + +src_configure() { + # Needs bison+flex + unset YACC LEX + + default +} + +src_install() { + emake DESTDIR="${D}" install + + if use doc ; then + mv "${ED}"/usr/share/doc/crosstool-ng/crosstool-ng-${PVR} "${ED}"/usr/share/doc/ || die + fi + + rm -rf "${ED}"/usr/share/doc/crosstool-ng || die + rm -rf "${ED}"/usr/share/man/man1/ct-ng.1.gz || die + doman docs/ct-ng.1 +} diff --git a/sys-devel/crosstool-ng/metadata.xml b/sys-devel/crosstool-ng/metadata.xml new file mode 100644 index 000000000000..69260a3c3c18 --- /dev/null +++ b/sys-devel/crosstool-ng/metadata.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <longdescription lang="en"> + crosstool-NG is a utility for building cross-compiling toolchains. + It will only build the toolchain. It is up to use how you want to + use it after that. + + It is an alternative to <pkg>sys-devel/crossdev</pkg>. + + For more information, see https://crosstool-ng.github.io/ + </longdescription> + <upstream> + <remote-id type="github">crosstool-ng/crosstool-ng</remote-id> + </upstream> + <use> + <flag name="dtc">Require <pkg>sys-apps/dtc</pkg></flag> + <flag name="lzip">Require <pkg>app-arch/lzip</pkg></flag> + <flag name="meson">Require <pkg>dev-build/meson</pkg></flag> + <flag name="ninja">Require <pkg>app-alternatives/ninja</pkg></flag> + <flag name="rsync">Require <pkg>net-misc/rsync</pkg></flag> + <flag name="wget">Require <pkg>net-misc/wget</pkg></flag> + </use> +</pkgmetadata> diff --git a/sys-devel/ct-ng/Manifest b/sys-devel/ct-ng/Manifest deleted file mode 100644 index 0398c325c3c4..000000000000 --- a/sys-devel/ct-ng/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST crosstool-ng-1.23.0.tar.bz2 1782247 BLAKE2B 77835534b5b664148985b57580bf24fa6153e1fc327be0622e55d9ff5c1c5f446039b293a7d1718bfbec89789638f80033be012e0878f75a57648bd574abe10e SHA512 1842d140b1c4f76783751eab60722e8077f356dfc9e9cc941d3c991a7e9bb23cb19e6bd7cd5c630cc87967853c55e0c16e415b222e546b5baaffb264ca799b69 -DIST crosstool-ng-1.24.0.tar.bz2 2058069 BLAKE2B 4108e9546acd6c0660552595d41164ce9c4f07985851a911c260fcc9e2ec70e80136b6cb2090290ca2aa2ceeb4ebc61fca183340de88eafd800bc2bf18d0cfbb SHA512 379e668365628f0ab359ae119213bed44960870093f64f0fbb12e92bbe2a3b82bfed77f5ab33f2e2f17c1977e7a63f2151c46ad8d0e6208220fb7fa8726fae33 diff --git a/sys-devel/ct-ng/ct-ng-1.23.0.ebuild b/sys-devel/ct-ng/ct-ng-1.23.0.ebuild deleted file mode 100644 index 3ee43cbeace6..000000000000 --- a/sys-devel/ct-ng/ct-ng-1.23.0.ebuild +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -inherit bash-completion-r1 - -DESCRIPTION="crosstool-ng is a tool to build cross-compiling toolchains" -HOMEPAGE="https://crosstool-ng.github.io/" -MY_P=${P/ct/crosstool} -SRC_URI="http://ymorin.is-a-geek.org/download/crosstool-ng/${MY_P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="doc" - -RDEPEND="net-misc/curl - dev-util/gperf - dev-vcs/cvs - dev-vcs/subversion" - -S="${WORKDIR}/crosstool-ng-${PV}" - -src_install() { - emake DESTDIR="${D%/}" install - newbashcomp ${PN}.comp ${PN} - use doc && mv "${D}"/usr/share/doc/crosstool-ng/crosstool-ng-${PVR} \ - "${D}"/usr/share/doc/ - rm -rf "${D}"/usr/share/doc/crosstool-ng -} diff --git a/sys-devel/ct-ng/ct-ng-1.24.0.ebuild b/sys-devel/ct-ng/ct-ng-1.24.0.ebuild deleted file mode 100644 index c43e112be440..000000000000 --- a/sys-devel/ct-ng/ct-ng-1.24.0.ebuild +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -DESCRIPTION="crosstool-ng is a tool to build cross-compiling toolchains" -HOMEPAGE="https://crosstool-ng.github.io/" -MY_P=${P/ct/crosstool} -SRC_URI="http://ymorin.is-a-geek.org/download/crosstool-ng/${MY_P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="doc" - -RDEPEND="net-misc/curl - dev-util/gperf - dev-vcs/cvs - dev-vcs/subversion" - -S="${WORKDIR}/crosstool-ng-${PV}" - -src_install() { - emake DESTDIR="${D}" install - use doc && mv "${D}"/usr/share/doc/crosstool-ng/crosstool-ng-${PVR} \ - "${D}"/usr/share/doc/ - rm -rf "${D}"/usr/share/doc/crosstool-ng -} diff --git a/sys-devel/ct-ng/metadata.xml b/sys-devel/ct-ng/metadata.xml deleted file mode 100644 index 7aa3ac198772..000000000000 --- a/sys-devel/ct-ng/metadata.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="person"> - <email>blueness@gentoo.org</email> - <name>Anthony G. Basile</name> - </maintainer> - <longdescription lang="en"> - crosstool-NG is a utility for building cross-compiling toolchains. - It will only build the toolchain. It is up to use how you want to - use it after that. - - It is an alternative to sys-devel/crossdev. - - For more information, see http://ymorin.is-a-geek.org/projects/crosstool - </longdescription> -</pkgmetadata> diff --git a/sys-devel/dev86/dev86-0.16.21-r3.ebuild b/sys-devel/dev86/dev86-0.16.21-r3.ebuild index 2af636abe3e1..e3784e658bfb 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 000000000000..39e3a1296c21 --- /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/dev86/metadata.xml b/sys-devel/dev86/metadata.xml index 7a38bb900964..c4f5ea2afda9 100644 --- a/sys-devel/dev86/metadata.xml +++ b/sys-devel/dev86/metadata.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <!-- maintainer-needed --> + <upstream> + <remote-id type="github">lkundrak/dev86</remote-id> + </upstream> </pkgmetadata> diff --git a/sys-devel/distcc/Manifest b/sys-devel/distcc/Manifest index 1efba30ad96b..19f4116d75c4 100644 --- a/sys-devel/distcc/Manifest +++ b/sys-devel/distcc/Manifest @@ -1 +1 @@ -DIST distcc-3.3.3.tar.gz 1195666 BLAKE2B b393fdb20eb555dec794bf55c1287dd804a576e0a5db9f2fa84c3924a40185a193231aea807353918430297c9c83c7592aaaafd521cf73c92a72bf30b8a69caa SHA512 d5e7fc67f49ee640cef753038b5c0ebcbbac61c6ac29f20ee4736b045a89979ced765717c46383a4fadc50a4fe34e94e58e307509144414a9ca19eb4cc68a135 +DIST distcc-3.4.tar.gz 1239519 BLAKE2B 8dc9baa6b1f65f2bb3621e4e643d7d15d55e2338de4d6a7f20a572d9ec280925b4421a294f40c9fcfba8d4193a6bd1871eb8caf13dd2c2a8a81834671f6bc8bc SHA512 de09329fdfa25e08a9b9529190ddaa9ceccb34c8655692edb86f367a8db4a71b750c6e928cb8e5a670f51fbbc02fd1c8524f72e01b3ebaacc1106dc676d18eef diff --git a/sys-devel/distcc/distcc-3.3.3-r3.ebuild b/sys-devel/distcc/distcc-3.4-r1.ebuild index c535bb1a9fe3..482c5d36a63e 100644 --- a/sys-devel/distcc/distcc-3.3.3-r3.ebuild +++ b/sys-devel/distcc/distcc-3.4-r1.ebuild @@ -1,12 +1,11 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{7..9} ) +PYTHON_COMPAT=( python3_{10..11} ) -inherit autotools flag-o-matic prefix python-single-r1 systemd \ - toolchain-funcs xdg-utils +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" @@ -14,20 +13,20 @@ 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 ~s390 sparc x86" +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+:2 ) + gtk? ( x11-libs/gtk+:3 ) zeroconf? ( >=net-dns/avahi-0.6[dbus] ) " DEPEND="${RDEPEND} sys-libs/binutils-libs" BDEPEND=" - sys-devel/autoconf-archive + dev-build/autoconf-archive virtual/pkgconfig" RDEPEND+=" acct-user/distcc @@ -38,16 +37,9 @@ RDEPEND+=" src_prepare() { eapply "${FILESDIR}/${PN}-3.0-xinetd.patch" - # bug #255188 - eapply "${FILESDIR}/${PN}-3.3.2-freedesktop.patch" # SOCKSv5 support needed for Portage, bug #537616 eapply "${FILESDIR}/${PN}-3.2_rc1-socks5.patch" - # backport py3.8 fixes - eapply "${FILESDIR}/${P}-py38.patch" - # gcc-10 fix, #707502 - eapply "${FILESDIR}/${P}-gcc-10-fix.patch" - # unbreak CHOST prefix, https://bugs.gentoo.org/773652 - eapply "${FILESDIR}/${P}-no-rewrite-chost.patch" + eapply "${FILESDIR}/${PN}-3.4-pump-tests.patch" eapply_user # Bugs #120001, #167844 and probably more. See patch for description. @@ -72,9 +64,12 @@ src_prepare() { } src_configure() { + # https://github.com/distcc/distcc/issues/454 + append-cppflags -DPY_SSIZE_T_CLEAN + local myconf=( --disable-Werror - --libdir=/usr/lib + --libdir="${EPREFIX}"/usr/lib $(use_enable ipv6 rfc2553) $(use_with gtk) --without-gnome diff --git a/sys-devel/distcc/distcc-3.4-r2.ebuild b/sys-devel/distcc/distcc-3.4-r2.ebuild new file mode 100644 index 000000000000..8aeae8cfb6ff --- /dev/null +++ b/sys-devel/distcc/distcc-3.4-r2.ebuild @@ -0,0 +1,182 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..11} ) + +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=" + dev-build/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 "${FILESDIR}/${P}-fix-dcc_gcc_rewrite_fqn-corruption.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/distcc-3.4-r3.ebuild b/sys-devel/distcc/distcc-3.4-r3.ebuild new file mode 100644 index 000000000000..aacc1981dc3e --- /dev/null +++ b/sys-devel/distcc/distcc-3.4-r3.ebuild @@ -0,0 +1,186 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..11} ) + +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=" + dev-build/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 )" + +PATCHES=( + "${FILESDIR}/${PN}-3.0-xinetd.patch" + # SOCKSv5 support needed for Portage, bug #537616 + "${FILESDIR}/${PN}-3.2_rc1-socks5.patch" + "${FILESDIR}/${PN}-3.4-pump-tests.patch" + "${FILESDIR}/${P}-fix-dcc_gcc_rewrite_fqn-corruption.patch" + "${FILESDIR}/${P}-rewrite-chost.patch" +) + +src_prepare() { + default + + # 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.3.2-freedesktop.patch b/sys-devel/distcc/files/distcc-3.3.2-freedesktop.patch deleted file mode 100644 index 7b735ebec7f9..000000000000 --- a/sys-devel/distcc/files/distcc-3.3.2-freedesktop.patch +++ /dev/null @@ -1,112 +0,0 @@ -From d852c808d6f470031f40edec9ebe980afc69b9b9 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Sat, 8 Dec 2018 12:50:07 +0100 -Subject: [PATCH] Fix desktop spec compliance of distccmon-gnome install - ---- - Makefile.in | 18 ++++++++++-------- - gnome/distccmon-gnome.desktop | 7 +++---- - ...mon-gnome-icon.png => distccmon-gnome.png} | Bin - src/mon-gnome.c | 2 +- - 4 files changed, 14 insertions(+), 13 deletions(-) - rename gnome/{distccmon-gnome-icon.png => distccmon-gnome.png} (100%) - -diff --git a/Makefile.in b/Makefile.in -index 6e1e467..1106559 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -52,13 +52,14 @@ mandir = @mandir@ - includedir = @includedir@ - oldincludedir = /usr/include - docdir = @docdir@ --pkgdatadir = $(datadir)/@PACKAGE_NAME@ -+icondir = $(datarootdir)/pixmaps -+desktopdir = $(datarootdir)/applications - - include_server_builddir = $(builddir)/_include_server - - # These must be done from here, not from autoconf, because they can - # contain variable expansions written in Make syntax. Ew. --DIR_DEFS = -DLIBDIR="\"${libdir}\"" -DSYSCONFDIR="\"${sysconfdir}\"" -DPKGDATADIR="\"${pkgdatadir}\"" -+DIR_DEFS = -DLIBDIR="\"${libdir}\"" -DSYSCONFDIR="\"${sysconfdir}\"" -DICONDIR="\"${icondir}\"" - - # arguments to pkgconfig - GNOME_PACKAGES = @GNOME_PACKAGES@ -@@ -387,7 +388,7 @@ man_HTML = man/distcc_1.html man/distccd_1.html man/distccmon_text_1.html \ - man/lsdistcc_1.html man/pump_1.html man/include_server_1.html - MEN = $(man1_MEN) - --gnome_data = gnome/distccmon-gnome-icon.png \ -+gnome_data = gnome/distccmon-gnome.png \ - gnome/distccmon-gnome.desktop - - popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \ -@@ -1033,7 +1034,8 @@ showpaths: - @echo " programs $(DESTDIR)$(bindir)" - @echo " sbin programs $(DESTDIR)$(sbindir)" - @echo " system configuration $(DESTDIR)$(sysconfdir)" -- @echo " shared data files $(DESTDIR)$(pkgdatadir)" -+ @echo " icon file $(DESTDIR)$(icondir)" -+ @echo " application file $(DESTDIR)$(desktopdir)" - - - # install-sh can't handle multiple arguments, but we don't need any -@@ -1129,10 +1131,10 @@ install-example: $(example_DOCS) - done - - install-gnome-data: $(gnome_data) -- $(mkinstalldirs) "$(DESTDIR)$(pkgdatadir)" -- for p in $(gnome_data); do \ -- $(INSTALL_DATA) "$$p" "$(DESTDIR)$(pkgdatadir)" || exit 1; \ -- done -+ $(mkinstalldirs) "$(DESTDIR)$(icondir)" -+ $(mkinstalldirs) "$(DESTDIR)$(desktopdir)" -+ $(INSTALL_DATA) gnome/distccmon-gnome.png "$(DESTDIR)$(icondir)" -+ $(INSTALL_DATA) gnome/distccmon-gnome.desktop "$(DESTDIR)$(desktopdir)" - - install-conf: $(conf_files) $(default_files) - $(mkinstalldirs) "$(DESTDIR)$(sysconfdir)/distcc" -diff --git a/gnome/distccmon-gnome.desktop b/gnome/distccmon-gnome.desktop -index bd1fa26..7205f5e 100644 ---- a/gnome/distccmon-gnome.desktop -+++ b/gnome/distccmon-gnome.desktop -@@ -1,6 +1,5 @@ - [Desktop Entry] --Version=0.9.4 --Encoding=UTF-8 -+Version=1.0 - Exec=distccmon-gnome - Name=distcc monitor - Name[sv]=distcc övervakare -@@ -8,9 +7,9 @@ GenericName=Distributed Compile Monitor - GenericName[sv]=Distribuerad kompilerings-övervakare - Comment=Graphical view of distributed compile tasks - Comment[sv]=Grafisk vy av distribuerade kompileringsuppgifter --Icon=distccmon-gnome-icon.png -+Icon=distccmon-gnome - TryExec=distccmon-gnome - Terminal=false - Type=Application --Categories=GNOME;Application;Development; -+Categories=GNOME;GTK;Development; - StartupNotify=true -diff --git a/gnome/distccmon-gnome-icon.png b/gnome/distccmon-gnome.png -similarity index 100% -rename from gnome/distccmon-gnome-icon.png -rename to gnome/distccmon-gnome.png -diff --git a/src/mon-gnome.c b/src/mon-gnome.c -index 24681d0..bfc286d 100644 ---- a/src/mon-gnome.c -+++ b/src/mon-gnome.c -@@ -599,7 +599,7 @@ static GtkWidget * dcc_gnome_make_mainwin (void) - - #if GTK_CHECK_VERSION(2,2,0) - gtk_window_set_icon_from_file (GTK_WINDOW (mainwin), -- PKGDATADIR "/distccmon-gnome-icon.png", -+ ICONDIR "/distccmon-gnome.png", - NULL); - #endif - --- -2.20.0.rc2 - diff --git a/sys-devel/distcc/files/distcc-3.3.3-gcc-10-fix.patch b/sys-devel/distcc/files/distcc-3.3.3-gcc-10-fix.patch deleted file mode 100644 index 2c0bce6c82b6..000000000000 --- a/sys-devel/distcc/files/distcc-3.3.3-gcc-10-fix.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 377969cc762569f4a5ec409a1e7ad6a7be3e51b3 Mon Sep 17 00:00:00 2001 -From: Romain Geissler <romain.geissler@amadeus.com> -Date: Mon, 27 Jan 2020 09:28:43 +0000 -Subject: [PATCH] Fix build with gcc 10 which defaults to -fno-common (cf - https://gcc.gnu.org/gcc-10/porting_to.html) - -This fixes the following link error I see when I use the latest gcc 10 -git branch: -/opt/1A/toolchain/x86_64-v20.0.7/lib/gcc/x86_64-1a-linux-gnu/10.0.1/../../../../x86_64-1a-linux-gnu/bin/ld: src/serve.o:(.bss+0x0): multiple definition of `stats_text'; src/prefork.o:(.bss+0x0): first defined here -/opt/1A/toolchain/x86_64-v20.0.7/lib/gcc/x86_64-1a-linux-gnu/10.0.1/../../../../x86_64-1a-linux-gnu/bin/ld: src/stats.o:(.data+0x20): multiple definition of `stats_text'; src/prefork.o:(.bss+0x0): first defined here -collect2: error: ld returned 1 exit status ---- - src/stats.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/stats.h b/src/stats.h -index 9bde285..74d4690 100644 ---- a/src/stats.h -+++ b/src/stats.h -@@ -33,7 +33,7 @@ enum stats_e { STATS_TCP_ACCEPT, STATS_REJ_BAD_REQ, STATS_REJ_OVERLOAD, - STATS_COMPILE_OK, STATS_COMPILE_ERROR, STATS_COMPILE_TIMEOUT, - STATS_CLI_DISCONN, STATS_OTHER, STATS_ENUM_MAX }; - --const char *stats_text[20]; -+extern const char *stats_text[20]; - - int dcc_stats_init(void); - void dcc_stats_init_kid(void); diff --git a/sys-devel/distcc/files/distcc-3.3.3-no-rewrite-chost.patch b/sys-devel/distcc/files/distcc-3.3.3-no-rewrite-chost.patch deleted file mode 100644 index dafaa90759b4..000000000000 --- a/sys-devel/distcc/files/distcc-3.3.3-no-rewrite-chost.patch +++ /dev/null @@ -1,28 +0,0 @@ -From c2471d4cf3e2ef2556c150d52860b4e8f04e4994 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com> -Date: Mon, 1 Mar 2021 22:13:36 +0200 -Subject: [PATCH] distcc: fix i686 cross compile - -[mgorny: disable toolchain prefix rewriting code that workarounds some - Debian invention and breaks everything else] - ---- - src/compile.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/compile.c b/src/compile.c -index 25df355..e5d655b 100644 ---- a/src/compile.c -+++ b/src/compile.c -@@ -572,7 +572,7 @@ static int dcc_gcc_rewrite_fqn(char **argv) - if (!newcmd) - return -ENOMEM; - -- if ((t = strstr(target_with_vendor, "-pc-"))) { -+ if (0 && (t = strstr(target_with_vendor, "-pc-"))) { - memcpy(newcmd, target_with_vendor, t - target_with_vendor); - strcat(newcmd, t + strlen("-pc")); - } else --- -2.26.2 - diff --git a/sys-devel/distcc/files/distcc-3.3.3-py38.patch b/sys-devel/distcc/files/distcc-3.3.3-py38.patch deleted file mode 100644 index 1ba5fee7d87e..000000000000 --- a/sys-devel/distcc/files/distcc-3.3.3-py38.patch +++ /dev/null @@ -1,53 +0,0 @@ -From c52a023b8a17e4346c66a8fddee69b40b327eae7 Mon Sep 17 00:00:00 2001 -From: MartB <mart.b@outlook.de> -Date: Thu, 28 Nov 2019 21:00:59 +0100 -Subject: [PATCH] Replace time.clock() with time.perf_counter() - -.clock() got removed in python 3.8 and was marked as deprecated since 3.3 -(https://github.com/python/cpython/pull/13270) ---- - include_server/parse_file.py | 4 ++-- - include_server/statistics.py | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/include_server/parse_file.py b/include_server/parse_file.py -index d1dcc74..f5d78b7 100755 ---- a/include_server/parse_file.py -+++ b/include_server/parse_file.py -@@ -272,7 +272,7 @@ def Parse(self, filepath, symbol_table): - - assert isinstance(filepath, str) - self.filepath = filepath -- parse_file_start_time = time.clock() -+ parse_file_start_time = time.perf_counter() - statistics.parse_file_counter += 1 - - includepath_map_index = self.includepath_map.Index -@@ -338,6 +338,6 @@ def Parse(self, filepath, symbol_table): - expr_includes, next_includes) - - -- statistics.parse_file_total_time += time.clock() - parse_file_start_time -+ statistics.parse_file_total_time += time.perf_counter() - parse_file_start_time - - return (quote_includes, angle_includes, expr_includes, next_includes) -diff --git a/include_server/statistics.py b/include_server/statistics.py -index 9677af3..7bc9cb8 100755 ---- a/include_server/statistics.py -+++ b/include_server/statistics.py -@@ -62,13 +62,13 @@ def StartTiming(): - global start_time, translation_unit_counter - """Mark the start of a request to find an include closure.""" - translation_unit_counter += 1 -- start_time = time.clock() -+ start_time = time.perf_counter() - - - def EndTiming(): - """Mark the end of an include closure calculation.""" - global translation_unit_time, min_time, max_time, total_time -- translation_unit_time = time.clock() - start_time -+ translation_unit_time = time.perf_counter() - start_time - min_time = min(translation_unit_time, min_time) - max_time = max(translation_unit_time, max_time) - total_time += translation_unit_time diff --git a/sys-devel/distcc/files/distcc-3.4-fix-dcc_gcc_rewrite_fqn-corruption.patch b/sys-devel/distcc/files/distcc-3.4-fix-dcc_gcc_rewrite_fqn-corruption.patch new file mode 100644 index 000000000000..14c08db329d1 --- /dev/null +++ b/sys-devel/distcc/files/distcc-3.4-fix-dcc_gcc_rewrite_fqn-corruption.patch @@ -0,0 +1,65 @@ +https://bugs.gentoo.org/904720 +https://github.com/distcc/distcc/commit/879b71d6e95673e58d33f6c3c341a893ee307161 + +From 879b71d6e95673e58d33f6c3c341a893ee307161 Mon Sep 17 00:00:00 2001 +From: Alexey Sheplyakov <asheplyakov@yandex.ru> +Date: Sat, 10 Jul 2021 22:18:14 +0400 +Subject: [PATCH] dcc_gcc_rewrite_fqn: avoid heap corruption + +On ALT Linux I've run into the following bug: + +distcc gcc -Wall -std=gnu89 -I. -O2 -o hello.o -c hello.c +free(): invalid next size (fast) +Aborted (core dumped) + +Apparently dcc_gcc_rewrite writes beyond the allocated memory: + +valgrind --leak-check=full -v ./distcc gcc -Wall -std=gnu89 -I. -O2 -o hello.o -c hello.c + +==11382== ERROR SUMMARY: 53 errors from 5 contexts (suppressed: 0 from 0) +==11382== +==11382== 1 errors in context 1 of 5: +==11382== Invalid write of size 1 +==11382== at 0x4C349D8: strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) +==11382== by 0x10D165: dcc_gcc_rewrite_fqn (compile.c:611) +==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725) +==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014) +==11382== by 0x10E380: main (distcc.c:352) +==11382== Address 0x544e828 is 1 bytes after a block of size 23 alloc'd +==11382== at 0x4C31B0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) +==11382== by 0x10D087: dcc_gcc_rewrite_fqn (compile.c:588) +==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725) +==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014) +==11382== by 0x10E380: main (distcc.c:352) +==11382== +==11382== +==11382== 1 errors in context 2 of 5: +==11382== Invalid write of size 1 +==11382== at 0x4C349C8: strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) +==11382== by 0x10D165: dcc_gcc_rewrite_fqn (compile.c:611) +==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725) +==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014) +==11382== by 0x10E380: main (distcc.c:352) +==11382== Address 0x544e827 is 0 bytes after a block of size 23 alloc'd +==11382== at 0x4C31B0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) +==11382== by 0x10D087: dcc_gcc_rewrite_fqn (compile.c:588) +==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725) +==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014) +==11382== by 0x10E380: main (distcc.c:352) + +and ALT Linux' hardened glibc does not quite like that. +Correctly compute the `newcmd_len` to avoid the problem. + +ALTBUG: #40425 +--- a/src/compile.c ++++ b/src/compile.c +@@ -584,7 +584,7 @@ static int dcc_gcc_rewrite_fqn(char **argv) + return -ENOENT; + + +- newcmd_len = strlen(target_with_vendor) + 1 + strlen(argv[0] + 1); ++ newcmd_len = strlen(target_with_vendor) + 1 + strlen(argv[0]) + 1; + newcmd = malloc(newcmd_len); + if (!newcmd) + return -ENOMEM; + 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 000000000000..db392b7f3632 --- /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/files/distcc-3.4-rewrite-chost.patch b/sys-devel/distcc/files/distcc-3.4-rewrite-chost.patch new file mode 100644 index 000000000000..05db9691bbbe --- /dev/null +++ b/sys-devel/distcc/files/distcc-3.4-rewrite-chost.patch @@ -0,0 +1,79 @@ +https://bugs.gentoo.org/773652 +https://github.com/distcc/distcc/issues/440 +https://github.com/distcc/distcc/commit/850db9eec0d5dd7f47ade8ffca91b679081f6d85 + +From 850db9eec0d5dd7f47ade8ffca91b679081f6d85 Mon Sep 17 00:00:00 2001 +From: Alexey Sheplyakov <asheplyakov@altlinux.org> +Date: Sun, 11 Jul 2021 18:57:00 +0400 +Subject: [PATCH] Improved cross-rewriting on non-x86 systems + +Unfortunately autoconf and GCC don't agree on the system name: + +- On arm (aarch64): `GNU_HOST` is `aarch64-unknown-linux-gnu`, + and GCC triple is `aarch64-linux-gnu` instead. +- On rpm-based x86_64 distros: `GNU_HOST` is `x86_64-pc-linux-gnu`, + and GCC triple is `x86_64-redhat-linux` + +Therefore ask the compiler (when running distcc configure script) +how to correctly identify it. + +Closes: #440 +ALTBUG: 40425 +--- a/configure.ac ++++ b/configure.ac +@@ -547,6 +547,22 @@ AC_SUBST(CPPFLAGS) + AC_SUBST(POPT_INCLUDES) + AC_SUBST(BUILD_POPT) + AC_SUBST(GNOME_BIN) ++ ++ ++# Sometimes canonical triples as used by configure differ from GCC ones ++# x86: configure: x86_64-pc-linux-gnu, GCC: x86_64-linux-gnu ++# ALT Linux: configure: ${arch}-alt-linux-gnu, GCC: ${arch}-alt-linux ++# Therefore ask the compiler for its triple ++if test "x${GCC}" = xyes ; then ++ native_compiler_triple=`$CC -dumpmachine` ++fi ++if test "x$native_compiler_triple" = "x"; then ++ native_compiler_triple="$host" ++fi ++AC_MSG_NOTICE([Native compiler triple: $native_compiler_triple]) ++ ++AC_DEFINE_UNQUOTED(NATIVE_COMPILER_TRIPLE, ["$native_compiler_triple"], [Native compiler triple]) ++ + AC_DEFINE_UNQUOTED(GNU_HOST, ["$host"], [Your gnu-style host triple]) + # The '.stamp-conf' files force creation of the containing directories in the + # build tree. +--- a/src/compile.c ++++ b/src/compile.c +@@ -549,7 +549,7 @@ static void dcc_rewrite_generic_compiler(char **argv) + static void dcc_add_clang_target(char **argv) + { + /* defined by autoheader */ +- const char *target = GNU_HOST; ++ const char *target = NATIVE_COMPILER_TRIPLE; + + if (strcmp(argv[0], "clang") == 0 || strncmp(argv[0], "clang-", strlen("clang-")) == 0 || + strcmp(argv[0], "clang++") == 0 || strncmp(argv[0], "clang++-", strlen("clang++-")) == 0) +@@ -577,7 +577,7 @@ static void dcc_add_clang_target(char **argv) + static int dcc_gcc_rewrite_fqn(char **argv) + { + /* defined by autoheader */ +- const char *target_with_vendor = GNU_HOST; ++ const char *target_with_vendor = NATIVE_COMPILER_TRIPLE; + char *newcmd, *t, *path; + int pathlen = 0; + int newcmd_len = 0; +@@ -595,11 +595,7 @@ static int dcc_gcc_rewrite_fqn(char **argv) + return -ENOMEM; + memset(newcmd, 0, newcmd_len); + +- if ((t = strstr(target_with_vendor, "-pc-"))) { +- memcpy(newcmd, target_with_vendor, t - target_with_vendor); +- strcat(newcmd, t + strlen("-pc")); +- } else +- strcpy(newcmd, target_with_vendor); ++ strcpy(newcmd, target_with_vendor); + + + strcat(newcmd, "-"); diff --git a/sys-devel/distcc/metadata.xml b/sys-devel/distcc/metadata.xml index 8c6bdf64be99..8e23cf8fbb58 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 "http://www.gentoo.org/dtd/metadata.dtd"> +<!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> @@ -12,4 +8,7 @@ <use> <flag name="gssapi">Enable support for <pkg>net-libs/libgssglue</pkg></flag> </use> + <upstream> + <remote-id type="github">distcc/distcc</remote-id> + </upstream> </pkgmetadata> diff --git a/sys-devel/dwz/Manifest b/sys-devel/dwz/Manifest index e03a7ec5d0f8..d770ee4adc0a 100644 --- a/sys-devel/dwz/Manifest +++ b/sys-devel/dwz/Manifest @@ -1 +1 @@ -DIST dwz-0.13.tar.xz 114016 BLAKE2B 0e53bb99a7790dbdd724594ad00f76267483fe31bf99c9a6ea67f8ca031d2559d5cfc79f613c81b1a99f9086aa16570cb4d850f36ddbc60bdec443dc3122cae7 SHA512 8dc5e647a99ab652fbbed2d37c595a072a2e31198e66f84220d4caf04a9ee0b2900b116932f268b68015e4cc6b49b87313bf1a2d00748d2b3c4799c9ee58c2f4 +DIST dwz-0.15.tar.xz 150080 BLAKE2B 4ce1722a53cb588cda8195211a26b28d69891ed32cc59e44897270298d033590c79c8c73168dc3b261cb017fc12874a9cbd50db3bfaa0aa7de8ed7cf8a588cca SHA512 43eb4b08c1f529859dc3466697d5ad7e172d6efbf21409530a67a2492ae4acc3734d5134bbd6e07c089ecc358d915871b13e22f6e4f1dd4c3af19ef804f8fcc5 diff --git a/sys-devel/dwz/dwz-0.13.ebuild b/sys-devel/dwz/dwz-0.15-r1.ebuild index 58aaf22593d5..07e6062f11f1 100644 --- a/sys-devel/dwz/dwz-0.13.ebuild +++ b/sys-devel/dwz/dwz-0.15-r1.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit toolchain-funcs @@ -13,19 +13,34 @@ S="${WORKDIR}/${PN}" LICENSE="GPL-2+ GPL-3+" SLOT="0" -KEYWORDS="~amd64" +KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86" IUSE="test" RESTRICT="!test? ( test )" -RDEPEND="dev-libs/elfutils" +RDEPEND=" + dev-libs/elfutils + dev-libs/xxhash +" DEPEND="${RDEPEND}" BDEPEND="test? ( - dev-util/dejagnu dev-libs/elfutils[utils] + dev-util/dejagnu + dev-debug/gdb )" src_prepare() { default - sed -e '/^CFLAGS/d' -i Makefile || die tc-export CC } + +src_compile() { + emake CFLAGS="${CFLAGS}" srcdir="${S}" +} + +src_test() { + emake CFLAGS="${CFLAGS}" srcdir="${S}" check +} + +src_install() { + emake DESTDIR="${D}" CFLAGS="${CFLAGS}" srcdir="${S}" install +} diff --git a/sys-devel/dwz/metadata.xml b/sys-devel/dwz/metadata.xml index adcbc40ec9a0..c87f24a66212 100644 --- a/sys-devel/dwz/metadata.xml +++ b/sys-devel/dwz/metadata.xml @@ -1,13 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="person" proxied="yes"> - <email>annulen@yandex.ru</email> - <name>Konstantin Tokarev</name> - </maintainer> - <maintainer type="project" proxied="proxy"> - <email>proxy-maint@gentoo.org</email> - <name>Proxy Maintainers</name> + <maintainer type="project"> + <email>toolchain@gentoo.org</email> + <name>Gentoo Toolchain Project</name> </maintainer> <longdescription> The dwz package contains a program that attempts to optimize DWARF diff --git a/sys-devel/elftoolchain/Manifest b/sys-devel/elftoolchain/Manifest index 40e9f23e39d8..d43a208db906 100644 --- a/sys-devel/elftoolchain/Manifest +++ b/sys-devel/elftoolchain/Manifest @@ -1 +1,2 @@ DIST elftoolchain-0.7.1.tar.bz2 5361427 BLAKE2B f86204b3c89433948eaf2cd2edc57abf9b77bfab777dc2a840b7aa5fbddfd31665bd27f31d7af2dea09fab0118e201b12802b4da85f8210af29094661f6f1fe5 SHA512 8226c468b393f0d567167a9dd6b16d2a226227e4d05dab8f44550038da44dcbfb92749f8e1a4b130b893675337a6771e24a81f350f3f864b1b8b17402ed23b26 +DIST elftoolchain-0.7.1_p20210319.tar.gz 6767324 BLAKE2B c7e068577744fd42a44784e6a2b03ffdaa9dd15e41f4ff2a6d5fd80df24a61a950ff11fa63ebbbaf2c90bc1b19e58f7184a2b883a6f866adcbf0940ad9fca81c SHA512 968d3247e160dd6f90a88e69bf3cb8e6bf2b8216500a0a91699bc2b8d3de22db8f013212813139701e75c3a9eb852bb4c1360e8058f85959e0973e05e4851c8c diff --git a/sys-devel/elftoolchain/elftoolchain-0.7.1-r2.ebuild b/sys-devel/elftoolchain/elftoolchain-0.7.1-r2.ebuild index 4eea87b1c581..a237b0a27ce2 100644 --- a/sys-devel/elftoolchain/elftoolchain-0.7.1-r2.ebuild +++ b/sys-devel/elftoolchain/elftoolchain-0.7.1-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -21,8 +21,8 @@ DEPEND="${RDEPEND}" BDEPEND=" dev-vcs/subversion sys-apps/lsb-release - >=sys-devel/bmake-20210314-r1 - virtual/yacc" + >=dev-build/bmake-20210314-r1 + app-alternatives/yacc" PATCHES=( "${FILESDIR}"/${P}-fno-common.patch ) diff --git a/sys-devel/elftoolchain/elftoolchain-0.7.1_p20210319.ebuild b/sys-devel/elftoolchain/elftoolchain-0.7.1_p20210319.ebuild new file mode 100644 index 000000000000..02c757f53f3e --- /dev/null +++ b/sys-devel/elftoolchain/elftoolchain-0.7.1_p20210319.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic toolchain-funcs + +MY_COMMIT="58584bb3e5276586e1cb246641525f72843ebc08" + +DESCRIPTION="Libraries/utilities to handle ELF objects (BSD drop in replacement for libelf)" +HOMEPAGE="https://wiki.freebsd.org/LibElf" +SRC_URI="https://github.com/elftoolchain/elftoolchain/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}"/${PN}-${MY_COMMIT} + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + app-arch/libarchive:= + dev-libs/uthash + !dev-libs/elfutils + !dev-libs/libelf" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-vcs/subversion + sys-apps/lsb-release + >=dev-build/bmake-20210314-r1 + app-alternatives/yacc" + +src_prepare() { + default + + sed -e 's/-Werror//' -i libelf/os.Linux.mk || die + + # use system uthash + rm common/{utarray,uthash}.h || die + + # needs unpackaged TET tools + rm -r test || die +} + +src_configure() { + # -pg is used and the two are incompatible + filter-flags -fomit-frame-pointer + tc-export AR CC LD RANLIB + export MAKESYSPATH="${BROOT}"/usr/share/mk/bmake +} + +src_compile() { + bmake || die +} + +src_install() { + bmake \ + DESTDIR="${D}" \ + BINDIR="${EPREFIX}"/usr/bin/${CHOST}-elftoolchain \ + LIBDIR="${EPREFIX}"/usr/$(get_libdir) \ + DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \ + install || die + + # remove static libraries + find "${ED}" -name '*.a' -delete || die +} diff --git a/sys-devel/elftoolchain/metadata.xml b/sys-devel/elftoolchain/metadata.xml index cebcfd378268..adc88ed39395 100644 --- a/sys-devel/elftoolchain/metadata.xml +++ b/sys-devel/elftoolchain/metadata.xml @@ -1,13 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person"> - <email>jakov.smolic@sartura.hr</email> - <name>Jakov Smolic</name> - </maintainer> - <maintainer type="project"> - <email>proxy-maint@gentoo.org</email> - <name>Proxy Maintainers</name> + <email>jsmolic@gentoo.org</email> + <name>Jakov Smolić</name> </maintainer> <upstream> <remote-id type="sourceforge">elftoolchain</remote-id> diff --git a/sys-devel/flex/Manifest b/sys-devel/flex/Manifest index 14e6b2bca98b..34ccf066269d 100644 --- a/sys-devel/flex/Manifest +++ b/sys-devel/flex/Manifest @@ -1,3 +1,2 @@ -DIST flex-2.6.1.tar.xz 835048 BLAKE2B 5b0b67774d1ba2d4b2ad8a8cba1f0b8fed9aecdae387e54e6cb8fd1c0c9ef78559bc1a6fe6b97f984f16b438d350de4dccda7e3427d71fead9073ab6616b0ecc SHA512 1e35d0447f59139b98ede085d1a603d4f61cf8bc11cf2e291a3f492a05c60ee61535481b878585cd6843cd9b3c7952c834adfa78a6a71c64802e7b3069dec9d1 -DIST flex-2.6.3.tar.gz 1405560 BLAKE2B 2aa9ca18f2ab124db9567e2d2ee512881a71755342bdcbd05ef536653396d1e4ed47dafc1227531bf9e9a610d9c5aa2d924bf864b18c5a618b2ccb61db7fef4e SHA512 f14b1af7ddd148660737991787fcf13d86cc0bef3859ed6c2135963373e76524d70382795c845cb6491b0435f8c40ba81e17f15267592b8d1656cfd4c3430b00 +DIST flex-2.6.4-autotools-regenerate.patch.xz 282588 BLAKE2B 3995b8b5e354a43b1a4ff72fae76027c904ddb24eb8e5d55fc6fbe81299f48fa70ac3c4a98b9ed39aca8a98190d6db5005cacb96ec1016d413860d84a434dcc0 SHA512 9efd3197fdf7f8435dfbf4dafbe6b99c1fafede0ec364dbeb9cca81711763d693bc5d30fc3b2af038a44f8848577d19dd737e3afe0cd3b08ab79daea64fcdefa DIST flex-2.6.4.tar.gz 1419096 BLAKE2B c003d4f764f7f4d41e33af7ee28c2af272a9f0aee6ba7c2494ba96722d8d0b18f7a3f745217e9a2cecb43b6863328267a810280670c04464156b3eb3d7ee9d62 SHA512 e9785f3d620a204b7d20222888917dc065c2036cae28667065bf7862dfa1b25235095a12fd04efdbd09bfd17d3452e6b9ef953a8c1137862ff671c97132a082e diff --git a/sys-devel/flex/files/flex-2.6.3-reentrant.patch b/sys-devel/flex/files/flex-2.6.3-reentrant.patch deleted file mode 100644 index f2f5eb8374ba..000000000000 --- a/sys-devel/flex/files/flex-2.6.3-reentrant.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 078b46c69d063aef1715b11348a2871d6036f253 Mon Sep 17 00:00:00 2001 -From: Christos Zoulas <christos@zoulas.com> -Date: Sun, 22 Jan 2017 18:34:30 +0100 -Subject: [PATCH] Add more defines in the non-reentrant part. - -Fix the reentrant part; don't "#define yyfoo yyfoo" because it breaks -code that does #ifndef yywrap .. ---- - src/flex.skl | 16 ++++++++++++++-- - 1 file changed, 14 insertions(+), 2 deletions(-) - -diff --git a/src/flex.skl b/src/flex.skl -index 190700f..6a7cde4 100644 ---- a/src/flex.skl -+++ b/src/flex.skl -@@ -61,11 +61,17 @@ m4_changequote([[, ]]) - m4_ifelse(M4_YY_PREFIX,yy,, - #define yy_create_buffer M4_YY_PREFIX[[_create_buffer]] - #define yy_delete_buffer M4_YY_PREFIX[[_delete_buffer]] --#define yy_flex_debug M4_YY_PREFIX[[_flex_debug]] -+#define yy_scan_buffer M4_YY_PREFIX[[_scan_buffer]] -+#define yy_scan_string M4_YY_PREFIX[[_scan_string]] -+#define yy_scan_bytes M4_YY_PREFIX[[_scan_bytes]] - #define yy_init_buffer M4_YY_PREFIX[[_init_buffer]] - #define yy_flush_buffer M4_YY_PREFIX[[_flush_buffer]] - #define yy_load_buffer_state M4_YY_PREFIX[[_load_buffer_state]] - #define yy_switch_to_buffer M4_YY_PREFIX[[_switch_to_buffer]] -+#define yypush_buffer_state M4_YY_PREFIX[[push_buffer_state]] -+#define yypop_buffer_state M4_YY_PREFIX[[pop_buffer_state]] -+#define yyensure_buffer_stack M4_YY_PREFIX[[ensure_buffer_stack]] -+#define yy_flex_debug M4_YY_PREFIX[[_flex_debug]] - #define yyin M4_YY_PREFIX[[in]] - #define yyleng M4_YY_PREFIX[[leng]] - #define yylex M4_YY_PREFIX[[lex]] -@@ -107,7 +113,7 @@ m4_ifdef( [[M4_YY_PREFIX]],, [[m4_define([[M4_YY_PREFIX]], [[yy]])]]) - - m4preproc_define(`M4_GEN_PREFIX', - ``[[#define yy$1 ]]M4_YY_PREFIX[[$1]] --m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'') -+%# m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'') - - %if-c++-only - /* The c++ scanner is a mess. The FlexLexer.h header file relies on the -@@ -120,6 +126,7 @@ m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'') - %endif - - %if-c-only -+m4_ifelse(M4_YY_PREFIX,yy,, - M4_GEN_PREFIX(`_create_buffer') - M4_GEN_PREFIX(`_delete_buffer') - M4_GEN_PREFIX(`_scan_buffer') -@@ -155,6 +162,7 @@ m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'') - M4_GEN_PREFIX(`set_column') - ]]) - M4_GEN_PREFIX(`wrap') -+) - %endif - - m4_ifdef( [[M4_YY_BISON_LVAL]], -@@ -170,11 +178,14 @@ m4_ifdef( [[<M4_YY_BISON_LLOC>]], - ]]) - - -+m4_ifelse(M4_YY_PREFIX,yy,, - M4_GEN_PREFIX(`alloc') - M4_GEN_PREFIX(`realloc') - M4_GEN_PREFIX(`free') -+) - - %if-c-only -+m4_ifelse(M4_YY_PREFIX,yy,, - m4_ifdef( [[M4_YY_NOT_REENTRANT]], - [[ - M4_GEN_PREFIX(`text') -@@ -184,6 +195,7 @@ m4_ifdef( [[M4_YY_NOT_REENTRANT]], - M4_GEN_PREFIX(`_flex_debug') - M4_GEN_PREFIX(`lineno') - ]]) -+) - %endif - - diff --git a/sys-devel/flex/files/flex-2.6.4-fix-apple-m1-crash-by-explicit-pointer-cast.patch b/sys-devel/flex/files/flex-2.6.4-fix-apple-m1-crash-by-explicit-pointer-cast.patch new file mode 100644 index 000000000000..c594262d2cb0 --- /dev/null +++ b/sys-devel/flex/files/flex-2.6.4-fix-apple-m1-crash-by-explicit-pointer-cast.patch @@ -0,0 +1,48 @@ +https://github.com/westes/flex/issues/539 +https://github.com/westes/flex/pull/554 +https://bugs.gentoo.org/871324 + +This is a backported version for applying to v2.6.4 +instead of git. + +From cce2df853386d5b5b60445b1204dcca08e9f259e Mon Sep 17 00:00:00 2001 +From: Yifeng Li <tomli@tomli.me> +Date: Mon, 20 Feb 2023 11:23:52 +0000 +Subject: [PATCH] Fix #539 crash on Apple M1 by casting 0 to (char *) + explicitly + +Currently, when the NULL-terminated variadic function +filter_create_ext() is invoked, the value "0" is passed as +the last argument to act as a terminator. However, this is +an integer value, which is incompatible with the pointer +data type expected by filter_create_ext(). + +This is undefined behavior in C, correct operation is not +guaranteed. In fact, it causes flex to crash on Apple M1 +when GCC is used - the loop is not terminated when it should, +instead, it keeps running, corrupting the argument list for +invoking m4. As a result, it creates the following error: + +> flex: fatal internal error, exec of gm4 failed + +This commit fixes the problem by explicitly casting the value 0 to +the correct pointer type (char *). + +Signed-off-by: Yifeng Li <tomli@tomli.me> +--- + src/main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/main.c b/src/main.c +index e5eac44fe..5c9086183 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -380,7 +380,7 @@ void check_options (void) + } + } + } +- filter_create_ext(output_chain, m4, "-P", 0); ++ filter_create_ext(output_chain, m4, "-P", (char *) 0); + filter_create_int(output_chain, filter_fix_linedirs, NULL); + + /* For debugging, only run the requested number of filters. */ diff --git a/sys-devel/flex/files/flex-2.6.4-fix-build-with-glibc2.26.patch b/sys-devel/flex/files/flex-2.6.4-fix-build-with-glibc2.26.patch new file mode 100644 index 000000000000..9a9de8746b89 --- /dev/null +++ b/sys-devel/flex/files/flex-2.6.4-fix-build-with-glibc2.26.patch @@ -0,0 +1,219 @@ +https://github.com/westes/flex/issues/436 +https://bugs.gentoo.org/705800 +https://developers.redhat.com/blog/2019/04/22/implicit-function-declarations-flexs-use-of-reallocarray +https://github.com/westes/flex/commit/4b5111d9772b5c160340ca96f08d30d7f6db5cda +https://github.com/westes/flex/commit/24fd0551333e7eded87b64dd36062da3df2f6380 +https://github.com/westes/flex/commit/0db9f8903a446e7026874be519b8dc55a471f014 +https://github.com/westes/flex/commit/a17d79e9c722a6735b6d2a8f152287404f27df32 +https://github.com/westes/flex/commit/4081efa0831b15d7e4e4255401c225ad8262426d +https://github.com/westes/flex/commit/1985bb3c7abed940e91ad816504ef08a18c3b7c1 + +From 4b5111d9772b5c160340ca96f08d30d7f6db5cda Mon Sep 17 00:00:00 2001 +From: Explorer09 <explorer09@gmail.com> +Date: Mon, 4 Sep 2017 08:28:53 +0800 +Subject: [PATCH] scanner: Include flexdef.h at %top block of scan.l + +config.h may define macros that alter the API of the standard library +funtions, and so it should be included before any other standard +header, even before the skeleton's standard header inclusion. + +For example: config.h may #define _GNU_SOURCE that would expose the +reallocarray() prototype from <stdlib.h> on glibc 2.26+ systems. If we +include <stdlib.h> before config.h, reallocarray() would not be +available for use in lex file since the second include doesn't help +due to header guard. + +For now our config.h might `#define malloc rpl_malloc` -- this +substitution must work before including stdlib.h, or else the compiler +will complain about missing prototypes, and may result in incorrect +code in scan.l (gcc warning: return makes pointer from integer without +a cast [-Wint-conversion]). + +Fixes #247. +--- a/src/scan.l ++++ b/src/scan.l +@@ -1,5 +1,11 @@ + /* scan.l - scanner for flex input -*-C-*- */ + ++%top{ ++/* flexdef.h includes config.h, which may contain macros that alter the API */ ++/* of libc functions. Must include first before any libc header. */ ++#include "flexdef.h" ++} ++ + %{ + /* Copyright (c) 1990 The Regents of the University of California. */ + /* All rights reserved. */ +@@ -32,7 +38,6 @@ + /* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */ + /* PURPOSE. */ + +-#include "flexdef.h" + #include "parse.h" + extern bool tablesverify, tablesext; + extern int trlcontxt; /* Set in parse.y for each rule. */ + +From 24fd0551333e7eded87b64dd36062da3df2f6380 Mon Sep 17 00:00:00 2001 +From: Explorer09 <explorer09@gmail.com> +Date: Mon, 4 Sep 2017 10:47:33 +0800 +Subject: [PATCH] build: AC_USE_SYSTEM_EXTENSIONS in configure.ac. + +This would, e.g. define _GNU_SOURCE in config.h, enabling the +reallocarray() prototype in glibc 2.26+ on Linux systems with that +version of glibc. + +Fixes #241. +--- a/configure.ac ++++ b/configure.ac +@@ -25,8 +25,10 @@ + # autoconf requirements and initialization + + AC_INIT([the fast lexical analyser generator],[2.6.4],[flex-help@lists.sourceforge.net],[flex]) ++AC_PREREQ([2.60]) + AC_CONFIG_SRCDIR([src/scan.l]) + AC_CONFIG_AUX_DIR([build-aux]) ++AC_USE_SYSTEM_EXTENSIONS + LT_INIT + AM_INIT_AUTOMAKE([1.15 -Wno-portability foreign std-options dist-lzip parallel-tests subdir-objects]) + AC_CONFIG_HEADER([src/config.h]) + + +From 0db9f8903a446e7026874be519b8dc55a471f014 Mon Sep 17 00:00:00 2001 +From: Lukasz Baj <l.baj@radytek.com> +Date: Fri, 22 Sep 2017 10:24:46 +0200 +Subject: [PATCH] build: Remove custom reallocarray() declaration. + +Use one from <stdlib.h> instead because that is more portable. +--- a/src/flexdef.h ++++ b/src/flexdef.h +@@ -631,10 +631,6 @@ extern int sectnum, nummt, hshcol, dfaeql, numeps, eps2, num_reallocs; + extern int tmpuses, totnst, peakpairs, numuniq, numdup, hshsave; + extern int num_backing_up, bol_needed; + +-#ifndef HAVE_REALLOCARRAY +-void *reallocarray(void *, size_t, size_t); +-#endif +- + void *allocate_array(int, size_t); + void *reallocate_array(void *, int, size_t); + + +From a17d79e9c722a6735b6d2a8f152287404f27df32 Mon Sep 17 00:00:00 2001 +From: Explorer09 <explorer09@gmail.com> +Date: Sat, 14 Oct 2017 00:36:54 +0800 +Subject: [PATCH] scanner: Define _POSIX_C_SOURCE when needed in skeleton. + +The function fileno() is defined by POSIX. When flex would otherwise not provide that feature macro, we define it. + +Fixes #263 +--- a/src/flex.skl ++++ b/src/flex.skl +@@ -218,6 +218,14 @@ m4_ifdef( [[M4_YY_TABLES_EXTERNAL]], + + /* begin standard C headers. */ + %if-c-only ++m4_ifdef( [[M4_YY_ALWAYS_INTERACTIVE]], , ++[[m4_ifdef( [[M4_YY_NEVER_INTERACTIVE]], , ++[[#ifndef _POSIX_C_SOURCE ++#define _POSIX_C_SOURCE 1 /* for fileno() */ ++#ifndef _POSIX_SOURCE ++#define _POSIX_SOURCE 1 ++#endif ++#endif]])]]) + #include <stdio.h> + #include <string.h> + #include <errno.h> + +From 4081efa0831b15d7e4e4255401c225ad8262426d Mon Sep 17 00:00:00 2001 +From: Explorer09 <explorer09@gmail.com> +Date: Thu, 8 Mar 2018 10:04:36 +0800 +Subject: [PATCH] scanner: Fix glibc features.h dependency in skeleton. + +Commit a17d79e9c722a6735b6d2a8f152287404f27df32 defines _POSIX_C_SOURCE +to the minimum of 1 if it's not defined in the user's scanner code or +the compiling environment. However in glibc the macros are not yet set +up until one of the libc headers is included. This unfortunately have +made us overwrite the default _POSIX_C_SOURCE value that would be +defined by glibc (200809L at the time of writing), causing regressions +in user code. + +Now in this patch: +1. Ensure feature test macros have been set up in glibc before checking +or defining any of them in our skeleton code. +2. Have a more conservative logic when determining the need to define +_POSIX_C_SOURCE (required for fileno()). + +Fixes: #313 + +Note: +It could be tricky for application code to ensure feature test macros +have been set up in glibc, since <features.h> is no portable header and +not meant to be included directly by applications. The way to do it is +to include a libc header which in turn includes <features.h>. However, +many of the glibc headers check __USE_POSIX (a glibc internal macro +defined if _POSIX_C_SOURCE is defined) and determine which interfaces +to expose already, making the headers inappropriate for our goal. +Those which don't depend on _POSIX_C_SOURCE, and are also available +since ANSI C89, are only <assert.h>, <errno.h> and <math.h>. + +<assert.h> is finally favored due to other considerations: +- <math.h> check for __USE_XOPEN in glibc, making a dependency on +_XOPEN_SOURCE, besides it exposes much more interfaces than we need. +- In djgpp, <errno.h> depends on _POSIX_SOURCE to hide definitions of +some errno values when it's defined. +- <assert.h> exposes the fewest interfaces among the 3 headers and, at +the time of writing, checks for only C99 (for __func__), C11 (for +_Static_assert), and _GNU_SOURCE when needed. + +Signed-off-by: Kang-Che Sung <explorer09@gmail.com> +--- a/src/flex.skl ++++ b/src/flex.skl +@@ -220,11 +220,21 @@ m4_ifdef( [[M4_YY_TABLES_EXTERNAL]], + %if-c-only + m4_ifdef( [[M4_YY_ALWAYS_INTERACTIVE]], , + [[m4_ifdef( [[M4_YY_NEVER_INTERACTIVE]], , +-[[#ifndef _POSIX_C_SOURCE +-#define _POSIX_C_SOURCE 1 /* for fileno() */ +-#ifndef _POSIX_SOURCE +-#define _POSIX_SOURCE 1 ++[[/* Feature test macros. Flex uses functions that require a minimum set of ++ * macros defined. As defining some macros may hide function declarations that ++ * user code might use, be conservative and respect user's definitions as much ++ * as possible. In glibc, feature test macros may not be all set up until one ++ * of the libc header (that includes <features.h>) is included. This creates ++ * a circular dependency when we check the macros. <assert.h> is the safest ++ * header we can include and does not declare too many functions we don't need. ++ */ ++#if !defined(__GNU_LIBRARY__) && defined(__STDC__) ++#include <assert.h> + #endif ++#if !(defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \ ++ defined(_POSIX_SOURCE)) ++# define _POSIX_C_SOURCE 1 /* Required for fileno() */ ++# define _POSIX_SOURCE 1 + #endif]])]]) + #include <stdio.h> + #include <string.h> + +From 1985bb3c7abed940e91ad816504ef08a18c3b7c1 Mon Sep 17 00:00:00 2001 +From: Explorer09 <explorer09@gmail.com> +Date: Thu, 8 Mar 2018 09:53:24 +0800 +Subject: [PATCH] scanner: correct comments about __STDC_LIMIT_MACROS. + +No code changes. + +Signed-off-by: Kang-Che Sung <explorer09@gmail.com> +--- a/src/flexint.h ++++ b/src/flexint.h +@@ -7,8 +7,8 @@ + + #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +-/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, +- * if you want the limit (max/min) macros for int types. ++/* C++ systems might need __STDC_LIMIT_MACROS defined before including ++ * <stdint.h>, if you want the limit (max/min) macros for int types. + */ + #ifndef __STDC_LIMIT_MACROS + #define __STDC_LIMIT_MACROS 1 + diff --git a/sys-devel/flex/files/flex-2.6.4-fix-build-with-glibc2.6+.patch b/sys-devel/flex/files/flex-2.6.4-fix-build-with-glibc2.6+.patch deleted file mode 100644 index 328b57524565..000000000000 --- a/sys-devel/flex/files/flex-2.6.4-fix-build-with-glibc2.6+.patch +++ /dev/null @@ -1,767 +0,0 @@ -Backport of https://github.com/westes/flex/commit/24fd0551333e7eded87b64dd36062da3df2f6380 - -Bug: https://bugs.gentoo.org/628744 - ---- a/configure -+++ b/configure -@@ -3605,13 +3605,142 @@ test -z "$SED" && SED=sed - Xsed="$SED -e 1s/^X//" - - -+ac_ext=c -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -+$as_echo_n "checking how to run the C preprocessor... " >&6; } -+# On Suns, sometimes $CPP names a directory. -+if test -n "$CPP" && test -d "$CPP"; then -+ CPP= -+fi -+if test -z "$CPP"; then -+ if ${ac_cv_prog_CPP+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ # Double quotes because CPP needs to be expanded -+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" -+ do -+ ac_preproc_ok=false -+for ac_c_preproc_warn_flag in '' yes -+do -+ # Use a header file that comes with gcc, so configuring glibc -+ # with a fresh cross-compiler works. -+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since -+ # <limits.h> exists even on freestanding compilers. -+ # On the NeXT, cc -E runs the code through the compiler's parser, -+ # not just through cpp. "Syntax error" is here to catch this case. -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#ifdef __STDC__ -+# include <limits.h> -+#else -+# include <assert.h> -+#endif -+ Syntax error -+_ACEOF -+if ac_fn_c_try_cpp "$LINENO"; then : -+ -+else -+ # Broken: fails on valid input. -+continue -+fi -+rm -f conftest.err conftest.i conftest.$ac_ext -+ -+ # OK, works on sane cases. Now check whether nonexistent headers -+ # can be detected and how. -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#include <ac_nonexistent.h> -+_ACEOF -+if ac_fn_c_try_cpp "$LINENO"; then : -+ # Broken: success on invalid input. -+continue -+else -+ # Passes both tests. -+ac_preproc_ok=: -+break -+fi -+rm -f conftest.err conftest.i conftest.$ac_ext -+ -+done -+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -+rm -f conftest.i conftest.err conftest.$ac_ext -+if $ac_preproc_ok; then : -+ break -+fi - -+ done -+ ac_cv_prog_CPP=$CPP - -+fi -+ CPP=$ac_cv_prog_CPP -+else -+ ac_cv_prog_CPP=$CPP -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -+$as_echo "$CPP" >&6; } -+ac_preproc_ok=false -+for ac_c_preproc_warn_flag in '' yes -+do -+ # Use a header file that comes with gcc, so configuring glibc -+ # with a fresh cross-compiler works. -+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since -+ # <limits.h> exists even on freestanding compilers. -+ # On the NeXT, cc -E runs the code through the compiler's parser, -+ # not just through cpp. "Syntax error" is here to catch this case. -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#ifdef __STDC__ -+# include <limits.h> -+#else -+# include <assert.h> -+#endif -+ Syntax error -+_ACEOF -+if ac_fn_c_try_cpp "$LINENO"; then : - -+else -+ # Broken: fails on valid input. -+continue -+fi -+rm -f conftest.err conftest.i conftest.$ac_ext - -+ # OK, works on sane cases. Now check whether nonexistent headers -+ # can be detected and how. -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#include <ac_nonexistent.h> -+_ACEOF -+if ac_fn_c_try_cpp "$LINENO"; then : -+ # Broken: success on invalid input. -+continue -+else -+ # Passes both tests. -+ac_preproc_ok=: -+break -+fi -+rm -f conftest.err conftest.i conftest.$ac_ext - -+done -+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -+rm -f conftest.i conftest.err conftest.$ac_ext -+if $ac_preproc_ok; then : - -+else -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -+See \`config.log' for more details" "$LINENO" 5; } -+fi - -+ac_ext=c -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -@@ -3744,91 +3873,208 @@ $as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 --$as_echo_n "checking for fgrep... " >&6; } --if ${ac_cv_path_FGREP+:} false; then : -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -+$as_echo_n "checking for ANSI C header files... " >&6; } -+if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 - else -- if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 -- then ac_cv_path_FGREP="$GREP -F" -- else -- if test -z "$FGREP"; then -- ac_path_FGREP_found=false -- # Loop through the user's path and test for each of PROGNAME-LIST -- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_prog in fgrep; do -- for ac_exec_ext in '' $ac_executable_extensions; do -- ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" -- as_fn_executable_p "$ac_path_FGREP" || continue --# Check for GNU ac_path_FGREP and select it if it is found. -- # Check for GNU $ac_path_FGREP --case `"$ac_path_FGREP" --version 2>&1` in --*GNU*) -- ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; --*) -- ac_count=0 -- $as_echo_n 0123456789 >"conftest.in" -- while : -- do -- cat "conftest.in" "conftest.in" >"conftest.tmp" -- mv "conftest.tmp" "conftest.in" -- cp "conftest.in" "conftest.nl" -- $as_echo 'FGREP' >> "conftest.nl" -- "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break -- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break -- as_fn_arith $ac_count + 1 && ac_count=$as_val -- if test $ac_count -gt ${ac_path_FGREP_max-0}; then -- # Best one so far, save it but keep looking for a better one -- ac_cv_path_FGREP="$ac_path_FGREP" -- ac_path_FGREP_max=$ac_count -- fi -- # 10*(2^10) chars as input seems more than enough -- test $ac_count -gt 10 && break -- done -- rm -f conftest.in conftest.tmp conftest.nl conftest.out;; --esac -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#include <stdlib.h> -+#include <stdarg.h> -+#include <string.h> -+#include <float.h> - -- $ac_path_FGREP_found && break 3 -- done -- done -- done --IFS=$as_save_IFS -- if test -z "$ac_cv_path_FGREP"; then -- as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 -- fi --else -- ac_cv_path_FGREP=$FGREP --fi -+int -+main () -+{ - -- fi -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ ac_cv_header_stdc=yes -+else -+ ac_cv_header_stdc=no - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 --$as_echo "$ac_cv_path_FGREP" >&6; } -- FGREP="$ac_cv_path_FGREP" -- -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - --test -z "$GREP" && GREP=grep -+if test $ac_cv_header_stdc = yes; then -+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#include <string.h> - -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "memchr" >/dev/null 2>&1; then : - -+else -+ ac_cv_header_stdc=no -+fi -+rm -f conftest* - -+fi - -+if test $ac_cv_header_stdc = yes; then -+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#include <stdlib.h> - -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "free" >/dev/null 2>&1; then : - -+else -+ ac_cv_header_stdc=no -+fi -+rm -f conftest* - -+fi - -+if test $ac_cv_header_stdc = yes; then -+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -+ if test "$cross_compiling" = yes; then : -+ : -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#include <ctype.h> -+#include <stdlib.h> -+#if ((' ' & 0x0FF) == 0x020) -+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -+#else -+# define ISLOWER(c) \ -+ (('a' <= (c) && (c) <= 'i') \ -+ || ('j' <= (c) && (c) <= 'r') \ -+ || ('s' <= (c) && (c) <= 'z')) -+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -+#endif - -+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -+int -+main () -+{ -+ int i; -+ for (i = 0; i < 256; i++) -+ if (XOR (islower (i), ISLOWER (i)) -+ || toupper (i) != TOUPPER (i)) -+ return 2; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_run "$LINENO"; then : - -+else -+ ac_cv_header_stdc=no -+fi -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -+ conftest.$ac_objext conftest.beam conftest.$ac_ext -+fi - -+fi -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -+$as_echo "$ac_cv_header_stdc" >&6; } -+if test $ac_cv_header_stdc = yes; then - -+$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -+fi - -+# On IRIX 5.3, sys/types and inttypes.h are conflicting. -+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ -+ inttypes.h stdint.h unistd.h -+do : -+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -+" -+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : -+ cat >>confdefs.h <<_ACEOF -+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+_ACEOF -+ -+fi -+ -+done -+ -+ -+ -+ ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" -+if test "x$ac_cv_header_minix_config_h" = xyes; then : -+ MINIX=yes -+else -+ MINIX= -+fi -+ -+ -+ if test "$MINIX" = yes; then - -+$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h - - -+$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h -+ -+ -+$as_echo "#define _MINIX 1" >>confdefs.h -+ -+ fi -+ -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 -+$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } -+if ${ac_cv_safe_to_define___extensions__+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+# define __EXTENSIONS__ 1 -+ $ac_includes_default -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ ac_cv_safe_to_define___extensions__=yes -+else -+ ac_cv_safe_to_define___extensions__=no -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 -+$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } -+ test $ac_cv_safe_to_define___extensions__ = yes && -+ $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h -+ -+ $as_echo "#define _ALL_SOURCE 1" >>confdefs.h -+ -+ $as_echo "#define _GNU_SOURCE 1" >>confdefs.h -+ -+ $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h -+ -+ $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h -+ -+ -+for ac_header in dlfcn.h -+do : -+ ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -+" -+if test "x$ac_cv_header_dlfcn_h" = xyes; then : -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_DLFCN_H 1 -+_ACEOF -+ -+fi -+ -+done - - - # Check whether --with-gnu-ld was given. -@@ -6898,288 +7144,6 @@ func_munge_path_list () - esac - } - --ac_ext=c --ac_cpp='$CPP $CPPFLAGS' --ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' --ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' --ac_compiler_gnu=$ac_cv_c_compiler_gnu --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 --$as_echo_n "checking how to run the C preprocessor... " >&6; } --# On Suns, sometimes $CPP names a directory. --if test -n "$CPP" && test -d "$CPP"; then -- CPP= --fi --if test -z "$CPP"; then -- if ${ac_cv_prog_CPP+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- # Double quotes because CPP needs to be expanded -- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" -- do -- ac_preproc_ok=false --for ac_c_preproc_warn_flag in '' yes --do -- # Use a header file that comes with gcc, so configuring glibc -- # with a fresh cross-compiler works. -- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since -- # <limits.h> exists even on freestanding compilers. -- # On the NeXT, cc -E runs the code through the compiler's parser, -- # not just through cpp. "Syntax error" is here to catch this case. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#ifdef __STDC__ --# include <limits.h> --#else --# include <assert.h> --#endif -- Syntax error --_ACEOF --if ac_fn_c_try_cpp "$LINENO"; then : -- --else -- # Broken: fails on valid input. --continue --fi --rm -f conftest.err conftest.i conftest.$ac_ext -- -- # OK, works on sane cases. Now check whether nonexistent headers -- # can be detected and how. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include <ac_nonexistent.h> --_ACEOF --if ac_fn_c_try_cpp "$LINENO"; then : -- # Broken: success on invalid input. --continue --else -- # Passes both tests. --ac_preproc_ok=: --break --fi --rm -f conftest.err conftest.i conftest.$ac_ext -- --done --# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. --rm -f conftest.i conftest.err conftest.$ac_ext --if $ac_preproc_ok; then : -- break --fi -- -- done -- ac_cv_prog_CPP=$CPP -- --fi -- CPP=$ac_cv_prog_CPP --else -- ac_cv_prog_CPP=$CPP --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 --$as_echo "$CPP" >&6; } --ac_preproc_ok=false --for ac_c_preproc_warn_flag in '' yes --do -- # Use a header file that comes with gcc, so configuring glibc -- # with a fresh cross-compiler works. -- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since -- # <limits.h> exists even on freestanding compilers. -- # On the NeXT, cc -E runs the code through the compiler's parser, -- # not just through cpp. "Syntax error" is here to catch this case. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#ifdef __STDC__ --# include <limits.h> --#else --# include <assert.h> --#endif -- Syntax error --_ACEOF --if ac_fn_c_try_cpp "$LINENO"; then : -- --else -- # Broken: fails on valid input. --continue --fi --rm -f conftest.err conftest.i conftest.$ac_ext -- -- # OK, works on sane cases. Now check whether nonexistent headers -- # can be detected and how. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include <ac_nonexistent.h> --_ACEOF --if ac_fn_c_try_cpp "$LINENO"; then : -- # Broken: success on invalid input. --continue --else -- # Passes both tests. --ac_preproc_ok=: --break --fi --rm -f conftest.err conftest.i conftest.$ac_ext -- --done --# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. --rm -f conftest.i conftest.err conftest.$ac_ext --if $ac_preproc_ok; then : -- --else -- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 --$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error $? "C preprocessor \"$CPP\" fails sanity check --See \`config.log' for more details" "$LINENO" 5; } --fi -- --ac_ext=c --ac_cpp='$CPP $CPPFLAGS' --ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' --ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' --ac_compiler_gnu=$ac_cv_c_compiler_gnu -- -- --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 --$as_echo_n "checking for ANSI C header files... " >&6; } --if ${ac_cv_header_stdc+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include <stdlib.h> --#include <stdarg.h> --#include <string.h> --#include <float.h> -- --int --main () --{ -- -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_header_stdc=yes --else -- ac_cv_header_stdc=no --fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -- --if test $ac_cv_header_stdc = yes; then -- # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include <string.h> -- --_ACEOF --if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "memchr" >/dev/null 2>&1; then : -- --else -- ac_cv_header_stdc=no --fi --rm -f conftest* -- --fi -- --if test $ac_cv_header_stdc = yes; then -- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include <stdlib.h> -- --_ACEOF --if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "free" >/dev/null 2>&1; then : -- --else -- ac_cv_header_stdc=no --fi --rm -f conftest* -- --fi -- --if test $ac_cv_header_stdc = yes; then -- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -- if test "$cross_compiling" = yes; then : -- : --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include <ctype.h> --#include <stdlib.h> --#if ((' ' & 0x0FF) == 0x020) --# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') --# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) --#else --# define ISLOWER(c) \ -- (('a' <= (c) && (c) <= 'i') \ -- || ('j' <= (c) && (c) <= 'r') \ -- || ('s' <= (c) && (c) <= 'z')) --# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) --#endif -- --#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) --int --main () --{ -- int i; -- for (i = 0; i < 256; i++) -- if (XOR (islower (i), ISLOWER (i)) -- || toupper (i) != TOUPPER (i)) -- return 2; -- return 0; --} --_ACEOF --if ac_fn_c_try_run "$LINENO"; then : -- --else -- ac_cv_header_stdc=no --fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -- conftest.$ac_objext conftest.beam conftest.$ac_ext --fi -- --fi --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 --$as_echo "$ac_cv_header_stdc" >&6; } --if test $ac_cv_header_stdc = yes; then -- --$as_echo "#define STDC_HEADERS 1" >>confdefs.h -- --fi -- --# On IRIX 5.3, sys/types and inttypes.h are conflicting. --for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ -- inttypes.h stdint.h unistd.h --do : -- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` --ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default --" --if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : -- cat >>confdefs.h <<_ACEOF --#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 --_ACEOF -- --fi -- --done -- -- --for ac_header in dlfcn.h --do : -- ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default --" --if test "x$ac_cv_header_dlfcn_h" = xyes; then : -- cat >>confdefs.h <<_ACEOF --#define HAVE_DLFCN_H 1 --_ACEOF -- --fi -- --done -- -- -- - - - # Set options ---- a/src/config.h.in -+++ b/src/config.h.in -@@ -207,6 +207,9 @@ - /* Define to the m4 executable name. */ - #undef M4 - -+/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -+#undef NO_MINUS_C_MINUS_O -+ - /* Name of package */ - #undef PACKAGE - -@@ -239,6 +242,28 @@ - /* Define to 1 if you have the ANSI C header files. */ - #undef STDC_HEADERS - -+/* Enable extensions on AIX 3, Interix. */ -+#ifndef _ALL_SOURCE -+# undef _ALL_SOURCE -+#endif -+/* Enable GNU extensions on systems that have them. */ -+#ifndef _GNU_SOURCE -+# undef _GNU_SOURCE -+#endif -+/* Enable threading extensions on Solaris. */ -+#ifndef _POSIX_PTHREAD_SEMANTICS -+# undef _POSIX_PTHREAD_SEMANTICS -+#endif -+/* Enable extensions on HP NonStop. */ -+#ifndef _TANDEM_SOURCE -+# undef _TANDEM_SOURCE -+#endif -+/* Enable general extensions on Solaris. */ -+#ifndef __EXTENSIONS__ -+# undef __EXTENSIONS__ -+#endif -+ -+ - /* Version number of package */ - #undef VERSION - -@@ -246,6 +271,16 @@ - `char[]'. */ - #undef YYTEXT_POINTER - -+/* Define to 1 if on MINIX. */ -+#undef _MINIX -+ -+/* Define to 2 if the system does not provide POSIX.1 features except with -+ this defined. */ -+#undef _POSIX_1_SOURCE -+ -+/* Define to 1 if you need to in order for `stat' and other things to work. */ -+#undef _POSIX_SOURCE -+ - /* Define to empty if `const' does not conform to ANSI C. */ - #undef const - diff --git a/sys-devel/flex/flex-2.6.1.ebuild b/sys-devel/flex/flex-2.6.1.ebuild deleted file mode 100644 index d732bb861ffa..000000000000 --- a/sys-devel/flex/flex-2.6.1.ebuild +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -inherit eutils flag-o-matic ltprune multilib-minimal - -DESCRIPTION="The Fast Lexical Analyzer" -HOMEPAGE="https://flex.sourceforge.net/ https://github.com/westes/flex" -SRC_URI="https://github.com/westes/flex/releases/download/v${PV}/${P}.tar.xz" - -LICENSE="FLEX" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86 ~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 #381273 -RDEPEND="sys-devel/m4" -DEPEND="${RDEPEND} - app-arch/xz-utils - nls? ( sys-devel/gettext ) - test? ( sys-devel/bison )" - -src_prepare() { - # Disable running in the tests/ subdir as it has a bunch of built sources - # that cannot be made conditional (automake limitation). #568842 - if ! use test ; then - sed -i \ - -e '/^SUBDIRS =/,/^$/{/tests/d}' \ - Makefile.in || die - fi -} - -src_configure() { - use static && append-ldflags -static - - multilib-minimal_src_configure -} - -multilib_src_configure() { - # Do not install shared libs #503522 - ECONF_SOURCE=${S} \ - econf \ - --disable-shared \ - $(use_enable nls) \ - --docdir='$(datarootdir)/doc/'${PF} -} - -multilib_src_compile() { - if multilib_is_native_abi; then - default - else - cd src || die - emake -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 - cd src || die - emake DESTDIR="${D}" install-libLTLIBRARIES install-includeHEADERS - fi -} - -multilib_src_install_all() { - einstalldocs - dodoc ONEWS - prune_libtool_files --all - rm "${ED}"/usr/share/doc/${PF}/COPYING || die - dosym flex /usr/bin/lex -} diff --git a/sys-devel/flex/flex-2.6.3-r1.ebuild b/sys-devel/flex/flex-2.6.3-r1.ebuild deleted file mode 100644 index 86c8beada8b1..000000000000 --- a/sys-devel/flex/flex-2.6.3-r1.ebuild +++ /dev/null @@ -1,85 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -inherit eutils flag-o-matic libtool ltprune multilib-minimal - -DESCRIPTION="The Fast Lexical Analyzer" -HOMEPAGE="https://flex.sourceforge.net/ 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 ~m68k ~mips ~ppc ~ppc64 ~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 #381273 -RDEPEND="sys-devel/m4" -DEPEND="${RDEPEND} - app-arch/xz-utils - nls? ( sys-devel/gettext ) - test? ( sys-devel/bison )" - -PATCHES=( - "${FILESDIR}/${P}-reentrant.patch" -) - -src_prepare() { - epatch "${PATCHES[@]}" - - # Disable running in the tests/ subdir as it has a bunch of built sources - # that cannot be made conditional (automake limitation). #568842 - if ! use test ; then - sed -i \ - -e '/^SUBDIRS =/,/^$/{/tests/d}' \ - Makefile.in || die - fi - elibtoolize # Prefix always needs this -} - -src_configure() { - use static && append-ldflags -static - - multilib-minimal_src_configure -} - -multilib_src_configure() { - # Do not install shared libs #503522 - ECONF_SOURCE=${S} \ - econf \ - --disable-shared \ - $(use_enable nls) \ - --docdir='$(datarootdir)/doc/'${PF} -} - -multilib_src_compile() { - if multilib_is_native_abi; then - default - else - cd src || die - emake -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 - cd src || die - emake DESTDIR="${D}" install-libLTLIBRARIES install-includeHEADERS - fi -} - -multilib_src_install_all() { - einstalldocs - dodoc ONEWS - prune_libtool_files --all - rm "${ED}"/usr/share/doc/${PF}/COPYING || die - dosym flex /usr/bin/lex -} diff --git a/sys-devel/flex/flex-2.6.3.ebuild b/sys-devel/flex/flex-2.6.3.ebuild deleted file mode 100644 index 922593293712..000000000000 --- a/sys-devel/flex/flex-2.6.3.ebuild +++ /dev/null @@ -1,79 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -inherit eutils flag-o-matic libtool ltprune multilib-minimal - -DESCRIPTION="The Fast Lexical Analyzer" -HOMEPAGE="https://flex.sourceforge.net/ 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 ~m68k ~mips ~ppc ~ppc64 ~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 #381273 -RDEPEND="sys-devel/m4" -DEPEND="${RDEPEND} - app-arch/xz-utils - nls? ( sys-devel/gettext ) - test? ( sys-devel/bison )" - -src_prepare() { - # Disable running in the tests/ subdir as it has a bunch of built sources - # that cannot be made conditional (automake limitation). #568842 - if ! use test ; then - sed -i \ - -e '/^SUBDIRS =/,/^$/{/tests/d}' \ - Makefile.in || die - fi - elibtoolize # Prefix always needs this -} - -src_configure() { - use static && append-ldflags -static - - multilib-minimal_src_configure -} - -multilib_src_configure() { - # Do not install shared libs #503522 - ECONF_SOURCE=${S} \ - econf \ - --disable-shared \ - $(use_enable nls) \ - --docdir='$(datarootdir)/doc/'${PF} -} - -multilib_src_compile() { - if multilib_is_native_abi; then - default - else - cd src || die - emake -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 - cd src || die - emake DESTDIR="${D}" install-libLTLIBRARIES install-includeHEADERS - fi -} - -multilib_src_install_all() { - einstalldocs - dodoc ONEWS - prune_libtool_files --all - rm "${ED}"/usr/share/doc/${PF}/COPYING || die - dosym flex /usr/bin/lex -} diff --git a/sys-devel/flex/flex-2.6.4-r1.ebuild b/sys-devel/flex/flex-2.6.4-r6.ebuild index 9c73a8e03c37..fd91a0206e3b 100644 --- a/sys-devel/flex/flex-2.6.4-r1.ebuild +++ b/sys-devel/flex/flex-2.6.4-r6.ebuild @@ -1,42 +1,54 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit flag-o-matic libtool multilib-minimal toolchain-funcs DESCRIPTION="The Fast Lexical Analyzer" -HOMEPAGE="https://flex.sourceforge.net/ https://github.com/westes/flex" +HOMEPAGE="https://github.com/westes/flex" SRC_URI="https://github.com/westes/${PN}/releases/download/v${PV}/${P}.tar.gz" +SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-autotools-regenerate.patch.xz" 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 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" IUSE="nls static test" RESTRICT="!test? ( test )" -# We want bison explicitly and not yacc in general #381273 RDEPEND="sys-devel/m4" -BDEPEND="${RDEPEND} +# We want bison explicitly and not yacc in general, bug #381273 +BDEPEND=" + ${RDEPEND} nls? ( sys-devel/gettext ) - test? ( sys-devel/bison )" + test? ( sys-devel/bison ) +" +PDEPEND="app-alternatives/lex" PATCHES=( - "${FILESDIR}"/${PN}-2.6.4-libobjdir.patch - "${FILESDIR}"/${PN}-2.6.4-fix-build-with-glibc2.6+.patch + "${FILESDIR}"/${P}-libobjdir.patch + "${FILESDIR}"/${P}-fix-build-with-glibc2.26.patch + "${FILESDIR}"/${P}-fix-apple-m1-crash-by-explicit-pointer-cast.patch + + "${WORKDIR}"/${P}-autotools-regenerate.patch ) src_prepare() { default + # Drop on next release when we can remove ${P}-autotools-regenerate.patch + touch configure.ac aclocal.m4 Makefile.in configure src/config.h.in || die + # Disable running in the tests/ subdir as it has a bunch of built sources - # that cannot be made conditional (automake limitation). #568842 + # that cannot be made conditional (automake limitation). bug #568842 if ! use test ; then sed -i \ -e '/^SUBDIRS =/,/^$/{/tests/d}' \ Makefile.in || die fi - elibtoolize # Prefix always needs this + + # Prefix always needs this + elibtoolize } src_configure() { @@ -46,9 +58,8 @@ src_configure() { } multilib_src_configure() { - # Do not install shared libs #503522 - ECONF_SOURCE=${S} \ - econf \ + # Do not install shared libs, #503522 + ECONF_SOURCE="${S}" econf \ CC_FOR_BUILD="$(tc-getBUILD_CC)" \ --disable-shared \ $(use_enable nls) @@ -79,5 +90,12 @@ multilib_src_install_all() { dodoc ONEWS find "${ED}" -name '*.la' -type f -delete || die rm "${ED}"/usr/share/doc/${PF}/COPYING || die - dosym flex /usr/bin/lex +} + +pkg_postinst() { + # ensure to preserve the symlink before app-alternatives/lex + # is installed + if [[ ! -h ${EROOT}/usr/bin/lex ]]; then + ln -s flex "${EROOT}/usr/bin/lex" || die + fi } diff --git a/sys-devel/flex/flex-2.6.4.ebuild b/sys-devel/flex/flex-2.6.4.ebuild deleted file mode 100644 index 623bc261d893..000000000000 --- a/sys-devel/flex/flex-2.6.4.ebuild +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -inherit eutils flag-o-matic libtool ltprune multilib-minimal - -DESCRIPTION="The Fast Lexical Analyzer" -HOMEPAGE="https://flex.sourceforge.net/ 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 ~m68k ~mips ~ppc ~ppc64 ~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 #381273 -RDEPEND="sys-devel/m4" -DEPEND="${RDEPEND} - app-arch/xz-utils - nls? ( sys-devel/gettext ) - test? ( sys-devel/bison )" - -src_prepare() { - #epatch "${PATCHES[@]}" - epatch_user - - # Disable running in the tests/ subdir as it has a bunch of built sources - # that cannot be made conditional (automake limitation). #568842 - if ! use test ; then - sed -i \ - -e '/^SUBDIRS =/,/^$/{/tests/d}' \ - Makefile.in || die - fi - elibtoolize # Prefix always needs this -} - -src_configure() { - use static && append-ldflags -static - - multilib-minimal_src_configure -} - -multilib_src_configure() { - # Do not install shared libs #503522 - ECONF_SOURCE=${S} \ - econf \ - --disable-shared \ - $(use_enable nls) \ - --docdir='$(datarootdir)/doc/'${PF} -} - -multilib_src_compile() { - if multilib_is_native_abi; then - default - else - cd src || die - emake -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 - cd src || die - emake DESTDIR="${D}" install-libLTLIBRARIES install-includeHEADERS - fi -} - -multilib_src_install_all() { - einstalldocs - dodoc ONEWS - prune_libtool_files --all - rm "${ED}"/usr/share/doc/${PF}/COPYING || die - dosym flex /usr/bin/lex -} diff --git a/sys-devel/flex/metadata.xml b/sys-devel/flex/metadata.xml index 2bdb533c03f5..b08413e6cfb8 100644 --- a/sys-devel/flex/metadata.xml +++ b/sys-devel/flex/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>base-system@gentoo.org</email> diff --git a/sys-devel/gcc-apple/files/gcc-apple-4.2.1-dsymutil.patch b/sys-devel/gcc-apple/files/gcc-apple-4.2.1-dsymutil.patch deleted file mode 100644 index 8da025d8c5d0..000000000000 --- a/sys-devel/gcc-apple/files/gcc-apple-4.2.1-dsymutil.patch +++ /dev/null @@ -1,20 +0,0 @@ -Revert of dsymutil part of -http://gcc.gnu.org/ml/gcc-patches/2006-09/msg00057.html -See http://article.gmane.org/gmane.linux.gentoo.alt/4327 - ---- gcc/config/darwin.h -+++ gcc/config/darwin.h -@@ -326,12 +326,7 @@ - "/* APPLE LOCAL nested functions 4357979 */"\ - %{fnested-functions: -allow_stack_execute} \ - %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %G %L}} \ --"/* APPLE LOCAL begin mainline 4.3 2006-10-31 4370146 */"\ -- %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} %{F*} }}}}}}}}\n\ --%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\ --"/* APPLE LOCAL end mainline 4.3 2006-10-31 4370146 */"\ -- %{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm: \ -- %{g*:%{!gstabs*:%{!g0: dsymutil %{o*:%*}%{!o:a.out}}}}}}}}}}}}" -+ %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} %{F*} }}}}}}}}" - /* APPLE LOCAL end mainline */ - - #ifdef TARGET_SYSTEM_ROOT diff --git a/sys-devel/gcc-apple/files/libstdc++-16.patch b/sys-devel/gcc-apple/files/libstdc++-16.patch deleted file mode 100644 index 81d075bface7..000000000000 --- a/sys-devel/gcc-apple/files/libstdc++-16.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- libstdc++-v3/include/bits/c++config -+++ libstdc++-v3/include/bits/c++config -@@ -76,7 +76,7 @@ - } - namespace std - { -- using namespace __gnu_debug_def __attribute__ ((strong)); -+ using namespace __gnu_debug_def; - } - #else - # define _GLIBCXX_STD std diff --git a/sys-devel/gcc-apple/gcc-apple-4.2.1_p5666-r2.ebuild b/sys-devel/gcc-apple/gcc-apple-4.2.1_p5666-r3.ebuild index feaeada61891..0a8cb2421474 100644 --- a/sys-devel/gcc-apple/gcc-apple-4.2.1_p5666-r2.ebuild +++ b/sys-devel/gcc-apple/gcc-apple-4.2.1_p5666-r3.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="5" +EAPI="7" -inherit eutils toolchain flag-o-matic autotools prefix toolchain-funcs +inherit flag-o-matic autotools prefix toolchain-funcs GCC_VERS=${PV/_p*/} APPLE_VERS="${PV/*_p/}.3" @@ -32,7 +32,7 @@ RDEPEND=">=sys-libs/zlib-1.1.4 )" DEPEND="${RDEPEND} >=sys-apps/texinfo-4.2-r4 - >=sys-devel/bison-1.875 + app-alternatives/yacc ${CATEGORY}/binutils-apple >=dev-libs/mpfr-2.2.0_p10" PDEPEND="sys-libs/csu" @@ -42,6 +42,17 @@ S=${WORKDIR}/gcc-${APPLE_VERS} # TPREFIX is the prefix of the CTARGET installation export TPREFIX=${TPREFIX:-${EPREFIX}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} = ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +is_crosscompile() { + [[ ${CHOST} != ${CTARGET} ]] +} + do_bootstrap() { is_crosscompile && return 1 [[ ${CHOST} != ${CBUILD} ]] && return 1 @@ -60,7 +71,7 @@ src_prepare() { mv "${WORKDIR}"/gcc-4.2.4/gcc/fortran gcc/ || die mv "${WORKDIR}"/gcc-4.2.4/libgfortran . || die # from: substracted from http://r.research.att.com/tools/ - epatch "${DISTDIR}"/${PN}-4.2.1_p5646-gfortran.patch + eapply "${DISTDIR}"/${PN}-4.2.1_p5646-gfortran.patch fi mv "${WORKDIR}"/libstdcxx-39/libstdcxx/libstdc++-v3 . @@ -70,7 +81,7 @@ src_prepare() { # So back out dtrace support on those platforms using patch # thoughtfully provided by Apple. [[ ${CHOST} == x86_64-apple-darwin9 || ${CHOST##*-darwin} -le 8 ]] && \ - patch -R -p0 < "${WORKDIR}"/libstdcxx-39/patches-4.2.1/dtrace.patch + eapply -R -p0 "${WORKDIR}"/libstdcxx-39/patches-4.2.1/dtrace.patch # we use our libtool sed -i -e "s:/usr/bin/libtool:${EPREFIX}/usr/bin/${CTARGET}-libtool:" \ @@ -85,18 +96,18 @@ src_prepare() { gcc/Makefile.in || die "sed gcc/Makefile.in failed." # default to AltiVec on PPC, like for older releases - epatch "${FILESDIR}"/${PN}-4.0.1_p5465-default-altivec.patch + eapply -p0 "${FILESDIR}"/${PN}-4.0.1_p5465-default-altivec.patch # support -arch XXX if XXX is actually what the toolchain targets because # some upstreams insist on setting it - epatch "${FILESDIR}"/${PN}-4.2.1-arch-option.patch + eapply "${FILESDIR}"/${PN}-4.2.1-arch-option.patch # dsymutil stuff breaks on 10.4/x86, revert it [[ ${CHOST} == *86*-apple-darwin8 ]] && \ - epatch "${FILESDIR}"/${P}-dsymutil.patch + eapply -p0 "${FILESDIR}"/${P}-dsymutil.patch # support OS X 10.10 - epatch "${FILESDIR}"/${P}-darwin14.patch + eapply -p0 "${FILESDIR}"/${P}-darwin14.patch # bootstrapping might fail with host provided gcc on 10.4/x86 if ! is_crosscompile && ! echo "int main(){return 0;}" | $(tc-getCC) -o "${T}"/foo \ @@ -118,24 +129,28 @@ src_prepare() { sed -i -e 's/-no-cpp-precomp//' configure.in configure || die fi - epatch "${FILESDIR}"/${P}-perl-5.18.patch - epatch "${FILESDIR}"/${P}-darwin8.patch + eapply "${FILESDIR}"/${P}-perl-5.18.patch + eapply "${FILESDIR}"/${P}-darwin8.patch - epatch "${FILESDIR}"/${PN}-4.2.1-prefix-search-dirs-r1.patch + eapply -p0 "${FILESDIR}"/${PN}-4.2.1-prefix-search-dirs-r1.patch eprefixify "${S}"/gcc/gcc.c - sed -i -e "s|@GENTOO_PORTAGE_TPREFIX@|${TPREFIX}|g" "${S}"/gcc/config/darwin.h + sed -i -e "s|@GENTOO_PORTAGE_TPREFIX@|${TPREFIX}|g" \ + "${S}"/gcc/config/darwin.h if use !bootstrap ; then # this only occurs with up-to-date tools from the Prefix, and actually # breaks the bootstrap since the autoconf needs a very recent automake - epatch "${FILESDIR}"/${PN}-${GCC_VERS}-texinfo.patch - epatch "${FILESDIR}"/${PN}-${GCC_VERS}-autoconf-m4-precious.patch + eapply -p0 "${FILESDIR}"/${PN}-${GCC_VERS}-texinfo.patch + eapply -p0 "${FILESDIR}"/${PN}-${GCC_VERS}-autoconf-m4-precious.patch cd "${S}"/gcc && eautoconf cd "${S}"/libgomp && eautoconf fi + local extvers= + eapply_user && extvers=" with user patches" + local BRANDING_GCC_PKGVERSION="$(sed -n -e '/^#define VERSUFFIX/s/^[^"]*"\([^"]\+\)".*$/\1/p' "${S}"/gcc/version.c)" - BRANDING_GCC_PKGVERSION=${BRANDING_GCC_PKGVERSION/(/(Gentoo ${PVR}, } + BRANDING_GCC_PKGVERSION=${BRANDING_GCC_PKGVERSION/(/(Gentoo ${PVR}${extvers}, } # ) ) } # <- to help Vim highlight this correctly einfo "patching gcc version: ${GCC_VERS}${BRANDING_GCC_PKGVERSION}" @@ -297,6 +312,8 @@ src_install() { echo "STDCXX_INCDIR=\"g++-v${GCC_VERS/\.*/}\"" >> ${gcc_envd_file} is_crosscompile && echo "CTARGET=${CTARGET}" >> ${gcc_envd_file} + docompress /usr/share/gcc-data/${CTARGET}/${GCC_VERS}/{man,info} + # Move <cxxabi.h> to compiler-specific directories [[ -f ${D}${STDCXX_INCDIR}/cxxabi.h ]] && \ mv -f "${D}"${STDCXX_INCDIR}/cxxabi.h "${D}"${LIBPATH}/include/ diff --git a/sys-devel/gcc-apple/metadata.xml b/sys-devel/gcc-apple/metadata.xml index 77e886c0ba4d..061c979b2856 100644 --- a/sys-devel/gcc-apple/metadata.xml +++ b/sys-devel/gcc-apple/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>prefix@gentoo.org</email> diff --git a/sys-devel/gcc-config/Manifest b/sys-devel/gcc-config/Manifest index 0274ff30b102..d36547d79ebd 100644 --- a/sys-devel/gcc-config/Manifest +++ b/sys-devel/gcc-config/Manifest @@ -1,3 +1 @@ -DIST gcc-config-2.3.2.tar.xz 17444 BLAKE2B c66fd121770dddcb27033be228de691f766f1acd9ada9580ae96dc12f6fbd0cd823e6656dc9b0515d498305b10d72f9cd87cf69388791971e9eac1a20e3f97c9 SHA512 31327d9abd26fdadaaf25a63568fd860ae25030b4a99dcbf0424f2d8fb14e61f041e681eea90c781a3f4e5401e3a7ba3299b1260ceb6e51bda5bef24f65dcacc -DIST gcc-config-2.3.3.tar.xz 17452 BLAKE2B fb77e2a2ea3d57142e6784d985364f3c0c82c149af10ac0a6490b3f4acceb3cd86e9d25168a60c532dd2bfce300a12a13cfc0eb290bf8c9457e43b9acf247328 SHA512 110af5a15e34c41f8f0568f20215bd4b0db2ffd2e65a4c3e7c3a6695c0de574e85478582cd65b627591ee754cd7f28c01ab8f3c3a101ed00c2b42fedab58a08a -DIST gcc-config-2.4.tar.xz 17552 BLAKE2B 631645a5cc9f3e7ab0ff089960ee3d0b2ecea29aa96f839a03a86985db512bf0d182b67a7b1bb73b95808c04523f32d6b8c122cdfbe8dbf94e7d319a1e49a23c SHA512 852b4aefaccfae1d91c551e226ac28110fa23f9668075c190a5fb9129c86d2f3e4994e96b7a5e8a2801883c5a5b16d9fbf3e9066e6b6a423055fdefa490793c7 +DIST gcc-config-2.11.tar.xz 18068 BLAKE2B 0d76321adea9eff545e042ad847b70a5b3d8ecb8c248fdf58f71c88a7b03c0aca39f7d39e332808b89c3f6d0fb3fc3114bc2d8dfa1ade6460c0b12c3420d876f SHA512 38ea52c2d16287fc2c8efa0ee76e24563851b4fa1ee7dce601507df1530e7a867281f178ad4228505eb2aaf46164024a18825cd6771d847ff1a60a85d6e96d3e diff --git a/sys-devel/gcc-config/gcc-config-2.3.2-r1.ebuild b/sys-devel/gcc-config/gcc-config-2.11.ebuild index 41607b404c0c..f387c81e5cb3 100644 --- a/sys-devel/gcc-config/gcc-config-2.3.2-r1.ebuild +++ b/sys-devel/gcc-config/gcc-config-2.11.ebuild @@ -1,21 +1,20 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 - -inherit toolchain-funcs +EAPI=8 if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gcc-config.git" inherit git-r3 else - SRC_URI="https://dev.gentoo.org/~slyfox/distfiles/${P}.tar.xz" - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" + 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 manage compilers" HOMEPAGE="https://gitweb.gentoo.org/proj/gcc-config.git/" -LICENSE="GPL-2" + +LICENSE="GPL-2 GPL-2+" SLOT="0" IUSE="+cc-wrappers +native-symlinks" @@ -40,15 +39,6 @@ src_install() { } pkg_postinst() { - # Scrub eselect-compiler remains. - # To be removed in 2021. - rm -f "${ROOT}"/etc/env.d/05compiler - - # We not longer use the /usr/include/g++-v3 hacks, as - # it is not needed ... - # To be removed in 2021. - rm -f "${ROOT}"/usr/include/g++{,-v3} - # Do we have a valid multi ver setup ? local x for x in $(gcc-config -C -l 2>/dev/null | awk '$NF == "*" { print $2 }') ; do @@ -59,4 +49,12 @@ pkg_postinst() { if [[ ! ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then eselect compiler-shadow update all fi + + if ! has_version "sys-devel/gcc[gcj(-)]" && [[ -x "${EROOT}"/usr/bin/gcj ]] ; then + # Warn about obsolete /usr/bin/gcj for bug #804178 + ewarn "Obsolete GCJ wrapper found: ${EROOT}/usr/bin/gcj!" + ewarn "Please delete this file unless you know it is needed (e.g. custom gcj install)." + ewarn "If you have no idea what this means, please delete the file:" + ewarn " rm ${EROOT}/usr/bin/gcj" + fi } diff --git a/sys-devel/gcc-config/gcc-config-2.3.3.ebuild b/sys-devel/gcc-config/gcc-config-2.3.3.ebuild deleted file mode 100644 index 786a945b65f3..000000000000 --- a/sys-devel/gcc-config/gcc-config-2.3.3.ebuild +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit toolchain-funcs - -if [[ ${PV} == 9999 ]]; then - EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gcc-config.git" - inherit git-r3 -else - SRC_URI="https://dev.gentoo.org/~slyfox/distfiles/${P}.tar.xz" - KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" -fi - -DESCRIPTION="Utility to manage compilers" -HOMEPAGE="https://gitweb.gentoo.org/proj/gcc-config.git/" -LICENSE="GPL-2" -SLOT="0" -IUSE="+cc-wrappers +native-symlinks" - -RDEPEND=">=sys-apps/gentoo-functions-0.10" - -_emake() { - emake \ - PV="${PVR}" \ - SUBLIBDIR="$(get_libdir)" \ - USE_CC_WRAPPERS="$(usex cc-wrappers)" \ - USE_NATIVE_LINKS="$(usex native-symlinks)" \ - TOOLCHAIN_PREFIX="${CHOST}-" \ - "$@" -} - -src_compile() { - _emake -} - -src_install() { - _emake DESTDIR="${D}" install -} - -pkg_postinst() { - # Do we have a valid multi ver setup ? - local x - for x in $(gcc-config -C -l 2>/dev/null | awk '$NF == "*" { print $2 }') ; do - gcc-config ${x} - done - - # USE flag change can add or delete files in /usr/bin worth recaching - if [[ ! ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then - eselect compiler-shadow update all - fi -} diff --git a/sys-devel/gcc-config/gcc-config-2.4.ebuild b/sys-devel/gcc-config/gcc-config-2.4.ebuild deleted file mode 100644 index 786a945b65f3..000000000000 --- a/sys-devel/gcc-config/gcc-config-2.4.ebuild +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit toolchain-funcs - -if [[ ${PV} == 9999 ]]; then - EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gcc-config.git" - inherit git-r3 -else - SRC_URI="https://dev.gentoo.org/~slyfox/distfiles/${P}.tar.xz" - KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" -fi - -DESCRIPTION="Utility to manage compilers" -HOMEPAGE="https://gitweb.gentoo.org/proj/gcc-config.git/" -LICENSE="GPL-2" -SLOT="0" -IUSE="+cc-wrappers +native-symlinks" - -RDEPEND=">=sys-apps/gentoo-functions-0.10" - -_emake() { - emake \ - PV="${PVR}" \ - SUBLIBDIR="$(get_libdir)" \ - USE_CC_WRAPPERS="$(usex cc-wrappers)" \ - USE_NATIVE_LINKS="$(usex native-symlinks)" \ - TOOLCHAIN_PREFIX="${CHOST}-" \ - "$@" -} - -src_compile() { - _emake -} - -src_install() { - _emake DESTDIR="${D}" install -} - -pkg_postinst() { - # Do we have a valid multi ver setup ? - local x - for x in $(gcc-config -C -l 2>/dev/null | awk '$NF == "*" { print $2 }') ; do - gcc-config ${x} - done - - # USE flag change can add or delete files in /usr/bin worth recaching - if [[ ! ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then - eselect compiler-shadow update all - fi -} diff --git a/sys-devel/gcc-config/gcc-config-9999.ebuild b/sys-devel/gcc-config/gcc-config-9999.ebuild index 2af22f6a6333..a314266369ef 100644 --- a/sys-devel/gcc-config/gcc-config-9999.ebuild +++ b/sys-devel/gcc-config/gcc-config-9999.ebuild @@ -1,21 +1,20 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 - -inherit toolchain-funcs +EAPI=8 if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gcc-config.git" inherit git-r3 else - SRC_URI="https://dev.gentoo.org/~slyfox/distfiles/${P}.tar.xz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + 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 manage compilers" HOMEPAGE="https://gitweb.gentoo.org/proj/gcc-config.git/" -LICENSE="GPL-2" + +LICENSE="GPL-2 GPL-2+" SLOT="0" IUSE="+cc-wrappers +native-symlinks" @@ -40,15 +39,6 @@ src_install() { } pkg_postinst() { - # Scrub eselect-compiler remains. - # To be removed in 2021. - rm -f "${ROOT}"/etc/env.d/05compiler - - # We not longer use the /usr/include/g++-v3 hacks, as - # it is not needed ... - # To be removed in 2021. - rm -f "${ROOT}"/usr/include/g++{,-v3} - # Do we have a valid multi ver setup ? local x for x in $(gcc-config -C -l 2>/dev/null | awk '$NF == "*" { print $2 }') ; do @@ -59,4 +49,12 @@ pkg_postinst() { if [[ ! ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then eselect compiler-shadow update all fi + + if ! has_version "sys-devel/gcc[gcj(-)]" && [[ -x "${EROOT}"/usr/bin/gcj ]] ; then + # Warn about obsolete /usr/bin/gcj for bug #804178 + ewarn "Obsolete GCJ wrapper found: ${EROOT}/usr/bin/gcj!" + ewarn "Please delete this file unless you know it is needed (e.g. custom gcj install)." + ewarn "If you have no idea what this means, please delete the file:" + ewarn " rm ${EROOT}/usr/bin/gcj" + fi } diff --git a/sys-devel/gcc-config/metadata.xml b/sys-devel/gcc-config/metadata.xml index ecfb291141ed..61a8b0758cd6 100644 --- a/sys-devel/gcc-config/metadata.xml +++ b/sys-devel/gcc-config/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>toolchain@gentoo.org</email> @@ -9,4 +9,8 @@ <flag name="cc-wrappers">Install and manage 'cc' and 'f77' wrappers in /usr/bin. Otherwise ignore them.</flag> <flag name="native-symlinks">Install native symlinks like 'gcc' or 'g++' to /usr/bin. Otherwise keep only ${CTARGET}-gcc and friends.</flag> </use> + <upstream> + <remote-id type="gentoo">proj/gcc-config</remote-id> + <remote-id type="github">gentoo/gcc-config</remote-id> + </upstream> </pkgmetadata> diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest index db475f1356aa..c0538a3e11f1 100644 --- a/sys-devel/gcc/Manifest +++ b/sys-devel/gcc/Manifest @@ -1,17 +1,44 @@ -DIST ecj-4.5.jar 1470676 BLAKE2B 793c10ba09fd8040c0e1181204141aea16780c9c9088e07126e00da2b510af2ad6f58d876357d7e98cbb02d783a3be434469d5de1df134ccb8cc508e45028d80 SHA512 d4e1bf7538ace56e3d69fa91da5bbd16c272923b4de0a9d8dee23ea2b75f9f38c603de72fc4061df49285c450b63f3df211cee5270e9fffc5447445d1a9c9e4e -DIST gcc-10.2.0-patches-6.tar.bz2 24103 BLAKE2B f719012f86136ad9c4ea1397548caca6e69687534599a88cc25fe0e4f83dd7fd34c07375fa6e612e2b430e078c1a59913160cce07312e94fa1ce575a33e5457b SHA512 61d97dba29024c7a22806689ebf33f5cb9ce099230bcc344f2865b976c3fdfd8ebec5962eaffd0156de75eca58499ba785867bd4a4ac92c6f799ab1bee8844a1 -DIST gcc-10.2.0.tar.xz 75004144 BLAKE2B 1d79397330354e61439283cac96a109bf78ffc726265442e6d3ec131f107589ab7349d6612836edd8c8512f7bcc1d901a65a0d5d925d28a5bf3ef5cc3f9787ee SHA512 42ae38928bd2e8183af445da34220964eb690b675b1892bbeb7cd5bb62be499011ec9a93397dba5e2fb681afadfc6f2767d03b9035b44ba9be807187ae6dc65e -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.0.0-patches-6.tar.bz2 12744 BLAKE2B 05e8d8b87cd1069bc6c03a6cbd61e5414148b7c6467e5b2ebf03af1493075280d8f1a5a123148f786724e3f813ef7fbb5f2728598ab4ab7879b4e649f592156b SHA512 9e873a40eca07e471a9832ed062575063144554ca306b60a9b5f7da61fa1f148a13fd5ea933c852d105931e452de1c6ab3cd7baf4f80da17b9d81eeb36c5b3fd -DIST gcc-12.0.0-patches-1.tar.bz2 12137 BLAKE2B 1b5a07c4e0996b559cc5d57c5a0ade76983d80f3dc8f87e67b95b54114f7adcf3a78bd409123e7f414e33cf3114da9fab3491fd7cb39e337a22c1d6b562842e5 SHA512 fb5464a0b55446b2c99b6cb50e70404a723925b6bea322855ed4d2f66bdff70aab22e93d1e6d7d72d8a1451cac919d0d07b2a6caf0d953fa1692fb3422b2528c -DIST gcc-6.5.0-patches-5.tar.bz2 13723 BLAKE2B db0170d6db74dcb6dc3ec937379c188814cfe88b5204aa0c1cc925083d8f178be4896e98ff44fe224060e4e1fea98ef3c90aa8339b2cf78d33cd2dc8b94e3bdc SHA512 d79cf975157c5285faa893da0259b0013df66b01ad597322f05ece0343dd7912d8d793663448c04f37be93092e2fde06f84374e142cb81b12ba5964b37b0de89 -DIST gcc-6.5.0.tar.xz 74355588 BLAKE2B 538595d32000b15a53577f0dc6b164d75791a8ccdf90500d5f667ff78378ef4ab9bedb8a590848907caf863bf1165ebe108b5e81eb4b54e85ced4002affde693 SHA512 ce046f9a50050fd54b870aab764f7db187fe7ea92eb4aaffb7c3689ca623755604e231f2af97ef795f41c406bb80c797dd69957cfdd51dfa2ba60813f72b7eac -DIST gcc-7.5.0-patches-3.tar.bz2 11613 BLAKE2B 84d59103bffaec8fc57e69dbb17f53882935b20c23d54db5f805e8270fa16d8e572ee4a369ecc82d2279cf66a71d1eb2a7f0c9792d4495d2f68946d6b6403f15 SHA512 6e5bea150c56ce3d43c9b0878691ed54ecc5d2a12482e99261efa74af7f1d59ec94c2d0c363792d99e0d3a0abd739d5d06b861da4dea2c1676e5d498b5815d55 -DIST gcc-7.5.0.tar.xz 62783088 BLAKE2B 8a5efeef517a5da1634d063aaa83bf5e002f86acdf27419f1067f5c3d087333d9eea0c8db427b8bd895af646990bb00ee173069980ca49cec848434a4127256f SHA512 fe716cc19f2e3255d3a8b1b8290777bf769c6d98e6e0b07b81a3d6ad43f8af74cb170dfa18b1555dbfcd3f55ae582b91a286ccef496b9b65c1579902f96a1f60 -DIST gcc-8.4.0-patches-2.tar.bz2 16254 BLAKE2B 5ee50ee1a3f6cdb392b370a0f62af7e8fd2fb2cadc46d4faf37ddbae23812a0e9f2e35a4ed6a08c41ffe648c21e9982e965d3ab91f68ae941c6cad74098afa2f SHA512 26fd2ad9f29dfd1db671d4966c16165a6fb75bd74f440871fb41dcb9b6102f07347ae8df67baa9e4d52aec91d3d67803a952b7bd45159fde56e1a1f28237c5eb -DIST gcc-8.4.0-patches-3.tar.bz2 16890 BLAKE2B 29b537faf6fbf5ee43a72ea622090c17a28e19b903807d64302ef9a53c4eddc796c32e4f522ae0b724dda527ee073ba436e8803384d6d73d5e715653f89f59a3 SHA512 3f44e05d271c877eb2183731d4faccfdd66ac392bb8a541256d4d58c9e26bd205a53b9c881cc9c457cece55596cfbd8c6278be9509f3b151bb5e43206ce80188 -DIST gcc-8.4.0.tar.xz 63713440 BLAKE2B e536b7d1da5942a522f4ccce489882dcd5aefb1c76660fc17b0475a1164753979563bec25ed46c4e6c718cb9f64c047f57780e8d5be919657a1653f8221c1c9a SHA512 6de904f552a02de33b11ef52312bb664396efd7e1ce3bbe37bfad5ef617f133095b3767b4804bc7fe78df335cb53bc83f1ac055baed40979ce4c2c3e46b70280 -DIST gcc-9.3.0-patches-3.tar.bz2 14193 BLAKE2B 4863fec1af41a8cdb2c24479b28812df36c1f71ab71d267ff0efc467cfb8ce99ed77714ceaedfb08b0d1eb0eb9316758cc7cbc5a8ad0bb582050690935e64b46 SHA512 8b90a5826df64e6f74e4f6c0e5acead695b38f671e26485b110d5b341daaad4ac21aabb04baae9ad457408eed274888b7f785bbc782611acfc7261e6a315d110 -DIST gcc-9.3.0-patches-4.tar.bz2 15474 BLAKE2B b06fdfce4402850bb1c6c211ace4c3a07ad2114ffa48eac58d1624124d5d1bddd6d2b4faa18be3291a340272c022bea26dfcaf17929828ceb6474a5211401389 SHA512 54904a4a1c4a784f1a707cbdd9f6f498457e4aa550dc6f3d6eff71ed05a75685e23e6b71c2a614b1dea7e506b9f42fb0109ecfde00ef00373275bbc0409cb7e0 -DIST gcc-9.3.0.tar.xz 70533868 BLAKE2B 21efb1432aefad5ed9b9b395e88ef2adfda3a8ea6e3e808cd151da6e66df9fed1bafdc8b8ff055d4b2272ac786d8b7ddc4293bb6b51c55c40a261a0eda0e7cb4 SHA512 4b9e3639eef6e623747a22c37a904b4750c93b6da77cf3958d5047e9b5ebddb7eebe091cc16ca0a227c0ecbd2bf3b984b221130f269a97ee4cc18f9cf6c444de +DIST gcc-10.5.0-musl-patches-2.tar.xz 3452 BLAKE2B 5387e516d07d81477b3f39b8b3bd986bf861d32cd25dc5481c97bd3620d00c918c5661e86857f66dbf28a655401a53e43417f638c443e44cbfdbf5e950caac4d SHA512 86f2ce31cc4fc4fb5a6043fb527bf822d895e1a6220652024f78a1cbd5a962edb6be8dc5f43c32053e075f39bb2350ea8f14e7d57e0473dd2933a7b44676bde5 +DIST gcc-10.5.0-patches-6.tar.xz 18208 BLAKE2B 4cac3340108fb378c76ad62b728429f3c97f348d178744e7536575f3576ca8aa682b878b7df3b1c162dccae64a3cb56c66d8d60eae323e1ece2de4278084fdbd SHA512 9d6c84325fbc118cee01347468ce729c278e5b026b16da945fe54050726e26f86a46ee7b71a01a47cf927b70bfcce459c49a6bc4fb93dcfaa047c76d4c5bc5bc +DIST gcc-10.5.0.tar.xz 77846412 BLAKE2B 9b71761f4015649514677784443886e59733ac3845f7dfaa4343f46327d36c08c403c444b9e492b870ac0b3f2e3568f972b7700a0ef05a497fb4066079b3143b SHA512 d86dbc18b978771531f4039465e7eb7c19845bf607dc513c97abf8e45ffe1086a99d98f83dfb7b37204af22431574186de9d5ff80c8c3c3a98dbe3983195bffd +DIST gcc-11-20240111.tar.xz 76240620 BLAKE2B dcf3b2493ca6ba1a9cd0137186cfbf1b96296ff9c5625e40ec7b89e5903b07dc151b61ad54b885fc57ccc02214e2cfa7b9249cbd755ac2554c6ca0008f0704d8 SHA512 aaed094cb6dd99166e0ec59886014108574ddab52701581f0f8e7f0abb966320d01f1bce6ff646170618ca7c2819d20523a23615f20114dbe412de43b937caf4 +DIST gcc-11-20240208.tar.xz 76276224 BLAKE2B efce83c3ea03093546b73d7731ac1051da7a2b0309612ce5b809ae2756bf7a949c94f951f6a77e789f7669051315e1a4e4c33f2b12a2ec1999ee9f1f39f6b13f SHA512 a0e2b4402ff187d0804e3bc2ed0a228cfce48476c1270d57798b060899f65c7e986945651d36c358f9df5eb4b36db13321e141895329b7382c130a0aca6a8962 +DIST gcc-11-20240328.tar.xz 76268060 BLAKE2B a3ffdd5a2376b1d3984ca39837932e1c6dc047ff6ae72eac0387cf27acdf8f1a1ff7e9584f631de348b6553e929892d8bc443ad6c40132a2636c39a8907c5eec SHA512 6372a99f2a1320c7df6e7984bb780395aaf8319624f311d955d5dbab2ac7bfb8de933c5b945bc3c4ea3b5d7404b8fc2d696825214b6563c1e032094a421b8bd2 +DIST gcc-11-20240404.tar.xz 76246936 BLAKE2B 09eed1bff289e960018b8c9c5d39e43ebcff78d344feba45d7889149e0de0d2727a54a0359471eab9a28cb38d5750b488c62cbffbf937ab7238eab51f3e7d0b7 SHA512 431f0b8d78f2b5e910ca8de8e8f64594f070639c17bc65a074650c217a5262cb9081db7e090bd3396e30ef50e92ed3ada0d163b4cabf04f2ae78fd02dba8c05a +DIST gcc-11-20240411.tar.xz 76275268 BLAKE2B a24769b7f4b6d111b1fc46f9a99f9f731193a15b9a1a73fc224388721f0e3b6d02022eb0dc44a3d587522ad124bf63ce9ee50b9622ec91b55001c46fbc261776 SHA512 43fef6a426b4b8001c1d8707c34339203e66dcfa580cf289e20cd7abeaf0f8b57068ab1099099c4692a7acce1bc38bb978bcff6c309f30e3430457af5b7fb018 +DIST gcc-11-20240418.tar.xz 76255988 BLAKE2B 363f195d8e23915511e768c303550e6e3a67aa45e3f55945cf763fbbcaea7e28932e5094d2fe4c26f8a920ad3479523c27b8aef14716cb7d26cd7da7a69196fa SHA512 a6072e40ad233759f8f893b5c7962df5cc926cd5322bf1b3986b88013628ac7b08eea23a8f5f5bf75444e26e6106d0ebfab26caa82974805308d17f6b69b36d0 +DIST gcc-11.4.0-musl-patches-2.tar.xz 4308 BLAKE2B a2335e155fc57816fed822a648e0eaefafcba9d04e1ad0fd7baeea5a694ab6f5e3c1678cb406f2a1bd17bab25cb01699d032713a1ccf337948dfda2093844607 SHA512 17b84f907cb1bd763873655e6f35fd3ed55a40b602b70a626f04f83b4cc89c6261db1661de78d4d969187a8c56e9f6305b742515a3836b962248a21df0df5d0c +DIST gcc-11.4.0-patches-12.tar.xz 13824 BLAKE2B e4df9e0dc9512882022aaf325ebf65c540169454c91dd31f913c6f57f6eb291c79ae919671b53db1549799d4a70c09298bf45ed82ad05eb1f961443cc958369d SHA512 87fed0c3f8e28c9f702443db58350bb615110b27ebe334b5de2ea60678e2548c56cd75cffade210d69634e2ac0a9311f5100ddb45d97645aa76d5688bc421a61 +DIST gcc-12-20240112.tar.xz 79832228 BLAKE2B deec7123b8ffc42ddace51e1f3e8e08d5485f7000c0d4b7273b6311912ec0e7e2cb41124297af8c54456bb369a76fa2ef51aff552d8d680ec41dd2b144b08e55 SHA512 2c0a676ad35e6edee915c042a1751ac0263fae9b7af4d324deb49d6603dc73d3ec768832184879543e6ffb1595da5c56d9117288547adab7f243646dcbfc64ac +DIST gcc-12-20240209.tar.xz 79824868 BLAKE2B 1ae5a646da470f06648c4766c77475ceb287c5f6647d5102f1aef6590f973233d5e7f83b5e0241488d49dba59dd605c211938379e68a393a2dccb3834103ae4b SHA512 9f9a04f4477f41bb2a5662aedef2af75b039de50c2dc99310e504e6080cb7aae06a1255337ea2e563975cb108ddc6766adbbaf4e3d5d5712801d7ba9a5209dbd +DIST gcc-12-20240329.tar.xz 79862704 BLAKE2B 2ac09aeed2718acfcbb8d0d71e51f21cab9b186c73860cfabcf95a7ed4c37eb461fb26f86ee7319c614c21208c0fdf841b660d314eacd8314e8f323edd37f7cf SHA512 56d67cac2744c7fcb28eda9a29ba200d418a9e44fecc37b29747c2abac479e366b591ad6f7f92ce64b09dd3d0261af8ef28673beee1280618e043cf66f3b76ac +DIST gcc-12-20240405.tar.xz 79849308 BLAKE2B d94046fead6cacd3e3b869f1db42843a2487d845ded332ad0fd55a7f290a4c3df72258dc1b74e4db3d7f7357e6b55444cde4b8863f2ce6f8691fd92bd49927fb SHA512 93ed2174ac3cdd8d5e885c6f4f546f9d0557e93bc9583a02d5d159c666fe6a82f30b6ed074f5f1e36f6f82855c41be527fb3d053498059ee4a6194575b00ed0d +DIST gcc-12-20240412.tar.xz 79856320 BLAKE2B b83d64584a2c5bade96b7964349e4b760d5b40a4d10256799130d329f5748d2741a5122105f094f161f95eb8ade64109276aec723a518a42d695b41c8f08d61e SHA512 2a8a3ae4779f1cc897846b9d5e2eeb94ea8ece72d061c0f2436e854bb26eef33eb51c66bee6c0c363be04023e5c5ce3e3a88c9aaa7ae9faaa9322fd18dfbfae3 +DIST gcc-12-20240419.tar.xz 79851084 BLAKE2B fff60c92dc6a2c10c413d837ab9a02959efd24896f1e174a3a15c4d1676abd72b68aa4c88ea3be16b521ecbb0e93afefe6df27b0099809b16426cea0c6ccef07 SHA512 09aefc61f8dea440ca2ffc7e448173c013769415e8bcc86695566d3fe7905b6943bca740f76035383399aef3086822de674265e0b881c504e458f8c6fb4b2b80 +DIST gcc-12.3.0-musl-patches-1.tar.xz 3572 BLAKE2B c7bf65f7c9ea8023ddaac821ee2b778622fa310ac72a72b2f7032494a8f304eac86217f9204622e6c21aaef9952bece0d09bc126facd4f42b602927909815ab5 SHA512 babc279fea2c1fd4c018815f2f5630214fd46015ce9f365c28af242681d51818eaca30ce298eddcab1eed5ac5f2759e2b47b2335afab9d722b4469a6d4fec326 +DIST gcc-12.3.0-patches-2.tar.xz 14236 BLAKE2B 06c43662c9abb0fa3cf90d5e2273c69aecb9158e6cf6f23c04754ed5d686be2616e81e2502eb16f4298ddd50518ca7677e13249da9e9b091162d3931ff65e4fe SHA512 b0d4b85dbf1a54aaaa1997203b872e3106906b4ad49cde57e1428bc22b2f8e2d73b8cb10ae0d0b792aebaf664594da4d1dea04c44ddc34e59047410766db04d1 +DIST gcc-12.3.0-patches-3.tar.xz 14852 BLAKE2B 7a5f1f43063b15f424099afd72096212fbbbc5151ff01f2de15dfb6e7cf274981c8cfaedba9ef61576c9096fb172fc550a7deb5cd7d9366fd249fd5dd3951f76 SHA512 aa89e4c2ae02f4fb42229ad5167f2eaa3a8fae51118645bf07199fe2124b9c83948590662b053d08002ef709fa870ea88315fd4ccbe4441a74e9cb62edcb82fb +DIST gcc-13-20240113.tar.xz 84356052 BLAKE2B 1fbfffc9f2afe443158e3f26182c8bdc3f3b599c5582762117831ecb6e6d3c1c69e8d2e5932f45eb7d534c3967e08a9f7b1bcec31aa5d7ac608bebff9f35120c SHA512 a59886f707cf18f684295031d4d9fc5b03396face1705e61852d7de98729c53ac4cf209e951d00c232f14e9dc48eee40dd92487db7cb6ad0e80f2339d6d9503a +DIST gcc-13-20240210.tar.xz 84354416 BLAKE2B 5807623d3f7dd751b6dfe164cfd50d57b2f93485c23c3c2228a4a846a9a94cdad52a5e6f2806e5e7ee2a7b5526386ebdb339c44c7ea023d69f8652088a1b114d SHA512 14a01ced7ac2bfd9fc93de4e3819b4d0823fbe129d3f1faabeb707e9e3e2613b4173321b58b3648a7250e3b7ff5d94edfee60e6c38682f31a1f7b57b1c01433f +DIST gcc-13-20240330.tar.xz 84407332 BLAKE2B 28b40915bf8e9ecf71b50d06fcdf69c01e87d3635f0c6b6159e003a0876453ada062cc538204604885e1350d226417fe9d7cbdb5e39146f9fde0d524ad34ff07 SHA512 4c4c4be522feb9ebe1bc868db59f0828de1154f80afad6c32bc2c7cf45df3797cb5e6dce2b35a297194ea87f81e34439f4d87bd88cabf0a29ce686e1b29e7a08 +DIST gcc-13-20240406.tar.xz 84392728 BLAKE2B 42a560b01677350c480bde2a7436a8be4d2259100dd6f2f9e7c5555adb3d13ee1f51bfae058ceb0cc2ca4d527b302b5250f26b3d6b26fa9c7a2f5715aa003a3f SHA512 e5ec524df7e9498a23ccfa42e28c5ce284fecdbb4771980328257d8251a11740c4cd3970d6bbe13052907b257d8e89b176d183c895168cf524dda12582d05d86 +DIST gcc-13-20240413.tar.xz 84405692 BLAKE2B 4df749357ed33afdb0255b4dc02ae568ce12e461c07a535f3736c2dcd9f779391846097aeb99ed70f5f45dbc029244a0c994b84f1de1086cce3da23bba719984 SHA512 934857721e1a92ea709e1ff6f64dbb8a47df4c614935ec298ded0a19bb92342e50bb8ab7eccd6e3ab46ca00e86ed34b499d4b06379a689bf48bf4201f3956006 +DIST gcc-13-20240420.tar.xz 84407856 BLAKE2B 188b92454735223a4da7af2b5b57bb52c6362778550aa6ddbc445d3a2e0700494db2f743da59961ceccb756791f01c23f76c83224daeaccfb561cd1d2e6ece7c SHA512 6be1fbb1cddebbccf38da4424af56e173d0c4a53e63ed3a9d86398f23053747a231287ce7bdeb5666ceeb4f3385dee228cc05fba19beaf4d7b2c9cbe1f14a489 +DIST gcc-13.2.0-musl-patches-2.tar.xz 5292 BLAKE2B c057d6574d03c05854edaa9f3fd40e9149662b04f3ac7a7db3eb078d73a7b535726d1bf52e5b12736dedb2f9898ad731f2e48a6421fcfbf7b90f929dee072fcb SHA512 a691da0c87c443a5e9d23731f4005f27871c5b12bc9102873ffa24d374aa7b9fbd187c4f5635d23fa9ffb17e351e76173c2d3fdf40646e355c4cb314b538de69 +DIST gcc-13.2.0-patches-12.tar.xz 47404 BLAKE2B ed018bcd7429d1c7aace746cbfc4e59dae409fc0a35231320c1b44c96fff0d912eba5c72109c2deb883f5368159df02148b2d4373396b34da882164c61fe4387 SHA512 b7872a03870bce7b633e4af4329b24fe8f3d50d6d9173f63549f606ce062787748af7f79e7ec4afeb768968d6e8462a849bd1b94316ea6bb284551f99e811617 +DIST gcc-13.2.0-patches-14.tar.xz 46928 BLAKE2B fce23bc5315f35b04a4976550c4b44578944a1b17e40c7553351eeb8a1ef0f3a2538da5a5e1ae6f37b784ff11bbd8a44b8f6eec542be63e34d984dee69e1cd81 SHA512 d7d52bb2915fd89c06b0134bede8db939cadbb1f2dcddf923bee2c3f9f577ff9e5e986b60420d892539edf82867a0d1bd635807814bc618b06a2b37cdaca893a +DIST gcc-13.2.0-patches-15.tar.xz 47052 BLAKE2B f145341813d6baf9cbcc3e8421c7f427148503d2aeddd6a2eaac1ad3d470a818292392861542a7915d8b0f2f9b3255603f394b2e6833141658fc035bcd2b5366 SHA512 c89a3fccd944f03d25e076a967c3b220803ee9a6fbedec1daf2c20f629dd6162ce6be4f259522bd193169f0e8307daa9895b5d8581cf975ee086e5abfd675e34 +DIST gcc-14-20240317.tar.xz 87764960 BLAKE2B 5cd957c3bf5e2fbb134b716a7ed14c0ace66d5c944e15422e66affbf110b76ba3b4bf83a05af49eec23d8f1543ca36c3d6ce81fa1b292cba47eceb517c3a7352 SHA512 77ade098872f687a3fb23dcb612eeed27a3ecf816304a218d695d2be7433576ceafcb13a9cfde3ed7fc9e48bfaee8521b77cfbabfe41b2557328cc95f3e73ebe +DIST gcc-14-20240324.tar.xz 87808876 BLAKE2B 546b69f4562cfee6a3d5d8700e2a9bd0da001e3dde04825754ec5298144243ea4c975d0bf0366711fc9680f263732afb40c083fe9268f578b89e7d006b8d4955 SHA512 16b00690bf541784a109bc2382bbdf8ba6b72b416b130905d020182708ae687cbeca28197ab16539032ce9db3ad0e062e4231f9ef4c2d2452b14ed2b0ff3596e +DIST gcc-14-20240331.tar.xz 87841560 BLAKE2B 7a3c0beb8234c38e4ad5d27369e848c178053a595bb6a4d2f5e2c848c5ddcd8a89b7674190d6964d5b3fd49709fb3f9be22e651a21543384f0210355bfca79fc SHA512 c7883d3ecb65e46783d8ce5efa87b53600aa84736a9af026b51ed5fdd827cae20729d4cb5cba70d3322ae7ca72c2d5a6944e5dee4174226bfc3c6398777d6377 +DIST gcc-14-20240407.tar.xz 87887372 BLAKE2B 76f9994af354fdd262420d80c6780dbf447a2ef64f09702523c31056d662227571d70cffab067ba82bcf4dee02a81a072382cb579a15af6f0b5edd4c1e51c1af SHA512 02d1ff0ee65ab7b0159d3d22a30ffd9055f3e7bf5f598663d5b711092dedd96bc67b511da37cbc785987d2f3460e2e38653c8fe6c7c3d34970fa1055db33cc0c +DIST gcc-14-20240414.tar.xz 87980364 BLAKE2B 9b8d4ff7127d5f5cf805d6caa6956acaf24be3d628cbbd82d6bf926e40c8ed0088bf2bf386072ca3ea93ee4d945e4270c1977a5cf96ae4ff24ae32ce768fffa5 SHA512 552d0c49e3903cc42b46f44f1cedd5f1135997cebcd9e1d28c01474ef4365b1136cccb490923923c7633dfe94d744c8882fda1bb286a7dcb2cc26a90d4c3e99f +DIST gcc-14-20240421.tar.xz 87982608 BLAKE2B e977ee966d7256e996064d0cb3a01ccbece49c6609e8c2bff54650a6d1965e72faf6ed0fe06f50e223f4edea83b44d4f2664d8141d7a8ba371485c9b4877c38e SHA512 f211ae16cc7c64ad097d33c6f092fb64c8c547efd0bf2975f536b457cf0314c7613d39fa82cf04c4a62facf47c4cd214f73a3f2347dd8f73b6d95a5836614f98 +DIST gcc-14.0.0-musl-patches-1.tar.xz 3576 BLAKE2B 692baee8a7709905d53aeb150d73a3721c4ba47ee5f397cfb1b5be905cf003ca02b60c94ee294d90ac39645cd5cdf186c7a3aa950c47d8cf680c128ed705b807 SHA512 0592ab98a7142e404623a6511c67dff61e9ade32c3fb2c0e75b456306e0af3799ad13252b50b3d2fdd31e5815d7f0b16b0ad63ab8386fe4d78729fc9c182d617 +DIST gcc-14.0.0-patches-25.tar.xz 12352 BLAKE2B c006fa3c2454ef4db073f718d54cab33d2832d233199469b1755f23bb168fd725eaec7ad60fb89e4e9965ad2870c35a232edd07ea2a781ca1f0d67964ad4c2e6 SHA512 1ab587c2e9873dd93356dfff30f02916811392b4c878e16f5b2129f833a974f96245deb6db346dde01e07e4ab162bb83be7c5ba1e1edd32efc0404a422268c52 +DIST gcc-14.0.0-patches-26.tar.xz 12360 BLAKE2B a2fdd6ff1774bc94f96bc4f7da4092c373936c93e04b94e75701227ab55d530523fee6b561773d05080e51748cc7716868d8b108f51a06e37a2c26a1d7f39b33 SHA512 1275e6345417ee196e74c46845d05508c8662d71e2432fbfbf7f1eb9c220657b4ee8e3b0ca02b7b4c7e14df164f254380c65af91cadc3bda4cd7afbe6af5ea8b +DIST gcc-8.5.0-patches-4.tar.xz 18616 BLAKE2B 7594cbaea5daecf1a0b3d526c06aeba0a84c6da66aee2e105a51fda6be8d30a37ccc3814281b284a4582d892a1d556bca063551584edfc2525bed8ea5b6888e7 SHA512 1aa5742c361186637e7855f06feb1a4547e7d4d5de6e51f3d049e0ef3c19e2eff179465f52781739f59422035b7f8e4c0efa3844849f920f3c96acfdc37ca6a6 +DIST gcc-8.5.0.tar.xz 63841008 BLAKE2B aa81a1a730fd7371360f6abed6ba78b5843fd18c58d5de5687acc320741b9e430e85df3535a1ef7a26051409be8d2f0945f503e5968480d919103123a99d4b12 SHA512 92f599680e6b7fbce88bcdda810f468777d541e5fddfbb287f7977d51093de2a5178bd0e6a08dfe37090ea10a0508a43ccd00220041abbbec33f1179bfc174d8 +DIST gcc-9.5.0-patches-2.tar.xz 14324 BLAKE2B 1d3bf3e673108ad2fcdcb86daefb4603d1c9f6aa815e34d1591054d466b76d6f50cce124ab4760528c4951ea16eb00888a3e6485417f81ebf250548732df4a8e SHA512 a6d6f650aaf0bd193a17ac279649f0544a282cea295824384c59341c3000eac4b574b60e00dd427585d928f9768166abf85168b47772132790ad98854acacbbf +DIST gcc-9.5.0.tar.xz 72462752 BLAKE2B 69e39314ee6bb46e3be491ba9c3cbc4914cb716f732c6d3f2b14d9382750b40c4f14b5d3051225b81f936ef8297b0ba8cb5439512e961dae5815d3bee2b0bfdb SHA512 cdd144ce4f747e051480410afc8506c90a57cb45da89071ddae377b1453bca3014422455ade9fe4563ebe51f4b6348cbc0c61905a9b8801cd597d51ad0ec62b3 +DIST gcc-validate-failures-7bbfb01a32b73842f8908de028703510a0e12057.py 27533 BLAKE2B 58917750d247d3a9e7078c62fd4412027a7d02d06c659a9c0743697529754218257c00dc6e10dff467e78b4e019225c39b1627b48a5298d13481a7072748a15f SHA512 b74d6358538d1b076f3d5b6632ea405b99627d5b5621b6f5101cb3453be13ba41e11d590039535b0c74b1624b69885a7093600d5395cc60bc63cea15ae7472b3 diff --git a/sys-devel/gcc/files/gcc-13-fix-cross-fixincludes.patch b/sys-devel/gcc/files/gcc-13-fix-cross-fixincludes.patch new file mode 100644 index 000000000000..6d1681938b07 --- /dev/null +++ b/sys-devel/gcc/files/gcc-13-fix-cross-fixincludes.patch @@ -0,0 +1,21 @@ +Revert of https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=59e4c98173a79fcaa2c33253261409f38856c384 +for now to fix cross fixincludes builds. + +https://bugs.gentoo.org/905118 +https://bugs.gentoo.org/925204 +https://bugs.gentoo.org/926059 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -532,11 +532,7 @@ LINKER_PLUGIN_API_H = $(srcdir)/../include/plugin-api.h + # Default native SYSTEM_HEADER_DIR, to be overridden by targets. + NATIVE_SYSTEM_HEADER_DIR = @NATIVE_SYSTEM_HEADER_DIR@ + # Default cross SYSTEM_HEADER_DIR, to be overridden by targets. +-ifeq (@includedir@,$(prefix)/include) +- CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@ +-else +- CROSS_SYSTEM_HEADER_DIR = @includedir@ +-endif ++CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@ + + # autoconf sets SYSTEM_HEADER_DIR to one of the above. + # Purge it of unnecessary internal relative paths diff --git a/sys-devel/gcc/files/gcc-14.0.1_pre20240324-PR114439.patch b/sys-devel/gcc/files/gcc-14.0.1_pre20240324-PR114439.patch new file mode 100644 index 000000000000..2f92ab10cebf --- /dev/null +++ b/sys-devel/gcc/files/gcc-14.0.1_pre20240324-PR114439.patch @@ -0,0 +1,112 @@ +https://bugs.gentoo.org/927657 +https://gcc.gnu.org/PR114439 +https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=de0886d48032332d10e4acb5d15c8789b281b6fe + +From de0886d48032332d10e4acb5d15c8789b281b6fe Mon Sep 17 00:00:00 2001 +From: Marek Polacek <polacek@redhat.com> +Date: Mon, 25 Mar 2024 15:32:20 -0400 +Subject: [PATCH] c++: broken direct-init with trailing array member [PR114439] + +can_init_array_with_p is wrongly saying that the init for 's' here: + + struct S { + int *list = arr; + int arr[]; + }; + + struct A { + A() {} + S s[2]{}; + }; + +is invalid. But as process_init_constructor_array says, for "non-constant +initialization of trailing elements with no explicit initializers" we use +a VEC_INIT_EXPR wrapped in a TARGET_EXPR, built in process_init_constructor. + +Unfortunately we didn't have a test for this scenario so I didn't +realize can_init_array_with_p must handle it. + + PR c++/114439 + +gcc/cp/ChangeLog: + + * init.cc (can_init_array_with_p): Return true for a VEC_INIT_EXPR + wrapped in a TARGET_EXPR. + +gcc/testsuite/ChangeLog: + + * g++.dg/init/array65.C: New test. +--- + gcc/cp/init.cc | 6 ++++- + gcc/testsuite/g++.dg/init/array65.C | 38 +++++++++++++++++++++++++++++ + 2 files changed, 43 insertions(+), 1 deletion(-) + create mode 100644 gcc/testsuite/g++.dg/init/array65.C + +diff --git a/gcc/cp/init.cc b/gcc/cp/init.cc +index dbd37d47cbf..a93ce00800c 100644 +--- a/gcc/cp/init.cc ++++ b/gcc/cp/init.cc +@@ -950,12 +950,16 @@ can_init_array_with_p (tree type, tree init) + mem-initializers of a constructor. */ + if (DECL_DEFAULTED_FN (current_function_decl)) + return true; +- /* As an extension, we allow copying from a compound literal. */ + if (TREE_CODE (init) == TARGET_EXPR) + { + init = TARGET_EXPR_INITIAL (init); ++ /* As an extension, we allow copying from a compound literal. */ + if (TREE_CODE (init) == CONSTRUCTOR) + return CONSTRUCTOR_C99_COMPOUND_LITERAL (init); ++ /* VEC_INIT_EXPR is used for non-constant initialization of trailing ++ elements with no explicit initializers. */ ++ else if (TREE_CODE (init) == VEC_INIT_EXPR) ++ return true; + } + + return false; +diff --git a/gcc/testsuite/g++.dg/init/array65.C b/gcc/testsuite/g++.dg/init/array65.C +new file mode 100644 +index 00000000000..0b144f45a9d +--- /dev/null ++++ b/gcc/testsuite/g++.dg/init/array65.C +@@ -0,0 +1,38 @@ ++// PR c++/114439 ++// { dg-do compile { target c++11 } } ++ ++struct S { ++ int *list = arr; ++ __extension__ int arr[]; ++}; ++ ++struct R { ++ int *list = arr; ++ int arr[2]; ++}; ++ ++struct A { ++ A() {} ++ S s[2]{}; ++}; ++ ++struct A2 { ++ A2() {} ++ S s[2]{ {}, {} }; ++}; ++ ++struct B { ++ B() {} ++ R r[2]{}; ++}; ++ ++struct B2 { ++ B2() {} ++ R r[2]{ {}, {} }; ++}; ++ ++struct S1 { S1(); }; ++struct S2 { ++ S2() {} ++ S1 a[1] {}; ++}; +-- +2.39.3 diff --git a/sys-devel/gcc/files/gcc-configure-LANG.patch b/sys-devel/gcc/files/gcc-configure-LANG.patch deleted file mode 100644 index d1b1b0353662..000000000000 --- a/sys-devel/gcc/files/gcc-configure-LANG.patch +++ /dev/null @@ -1,64 +0,0 @@ -The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in -option parsing, it may break. - -http://bugs.gentoo.org/103483 - ---- configure -+++ configure -@@ -54,6 +54,19 @@ - infodir='${prefix}/info' - mandir='${prefix}/man' - -+# NLS nuisances. -+for as_var in \ -+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ -+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ -+ LC_TELEPHONE LC_TIME -+do -+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then -+ eval $as_var=C; export $as_var -+ else -+ unset $as_var -+ fi -+done -+ - # Initialize some other variables. - subdirs= - MFLAGS= MAKEFLAGS= -@@ -452,16 +463,6 @@ - esac - done - --# NLS nuisances. --# Only set these to C if already set. These must not be set unconditionally --# because not all systems understand e.g. LANG=C (notably SCO). --# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! --# Non-C LC_CTYPE values break the ctype check. --if test "${LANG+set}" = set; then LANG=C; export LANG; fi --if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi --if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi --if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi -- - # confdefs.h avoids OS command line length limits that DEFS can exceed. - rm -rf conftest* confdefs.h - # AIX cpp loses on an empty file, so make sure it contains at least a newline. -@@ -1850,6 +1850,19 @@ - # Compiler output produced by configure, useful for debugging - # configure, is in ./config.log if it exists. - -+# NLS nuisances. -+for as_var in \ -+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ -+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ -+ LC_TELEPHONE LC_TIME -+do -+ if (set +x; test -z "`(eval \$as_var=C; export \$as_var) 2>&1`"); then -+ eval \$as_var=C; export \$as_var -+ else -+ unset \$as_var -+ fi -+done -+ - ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" - for ac_option - do diff --git a/sys-devel/gcc/gcc-10.2.0-r5.ebuild b/sys-devel/gcc/gcc-10.2.0-r5.ebuild deleted file mode 100644 index 21baa1ac7b19..000000000000 --- a/sys-devel/gcc/gcc-10.2.0-r5.ebuild +++ /dev/null @@ -1,18 +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 ~riscv ~s390 ~sparc x86" - -RDEPEND="" -BDEPEND="${CATEGORY}/binutils" - -src_prepare() { - has_version '>=sys-libs/glibc-2.32-r1' && rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch" - toolchain_src_prepare -} diff --git a/sys-devel/gcc/gcc-10.3.0.ebuild b/sys-devel/gcc/gcc-10.3.0.ebuild deleted file mode 100644 index 8cb8a15d5118..000000000000 --- a/sys-devel/gcc/gcc-10.3.0.ebuild +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -PATCH_VER="1" - -inherit toolchain - -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" - -RDEPEND="" -BDEPEND="${CATEGORY}/binutils" - -src_prepare() { - has_version '>=sys-libs/glibc-2.32-r1' && rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch" - toolchain_src_prepare -} diff --git a/sys-devel/gcc/gcc-10.3.1_pre9999.ebuild b/sys-devel/gcc/gcc-10.3.1_pre9999.ebuild deleted file mode 100644 index d15d241413c5..000000000000 --- a/sys-devel/gcc/gcc-10.3.1_pre9999.ebuild +++ /dev/null @@ -1,28 +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 - - has_version '>=sys-libs/glibc-2.32-r1' && rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch" - - toolchain_src_prepare -} diff --git a/sys-devel/gcc/gcc-10.5.0.ebuild b/sys-devel/gcc/gcc-10.5.0.ebuild new file mode 100644 index 000000000000..9203c7468723 --- /dev/null +++ b/sys-devel/gcc/gcc-10.5.0.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="10.5.0" +PATCH_VER="6" +MUSL_VER="2" +MUSL_GCC_VER="10.5.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + 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.0.1_pre9999.ebuild b/sys-devel/gcc/gcc-11.0.1_pre9999.ebuild deleted file mode 100644 index 07f439e1041f..000000000000 --- a/sys-devel/gcc/gcc-11.0.1_pre9999.ebuild +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -PATCH_GCC_VER="11.0.0" -PATCH_VER="6" - -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 - - has_version '>=sys-libs/glibc-2.32-r1' && rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch" - - toolchain_src_prepare -} diff --git a/sys-devel/gcc/gcc-11.4.1_p20240111.ebuild b/sys-devel/gcc/gcc-11.4.1_p20240111.ebuild new file mode 100644 index 000000000000..7e0cd54888ec --- /dev/null +++ b/sys-devel/gcc/gcc-11.4.1_p20240111.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="11.4.0" +PATCH_VER="12" +MUSL_VER="2" +MUSL_GCC_VER="11.4.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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.1_p20240208.ebuild b/sys-devel/gcc/gcc-11.4.1_p20240208.ebuild new file mode 100644 index 000000000000..9b1b89ca2bff --- /dev/null +++ b/sys-devel/gcc/gcc-11.4.1_p20240208.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="11.4.0" +PATCH_VER="12" +MUSL_VER="2" +MUSL_GCC_VER="11.4.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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.1_p20240328.ebuild b/sys-devel/gcc/gcc-11.4.1_p20240328.ebuild new file mode 100644 index 000000000000..5ab7ed2dbcfa --- /dev/null +++ b/sys-devel/gcc/gcc-11.4.1_p20240328.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="11.4.0" +PATCH_VER="12" +MUSL_VER="2" +MUSL_GCC_VER="11.4.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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.1_p20240404.ebuild b/sys-devel/gcc/gcc-11.4.1_p20240404.ebuild new file mode 100644 index 000000000000..9b1b89ca2bff --- /dev/null +++ b/sys-devel/gcc/gcc-11.4.1_p20240404.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="11.4.0" +PATCH_VER="12" +MUSL_VER="2" +MUSL_GCC_VER="11.4.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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.1_p20240411.ebuild b/sys-devel/gcc/gcc-11.4.1_p20240411.ebuild new file mode 100644 index 000000000000..5ab7ed2dbcfa --- /dev/null +++ b/sys-devel/gcc/gcc-11.4.1_p20240411.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="11.4.0" +PATCH_VER="12" +MUSL_VER="2" +MUSL_GCC_VER="11.4.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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.1_p20240418.ebuild b/sys-devel/gcc/gcc-11.4.1_p20240418.ebuild new file mode 100644 index 000000000000..5ab7ed2dbcfa --- /dev/null +++ b/sys-devel/gcc/gcc-11.4.1_p20240418.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="11.4.0" +PATCH_VER="12" +MUSL_VER="2" +MUSL_GCC_VER="11.4.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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.5.9999.ebuild b/sys-devel/gcc/gcc-11.5.9999.ebuild new file mode 100644 index 000000000000..124b2c1eeeb5 --- /dev/null +++ b/sys-devel/gcc/gcc-11.5.9999.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="11.4.0" +MUSL_GCC_VER="11.4.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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-12.0.0_pre9999.ebuild deleted file mode 100644 index 20155ba01b9a..000000000000 --- a/sys-devel/gcc/gcc-12.0.0_pre9999.ebuild +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -PATCH_GCC_VER="12.0.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" - -EGIT_BRANCH=master - -RDEPEND="" -BDEPEND="${CATEGORY}/binutils" - -src_prepare() { - has_version '>=sys-libs/glibc-2.32-r1' && rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch" - toolchain_src_prepare -} diff --git a/sys-devel/gcc/gcc-12.3.1_p20240112.ebuild b/sys-devel/gcc/gcc-12.3.1_p20240112.ebuild new file mode 100644 index 000000000000..6c45c55e4a05 --- /dev/null +++ b/sys-devel/gcc/gcc-12.3.1_p20240112.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="12.3.0" +PATCH_VER="2" +MUSL_VER="1" +MUSL_GCC_VER="12.3.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~riscv ~s390 sparc x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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.3.1_p20240209.ebuild b/sys-devel/gcc/gcc-12.3.1_p20240209.ebuild new file mode 100644 index 000000000000..f0ad270b596f --- /dev/null +++ b/sys-devel/gcc/gcc-12.3.1_p20240209.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="12.3.0" +PATCH_VER="3" +MUSL_VER="1" +MUSL_GCC_VER="12.3.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~riscv ~s390 sparc x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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.3.1_p20240329.ebuild b/sys-devel/gcc/gcc-12.3.1_p20240329.ebuild new file mode 100644 index 000000000000..2c4b89e72445 --- /dev/null +++ b/sys-devel/gcc/gcc-12.3.1_p20240329.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="12.3.0" +PATCH_VER="3" +MUSL_VER="1" +MUSL_GCC_VER="12.3.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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.3.1_p20240405.ebuild b/sys-devel/gcc/gcc-12.3.1_p20240405.ebuild new file mode 100644 index 000000000000..2c4b89e72445 --- /dev/null +++ b/sys-devel/gcc/gcc-12.3.1_p20240405.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="12.3.0" +PATCH_VER="3" +MUSL_VER="1" +MUSL_GCC_VER="12.3.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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.3.1_p20240412.ebuild b/sys-devel/gcc/gcc-12.3.1_p20240412.ebuild new file mode 100644 index 000000000000..2c4b89e72445 --- /dev/null +++ b/sys-devel/gcc/gcc-12.3.1_p20240412.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="12.3.0" +PATCH_VER="3" +MUSL_VER="1" +MUSL_GCC_VER="12.3.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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.3.1_p20240419.ebuild b/sys-devel/gcc/gcc-12.3.1_p20240419.ebuild new file mode 100644 index 000000000000..2c4b89e72445 --- /dev/null +++ b/sys-devel/gcc/gcc-12.3.1_p20240419.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="12.3.0" +PATCH_VER="3" +MUSL_VER="1" +MUSL_GCC_VER="12.3.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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.4.9999.ebuild b/sys-devel/gcc/gcc-12.4.9999.ebuild new file mode 100644 index 000000000000..4828fd444e14 --- /dev/null +++ b/sys-devel/gcc/gcc-12.4.9999.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="12.3.0" +MUSL_GCC_VER="12.3.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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.2.1_p20240113-r1.ebuild b/sys-devel/gcc/gcc-13.2.1_p20240113-r1.ebuild new file mode 100644 index 000000000000..27e1e5ab20bc --- /dev/null +++ b/sys-devel/gcc/gcc-13.2.1_p20240113-r1.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="13.2.0" +PATCH_VER="12" +MUSL_VER="2" +MUSL_GCC_VER="13.2.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 sparc x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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 "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch + eapply_user +} diff --git a/sys-devel/gcc/gcc-13.2.1_p20240210.ebuild b/sys-devel/gcc/gcc-13.2.1_p20240210.ebuild new file mode 100644 index 000000000000..e2094692e1f6 --- /dev/null +++ b/sys-devel/gcc/gcc-13.2.1_p20240210.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="13.2.0" +PATCH_VER="14" +MUSL_VER="2" +MUSL_GCC_VER="13.2.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 sparc x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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 "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch + eapply_user +} diff --git a/sys-devel/gcc/gcc-13.2.1_p20240330.ebuild b/sys-devel/gcc/gcc-13.2.1_p20240330.ebuild new file mode 100644 index 000000000000..1e4b87a7546c --- /dev/null +++ b/sys-devel/gcc/gcc-13.2.1_p20240330.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="13.2.0" +PATCH_VER="14" +MUSL_VER="2" +MUSL_GCC_VER="13.2.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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 "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch + eapply_user +} diff --git a/sys-devel/gcc/gcc-13.2.1_p20240406.ebuild b/sys-devel/gcc/gcc-13.2.1_p20240406.ebuild new file mode 100644 index 000000000000..2a22fc220b4c --- /dev/null +++ b/sys-devel/gcc/gcc-13.2.1_p20240406.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="13.2.0" +PATCH_VER="15" +MUSL_VER="2" +MUSL_GCC_VER="13.2.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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 "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch + eapply_user +} diff --git a/sys-devel/gcc/gcc-13.2.1_p20240413.ebuild b/sys-devel/gcc/gcc-13.2.1_p20240413.ebuild new file mode 100644 index 000000000000..2a22fc220b4c --- /dev/null +++ b/sys-devel/gcc/gcc-13.2.1_p20240413.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="13.2.0" +PATCH_VER="15" +MUSL_VER="2" +MUSL_GCC_VER="13.2.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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 "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch + eapply_user +} diff --git a/sys-devel/gcc/gcc-13.2.1_p20240420.ebuild b/sys-devel/gcc/gcc-13.2.1_p20240420.ebuild new file mode 100644 index 000000000000..2a22fc220b4c --- /dev/null +++ b/sys-devel/gcc/gcc-13.2.1_p20240420.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="13.2.0" +PATCH_VER="15" +MUSL_VER="2" +MUSL_GCC_VER="13.2.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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 "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch + eapply_user +} diff --git a/sys-devel/gcc/gcc-13.3.9999.ebuild b/sys-devel/gcc/gcc-13.3.9999.ebuild new file mode 100644 index 000000000000..b7539bd2eccf --- /dev/null +++ b/sys-devel/gcc/gcc-13.3.9999.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="13.2.0" +MUSL_GCC_VER="13.2.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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-14.0.1_pre20240317.ebuild b/sys-devel/gcc/gcc-14.0.1_pre20240317.ebuild new file mode 100644 index 000000000000..e809e40f6564 --- /dev/null +++ b/sys-devel/gcc/gcc-14.0.1_pre20240317.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="14.0.0" +PATCH_VER="25" +MUSL_VER="1" +MUSL_GCC_VER="14.0.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=master +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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 "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch + eapply_user +} diff --git a/sys-devel/gcc/gcc-14.0.1_pre20240324-r1.ebuild b/sys-devel/gcc/gcc-14.0.1_pre20240324-r1.ebuild new file mode 100644 index 000000000000..41416832f8b5 --- /dev/null +++ b/sys-devel/gcc/gcc-14.0.1_pre20240324-r1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="14.0.0" +PATCH_VER="25" +MUSL_VER="1" +MUSL_GCC_VER="14.0.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=master +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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 "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch + eapply "${FILESDIR}"/${P}-PR114439.patch + eapply_user +} diff --git a/sys-devel/gcc/gcc-14.0.1_pre20240331.ebuild b/sys-devel/gcc/gcc-14.0.1_pre20240331.ebuild new file mode 100644 index 000000000000..e809e40f6564 --- /dev/null +++ b/sys-devel/gcc/gcc-14.0.1_pre20240331.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="14.0.0" +PATCH_VER="25" +MUSL_VER="1" +MUSL_GCC_VER="14.0.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=master +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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 "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch + eapply_user +} diff --git a/sys-devel/gcc/gcc-14.0.1_pre20240407.ebuild b/sys-devel/gcc/gcc-14.0.1_pre20240407.ebuild new file mode 100644 index 000000000000..00b7365febb9 --- /dev/null +++ b/sys-devel/gcc/gcc-14.0.1_pre20240407.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="14.0.0" +PATCH_VER="26" +MUSL_VER="1" +MUSL_GCC_VER="14.0.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=master +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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 "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch + eapply_user +} diff --git a/sys-devel/gcc/gcc-14.0.1_pre20240414.ebuild b/sys-devel/gcc/gcc-14.0.1_pre20240414.ebuild new file mode 100644 index 000000000000..00b7365febb9 --- /dev/null +++ b/sys-devel/gcc/gcc-14.0.1_pre20240414.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="14.0.0" +PATCH_VER="26" +MUSL_VER="1" +MUSL_GCC_VER="14.0.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=master +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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 "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch + eapply_user +} diff --git a/sys-devel/gcc/gcc-14.0.1_pre20240421.ebuild b/sys-devel/gcc/gcc-14.0.1_pre20240421.ebuild new file mode 100644 index 000000000000..00b7365febb9 --- /dev/null +++ b/sys-devel/gcc/gcc-14.0.1_pre20240421.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="14.0.0" +PATCH_VER="26" +MUSL_VER="1" +MUSL_GCC_VER="14.0.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=master +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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 "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch + eapply_user +} diff --git a/sys-devel/gcc/gcc-14.0.9999.ebuild b/sys-devel/gcc/gcc-14.0.9999.ebuild new file mode 100644 index 000000000000..762b2f9aca6b --- /dev/null +++ b/sys-devel/gcc/gcc-14.0.9999.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="14.0.0" +MUSL_GCC_VER="14.0.0" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ -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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=master +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # 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="amd64? ( >=${CATEGORY}/binutils-2.30[cet(-)?] )" +fi + +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-6.5.0-r3.ebuild b/sys-devel/gcc/gcc-6.5.0-r3.ebuild deleted file mode 100644 index 9cea619a7e52..000000000000 --- a/sys-devel/gcc/gcc-6.5.0-r3.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="5" - -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-r1.ebuild b/sys-devel/gcc/gcc-7.5.0-r1.ebuild deleted file mode 100644 index 689958930bd1..000000000000 --- a/sys-devel/gcc/gcc-7.5.0-r1.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="3" - -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.4.0-r1.ebuild b/sys-devel/gcc/gcc-8.4.0-r1.ebuild deleted file mode 100644 index e5b72b981c98..000000000000 --- a/sys-devel/gcc/gcc-8.4.0-r1.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="2" - -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-8.4.0-r2.ebuild b/sys-devel/gcc/gcc-8.4.0-r2.ebuild deleted file mode 100644 index 1a3c971222b7..000000000000 --- a/sys-devel/gcc/gcc-8.4.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="3" - -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.3.0-r1.ebuild b/sys-devel/gcc/gcc-8.5.0-r1.ebuild index 7c475bdd0eb2..71a72ec0dc9e 100644 --- a/sys-devel/gcc/gcc-9.3.0-r1.ebuild +++ b/sys-devel/gcc/gcc-8.5.0-r1.ebuild @@ -1,9 +1,12 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="7" -PATCH_VER="3" +TOOLCHAIN_PATCH_SUFFIX="xz" +TOOLCHAIN_PATCH_DEV="sam" +PATCH_VER="4" +PYTHON_COMPAT=( python3_{10..11} ) inherit toolchain diff --git a/sys-devel/gcc/gcc-9.3.0-r2.ebuild b/sys-devel/gcc/gcc-9.3.0-r2.ebuild deleted file mode 100644 index d955f1876654..000000000000 --- a/sys-devel/gcc/gcc-9.3.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 ~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.5.0.ebuild b/sys-devel/gcc/gcc-9.5.0.ebuild new file mode 100644 index 000000000000..9208cb574215 --- /dev/null +++ b/sys-devel/gcc/gcc-9.5.0.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="9.5.0" +PATCH_VER="2" +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +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="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -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 + + toolchain_src_prepare +} diff --git a/sys-devel/gcc/metadata.xml b/sys-devel/gcc/metadata.xml index 1a676ab81391..853d96579504 100644 --- a/sys-devel/gcc/metadata.xml +++ b/sys-devel/gcc/metadata.xml @@ -1,42 +1,124 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!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="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 control flow hijacking protection. + + On amd64, this provides Intel Control Flow Enforcement Technology (CET). + + On arm64, this provides Branch Target Identification (BTI) + and Pointer Authentication Code (PAC) support. + + This is only effective on amd64 or arm64. + + Only provides benefits on newer CPUs. For Intel, the CPU + must be at least as new as Tiger Lake. For AMD, it must be + at least as new as Zen 3. This is harmless on older CPUs, + but provides no benefit either. + + For ARM64, PAC was introduced in armv8.3-a, and BTI was + introduced in armv8.5-a. + + When combined with USE=hardened on amd64, GCC will set -fcf-protection + by default when building software. The effect is minimal + on systems which do not support it, other than a possible + small increase in codesize for the NOPs. The generated + code is therefore compatible with i686 at the earliest. + + On arm64, GCC will set -mbranch-protection=standard by default + when building software. + </flag> + <flag name="d">Enable support for the D programming language</flag> + <flag name="debug"> + Enables GCC's 'checking' facility via --enable-checking=yes,extra,rtl. + + This adds checks to various compiler passes for integrity and input + validation. This can help catch possible miscompilations early as + well as latent bugs which could become real problems in future, but + at the cost of slower compile times when using GCC. + + Unrelated to backtraces. + </flag> + <flag name="default-stack-clash-protection"> + Build packages with stack clash protection on by default as + a hardening measure. + + This enables -fstack-clash-protection by default which protects against + large memory allocations allowing stack smashing. + + May cause slightly increased codesize, but modern compilers + have been adapted to optimize well for this case, as + this mitigation is now quite common. + + See https://developers.redhat.com/blog/2020/05/22/stack-clash-mitigation-in-gcc-part-3 + and https://www.qualys.com/2017/06/19/stack-clash/stack-clash.txt. + </flag> + <flag name="default-znow"> + Request full relocation on start from ld.so by default. + + This sets the -z,now (BIND_NOW) flag by default on all linker invocations. By + resolving all dynamic symbols at application startup, parts of the program + can be made read-only as a hardening measure. + + This is closely related to RELRO which is also separately + enabled by default. + + In some applications with many unresolved symbols (heavily plugin based, + for example), startup time may be impacted. + </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="ieee-long-double">Use accelerated 128-bit IEEE long double ABI (ppc64le only)</flag> + <flag name="jit">Enable libgccjit so other applications can embed gcc for Just-In-Time compilation.</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). + + Note that GCC is always built with support for building + other programs with LTO. This USE flag is for whether + GCC itself is built and optimized with LTO. + </flag> + <flag name="modula2">Build the GCC Modula-2 language frontend.</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). + + GCC will build itself and then analyze the just-built + binary and then rebuild itself using the data obtained + from analysis of codepaths taken. + + It does not affect whether GCC itself supports PGO + when building other software. + + This substantially increases the build time needed for + building GCC itself. + </flag> + <flag name="rust">Build support for the Rust language, installs gccrs.</flag> + <flag name="sanitize"> + Build support for various sanitizer functions (ASAN/TSAN/etc...) + to find runtime problems in applications. + </flag> + <flag name="ssp">Build packages with stack smashing protection on by default</flag> + <flag name="systemtap">enable systemtap static probe points</flag> + <flag name="vtv"> + Build support for virtual table verification (a C++ hardening feature). + + This does not control whether GCC defaults to using VTV> + + Note that actually using VTV breaks ABI and hence the whole + system must be built with -fvtable-verify. + </flag> + </use> + <upstream> + <remote-id type="cpe">cpe:/a:gnu:gcc</remote-id> + </upstream> </pkgmetadata> diff --git a/sys-devel/gdb-apple/Manifest b/sys-devel/gdb-apple/Manifest deleted file mode 100644 index d52e9873b523..000000000000 --- a/sys-devel/gdb-apple/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST gdb-1752.tar.gz 17922994 BLAKE2B 9b27bca2b6a9f10e01d130d595270300a4e7f0040790c5b60337d41086e1238dc12d785cc88c484df630f742ddfe783f7baefc2132b47e41bb74a5d0b7ebbf1e SHA512 863a861a9a7708b8a763ea93599f6b519277f23fff35700d04e81a7747cc49421d0f051790deb92c440ced30ee15ba719b75066d5a614341e0f0b765d7a81094 diff --git a/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8-9.patch b/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8-9.patch deleted file mode 100644 index a05169cec25d..000000000000 --- a/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8-9.patch +++ /dev/null @@ -1,87 +0,0 @@ ---- src/gdb/macosx/macosx-nat-dyld.c -+++ src/gdb/macosx/macosx-nat-dyld.c -@@ -2083,7 +2083,9 @@ - case MH_DYLIB: - case MH_DYLINKER: - case MH_BUNDLE: -+#ifdef MH_KEXT_BUNDLE - case MH_KEXT_BUNDLE: -+#endif - break; - case MH_FVMLIB: - case MH_PRELOAD: -@@ -2412,7 +2414,9 @@ - break; - case MH_DYLINKER: - case MH_BUNDLE: -+#ifdef MH_KEXT_BUNDLE - case MH_KEXT_BUNDLE: -+#endif - entry->reason = dyld_reason_dyld; - break; - default: ---- src/gdb/macosx/macosx-nat-dyld-process.c -+++ src/gdb/macosx/macosx-nat-dyld-process.c -@@ -407,7 +407,9 @@ - case MH_DYLIB: - break; - case MH_BUNDLE: -+#ifdef MH_KEXT_BUNDLE - case MH_KEXT_BUNDLE: -+#endif - break; - default: - return; - return; ---- src/gdb/macosx/macosx-nat-inferior.c -+++ src/gdb/macosx/macosx-nat-inferior.c -@@ -2692,6 +2692,7 @@ - if (tp->private == NULL || tp->private->app_thread_port == 0) - return NULL; - -+#ifdef THREAD_IDENTIFIER_INFO_COUNT - thread_identifier_info_data_t tident; - unsigned int info_count; - kern_return_t kret; -@@ -2719,6 +2720,7 @@ - } - } - } -+#endif - return buf; - } - ---- src/gdb/macosx/macosx-nat-infthread.c -+++ src/gdb/macosx/macosx-nat-infthread.c -@@ -809,6 +809,7 @@ - print_stack_frame (get_selected_frame (NULL), 0, LOCATION); - switch_to_thread (current_ptid); - -+#ifdef THREAD_IDENTIFIER_INFO_COUNT - thread_identifier_info_data_t tident; - info_count = THREAD_IDENTIFIER_INFO_COUNT; - kret = thread_info (tid, THREAD_IDENTIFIER_INFO, (thread_info_t) &tident, -@@ -878,6 +879,7 @@ - printf_filtered ("\tcurrent priority: %d\n", pth.pth_priority); - printf_filtered ("\tmax priority: %d\n", pth.pth_maxpriority); - } -+#endif - - printf_filtered ("\tsuspend count: %d", info.suspend_count); - -@@ -1175,6 +1177,7 @@ - ui_out_field_fmt (uiout, "mach-port-number", "0x%s", - paddr_nz (app_thread_name)); - -+#ifdef THREAD_IDENTIFIER_INFO_COUNT - thread_identifier_info_data_t tident; - info_count = THREAD_IDENTIFIER_INFO_COUNT; - kret = thread_info (tid, THREAD_IDENTIFIER_INFO, (thread_info_t) &tident, -@@ -1207,6 +1210,7 @@ - paddr_nz (struct_addr)); - } - } -+#endif - } - - diff --git a/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8.patch b/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8.patch deleted file mode 100644 index f8ecc30be7f6..000000000000 --- a/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8.patch +++ /dev/null @@ -1,128 +0,0 @@ ---- src/gdb/macosx/macosx-nat-inferior.c -+++ src/gdb/macosx/macosx-nat-inferior.c -@@ -60,13 +60,17 @@ - #include <sys/sysctl.h> - #include <sys/proc.h> - #include <mach/mach_error.h> -+#if defined(TARGET_ARM) - #include <spawn.h> -+#endif - - #include <semaphore.h> - - #include <dlfcn.h> -+#if 0 - #include <libproc.h> - #include <sys/proc_info.h> -+#endif - - #include "macosx-nat-dyld.h" - #include "macosx-nat-inferior.h" ---- src/gdb/macosx/macosx-nat-info.c -+++ src/gdb/macosx/macosx-nat-info.c -@@ -45,6 +45,22 @@ - #include "macosx-nat-inferior.h" - #include "macosx-nat-inferior-debug.h" - -+#ifdef __ppc__ -+#ifndef __darwin_ppc_thread_state -+#define __darwin_ppc_thread_state ppc_thread_state -+#define __r0 r0 -+#define __srr0 srr0 -+#define __srr1 srr1 -+#define __cr cr -+#define __xer xer -+#define __lr lr -+#define __ctr ctr -+#endif -+#ifndef __darwin_ppc_exception_state -+#define __darwin_ppc_exception_state ppc_exception_state -+#endif -+#endif -+ - extern macosx_inferior_status *macosx_status; - - #define CHECK_ARGS(what, args) \ ---- src/gdb/macosx/macosx-nat-infthread.c -+++ src/gdb/macosx/macosx-nat-infthread.c -@@ -36,8 +36,10 @@ - #include <sys/dir.h> - #include <inttypes.h> - -+#if 0 - #include <libproc.h> - #include <sys/proc_info.h> -+#endif - - #include "macosx-nat-inferior.h" - #include "macosx-nat-inferior-util.h" ---- src/gdb/macosx/macosx-tdep.c -+++ src/gdb/macosx/macosx-tdep.c -@@ -64,7 +64,6 @@ - #include "gdbcore.h" - - #include <dirent.h> --#include <libgen.h> - #include <sys/types.h> - #include <sys/stat.h> - #include <sys/param.h> ---- src/gdb/remote.c -+++ src/gdb/remote.c -@@ -63,7 +63,6 @@ - #include "macosx-nat-dyld.h" - #include "macosx-nat-dyld-process.h" - #endif --#include <execinfo.h> - - /* Prototypes for local functions. */ - static void cleanup_sigint_signal_handler (void *dummy); -@@ -475,11 +474,13 @@ - static void - remote_backtrace_self (const char *message) - { -+#if 0 - void *bt_buffer[100]; - int count = backtrace (bt_buffer, 100); - if (message && message[0]) - fprintf_filtered (gdb_stderr, "%s", message); - backtrace_symbols_fd (bt_buffer, count, STDERR_FILENO); -+#endif - } - - static void ---- src/gdb/symfile.c -+++ src/gdb/symfile.c -@@ -67,7 +67,6 @@ - #include <ctype.h> - #include <time.h> - #include <sys/time.h> --#include <libgen.h> - - #include <sys/mman.h> - ---- src/gdb/utils.c -+++ src/gdb/utils.c -@@ -28,7 +28,6 @@ - #include "event-top.h" - #include "exceptions.h" - #include "bfd.h" --#include <execinfo.h> - #include <sys/resource.h> - #include <uuid/uuid.h> - -@@ -879,6 +878,7 @@ - target_terminal_ours (); - begin_line (); - -+#if 0 - /* APPLE LOCAL: Do a stack crawl of how we got here so we're more likely - to get useful bug reports. */ - { -@@ -887,6 +887,7 @@ - fprintf (stderr, "gdb stack crawl at point of internal error:\n"); - backtrace_symbols_fd (bt_buffer, count, STDERR_FILENO); - } -+#endif - - /* Create a string containing the full error/warning message. Need - to call query with this full string, as otherwize the reason diff --git a/sys-devel/gdb-apple/files/gdb-apple-1705-darwin8-10.patch b/sys-devel/gdb-apple/files/gdb-apple-1705-darwin8-10.patch deleted file mode 100644 index 32247431fe89..000000000000 --- a/sys-devel/gdb-apple/files/gdb-apple-1705-darwin8-10.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/gdb/macosx/macosx-nat-dyld.c -+++ src/gdb/macosx/macosx-nat-dyld.c -@@ -788,7 +788,7 @@ - } - else - { --#if defined (NM_NEXTSTEP) -+#if defined (NM_NEXTSTEP) && defined(TASK_DYLD_INFO_COUNT) - if (macosx_status->task == TASK_NULL) - return 0; - diff --git a/sys-devel/gdb-apple/files/gdb-apple-768-texinfo.patch b/sys-devel/gdb-apple/files/gdb-apple-768-texinfo.patch deleted file mode 100644 index 41153d8436de..000000000000 --- a/sys-devel/gdb-apple/files/gdb-apple-768-texinfo.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- src/Makefile.in -+++ src/Makefile.in -@@ -280,6 +280,6 @@ - then echo $$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo ; \ - else if (${CONFIGURED_MAKEINFO} --version \ -- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \ -+ | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|4\.[1-9][0-9]|[5-9])') >/dev/null 2>&1; \ - then echo ${CONFIGURED_MAKEINFO}; else echo $$s/missing makeinfo; fi; fi` - - # This just becomes part of the MAKEINFO definition passed down to diff --git a/sys-devel/gdb-apple/files/gdb-apple-no-global-gdbinit.patch b/sys-devel/gdb-apple/files/gdb-apple-no-global-gdbinit.patch deleted file mode 100644 index 0c132ec5b384..000000000000 --- a/sys-devel/gdb-apple/files/gdb-apple-no-global-gdbinit.patch +++ /dev/null @@ -1,23 +0,0 @@ -Sourcing /etc/gdb.conf is annoying mainly because Apple put - set history save on -in there, which means everywhere you run it, you end up with a -.gdb_history file. - ---- src/gdb/main.c -+++ src/gdb/main.c -@@ -675,6 +675,7 @@ - memset (&cwdbuf, 0, sizeof (struct stat)); - /* APPLE LOCAL end move inits up */ - /* APPLE LOCAL begin global gdbinit */ -+#ifdef WANT_GLOBAL_GDBINIT - memset (&globalbuf, 0, sizeof (struct stat)); - stat (gdbinit_global, &globalbuf); - if (!inhibit_gdbinit) -@@ -683,6 +684,7 @@ - source_file (gdbinit_global, 0); - } - do_cleanups (ALL_CLEANUPS); -+#endif - /* APPLE LOCAL end global gdbinit */ - - /* APPLE LOCAL: Set the $_Xcode convenience variable at '0' before sourcing diff --git a/sys-devel/gdb-apple/gdb-apple-1752.ebuild b/sys-devel/gdb-apple/gdb-apple-1752.ebuild deleted file mode 100644 index e9abe3a3f5d7..000000000000 --- a/sys-devel/gdb-apple/gdb-apple-1752.ebuild +++ /dev/null @@ -1,95 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit flag-o-matic toolchain-funcs - -APPLE_PV=${PV} -DESCRIPTION="Apple branch of the GNU Debugger, Developer Tools 4.3" -HOMEPAGE="https://sourceware.org/gdb/" -SRC_URI="http://www.opensource.apple.com/darwinsource/tarballs/other/gdb-${APPLE_PV}.tar.gz" - -LICENSE="APSL-2 GPL-2" -SLOT="0" - -KEYWORDS="~ppc-macos ~x64-macos" - -IUSE="nls" - -RDEPEND=">=sys-libs/ncurses-5.2-r2:0= - sys-libs/readline:0= - =dev-db/sqlite-3*" -DEPEND="${RDEPEND} - nls? ( sys-devel/gettext ) - || ( >=sys-devel/gcc-apple-4.2.1 sys-devel/llvm:* )" - -S=${WORKDIR}/gdb-${APPLE_PV}/src - -PATCHES=( - "${FILESDIR}"/${PN}-no-global-gdbinit.patch - "${FILESDIR}"/${PN}-768-texinfo.patch - "${FILESDIR}"/${PN}-1518-darwin8-9.patch - "${FILESDIR}"/${PN}-1705-darwin8-10.patch -) - -src_prepare() { - default - [[ ${CHOST} == *-darwin8 ]] && eapply "${FILESDIR}"/${PN}-1518-darwin8.patch - - # use host readline - sed -i -e '/host_libs/s/readline//' configure.in configure || die - sed -i \ - -e '/^\(READLINE\|readline\)_/s/=.*$/=/' \ - -e '/^READLINE /s/=.*$/= -lreadline/' \ - gdb/Makefile.in || die -} - -src_configure() { - if tc-is-gcc ; then - # force gcc-apple, FSF gcc doesn't grok this code - export CC=${CTARGET:-${CHOST}}-gcc-4.2.1 - export CXX=${CTARGET:-${CHOST}}-g++-4.2.1 - fi - - replace-flags -O? -O2 - econf \ - --disable-werror \ - --disable-debug-symbols-framework \ - $(use_enable nls) -} - -src_compile() { - # unable to work around parallel make issue - # ignore texinfo issues (version mismatch, to hard to fix or - # disable) - emake -j2 MAKEINFOFLAGS="--force" -} - -src_install() { - emake -j2 \ - DESTDIR="${D}" libdir=/nukeme includedir=/nukeme \ - MAKEINFOFLAGS="--force" install || die - rm -R "${D}"/nukeme || die - rm -Rf "${ED}"/usr/${CHOST} || die - mv "${ED}"/usr/bin/gdb "${ED}"/ - rm -f "${ED}"/usr/bin/* - mv "${ED}"/gdb "${ED}"/usr/bin/ -} - -pkg_postinst() { - if [[ ${CHOST} == *-darwin* && ${CHOST#*-darwin} -ge 9 ]] ; then - ewarn "Due to increased security measures in 10.5 and up, gdb is" - ewarn "not able to get a mach task port when installed by Prefix" - ewarn "Portage, unprivileged. To make gdb fully functional you'll" - ewarn "have to perform the following steps:" - ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb" - ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb" - fi - if [[ ${CHOST} == *86* ]] ; then - einfo "FSF gdb works on Intel-based OSX platforms, sometimes even" - einfo "better than gdb-apple. You can consider installing FSF gdb" - einfo "instead of gdb-apple, since the FSF version is surely more" - einfo "advanced than this old 6.8 version modified by Apple." - fi -} diff --git a/sys-devel/gdb-apple/metadata.xml b/sys-devel/gdb-apple/metadata.xml deleted file mode 100644 index 0c982d881307..000000000000 --- a/sys-devel/gdb-apple/metadata.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>prefix@gentoo.org</email> - <name>Gentoo Prefix</name> - </maintainer> -</pkgmetadata> diff --git a/sys-devel/gdb/Manifest b/sys-devel/gdb/Manifest deleted file mode 100644 index 8fa3bb789909..000000000000 --- a/sys-devel/gdb/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST gdb-10.1.tar.xz 21507112 BLAKE2B 69d79cd667ecb6e936b41a03817ade5dd9b761f97bc123d668b5f968d123c37d048fc8ec1289151e989f01bb01a43cc3d8b5b54f1807f1e3eb5f43e6bf0aa55b SHA512 0dc54380435c6853db60f1e388b94836d294dfa9ad7f518385a27db4edd03cb970f8717d5f1e9c9a0d4a33d7fcf91bc2e5d6c9cf9e4b561dcc74e65b806c1537 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 7477ff90ac95..000000000000 --- 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-8.3.1-verbose-build.patch b/sys-devel/gdb/files/gdb-8.3.1-verbose-build.patch deleted file mode 100644 index 06aa6084d2d2..000000000000 --- a/sys-devel/gdb/files/gdb-8.3.1-verbose-build.patch +++ /dev/null @@ -1,13 +0,0 @@ -Enable verbose build. By default gdb ignores even --disable-silent-rules. -Override verbosity back to non-silent. - -https://bugs.gentoo.org/695936 ---- a/gdb/silent-rules.mk -+++ b/gdb/silent-rules.mk -@@ -1,5 +1,4 @@ --# If V is undefined or V=0 is specified, use the silent/verbose/compact mode. --V ?= 0 -+V ?= 1 - ifeq ($(V),0) - ECHO_CXX = @echo " CXX $@"; - ECHO_CXXLD = @echo " CXXLD $@"; diff --git a/sys-devel/gdb/gdb-10.1.ebuild b/sys-devel/gdb/gdb-10.1.ebuild deleted file mode 100644 index b60fdb81a1e3..000000000000 --- a/sys-devel/gdb/gdb-10.1.ebuild +++ /dev/null @@ -1,259 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -PYTHON_COMPAT=( python3_{7,8,9} ) - -inherit eutils flag-o-matic python-single-r1 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" - ;; -esac - -PATCH_VER="" -PATCH_DEV="" -DESCRIPTION="GNU debugger" -HOMEPAGE="https://sourceware.org/gdb/" -SRC_URI="${SRC_URI} - ${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz} - ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz} -" - -LICENSE="GPL-2 LGPL-2" -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" -fi -IUSE="cet lzma multitarget nls +python +server source-highlight test vanilla xml xxhash" -REQUIRED_USE=" - python? ( ${PYTHON_REQUIRED_USE} ) -" - -# ia64 kernel crashes when gdb testsuite is running -RESTRICT=" - ia64? ( test ) - - !test? ( test ) -" - -RDEPEND=" - dev-libs/mpfr:0= - >=sys-libs/ncurses-5.2-r2:0= - >=sys-libs/readline-7:0= - sys-libs/zlib - lzma? ( app-arch/xz-utils ) - python? ( ${PYTHON_DEPS} ) - xml? ( dev-libs/expat ) - source-highlight? ( - dev-util/source-highlight - ) - xxhash? ( - dev-libs/xxhash - ) -" -DEPEND="${RDEPEND}" -BDEPEND=" - app-arch/xz-utils - sys-apps/texinfo - virtual/yacc - nls? ( sys-devel/gettext ) - source-highlight? ( virtual/pkgconfig ) - test? ( dev-util/dejagnu ) -" - -PATCHES=( - "${FILESDIR}"/${PN}-8.3.1-verbose-build.patch - "${FILESDIR}"/${PN}-10.1-cet.patch -) - -pkg_setup() { - use python && python-single-r1_pkg_setup -} - -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 - 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 - - local myconf=( - # portage's econf() does not detect presence of --d-d-t - # because it greps only top-level ./configure. But not - # gnulib's or gdb's configure. - --disable-dependency-tracking - - --with-pkgversion="$(gdb_branding)" - --with-bugurl='https://bugs.gentoo.org/' - --disable-werror - # Disable modules that are in a combined binutils/gdb tree. #490566 - --disable-{binutils,etc,gas,gold,gprof,ld} - - # 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) - ) - local sysroot="${EPREFIX}/usr/${CTARGET}" - is_cross && myconf+=( - --with-sysroot="${sysroot}" - --includedir="${sysroot}/usr/include" - --with-gdb-datadir="\${datadir}/gdb/${CTARGET}" - ) - - # gdbserver only works for native targets (CHOST==CTARGET). - # it also doesn't support all targets, so rather than duplicate - # the target list (which changes between versions), use the - # "auto" value when things are turned on, which is triggered - # whenever no --enable or --disable is given - if is_cross || use !server ; then - myconf+=( --disable-gdbserver ) - fi - - myconf+=( - --enable-64-bit-bfd - --disable-install-libbfd - --disable-install-libiberty - # Disable guile for now as it requires guile-2.x #562902 - --without-guile - --enable-obsolete - # This only disables building in the readline subdir. - # For gdb itself, it'll use the system version. - --disable-readline - --with-system-readline - # This only disables building in the zlib subdir. - # For gdb itself, it'll use the system version. - --without-zlib - --with-system-zlib - --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug - $(use_with xml expat) - $(use_with lzma) - $(use_enable nls) - $(use_enable source-highlight) - $(use multitarget && echo --enable-targets=all) - $(use_with python python "${EPYTHON}") - $(use_with xxhash) - ) - if use sparc-solaris || use x86-solaris ; then - # disable largefile support - # https://sourceware.org/ml/gdb-patches/2014-12/msg00058.html - myconf+=( --disable-largefile ) - fi - - # source-highlight is detected with pkg-config: bug #716558 - export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)" - - econf "${myconf[@]}" -} - -src_install() { - default - find "${ED}"/usr -name libiberty.a -delete || die - - # Delete translations that conflict with binutils-libs. #528088 - # Note: Should figure out how to store these in an internal gdb dir. - if use nls ; then - find "${ED}" \ - -regextype posix-extended -regex '.*/(bfd|opcodes)[.]g?mo$' \ - -delete || die - fi - - # Don't install docs when building a cross-gdb - if [[ ${CTARGET} != ${CHOST} ]] ; then - rm -rf "${ED}"/usr/share/{doc,info,locale} || die - local f - for f in "${ED}"/usr/share/man/*/* ; do - if [[ ${f##*/} != ${CTARGET}-* ]] ; then - mv "${f}" "${f%/*}/${CTARGET}-${f##*/}" || die - fi - 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 - # notes in src_configure above). - [[ -e gdbserver/gdbreplay ]] && dobin gdbserver/gdbreplay - - docinto gdb - dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \ - gdb/NEWS gdb/ChangeLog gdb/PROBLEMS - docinto sim - dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING} - if use server ; then - docinto gdbserver - dodoc gdbserver/{ChangeLog,README} - fi - - if [[ -n ${PATCH_VER} ]] ; then - dodoc "${WORKDIR}"/extra/gdbinit.sample - fi - - # Remove shared info pages - rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,standards}.info* - - # gcore is part of ubin on freebsd - if [[ ${CHOST} == *-freebsd* ]]; then - rm "${ED}"/usr/bin/gcore || die - fi - - if use python; then - python_optimize "${ED}"/usr/share/gdb/python/gdb - fi -} - -pkg_postinst() { - # portage sucks and doesnt unmerge files in /etc - rm -vf "${EROOT}"/etc/skel/.gdbinit - - if use prefix && [[ ${CHOST} == *-darwin* ]] ; then - ewarn "gdb is unable to get a mach task port when installed by Prefix" - ewarn "Portage, unprivileged. To make gdb fully functional you'll" - ewarn "have to perform the following steps:" - ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb" - ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb" - fi -} diff --git a/sys-devel/gdb/gdb-9999.ebuild b/sys-devel/gdb/gdb-9999.ebuild deleted file mode 100644 index 045919faeb44..000000000000 --- a/sys-devel/gdb/gdb-9999.ebuild +++ /dev/null @@ -1,258 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -PYTHON_COMPAT=( python3_{7,8,9} ) - -inherit eutils flag-o-matic python-single-r1 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" - ;; -esac - -PATCH_VER="" -PATCH_DEV="" -DESCRIPTION="GNU debugger" -HOMEPAGE="https://sourceware.org/gdb/" -SRC_URI="${SRC_URI} - ${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz} - ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz} -" - -LICENSE="GPL-2 LGPL-2" -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" -fi -IUSE="cet lzma multitarget nls +python +server source-highlight test vanilla xml xxhash" -REQUIRED_USE=" - python? ( ${PYTHON_REQUIRED_USE} ) -" - -# ia64 kernel crashes when gdb testsuite is running -RESTRICT=" - ia64? ( test ) - - !test? ( test ) -" - -RDEPEND=" - dev-libs/mpfr:0= - >=sys-libs/ncurses-5.2-r2:0= - >=sys-libs/readline-7:0= - sys-libs/zlib - lzma? ( app-arch/xz-utils ) - python? ( ${PYTHON_DEPS} ) - xml? ( dev-libs/expat ) - source-highlight? ( - dev-util/source-highlight - ) - xxhash? ( - dev-libs/xxhash - ) -" -DEPEND="${RDEPEND}" -BDEPEND=" - app-arch/xz-utils - sys-apps/texinfo - virtual/yacc - source-highlight? ( virtual/pkgconfig ) - nls? ( sys-devel/gettext ) - test? ( dev-util/dejagnu ) -" - -PATCHES=( - "${FILESDIR}"/${PN}-8.3.1-verbose-build.patch -) - -pkg_setup() { - use python && python-single-r1_pkg_setup -} - -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 - 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 - - local myconf=( - # portage's econf() does not detect presence of --d-d-t - # because it greps only top-level ./configure. But not - # gnulib's or gdb's configure. - --disable-dependency-tracking - - --with-pkgversion="$(gdb_branding)" - --with-bugurl='https://bugs.gentoo.org/' - --disable-werror - # Disable modules that are in a combined binutils/gdb tree. #490566 - --disable-{binutils,etc,gas,gold,gprof,ld} - - # 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) - ) - local sysroot="${EPREFIX}/usr/${CTARGET}" - is_cross && myconf+=( - --with-sysroot="${sysroot}" - --includedir="${sysroot}/usr/include" - --with-gdb-datadir="\${datadir}/gdb/${CTARGET}" - ) - - # gdbserver only works for native targets (CHOST==CTARGET). - # it also doesn't support all targets, so rather than duplicate - # the target list (which changes between versions), use the - # "auto" value when things are turned on, which is triggered - # whenever no --enable or --disable is given - if is_cross || use !server ; then - myconf+=( --disable-gdbserver ) - fi - - myconf+=( - --enable-64-bit-bfd - --disable-install-libbfd - --disable-install-libiberty - # Disable guile for now as it requires guile-2.x #562902 - --without-guile - --enable-obsolete - # This only disables building in the readline subdir. - # For gdb itself, it'll use the system version. - --disable-readline - --with-system-readline - # This only disables building in the zlib subdir. - # For gdb itself, it'll use the system version. - --without-zlib - --with-system-zlib - --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug - $(use_with xml expat) - $(use_with lzma) - $(use_enable nls) - $(use_enable source-highlight) - $(use multitarget && echo --enable-targets=all) - $(use_with python python "${EPYTHON}") - $(use_with xxhash) - ) - if use sparc-solaris || use x86-solaris ; then - # disable largefile support - # https://sourceware.org/ml/gdb-patches/2014-12/msg00058.html - myconf+=( --disable-largefile ) - fi - - # source-highlight is detected with pkg-config: bug #716558 - export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)" - - econf "${myconf[@]}" -} - -src_install() { - default - find "${ED}"/usr -name libiberty.a -delete || die - - # Delete translations that conflict with binutils-libs. #528088 - # Note: Should figure out how to store these in an internal gdb dir. - if use nls ; then - find "${ED}" \ - -regextype posix-extended -regex '.*/(bfd|opcodes)[.]g?mo$' \ - -delete || die - fi - - # Don't install docs when building a cross-gdb - if [[ ${CTARGET} != ${CHOST} ]] ; then - rm -rf "${ED}"/usr/share/{doc,info,locale} || die - local f - for f in "${ED}"/usr/share/man/*/* ; do - if [[ ${f##*/} != ${CTARGET}-* ]] ; then - mv "${f}" "${f%/*}/${CTARGET}-${f##*/}" || die - fi - 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 - # notes in src_configure above). - [[ -e gdbserver/gdbreplay ]] && dobin gdbserver/gdbreplay - - docinto gdb - dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \ - gdb/NEWS gdb/ChangeLog gdb/PROBLEMS - docinto sim - dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING} - if use server ; then - docinto gdbserver - dodoc gdbserver/{ChangeLog,README} - fi - - if [[ -n ${PATCH_VER} ]] ; then - dodoc "${WORKDIR}"/extra/gdbinit.sample - fi - - # Remove shared info pages - rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,standards}.info* - - # gcore is part of ubin on freebsd - if [[ ${CHOST} == *-freebsd* ]]; then - rm "${ED}"/usr/bin/gcore || die - fi - - if use python; then - python_optimize "${ED}"/usr/share/gdb/python/gdb - fi -} - -pkg_postinst() { - # portage sucks and doesnt unmerge files in /etc - rm -vf "${EROOT}"/etc/skel/.gdbinit - - if use prefix && [[ ${CHOST} == *-darwin* ]] ; then - ewarn "gdb is unable to get a mach task port when installed by Prefix" - ewarn "Portage, unprivileged. To make gdb fully functional you'll" - ewarn "have to perform the following steps:" - ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb" - ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb" - fi -} diff --git a/sys-devel/gdb/metadata.xml b/sys-devel/gdb/metadata.xml deleted file mode 100644 index 36cae41ca5c8..000000000000 --- a/sys-devel/gdb/metadata.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<maintainer type="project"> - <email>toolchain@gentoo.org</email> - <name>Gentoo Toolchain Project</name> -</maintainer> -<use> - <flag name="cet">Enable Intel Control-flow Enforcement Technology.</flag> - <flag name="lzma">Support lzma compression in ELF debug info</flag> - <flag name="multitarget">Support all known targets in one gdb binary</flag> - <flag name="python">Enable support for the new internal scripting language, as well as extended pretty printers</flag> - <flag name="server">Install the "gdbserver" program (useful for embedded/remote targets)</flag> - <flag name="source-highlight">Enable listing highlighting via <pkg>dev-util/source-highlight</pkg></flag> - <flag name="xml">Support parsing XML data files needed (at least) for cpu features, memory maps, and syscall tracing</flag> - <flag name="xxhash">Use <pkg>dev-libs/xxhash</pkg> to speed up internal hashing.</flag> -</use> -<upstream> - <remote-id type="cpe">cpe:/a:gnu:gdb</remote-id> -</upstream> -</pkgmetadata> diff --git a/sys-devel/gettext/Manifest b/sys-devel/gettext/Manifest index 61bb66f324f9..fe3a242e1a81 100644 --- a/sys-devel/gettext/Manifest +++ b/sys-devel/gettext/Manifest @@ -1 +1,6 @@ -DIST gettext-0.21.tar.gz 24181849 BLAKE2B 2eae99d0916b00b2af6fbc6bf7e309076519a10fea16cd49e7aa29fe8aec1ee7c784c6277281b764dc4abacf400cd3fe461129586303c8cd337db15c76cb4b87 SHA512 bbe590c5dd3580c75bf30ff768da99a88eb8d466ec1ac9eea20be4cab4357ecf72448e6b81b47425e39d50fa6320ba426632914d7898dfebb4f159abc39c31d1 +DIST gettext-0.21.1.tar.xz 10054564 BLAKE2B e994924284b3fd5b3e3bf59d4bf43eb30c9b21cc213dc3b98616b4a9fc321c90911d94d314f323cfffd0d2c3e9371b5b8f7985b9a785adc61617dd042b6f4df5 SHA512 61e93bc9876effd3ca1c4e64ff6ba5bd84b24951ec2cc6f40a0e3248410e60f887552f29ca1f70541fb5524f6a4e8191fed288713c3e280e18922dd5bff1a2c9 +DIST gettext-0.21.1.tar.xz.sig 833 BLAKE2B f673436d315e972f9e110a1b5c8d1b2f20a32fc1b7ce027fcd3bc2fe7a81af183fb8db744cbed1a8c3a6ce1a13d55e19a8e8829fc944960fbfc7efcd9aaed91c SHA512 fba912830c57d0616fb66cf81da0cb7a3ab1e27497c45daa63249d3c9f85182a4f42dfeb1591d8f31c2a340ba0c519f04fd2f05429d1cf26a3ea316d047993d0 +DIST gettext-0.22.4.tar.xz 10255384 BLAKE2B 3f93aa5aef8e40d2e01acaa5aeed11efefd0de43ea26d084a0b9e743019685f7584d8e1bf05c1fd5772a5576d21ee1f052b81366f52c7827b6d14bd4d9890edc SHA512 0f3620b1621b85b3df9e372885c2f040c8a91ec0b2d4e16978459a8a2a152318a0e6f5fefb8d971bad80c437e7ee8ac8c24edc4de0ab86e729528b8a2ac62c51 +DIST gettext-0.22.4.tar.xz.sig 833 BLAKE2B fbb00b53c807934a11263c120861971fffebbd39689eda1fae0fb956476e69c3fb6799440cbf3acfcf43ecea2c134ea4dadb95becbac98badb43e546f3c8e9fb SHA512 a774c98de643b1ea3df645e451878652c2baa5cd786642aa457e6d5f5c44787cb1231eb15ad4390acdf314822633acaffffaa853eb69cbbc72c3b79b547a8854 +DIST gettext-0.22.5.tar.xz 10270724 BLAKE2B 18c383518f5a78b5c04cf76de976524da2a87a892a30d6386778bb4c7dd526ffc3f14f484906c5d3a513b7caf76ea560e53962b325e552182d6940055d798f24 SHA512 a60999bb9d09441f138214d87acb7e59aab81e765bb9253a77c54902681c5de164a5a04de2a9778dfb479dbdefaab2d5de1fbaf6095c555c43e7e9fd7a1c09bd +DIST gettext-0.22.5.tar.xz.sig 833 BLAKE2B bb3e5ced34ab109f498347a3567103fe3491f69addb4a5ce25bf854fae1a11340eef1a9826b369d2416b53e5f7065aeebdb1609615f064cf7fb4151e82a5b4e5 SHA512 87f1df69206702be928b09a59a19ae4c23072cbc78ea16e76bfc4c929de76a3c0bb8e4eb2c3100c6e7b3b51d23e3b0e484c7e1d576ba7e25fd887934dc9ed8f7 diff --git a/sys-devel/gettext/files/gettext-0.21-CVE-2020-12825.patch b/sys-devel/gettext/files/gettext-0.21-CVE-2020-12825.patch new file mode 100644 index 000000000000..6b4c463b4118 --- /dev/null +++ b/sys-devel/gettext/files/gettext-0.21-CVE-2020-12825.patch @@ -0,0 +1,335 @@ +https://gitlab.gnome.org/GNOME/gnome-shell/-/commit/44cbd1e718d6a08e59b9300280c340218a84e089 + +--- a/libtextstyle/gnulib-local/lib/libcroco/cr-parser.c ++++ b/libtextstyle/gnulib-local/lib/libcroco/cr-parser.c +@@ -146,6 +146,8 @@ struct _CRParserPriv { + + #define CHARS_TAB_SIZE 12 + ++#define RECURSIVE_CALLERS_LIMIT 100 ++ + /** + * IS_NUM: + *@a_char: the char to test. +@@ -354,9 +356,11 @@ static enum CRStatus cr_parser_parse_selector_core (CRParser * a_this); + + static enum CRStatus cr_parser_parse_declaration_core (CRParser * a_this); + +-static enum CRStatus cr_parser_parse_any_core (CRParser * a_this); ++static enum CRStatus cr_parser_parse_any_core (CRParser * a_this, ++ guint n_calls); + +-static enum CRStatus cr_parser_parse_block_core (CRParser * a_this); ++static enum CRStatus cr_parser_parse_block_core (CRParser * a_this, ++ guint n_calls); + + static enum CRStatus cr_parser_parse_value_core (CRParser * a_this); + +@@ -794,7 +798,7 @@ cr_parser_parse_atrule_core (CRParser * a_this) + cr_parser_try_to_skip_spaces_and_comments (a_this); + + do { +- status = cr_parser_parse_any_core (a_this); ++ status = cr_parser_parse_any_core (a_this, 0); + } while (status == CR_OK); + + status = cr_tknzr_get_next_token (PRIVATE (a_this)->tknzr, +@@ -805,7 +809,7 @@ cr_parser_parse_atrule_core (CRParser * a_this) + cr_tknzr_unget_token (PRIVATE (a_this)->tknzr, + token); + token = NULL; +- status = cr_parser_parse_block_core (a_this); ++ status = cr_parser_parse_block_core (a_this, 0); + CHECK_PARSING_STATUS (status, + FALSE); + goto done; +@@ -940,11 +944,11 @@ cr_parser_parse_selector_core (CRParser * a_this) + + RECORD_INITIAL_POS (a_this, &init_pos); + +- status = cr_parser_parse_any_core (a_this); ++ status = cr_parser_parse_any_core (a_this, 0); + CHECK_PARSING_STATUS (status, FALSE); + + do { +- status = cr_parser_parse_any_core (a_this); ++ status = cr_parser_parse_any_core (a_this, 0); + + } while (status == CR_OK); + +@@ -966,10 +970,12 @@ cr_parser_parse_selector_core (CRParser * a_this) + *in chapter 4.1 of the css2 spec. + *block ::= '{' S* [ any | block | ATKEYWORD S* | ';' ]* '}' S*; + *@param a_this the current instance of #CRParser. ++ *@param n_calls used to limit recursion depth + *FIXME: code this function. + */ + static enum CRStatus +-cr_parser_parse_block_core (CRParser * a_this) ++cr_parser_parse_block_core (CRParser * a_this, ++ guint n_calls) + { + CRToken *token = NULL; + CRInputPos init_pos; +@@ -977,6 +983,9 @@ cr_parser_parse_block_core (CRParser * a_this) + + g_return_val_if_fail (a_this && PRIVATE (a_this), CR_BAD_PARAM_ERROR); + ++ if (n_calls > RECURSIVE_CALLERS_LIMIT) ++ return CR_ERROR; ++ + RECORD_INITIAL_POS (a_this, &init_pos); + + status = cr_tknzr_get_next_token (PRIVATE (a_this)->tknzr, &token); +@@ -1006,13 +1015,13 @@ cr_parser_parse_block_core (CRParser * a_this) + } else if (token->type == CBO_TK) { + cr_tknzr_unget_token (PRIVATE (a_this)->tknzr, token); + token = NULL; +- status = cr_parser_parse_block_core (a_this); ++ status = cr_parser_parse_block_core (a_this, n_calls + 1); + CHECK_PARSING_STATUS (status, FALSE); + goto parse_block_content; + } else { + cr_tknzr_unget_token (PRIVATE (a_this)->tknzr, token); + token = NULL; +- status = cr_parser_parse_any_core (a_this); ++ status = cr_parser_parse_any_core (a_this, n_calls + 1); + CHECK_PARSING_STATUS (status, FALSE); + goto parse_block_content; + } +@@ -1119,7 +1128,7 @@ cr_parser_parse_value_core (CRParser * a_this) + status = cr_tknzr_unget_token (PRIVATE (a_this)->tknzr, + token); + token = NULL; +- status = cr_parser_parse_block_core (a_this); ++ status = cr_parser_parse_block_core (a_this, 0); + CHECK_PARSING_STATUS (status, FALSE); + ref++; + goto continue_parsing; +@@ -1133,7 +1142,7 @@ cr_parser_parse_value_core (CRParser * a_this) + status = cr_tknzr_unget_token (PRIVATE (a_this)->tknzr, + token); + token = NULL; +- status = cr_parser_parse_any_core (a_this); ++ status = cr_parser_parse_any_core (a_this, 0); + if (status == CR_OK) { + ref++; + goto continue_parsing; +@@ -1172,10 +1181,12 @@ cr_parser_parse_value_core (CRParser * a_this) + * | FUNCTION | DASHMATCH | '(' any* ')' | '[' any* ']' ] S*; + * + *@param a_this the current instance of #CRParser. ++ *@param n_calls used to limit recursion depth + *@return CR_OK upon successfull completion, an error code otherwise. + */ + static enum CRStatus +-cr_parser_parse_any_core (CRParser * a_this) ++cr_parser_parse_any_core (CRParser * a_this, ++ guint n_calls) + { + CRToken *token1 = NULL, + *token2 = NULL; +@@ -1184,6 +1195,9 @@ cr_parser_parse_any_core (CRParser * a_this) + + g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR); + ++ if (n_calls > RECURSIVE_CALLERS_LIMIT) ++ return CR_ERROR; ++ + RECORD_INITIAL_POS (a_this, &init_pos); + + status = cr_tknzr_get_next_token (PRIVATE (a_this)->tknzr, &token1); +@@ -1222,7 +1236,7 @@ cr_parser_parse_any_core (CRParser * a_this) + *We consider parameter as being an "any*" production. + */ + do { +- status = cr_parser_parse_any_core (a_this); ++ status = cr_parser_parse_any_core (a_this, n_calls + 1); + } while (status == CR_OK); + + ENSURE_PARSING_COND (status == CR_PARSING_ERROR); +@@ -1247,7 +1261,7 @@ cr_parser_parse_any_core (CRParser * a_this) + } + + do { +- status = cr_parser_parse_any_core (a_this); ++ status = cr_parser_parse_any_core (a_this, n_calls + 1); + } while (status == CR_OK); + + ENSURE_PARSING_COND (status == CR_PARSING_ERROR); +@@ -1275,7 +1289,7 @@ cr_parser_parse_any_core (CRParser * a_this) + } + + do { +- status = cr_parser_parse_any_core (a_this); ++ status = cr_parser_parse_any_core (a_this, n_calls + 1); + } while (status == CR_OK); + + ENSURE_PARSING_COND (status == CR_PARSING_ERROR); +--- a/libtextstyle/lib/libcroco/cr-parser.c ++++ b/libtextstyle/lib/libcroco/cr-parser.c +@@ -146,6 +146,8 @@ struct _CRParserPriv { + + #define CHARS_TAB_SIZE 12 + ++#define RECURSIVE_CALLERS_LIMIT 100 ++ + /** + * IS_NUM: + *@a_char: the char to test. +@@ -354,9 +356,11 @@ static enum CRStatus cr_parser_parse_selector_core (CRParser * a_this); + + static enum CRStatus cr_parser_parse_declaration_core (CRParser * a_this); + +-static enum CRStatus cr_parser_parse_any_core (CRParser * a_this); ++static enum CRStatus cr_parser_parse_any_core (CRParser * a_this, ++ guint n_calls); + +-static enum CRStatus cr_parser_parse_block_core (CRParser * a_this); ++static enum CRStatus cr_parser_parse_block_core (CRParser * a_this, ++ guint n_calls); + + static enum CRStatus cr_parser_parse_value_core (CRParser * a_this); + +@@ -794,7 +798,7 @@ cr_parser_parse_atrule_core (CRParser * a_this) + cr_parser_try_to_skip_spaces_and_comments (a_this); + + do { +- status = cr_parser_parse_any_core (a_this); ++ status = cr_parser_parse_any_core (a_this, 0); + } while (status == CR_OK); + + status = cr_tknzr_get_next_token (PRIVATE (a_this)->tknzr, +@@ -805,7 +809,7 @@ cr_parser_parse_atrule_core (CRParser * a_this) + cr_tknzr_unget_token (PRIVATE (a_this)->tknzr, + token); + token = NULL; +- status = cr_parser_parse_block_core (a_this); ++ status = cr_parser_parse_block_core (a_this, 0); + CHECK_PARSING_STATUS (status, + FALSE); + goto done; +@@ -940,11 +944,11 @@ cr_parser_parse_selector_core (CRParser * a_this) + + RECORD_INITIAL_POS (a_this, &init_pos); + +- status = cr_parser_parse_any_core (a_this); ++ status = cr_parser_parse_any_core (a_this, 0); + CHECK_PARSING_STATUS (status, FALSE); + + do { +- status = cr_parser_parse_any_core (a_this); ++ status = cr_parser_parse_any_core (a_this, 0); + + } while (status == CR_OK); + +@@ -966,10 +970,12 @@ cr_parser_parse_selector_core (CRParser * a_this) + *in chapter 4.1 of the css2 spec. + *block ::= '{' S* [ any | block | ATKEYWORD S* | ';' ]* '}' S*; + *@param a_this the current instance of #CRParser. ++ *@param n_calls used to limit recursion depth + *FIXME: code this function. + */ + static enum CRStatus +-cr_parser_parse_block_core (CRParser * a_this) ++cr_parser_parse_block_core (CRParser * a_this, ++ guint n_calls) + { + CRToken *token = NULL; + CRInputPos init_pos; +@@ -977,6 +983,9 @@ cr_parser_parse_block_core (CRParser * a_this) + + g_return_val_if_fail (a_this && PRIVATE (a_this), CR_BAD_PARAM_ERROR); + ++ if (n_calls > RECURSIVE_CALLERS_LIMIT) ++ return CR_ERROR; ++ + RECORD_INITIAL_POS (a_this, &init_pos); + + status = cr_tknzr_get_next_token (PRIVATE (a_this)->tknzr, &token); +@@ -1006,13 +1015,13 @@ cr_parser_parse_block_core (CRParser * a_this) + } else if (token->type == CBO_TK) { + cr_tknzr_unget_token (PRIVATE (a_this)->tknzr, token); + token = NULL; +- status = cr_parser_parse_block_core (a_this); ++ status = cr_parser_parse_block_core (a_this, n_calls + 1); + CHECK_PARSING_STATUS (status, FALSE); + goto parse_block_content; + } else { + cr_tknzr_unget_token (PRIVATE (a_this)->tknzr, token); + token = NULL; +- status = cr_parser_parse_any_core (a_this); ++ status = cr_parser_parse_any_core (a_this, n_calls + 1); + CHECK_PARSING_STATUS (status, FALSE); + goto parse_block_content; + } +@@ -1119,7 +1128,7 @@ cr_parser_parse_value_core (CRParser * a_this) + status = cr_tknzr_unget_token (PRIVATE (a_this)->tknzr, + token); + token = NULL; +- status = cr_parser_parse_block_core (a_this); ++ status = cr_parser_parse_block_core (a_this, 0); + CHECK_PARSING_STATUS (status, FALSE); + ref++; + goto continue_parsing; +@@ -1133,7 +1142,7 @@ cr_parser_parse_value_core (CRParser * a_this) + status = cr_tknzr_unget_token (PRIVATE (a_this)->tknzr, + token); + token = NULL; +- status = cr_parser_parse_any_core (a_this); ++ status = cr_parser_parse_any_core (a_this, 0); + if (status == CR_OK) { + ref++; + goto continue_parsing; +@@ -1172,10 +1181,12 @@ cr_parser_parse_value_core (CRParser * a_this) + * | FUNCTION | DASHMATCH | '(' any* ')' | '[' any* ']' ] S*; + * + *@param a_this the current instance of #CRParser. ++ *@param n_calls used to limit recursion depth + *@return CR_OK upon successfull completion, an error code otherwise. + */ + static enum CRStatus +-cr_parser_parse_any_core (CRParser * a_this) ++cr_parser_parse_any_core (CRParser * a_this, ++ guint n_calls) + { + CRToken *token1 = NULL, + *token2 = NULL; +@@ -1184,6 +1195,9 @@ cr_parser_parse_any_core (CRParser * a_this) + + g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR); + ++ if (n_calls > RECURSIVE_CALLERS_LIMIT) ++ return CR_ERROR; ++ + RECORD_INITIAL_POS (a_this, &init_pos); + + status = cr_tknzr_get_next_token (PRIVATE (a_this)->tknzr, &token1); +@@ -1222,7 +1236,7 @@ cr_parser_parse_any_core (CRParser * a_this) + *We consider parameter as being an "any*" production. + */ + do { +- status = cr_parser_parse_any_core (a_this); ++ status = cr_parser_parse_any_core (a_this, n_calls + 1); + } while (status == CR_OK); + + ENSURE_PARSING_COND (status == CR_PARSING_ERROR); +@@ -1247,7 +1261,7 @@ cr_parser_parse_any_core (CRParser * a_this) + } + + do { +- status = cr_parser_parse_any_core (a_this); ++ status = cr_parser_parse_any_core (a_this, n_calls + 1); + } while (status == CR_OK); + + ENSURE_PARSING_COND (status == CR_PARSING_ERROR); +@@ -1275,7 +1289,7 @@ cr_parser_parse_any_core (CRParser * a_this) + } + + do { +- status = cr_parser_parse_any_core (a_this); ++ status = cr_parser_parse_any_core (a_this, n_calls + 1); + } while (status == CR_OK); + + ENSURE_PARSING_COND (status == CR_PARSING_ERROR); + diff --git a/sys-devel/gettext/files/gettext-0.21-musl-omit_setlocale_lock.patch b/sys-devel/gettext/files/gettext-0.21-musl-omit_setlocale_lock.patch new file mode 100644 index 000000000000..e063785376dc --- /dev/null +++ b/sys-devel/gettext/files/gettext-0.21-musl-omit_setlocale_lock.patch @@ -0,0 +1,37 @@ +OMIT_SETLOCALE_LOCK should be true when gl_get_setlocale_null_lock is provided by a dependency library, like GNU libintl. +On Gentoo musl we use musl's libintl and gl_get_setlocale_null_lock is not provided by it, therefore we set OMIT_SETLOCALE_LOCK to 0. + +To properly fix this we should do AC_SEARCH_LIBS([gl_get_setlocale_null_lock], [intl], ...) in automake, but instead we do this +hack to not get complacent. This should be fixed upstream. + +https://savannah.gnu.org/bugs/index.php?62659#comment7 +https://bugs.gentoo.org/830590 +diff --git a/gettext-tools/libgettextpo/Makefile.am b/gettext-tools/libgettextpo/Makefile.am +index 59b016e..d92978d 100644 +--- a/gettext-tools/libgettextpo/Makefile.am ++++ b/gettext-tools/libgettextpo/Makefile.am +@@ -40,7 +40,7 @@ AM_CPPFLAGS = \ + -I../src -I$(top_srcdir)/src \ + -I../intl -I$(top_srcdir)/../gettext-runtime/intl + +-DEFS = -DIN_LIBGETTEXTPO=1 -DOMIT_SETLOCALE_LOCK=1 @DEFS@ ++DEFS = -DIN_LIBGETTEXTPO=1 -DOMIT_SETLOCALE_LOCK=0 @DEFS@ + + # libgettextpo contains the public API for PO files. + libgettextpo_la_SOURCES = \ +diff --git a/gettext-tools/libgettextpo/Makefile.in b/gettext-tools/libgettextpo/Makefile.in +index f76efa5..aca3a81 100644 +--- a/gettext-tools/libgettextpo/Makefile.in ++++ b/gettext-tools/libgettextpo/Makefile.in +@@ -804,7 +804,7 @@ CXXDEPMODE = @CXXDEPMODE@ + CXXFLAGS = @CXXFLAGS@ + CXX_CHOICE = @CXX_CHOICE@ + CYGPATH_W = @CYGPATH_W@ +-DEFS = -DIN_LIBGETTEXTPO=1 -DOMIT_SETLOCALE_LOCK=1 @DEFS@ ++DEFS = -DIN_LIBGETTEXTPO=1 -DOMIT_SETLOCALE_LOCK=0 @DEFS@ + DEPDIR = @DEPDIR@ + DLLTOOL = @DLLTOOL@ + DSYMUTIL = @DSYMUTIL@ +-- +2.35.1 + diff --git a/sys-devel/gettext/files/gettext-0.21.1-java-autoconf.patch b/sys-devel/gettext/files/gettext-0.21.1-java-autoconf.patch new file mode 100644 index 000000000000..a7471ac724c9 --- /dev/null +++ b/sys-devel/gettext/files/gettext-0.21.1-java-autoconf.patch @@ -0,0 +1,100 @@ +From b8fc039e4266570f5af5ee1c2cd201369a766f1e Mon Sep 17 00:00:00 2001 +From: Bruno Haible <bruno@clisp.org> +Date: Tue, 11 Oct 2022 01:54:44 +0200 +Subject: [PATCH] Avoid warnings during configure execution with + --disable-java. + +Reported by Sam James <sam@cmpct.info> +in <https://savannah.gnu.org/bugs/?63193>. + +* gettext-runtime/configure.ac: Expand gt_JAVACOMP_DISABLED inline. +* gettext-tools/configure.ac: Expand gt_JAVAEXEC_DISABLED and +gt_JAVACOMP_DISABLED inline. +--- a/gettext-runtime/configure.ac ++++ b/gettext-runtime/configure.ac +@@ -42,7 +42,16 @@ AS_IF([test "$JAVA_CHOICE" != no], [ + BUILDJAVA=no + fi + ], [ +- gt_JAVACOMP_DISABLED ++ CONF_JAVAC= ++ HAVE_JAVAC_ENVVAR= ++ HAVE_GCJ_C= ++ HAVE_JAVAC= ++ HAVE_JIKES= ++ AC_SUBST([CONF_JAVAC]) ++ AC_SUBST([HAVE_JAVAC_ENVVAR]) ++ AC_SUBST([HAVE_GCJ_C]) ++ AC_SUBST([HAVE_JAVAC]) ++ AC_SUBST([HAVE_JIKES]) + JAR= + BUILDJAVA=no + ]) +--- a/gettext-tools/configure.ac ++++ b/gettext-tools/configure.ac +@@ -43,8 +43,28 @@ AS_IF([test "$JAVA_CHOICE" != no], [ + BUILDJAVA=no + fi + ], [ +- gt_JAVAEXEC_DISABLED +- gt_JAVACOMP_DISABLED ++ CONF_JAVA= ++ HAVE_JAVA_ENVVAR= ++ HAVE_GIJ= ++ HAVE_JAVA= ++ HAVE_JRE= ++ HAVE_JVIEW= ++ AC_SUBST([CONF_JAVA]) ++ AC_SUBST([HAVE_JAVA_ENVVAR]) ++ AC_SUBST([HAVE_GIJ]) ++ AC_SUBST([HAVE_JAVA]) ++ AC_SUBST([HAVE_JRE]) ++ AC_SUBST([HAVE_JVIEW]) ++ CONF_JAVAC= ++ HAVE_JAVAC_ENVVAR= ++ HAVE_GCJ_C= ++ HAVE_JAVAC= ++ HAVE_JIKES= ++ AC_SUBST([CONF_JAVAC]) ++ AC_SUBST([HAVE_JAVAC_ENVVAR]) ++ AC_SUBST([HAVE_GCJ_C]) ++ AC_SUBST([HAVE_JAVAC]) ++ AC_SUBST([HAVE_JIKES]) + JAR= + BUILDJAVA=no + ]) +diff --git a/gettext-runtime/configure b/gettext-runtime/configure +index 5e2d593..cf579ff 100755 +--- a/gettext-runtime/configure ++++ b/gettext-runtime/configure +@@ -7070,7 +7070,11 @@ fi + + else $as_nop + +- gt_JAVACOMP_DISABLED ++ CONF_JAVAC= ++ HAVE_JAVAC_ENVVAR= ++ HAVE_GCJ_C= ++ HAVE_JAVAC= ++ HAVE_JIKES= + JAR= + BUILDJAVA=no + +diff --git a/gettext-tools/configure b/gettext-tools/configure +index f897bc3..3af54cd 100755 +--- a/gettext-tools/configure ++++ b/gettext-tools/configure +@@ -8718,8 +8718,11 @@ fi + + else $as_nop + +- gt_JAVAEXEC_DISABLED +- gt_JAVACOMP_DISABLED ++ CONF_JAVAC= ++ HAVE_JAVAC_ENVVAR= ++ HAVE_GCJ_C= ++ HAVE_JAVAC= ++ HAVE_JIKES= + JAR= + BUILDJAVA=no + diff --git a/sys-devel/gettext/gettext-0.21.ebuild b/sys-devel/gettext/gettext-0.21.1.ebuild index f16b3d86e91f..4988b01ddbeb 100644 --- a/sys-devel/gettext/gettext-0.21.ebuild +++ b/sys-devel/gettext/gettext-0.21.1.ebuild @@ -1,26 +1,29 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 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 +EAPI=8 -inherit mono-env libtool java-pkg-opt-2 multilib-minimal +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gettext.asc +inherit java-pkg-opt-2 libtool multilib-minimal verify-sig toolchain-funcs 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 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi # Only libasprintf is under the LGPL (and libintl is in a sep package), # so put that license behind USE=cxx. LICENSE="GPL-3+ cxx? ( LGPL-2.1+ )" SLOT="0" -IUSE="acl -cvs +cxx doc emacs git java ncurses nls openmp static-libs" +IUSE="acl +cxx doc emacs git java ncurses nls openmp static-libs" # only runtime goes multilib # Note: The version of libxml2 corresponds to the version bundled via gnulib. @@ -35,14 +38,13 @@ DEPEND=">=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] dev-libs/expat acl? ( virtual/acl ) ncurses? ( sys-libs/ncurses:0= ) - java? ( >=virtual/jdk-1.4:= )" + java? ( virtual/jdk:1.8 )" RDEPEND="${DEPEND} - !git? ( cvs? ( dev-vcs/cvs ) ) git? ( dev-vcs/git ) - java? ( >=virtual/jre-1.4 )" + java? ( virtual/jre:1.8 )" BDEPEND=" git? ( dev-vcs/git ) -" + verify-sig? ( sec-keys/openpgp-keys-gettext )" PDEPEND="emacs? ( app-emacs/po-mode )" MULTILIB_WRAPPED_HEADERS=( @@ -60,12 +62,18 @@ PATCHES=( "${FILESDIR}"/${PN}-0.19.7-disable-libintl.patch #564168 "${FILESDIR}"/${PN}-0.20-parallel_install.patch #685530 "${FILESDIR}"/${PN}-0.21_rc1-avoid_eautomake.patch + "${FILESDIR}"/${PN}-0.21-CVE-2020-12825.patch + "${FILESDIR}"/${P}-java-autoconf.patch ) QA_SONAME_NO_SYMLINK=".*/preloadable_libintl.so" +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + pkg_setup() { - mono-env_pkg_setup + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp java-pkg-opt-2_pkg_setup } @@ -74,7 +82,19 @@ src_prepare() { default + # gettext-0.21.1-java-autoconf.patch changes + # gettext-{runtime,tools}/configure.ac and the corresponding + # configure scripts. Avoid regenerating other autotools output. + touch -c gettext-{runtime,tools}/{aclocal.m4,Makefile.in,config.h.in,configure} || die + + # Makefile.am adds a dependency on gettext-{runtime,tools}/configure.ac + touch -c configure || die + elibtoolize + + if use elibc_musl || use elibc_Darwin; then + eapply "${FILESDIR}"/${PN}-0.21-musl-omit_setlocale_lock.patch + fi } multilib_src_configure() { @@ -98,12 +118,14 @@ multilib_src_configure() { # Never build bundled copy of libxml2. --without-included-libxml + --disable-csharp + --without-cvs + $(use_enable acl) $(use_enable cxx c++) $(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/gettext/gettext-0.22.4.ebuild b/sys-devel/gettext/gettext-0.22.4.ebuild new file mode 100644 index 000000000000..54fa2c5da80e --- /dev/null +++ b/sys-devel/gettext/gettext-0.22.4.ebuild @@ -0,0 +1,189 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Note: Keep version bumps in sync with dev-libs/libintl. + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gettext.asc +inherit java-pkg-opt-2 libtool multilib-minimal verify-sig toolchain-funcs + +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.xz + verify-sig? ( https://alpha.gnu.org/gnu/${PN}/${P/_/-}.tar.xz.sig ) + " + S="${WORKDIR}/${P/_/-}" +else + SRC_URI=" + mirror://gnu/${PN}/${P}.tar.xz + 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 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi + +# Only libasprintf is under the LGPL (and libintl is in a sep package), +# so put that license behind USE=cxx. +LICENSE="GPL-3+ cxx? ( LGPL-2.1+ )" +SLOT="0" +IUSE="acl +cxx doc emacs git java ncurses nls openmp static-libs xattr" + +# only runtime goes multilib +# Note: The version of libxml2 corresponds to the version bundled via gnulib. +# If the build detects too old of a system version, it will end up falling back +# to the bundled copy. #596918 +# Note: expat lacks a subslot because it is dynamically loaded at runtime. We +# would depend on older subslots if they were available (based on the ABIs that +# are explicitly handled), but expat doesn't currently use subslots. +DEPEND=" + >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] + >=virtual/libintl-0-r2[${MULTILIB_USEDEP}] + >=dev-libs/libxml2-2.9.3:= + dev-libs/expat + acl? ( virtual/acl ) + ncurses? ( sys-libs/ncurses:= ) + java? ( virtual/jdk:1.8 ) + xattr? ( sys-apps/attr ) +" +RDEPEND=" + ${DEPEND} + git? ( dev-vcs/git ) + java? ( virtual/jre:1.8 ) +" +BDEPEND=" + git? ( dev-vcs/git ) + verify-sig? ( sec-keys/openpgp-keys-gettext ) +" +PDEPEND="emacs? ( app-emacs/po-mode )" + +MULTILIB_WRAPPED_HEADERS=( + # only installed for native ABI + /usr/include/gettext-po.h + + /usr/include/autosprintf.h + /usr/include/textstyle.h + /usr/include/textstyle/stdbool.h + /usr/include/textstyle/version.h + /usr/include/textstyle/woe32dll.h +) + +PATCHES=( + "${FILESDIR}"/${PN}-0.21-CVE-2020-12825.patch +) + +QA_SONAME_NO_SYMLINK=".*/preloadable_libintl.so" + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + java-pkg-opt-2_src_prepare + + default + + # gettext-0.21.1-java-autoconf.patch changes + # gettext-{runtime,tools}/configure.ac and the corresponding + # configure scripts. Avoid regenerating other autotools output. + #touch -c gettext-{runtime,tools}/{aclocal.m4,Makefile.in,config.h.in,configure} || die + # Makefile.am adds a dependency on gettext-{runtime,tools}/configure.ac + #touch -c configure || die + + elibtoolize + + if use elibc_musl || use elibc_Darwin; then + eapply "${FILESDIR}"/${PN}-0.21-musl-omit_setlocale_lock.patch + fi +} + +multilib_src_configure() { + local myconf=( + # switches common to runtime and top-level + --cache-file="${BUILD_DIR}"/config.cache + #--docdir="\$(datarootdir)/doc/${PF}" + + # Emacs support is now in a separate package + --without-emacs + --without-lispdir + # glib depends on us so avoid circular deps + --with-included-glib + # libcroco depends on glib which ... ^^^ + --with-included-libcroco + # this will _disable_ libunistring (since it is not bundled), + # see bug #326477 + --with-included-libunistring + # Never build libintl since it's in dev-libs/libintl now. + --without-included-gettext + # Never build bundled copy of libxml2. + --without-included-libxml + + --disable-csharp + --without-cvs + + $(use_enable acl) + $(use_enable cxx c++) + $(use_enable cxx libasprintf) + $(use_with git) + $(multilib_native_use_enable java) + $(use_enable ncurses curses) + $(use_enable nls) + $(use_enable openmp) + $(use_enable static-libs static) + $(use_enable xattr attr) + ) + + local ECONF_SOURCE="${S}" + if ! multilib_is_native_abi ; then + # for non-native ABIs, we build runtime only + ECONF_SOURCE+=/gettext-runtime + fi + + econf "${myconf[@]}" +} + +multilib_src_install() { + emake DESTDIR="${D}" install + + if multilib_is_native_abi ; then + dosym msgfmt /usr/bin/gmsgfmt # bug #43435 + dobin gettext-tools/misc/gettextize + fi + + # 909041 never install libintl which upstream insists on building + rm -f "${ED}"/usr/$(get_libdir)/libintl.* "${ED}"/usr/include/libintl.h +} + +multilib_src_install_all() { + find "${ED}" -type f -name "*.la" -delete || die + + if use java ; then + java-pkg_dojar "${ED}"/usr/share/${PN}/*.jar + rm "${ED}"/usr/share/${PN}/*.jar || die + rm "${ED}"/usr/share/${PN}/*.class || die + if use doc ; then + java-pkg_dojavadoc "${ED}"/usr/share/doc/${PF}/html/javadoc2 + fi + fi + + dodoc AUTHORS ChangeLog NEWS README THANKS + + if use doc ; then + docinto html + dodoc "${ED}"/usr/share/doc/${PF}/*.html + else + rm -rf "${ED}"/usr/share/doc/${PF}/{csharpdoc,examples,javadoc2,javadoc1} + fi + rm "${ED}"/usr/share/doc/${PF}/*.html || die +} + +pkg_preinst() { + java-pkg-opt-2_pkg_preinst +} diff --git a/sys-devel/gettext/gettext-0.22.5.ebuild b/sys-devel/gettext/gettext-0.22.5.ebuild new file mode 100644 index 000000000000..0f0de646e397 --- /dev/null +++ b/sys-devel/gettext/gettext-0.22.5.ebuild @@ -0,0 +1,199 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Note: Keep version bumps in sync with dev-libs/libintl. + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gettext.asc +inherit java-pkg-opt-2 libtool multilib-minimal verify-sig toolchain-funcs + +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.xz + verify-sig? ( https://alpha.gnu.org/gnu/${PN}/${P/_/-}.tar.xz.sig ) + " + S="${WORKDIR}/${P/_/-}" +else + SRC_URI=" + mirror://gnu/${PN}/${P}.tar.xz + 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 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi + +# Only libasprintf is under the LGPL (and libintl is in a sep package), +# so put that license behind USE=cxx. +LICENSE="GPL-3+ cxx? ( LGPL-2.1+ )" +SLOT="0" +IUSE="acl +cxx doc emacs git java ncurses nls openmp static-libs xattr" + +# Only runtime goes multilib +# +# Note: The version of libxml2 corresponds to the version bundled via gnulib. +# If the build detects too old of a system version, it will end up falling back +# to the bundled copy (bug #596918). +# +# Note: expat lacks a subslot because it is dynamically loaded at runtime. We +# would depend on older subslots if they were available (based on the ABIs that +# are explicitly handled), but expat doesn't currently use subslots. +DEPEND=" + >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] + >=virtual/libintl-0-r2[${MULTILIB_USEDEP}] + >=dev-libs/libxml2-2.9.3:= + dev-libs/expat + acl? ( virtual/acl ) + ncurses? ( sys-libs/ncurses:= ) + java? ( virtual/jdk:1.8 ) + xattr? ( sys-apps/attr ) +" +RDEPEND=" + ${DEPEND} + git? ( dev-vcs/git ) + java? ( virtual/jre:1.8 ) +" +BDEPEND=" + git? ( dev-vcs/git ) + verify-sig? ( sec-keys/openpgp-keys-gettext ) +" +PDEPEND="emacs? ( app-emacs/po-mode )" + +MULTILIB_WRAPPED_HEADERS=( + # only installed for native ABI + /usr/include/gettext-po.h + + /usr/include/autosprintf.h + /usr/include/textstyle.h + /usr/include/textstyle/stdbool.h + /usr/include/textstyle/version.h + /usr/include/textstyle/woe32dll.h +) + +PATCHES=( + "${FILESDIR}"/${PN}-0.21-CVE-2020-12825.patch +) + +QA_SONAME_NO_SYMLINK=".*/preloadable_libintl.so" + +QA_CONFIG_IMPL_DECL_SKIP=( + # bug #898570 + unreachable + MIN + alignof + static_assert +) + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + java-pkg-opt-2_src_prepare + + default + + # gettext-0.21.1-java-autoconf.patch changes + # gettext-{runtime,tools}/configure.ac and the corresponding + # configure scripts. Avoid regenerating other autotools output. + #touch -c gettext-{runtime,tools}/{aclocal.m4,Makefile.in,config.h.in,configure} || die + # Makefile.am adds a dependency on gettext-{runtime,tools}/configure.ac + #touch -c configure || die + + elibtoolize + + if use elibc_musl || use elibc_Darwin; then + eapply "${FILESDIR}"/${PN}-0.21-musl-omit_setlocale_lock.patch + fi +} + +multilib_src_configure() { + local myconf=( + # switches common to runtime and top-level + --cache-file="${BUILD_DIR}"/config.cache + #--docdir="\$(datarootdir)/doc/${PF}" + + # Emacs support is now in a separate package + --without-emacs + --without-lispdir + # glib depends on us so avoid circular deps + --with-included-glib + # libcroco depends on glib which ... ^^^ + --with-included-libcroco + # this will _disable_ libunistring (since it is not bundled), + # see bug #326477 + --with-included-libunistring + # Never build libintl since it's in dev-libs/libintl now. + --without-included-gettext + # Never build bundled copy of libxml2. + --without-included-libxml + + --disable-csharp + --without-cvs + + $(use_enable acl) + $(use_enable cxx c++) + $(use_enable cxx libasprintf) + $(use_with git) + $(multilib_native_use_enable java) + $(use_enable ncurses curses) + $(use_enable nls) + $(use_enable openmp) + $(use_enable static-libs static) + $(use_enable xattr attr) + ) + + local ECONF_SOURCE="${S}" + if ! multilib_is_native_abi ; then + # for non-native ABIs, we build runtime only + ECONF_SOURCE+=/gettext-runtime + fi + + econf "${myconf[@]}" +} + +multilib_src_install() { + emake DESTDIR="${D}" install + + if multilib_is_native_abi ; then + dosym msgfmt /usr/bin/gmsgfmt # bug #43435 + dobin gettext-tools/misc/gettextize + fi + + # 909041 never install libintl which upstream insists on building + rm -f "${ED}"/usr/$(get_libdir)/libintl.* "${ED}"/usr/include/libintl.h +} + +multilib_src_install_all() { + find "${ED}" -type f -name "*.la" -delete || die + + if use java ; then + java-pkg_dojar "${ED}"/usr/share/${PN}/*.jar + rm "${ED}"/usr/share/${PN}/*.jar || die + rm "${ED}"/usr/share/${PN}/*.class || die + if use doc ; then + java-pkg_dojavadoc "${ED}"/usr/share/doc/${PF}/html/javadoc2 + fi + fi + + dodoc AUTHORS ChangeLog NEWS README THANKS + + if use doc ; then + docinto html + dodoc "${ED}"/usr/share/doc/${PF}/*.html + else + rm -rf "${ED}"/usr/share/doc/${PF}/{csharpdoc,examples,javadoc2,javadoc1} + fi + rm "${ED}"/usr/share/doc/${PF}/*.html || die +} + +pkg_preinst() { + java-pkg-opt-2_pkg_preinst +} diff --git a/sys-devel/gettext/metadata.xml b/sys-devel/gettext/metadata.xml index 8b69e80f973d..aad767169a65 100644 --- a/sys-devel/gettext/metadata.xml +++ b/sys-devel/gettext/metadata.xml @@ -1,21 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!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> -<use> - <flag name="cvs"> - When running `autopoint`, use cvs to store the internal development files; - this requires cvs at runtime, but will be faster/smaller than raw archives - </flag> - <flag name="git"> - When running `autopoint`, use git to store the internal development files; - this requires git at runtime, but will be faster/smaller than raw archives - </flag> -</use> -<upstream> - <remote-id type="cpe">cpe:/a:gnu:gettext</remote-id> -</upstream> + <maintainer type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> + </maintainer> + <use> + <flag name="git">When running `autopoint`, use git to store the internal development files; this requires git at runtime, but will be faster/smaller than raw archives</flag> + </use> + <upstream> + <remote-id type="cpe">cpe:/a:gnu:gettext</remote-id> + </upstream> </pkgmetadata> diff --git a/sys-devel/gnuconfig/Manifest b/sys-devel/gnuconfig/Manifest index 276a812c21d6..0a977480cafd 100644 --- a/sys-devel/gnuconfig/Manifest +++ b/sys-devel/gnuconfig/Manifest @@ -1,2 +1 @@ -DIST gnuconfig-20200621.tar.bz2 58729 BLAKE2B 8be2ff224620d0d93f676951ec8dcc7a4f1bfdfcb83e2e07371aa6fdf2f08a8d0e8503aecdd55954a0246f0d4119f31b24d60d461500db07757b061c89914df4 SHA512 25778100cb6b47a4ffa8a1875d3109a8b304bf3984549b53e2cbc1e31222aa9614ce01d34451cf6545af62b843378ab217d3396535ed4389ff3e8a7ddaa948ff -DIST gnuconfig-20210107.tar.xz 65944 BLAKE2B 209952ca349c9859b695df5a4f8b49df689cba47b439e715108cb66ccef7ec3742162113a2ee4948a85a96b44c45d4d553f9e41c15823403f451fea6ea61bd36 SHA512 e1485b7b719994441f49b18a88f922405f74aff2ba1df16050802a311fb5438e598d989fdb7fa008734e5ec0e567e7e90486f8bc6655787bc053ad8a89650213 +DIST gnuconfig-20230731.tar.xz 73112 BLAKE2B c6502d6b339e56440dbfc9abb0ba49e3eec5a573c5e44779dd326e6f11b55b7fc3a6d99fec73abbcc271e8f6f125699ce87f512cb3a825144307cf820df0067a SHA512 d8e24a30f86f1983c69a37a901e2357a0aefbe15fcd3f8a331d1c6f8eabc81b7436930055756a764ae874e406090d8029403f1c0faa3737acb94bd937cd577ef diff --git a/sys-devel/gnuconfig/files/99999999/0001-add-ps2-targets-to-config.sub.patch b/sys-devel/gnuconfig/files/99999999/0001-add-ps2-targets-to-config.sub.patch deleted file mode 100644 index a95e7ad3d5d8..000000000000 --- a/sys-devel/gnuconfig/files/99999999/0001-add-ps2-targets-to-config.sub.patch +++ /dev/null @@ -1,64 +0,0 @@ -From f1a763afa41654e25cbf73aae5ed56ca0909be63 Mon Sep 17 00:00:00 2001 -From: Mike Frysinger <vapier@gentoo.org> -Date: Thu, 9 Oct 2008 15:51:35 -0400 -Subject: [PATCH] add ps2 targets to config.sub - -We no longer carry the "ps2" target as that conflicts with the long -standing shortcut for the i386-ibm-aix target. ---- - config.sub | 25 +++++++++++++++++++++++-- - 1 file changed, 23 insertions(+), 2 deletions(-) - -diff --git a/config.sub b/config.sub -index b0f8492..4d89efe 100755 ---- a/config.sub -+++ b/config.sub -@@ -813,6 +813,27 @@ case $basic_machine in - vendor=atari - basic_os=mint - ;; -+ mipsEE* | ee) -+ cpu=mips64r5900el -+ vendor=scei -+ case $os in -+ linux*) -+ ;; -+ *) -+ os=elf -+ ;; -+ esac -+ ;; -+ iop) -+ cpu=mipsel -+ vendor=scei -+ os=irx -+ ;; -+ dvp) -+ cpu=dvp -+ vendor=scei -+ os=elf -+ ;; - news-3600 | risc-news) - cpu=mips - vendor=sony -@@ -1174,7 +1195,7 @@ case $cpu-$vendor in - | bfin | bpf | bs2000 \ - | c[123]* | c30 | [cjt]90 | c4x \ - | c8051 | clipper | craynv | csky | cydra \ -- | d10v | d30v | dlx | dsp16xx \ -+ | d10v | d30v | dlx | dsp16xx | dvp \ - | e2k | elxsi | epiphany \ - | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ - | h8300 | h8500 \ -@@ -1715,7 +1736,7 @@ case $os in - | uxpv* | beos* | mpeix* | udk* | moxiebox* \ - | interix* | uwin* | mks* | rhapsody* | darwin* \ - | openstep* | oskit* | conix* | pw32* | nonstopux* \ -- | storm-chaos* | tops10* | tenex* | tops20* | its* \ -+ | storm-chaos* | tops10* | tenex* | tops20* | its* | irx* \ - | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \ - | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \ - | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ --- -2.30.0 - diff --git a/sys-devel/gnuconfig/gnuconfig-20200621.ebuild b/sys-devel/gnuconfig/gnuconfig-20200621.ebuild deleted file mode 100644 index 5dbe1179e09e..000000000000 --- a/sys-devel/gnuconfig/gnuconfig-20200621.ebuild +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright 1999-2021 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/~whissi/dist/${PN}/${P}.tar.bz2" - 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" - 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" -IUSE="" - -maint_pkg_create() { - cd "${S}" - - 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.bz2" - 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 - use elibc_uclibc && sed -i 's:linux-gnu:linux-uclibc:' testsuite/config-guess.data #180637 -} - -src_compile() { :;} - -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-20210107.ebuild b/sys-devel/gnuconfig/gnuconfig-20230731.ebuild index e95a3aeabb3e..36482deca301 100644 --- a/sys-devel/gnuconfig/gnuconfig-20210107.ebuild +++ b/sys-devel/gnuconfig/gnuconfig-20230731.ebuild @@ -1,15 +1,15 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" +EAPI=8 -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/~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" + 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 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" S="${WORKDIR}" fi @@ -18,17 +18,14 @@ 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}'" - cp "${FILESDIR}"/${PV}/*.patch . || die - local tar="${T}/gnuconfig-${ver}.tar.xz" tar -Jcf "${tar}" ./* || die "creating tar failed" einfo "Packaged tar now available:" @@ -36,7 +33,7 @@ maint_pkg_create() { } src_unpack() { - if [[ ${PV} == "99999999" ]] ; then + if [[ ${PV} == 99999999 ]] ; then git-r3_src_unpack maint_pkg_create else @@ -44,18 +41,6 @@ src_unpack() { fi } -src_prepare() { - default - eapply "${S}"/*.patch - use elibc_uclibc && sed -i 's:linux-gnu:linux-uclibc:' testsuite/config-guess.data #180637 -} - -src_compile() { :;} - -src_test() { - emake check -} - src_install() { insinto /usr/share/${PN} doins config.{sub,guess} diff --git a/sys-devel/gnuconfig/gnuconfig-99999999.ebuild b/sys-devel/gnuconfig/gnuconfig-99999999.ebuild index 1032fedf8e00..bbfd2430e73e 100644 --- a/sys-devel/gnuconfig/gnuconfig-99999999.ebuild +++ b/sys-devel/gnuconfig/gnuconfig-99999999.ebuild @@ -1,15 +1,15 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" +EAPI=8 -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 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" S="${WORKDIR}" fi @@ -18,17 +18,14 @@ 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}'" - cp "${FILESDIR}"/${PV}/*.patch . || die - local tar="${T}/gnuconfig-${ver}.tar.xz" tar -Jcf "${tar}" ./* || die "creating tar failed" einfo "Packaged tar now available:" @@ -36,7 +33,7 @@ maint_pkg_create() { } src_unpack() { - if [[ ${PV} == "99999999" ]] ; then + if [[ ${PV} == 99999999 ]] ; then git-r3_src_unpack maint_pkg_create else @@ -44,18 +41,6 @@ src_unpack() { fi } -src_prepare() { - default - eapply "${S}"/*.patch - use elibc_uclibc && sed -i 's:linux-gnu:linux-uclibc:' testsuite/config-guess.data #180637 -} - -src_compile() { :;} - -src_test() { - emake check -} - src_install() { insinto /usr/share/${PN} doins config.{sub,guess} diff --git a/sys-devel/gnuconfig/metadata.xml b/sys-devel/gnuconfig/metadata.xml index e51634279815..fa5be8d4e324 100644 --- a/sys-devel/gnuconfig/metadata.xml +++ b/sys-devel/gnuconfig/metadata.xml @@ -1,9 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!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> <stabilize-allarches/> +<upstream> + <remote-id type="savannah">config</remote-id> +</upstream> </pkgmetadata> diff --git a/sys-devel/icecream/Manifest b/sys-devel/icecream/Manifest index 2cfb48ce5b59..715a372facd9 100644 --- a/sys-devel/icecream/Manifest +++ b/sys-devel/icecream/Manifest @@ -1 +1 @@ -DIST icecc-1.0.0.tar.bz2 485534 BLAKE2B 31a978a4a461f20716a95277426e79d4c298c212d36361dbbd68c5affcbbbe2f0c71f743cc7b731d86fbb5f09ab556182482f56e1382be8572d019f80a004fc8 SHA512 4292ecef6232112c3f4531cb2290a55f70c5c24095fef0865af2526d49fc10a043ffb06d22552e161f671c18ff1ab62795c3a63e2c8cb26f869cf65d0938af2a +DIST icecream-1.4.tar.gz 232707 BLAKE2B 5fdebea4d0eba4a99e8c7c01acab46ec323a887d3fe9944da23ae7089403a9ebf7bf9870ca61af49578af6adf49679341f7070f9e3da3e8c7c2f50d9d4e7c3fe SHA512 b77dd630c51b7b6b4d7fa06cd14a580891b974fe2d50074f7a3b129adc558fc7ce19b3a3716a6798c2fd0f7d0d3a1bc295bbedee3ed6dafa015f309c7c2590f5 diff --git a/sys-devel/icecream/files/icecc-scheduler.service b/sys-devel/icecream/files/icecc-scheduler.service new file mode 100644 index 000000000000..f0db05af534e --- /dev/null +++ b/sys-devel/icecream/files/icecc-scheduler.service @@ -0,0 +1,12 @@ +[Unit] +Description=Icecream distributed compiler scheduler + +[Service] +Type=simple +User=icecream +Group=icecream +SyslogIdentifier=icecc-scheduler +ExecStart=/usr/sbin/icecc-scheduler -u icecream -l /var/log/icecream/scheduler -v + +[Install] +WantedBy=multi-user.target diff --git a/sys-devel/icecream/files/iceccd.service b/sys-devel/icecream/files/iceccd.service new file mode 100644 index 000000000000..0b74362dfb3a --- /dev/null +++ b/sys-devel/icecream/files/iceccd.service @@ -0,0 +1,12 @@ +[Unit] +Description=Icecream Distributed Compiler +After=network.target nss-lookup.target + +[Service] +Type=simple +SyslogIdentifier=iceccd +ExecStart=/usr/sbin/iceccd -u icecream -b /var/cache/icecream -l /var/log/icecream/iceccd -v +Nice=5 + +[Install] +WantedBy=multi-user.target 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 3dc0e3713b0a..000000000000 --- 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 21cfddeda8c3..000000000000 --- 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/files/icecream-tmpfiles.conf b/sys-devel/icecream/files/icecream-tmpfiles.conf new file mode 100644 index 000000000000..a7cbf53f96ef --- /dev/null +++ b/sys-devel/icecream/files/icecream-tmpfiles.conf @@ -0,0 +1,2 @@ +d /run/icecc 0775 root icecream - +d /var/cache/icecream 0755 icecream icecream 3d diff --git a/sys-devel/icecream/files/icecream.openrc b/sys-devel/icecream/files/icecream.openrc new file mode 100644 index 000000000000..b574874b2075 --- /dev/null +++ b/sys-devel/icecream/files/icecream.openrc @@ -0,0 +1,55 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +start() { + basedir="${ICECREAM_BASEDIR:-'/var/cache/icecream'}" + verbosity="${ICECREAM_VERBOSITY:-'-v'}" + netname="${ICECREAM_NETNAME:+"-n ${ICECREAM_NETNAME}"}" + iceccd_logfile="${ICECREAM_LOG_FILE:-'/var/log/icecream/iceccd'}" + nice="${ICECREAM_NICE_LEVEL:+"--nice ${ICECREAM_NICE_LEVEL}"}" + scheduler="${ICECREAM_SCHEDULER_HOST:+"-s ${ICECREAM_SCHEDULER_HOST}"}" + + if [ "$ICECREAM_RUN_SCHEDULER" = 'yes' ]; then + sched_logfile="${ICECREAM_SCHEDULER_LOG_FILE:-'/var/log/icecream/scheduler'}" + + ebegin 'Starting Distributed Compiler Scheduler' + start-stop-daemon -u icecream --start --quiet --exec /usr/sbin/icecc-scheduler -- -d -l "$sched_logfile" $netname $verbosity + eend ${?} + fi + + noremote='' + if test "$ICECREAM_ALLOW_REMOTE" = 'no' 2> /dev/null; then + noremote='--no-remote' + fi + + maxjobs='' + if [ -n "$ICECREAM_MAX_JOBS" ]; then + if test "$ICECREAM_MAX_JOBS" -eq 0 2> /dev/null; then + maxjobs='-m 1' + noremote='--no-remote' + else + maxjobs="-m $ICECREAM_MAX_JOBS" + fi + fi + + ebegin 'Starting Distributed Compiler Daemon' + start-stop-daemon --start --quiet --exec /usr/sbin/iceccd -- -d -l "$iceccd_logfile" $nice $scheduler $netname -u icecream -b "$basedir" $maxjobs $noremote $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-r2.ebuild b/sys-devel/icecream/icecream-1.0.0-r2.ebuild deleted file mode 100644 index e7cc21f4e7fe..000000000000 --- a/sys-devel/icecream/icecream-1.0.0-r2.ebuild +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -MY_P="${P/icecream/icecc}" - -inherit user - -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" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm ~hppa ~ppc ~sparc ~x86" -IUSE="" - -DEPEND=" - sys-libs/libcap-ng -" -RDEPEND=" - ${DEPEND} - dev-util/shadowman -" - -S="${WORKDIR}/${MY_P}" - -PATCHES=( - "${FILESDIR}/${P}-libcap-ng.patch" -) - -pkg_setup() { - enewgroup icecream - enewuser icecream -1 -1 /var/cache/icecream icecream -} - -src_configure() { - econf \ - --enable-shared --disable-static \ - --enable-clang-wrappers \ - --enable-clang-rewrite-includes -} - -src_install() { - default - find "${D}" -name '*.la' -delete || die - - 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' -} - -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 000000000000..487a71efceb4 --- /dev/null +++ b/sys-devel/icecream/icecream-1.4.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2023 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 ~loong ~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/icecream/metadata.xml b/sys-devel/icecream/metadata.xml index 3afc743a5f96..90a452f2473d 100644 --- a/sys-devel/icecream/metadata.xml +++ b/sys-devel/icecream/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>cluster@gentoo.org</email> diff --git a/sys-devel/kgcc64/Manifest b/sys-devel/kgcc64/Manifest index 7dd8034630a6..33b317e8f850 100644 --- a/sys-devel/kgcc64/Manifest +++ b/sys-devel/kgcc64/Manifest @@ -1,8 +1,17 @@ -DIST gcc-10.2.0-patches-1.tar.bz2 14865 BLAKE2B 055ceac96a308081f395f12a970d6f5264d5dfac6defabb6baefafd6d584c03f2f968e0720448af5b6955e209c5d2220bc45854088347d7b438de9d716072804 SHA512 3583f51b2b80e1dab5ebda174c83054375a0c6601c6fca54a6991bbbbe5f335e30ee846fae57c0096ce28b23715fbfee8b560727c77cac263e83f44f03c6eda4 -DIST gcc-10.2.0.tar.xz 75004144 BLAKE2B 1d79397330354e61439283cac96a109bf78ffc726265442e6d3ec131f107589ab7349d6612836edd8c8512f7bcc1d901a65a0d5d925d28a5bf3ef5cc3f9787ee SHA512 42ae38928bd2e8183af445da34220964eb690b675b1892bbeb7cd5bb62be499011ec9a93397dba5e2fb681afadfc6f2767d03b9035b44ba9be807187ae6dc65e -DIST gcc-8.3.0-patches-1.0.tar.bz2 12278 BLAKE2B 793465c5de0af850c7f3017b3011e68f3bd1664e6ce3500a3dc3003d37c03fe81857698957770a135eadd395a7767fa804d354ecdcdeb1d83623280ca569d4ec SHA512 0efadd2481713992807fed2683666f1094b3757674754601c079569f3ef70cd7aed3cefc9f815f4e59a21d37e4e940c122df714e16f3878a5f966450c4273669 -DIST gcc-8.3.0.tar.xz 63694700 BLAKE2B 71df2ff5bd6874d57519c2e9af6b22152c8c4d7fab906a5f427b41bc4e8e742127592a8684120d9d3c9ce6241439531850be08ec0a4f29dbfdee95435655fdca SHA512 1811337ae3add9680cec64968a2509d085b6dc5b6783fc1e8c295e3e47416196fd1a3ad8dfe7e10be2276b4f62c357659ce2902f239f60a8648548231b4b5802 -DIST gcc-8.4.0-patches-2.tar.bz2 16254 BLAKE2B 5ee50ee1a3f6cdb392b370a0f62af7e8fd2fb2cadc46d4faf37ddbae23812a0e9f2e35a4ed6a08c41ffe648c21e9982e965d3ab91f68ae941c6cad74098afa2f SHA512 26fd2ad9f29dfd1db671d4966c16165a6fb75bd74f440871fb41dcb9b6102f07347ae8df67baa9e4d52aec91d3d67803a952b7bd45159fde56e1a1f28237c5eb -DIST gcc-8.4.0.tar.xz 63713440 BLAKE2B e536b7d1da5942a522f4ccce489882dcd5aefb1c76660fc17b0475a1164753979563bec25ed46c4e6c718cb9f64c047f57780e8d5be919657a1653f8221c1c9a SHA512 6de904f552a02de33b11ef52312bb664396efd7e1ce3bbe37bfad5ef617f133095b3767b4804bc7fe78df335cb53bc83f1ac055baed40979ce4c2c3e46b70280 -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-10.5.0-musl-patches-2.tar.xz 3452 BLAKE2B 5387e516d07d81477b3f39b8b3bd986bf861d32cd25dc5481c97bd3620d00c918c5661e86857f66dbf28a655401a53e43417f638c443e44cbfdbf5e950caac4d SHA512 86f2ce31cc4fc4fb5a6043fb527bf822d895e1a6220652024f78a1cbd5a962edb6be8dc5f43c32053e075f39bb2350ea8f14e7d57e0473dd2933a7b44676bde5 +DIST gcc-10.5.0-patches-6.tar.xz 18208 BLAKE2B 4cac3340108fb378c76ad62b728429f3c97f348d178744e7536575f3576ca8aa682b878b7df3b1c162dccae64a3cb56c66d8d60eae323e1ece2de4278084fdbd SHA512 9d6c84325fbc118cee01347468ce729c278e5b026b16da945fe54050726e26f86a46ee7b71a01a47cf927b70bfcce459c49a6bc4fb93dcfaa047c76d4c5bc5bc +DIST gcc-10.5.0.tar.xz 77846412 BLAKE2B 9b71761f4015649514677784443886e59733ac3845f7dfaa4343f46327d36c08c403c444b9e492b870ac0b3f2e3568f972b7700a0ef05a497fb4066079b3143b SHA512 d86dbc18b978771531f4039465e7eb7c19845bf607dc513c97abf8e45ffe1086a99d98f83dfb7b37204af22431574186de9d5ff80c8c3c3a98dbe3983195bffd +DIST gcc-11-20240111.tar.xz 76240620 BLAKE2B dcf3b2493ca6ba1a9cd0137186cfbf1b96296ff9c5625e40ec7b89e5903b07dc151b61ad54b885fc57ccc02214e2cfa7b9249cbd755ac2554c6ca0008f0704d8 SHA512 aaed094cb6dd99166e0ec59886014108574ddab52701581f0f8e7f0abb966320d01f1bce6ff646170618ca7c2819d20523a23615f20114dbe412de43b937caf4 +DIST gcc-11-20240208.tar.xz 76276224 BLAKE2B efce83c3ea03093546b73d7731ac1051da7a2b0309612ce5b809ae2756bf7a949c94f951f6a77e789f7669051315e1a4e4c33f2b12a2ec1999ee9f1f39f6b13f SHA512 a0e2b4402ff187d0804e3bc2ed0a228cfce48476c1270d57798b060899f65c7e986945651d36c358f9df5eb4b36db13321e141895329b7382c130a0aca6a8962 +DIST gcc-11.4.0-musl-patches-2.tar.xz 4308 BLAKE2B a2335e155fc57816fed822a648e0eaefafcba9d04e1ad0fd7baeea5a694ab6f5e3c1678cb406f2a1bd17bab25cb01699d032713a1ccf337948dfda2093844607 SHA512 17b84f907cb1bd763873655e6f35fd3ed55a40b602b70a626f04f83b4cc89c6261db1661de78d4d969187a8c56e9f6305b742515a3836b962248a21df0df5d0c +DIST gcc-11.4.0-patches-12.tar.xz 13824 BLAKE2B e4df9e0dc9512882022aaf325ebf65c540169454c91dd31f913c6f57f6eb291c79ae919671b53db1549799d4a70c09298bf45ed82ad05eb1f961443cc958369d SHA512 87fed0c3f8e28c9f702443db58350bb615110b27ebe334b5de2ea60678e2548c56cd75cffade210d69634e2ac0a9311f5100ddb45d97645aa76d5688bc421a61 +DIST gcc-12-20240112.tar.xz 79832228 BLAKE2B deec7123b8ffc42ddace51e1f3e8e08d5485f7000c0d4b7273b6311912ec0e7e2cb41124297af8c54456bb369a76fa2ef51aff552d8d680ec41dd2b144b08e55 SHA512 2c0a676ad35e6edee915c042a1751ac0263fae9b7af4d324deb49d6603dc73d3ec768832184879543e6ffb1595da5c56d9117288547adab7f243646dcbfc64ac +DIST gcc-12-20240209.tar.xz 79824868 BLAKE2B 1ae5a646da470f06648c4766c77475ceb287c5f6647d5102f1aef6590f973233d5e7f83b5e0241488d49dba59dd605c211938379e68a393a2dccb3834103ae4b SHA512 9f9a04f4477f41bb2a5662aedef2af75b039de50c2dc99310e504e6080cb7aae06a1255337ea2e563975cb108ddc6766adbbaf4e3d5d5712801d7ba9a5209dbd +DIST gcc-12.3.0-musl-patches-1.tar.xz 3572 BLAKE2B c7bf65f7c9ea8023ddaac821ee2b778622fa310ac72a72b2f7032494a8f304eac86217f9204622e6c21aaef9952bece0d09bc126facd4f42b602927909815ab5 SHA512 babc279fea2c1fd4c018815f2f5630214fd46015ce9f365c28af242681d51818eaca30ce298eddcab1eed5ac5f2759e2b47b2335afab9d722b4469a6d4fec326 +DIST gcc-12.3.0-patches-2.tar.xz 14236 BLAKE2B 06c43662c9abb0fa3cf90d5e2273c69aecb9158e6cf6f23c04754ed5d686be2616e81e2502eb16f4298ddd50518ca7677e13249da9e9b091162d3931ff65e4fe SHA512 b0d4b85dbf1a54aaaa1997203b872e3106906b4ad49cde57e1428bc22b2f8e2d73b8cb10ae0d0b792aebaf664594da4d1dea04c44ddc34e59047410766db04d1 +DIST gcc-13-20240113.tar.xz 84356052 BLAKE2B 1fbfffc9f2afe443158e3f26182c8bdc3f3b599c5582762117831ecb6e6d3c1c69e8d2e5932f45eb7d534c3967e08a9f7b1bcec31aa5d7ac608bebff9f35120c SHA512 a59886f707cf18f684295031d4d9fc5b03396face1705e61852d7de98729c53ac4cf209e951d00c232f14e9dc48eee40dd92487db7cb6ad0e80f2339d6d9503a +DIST gcc-13-20240210.tar.xz 84354416 BLAKE2B 5807623d3f7dd751b6dfe164cfd50d57b2f93485c23c3c2228a4a846a9a94cdad52a5e6f2806e5e7ee2a7b5526386ebdb339c44c7ea023d69f8652088a1b114d SHA512 14a01ced7ac2bfd9fc93de4e3819b4d0823fbe129d3f1faabeb707e9e3e2613b4173321b58b3648a7250e3b7ff5d94edfee60e6c38682f31a1f7b57b1c01433f +DIST gcc-13.2.0-musl-patches-2.tar.xz 5292 BLAKE2B c057d6574d03c05854edaa9f3fd40e9149662b04f3ac7a7db3eb078d73a7b535726d1bf52e5b12736dedb2f9898ad731f2e48a6421fcfbf7b90f929dee072fcb SHA512 a691da0c87c443a5e9d23731f4005f27871c5b12bc9102873ffa24d374aa7b9fbd187c4f5635d23fa9ffb17e351e76173c2d3fdf40646e355c4cb314b538de69 +DIST gcc-13.2.0-patches-12.tar.xz 47404 BLAKE2B ed018bcd7429d1c7aace746cbfc4e59dae409fc0a35231320c1b44c96fff0d912eba5c72109c2deb883f5368159df02148b2d4373396b34da882164c61fe4387 SHA512 b7872a03870bce7b633e4af4329b24fe8f3d50d6d9173f63549f606ce062787748af7f79e7ec4afeb768968d6e8462a849bd1b94316ea6bb284551f99e811617 +DIST gcc-13.2.0-patches-13.tar.xz 46404 BLAKE2B d11e6ebfed8d1fcba60638240927d57722015ea7cfb0790836c338c023fc01f9f5b3ebf0fe1e0c615b36e0131d38b49e3aee4026f8ed81473572255ccaa74e4b SHA512 4f8bbf9101548d64e78e32f38869ed84e462ce8329d64fbb934132d15bc81f8a9b6f2a075c0263fdc3b32e0dfac6bc032a4176eb06df88cb282fe974bfe102f4 +DIST kgcc64-validate-failures-7bbfb01a32b73842f8908de028703510a0e12057.py 27533 BLAKE2B 58917750d247d3a9e7078c62fd4412027a7d02d06c659a9c0743697529754218257c00dc6e10dff467e78b4e019225c39b1627b48a5298d13481a7072748a15f SHA512 b74d6358538d1b076f3d5b6632ea405b99627d5b5621b6f5101cb3453be13ba41e11d590039535b0c74b1624b69885a7093600d5395cc60bc63cea15ae7472b3 diff --git a/sys-devel/kgcc64/files/gcc-12.3-ccache-ICE.patch b/sys-devel/kgcc64/files/gcc-12.3-ccache-ICE.patch new file mode 100644 index 000000000000..9a170f5db77e --- /dev/null +++ b/sys-devel/kgcc64/files/gcc-12.3-ccache-ICE.patch @@ -0,0 +1,67 @@ +https://bugs.gentoo.org/906310 +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109850 +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109241 + +https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=396a4e76afec30d2461638f569cae18955eb4ad2 + +From 396a4e76afec30d2461638f569cae18955eb4ad2 Mon Sep 17 00:00:00 2001 +From: Jason Merrill <jason@redhat.com> +Date: Wed, 22 Mar 2023 16:11:47 -0400 +Subject: [PATCH] c++: local class in nested generic lambda [PR109241] + +In this testcase, the tree walk to look for bare parameter packs was +confused by finding a type with no TREE_BINFO. But it should be fine that +it's unset; we already checked for unexpanded packs at parse time. + +I also tried doing the partial instantiation of the local class, which is +probably the long-term direction we want to go, but for stage 4 let's go +with this safer change. + + PR c++/109241 + +gcc/cp/ChangeLog: + + * pt.cc (find_parameter_packs_r): Handle null TREE_BINFO. + +gcc/testsuite/ChangeLog: + + * g++.dg/cpp1y/lambda-generic-local-class2.C: New test. +--- a/gcc/cp/pt.cc ++++ b/gcc/cp/pt.cc +@@ -4106,10 +4106,14 @@ find_parameter_packs_r (tree *tp, int *walk_subtrees, void* data) + case TAG_DEFN: + t = TREE_TYPE (t); + if (CLASS_TYPE_P (t)) +- /* Local class, need to look through the whole definition. */ +- for (tree bb : BINFO_BASE_BINFOS (TYPE_BINFO (t))) +- cp_walk_tree (&BINFO_TYPE (bb), &find_parameter_packs_r, +- ppd, ppd->visited); ++ { ++ /* Local class, need to look through the whole definition. ++ TYPE_BINFO might be unset for a partial instantiation. */ ++ if (TYPE_BINFO (t)) ++ for (tree bb : BINFO_BASE_BINFOS (TYPE_BINFO (t))) ++ cp_walk_tree (&BINFO_TYPE (bb), &find_parameter_packs_r, ++ ppd, ppd->visited); ++ } + else + /* Enum, look at the values. */ + for (tree l = TYPE_VALUES (t); l; l = TREE_CHAIN (l)) +--- /dev/null ++++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-local-class2.C +@@ -0,0 +1,13 @@ ++// PR c++/109241 ++// { dg-do compile { target c++14 } } ++// { dg-options "" } no pedantic ++ ++void g() { ++ [](auto) { ++ [](auto) { ++ ({ ++ struct A {}; ++ }); ++ }; ++ }(1); ++} +-- +2.31.1 diff --git a/sys-devel/kgcc64/files/gcc-configure-LANG.patch b/sys-devel/kgcc64/files/gcc-configure-LANG.patch deleted file mode 100644 index d1b1b0353662..000000000000 --- a/sys-devel/kgcc64/files/gcc-configure-LANG.patch +++ /dev/null @@ -1,64 +0,0 @@ -The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in -option parsing, it may break. - -http://bugs.gentoo.org/103483 - ---- configure -+++ configure -@@ -54,6 +54,19 @@ - infodir='${prefix}/info' - mandir='${prefix}/man' - -+# NLS nuisances. -+for as_var in \ -+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ -+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ -+ LC_TELEPHONE LC_TIME -+do -+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then -+ eval $as_var=C; export $as_var -+ else -+ unset $as_var -+ fi -+done -+ - # Initialize some other variables. - subdirs= - MFLAGS= MAKEFLAGS= -@@ -452,16 +463,6 @@ - esac - done - --# NLS nuisances. --# Only set these to C if already set. These must not be set unconditionally --# because not all systems understand e.g. LANG=C (notably SCO). --# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! --# Non-C LC_CTYPE values break the ctype check. --if test "${LANG+set}" = set; then LANG=C; export LANG; fi --if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi --if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi --if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi -- - # confdefs.h avoids OS command line length limits that DEFS can exceed. - rm -rf conftest* confdefs.h - # AIX cpp loses on an empty file, so make sure it contains at least a newline. -@@ -1850,6 +1850,19 @@ - # Compiler output produced by configure, useful for debugging - # configure, is in ./config.log if it exists. - -+# NLS nuisances. -+for as_var in \ -+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ -+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ -+ LC_TELEPHONE LC_TIME -+do -+ if (set +x; test -z "`(eval \$as_var=C; export \$as_var) 2>&1`"); then -+ eval \$as_var=C; export \$as_var -+ else -+ unset \$as_var -+ fi -+done -+ - ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" - for ac_option - do diff --git a/sys-devel/kgcc64/kgcc64-9.3.0-r2.ebuild b/sys-devel/kgcc64/kgcc64-10.5.0.ebuild index 973b2870eba9..c2a2eb1fd4b3 100644 --- a/sys-devel/kgcc64/kgcc64-9.3.0-r2.ebuild +++ b/sys-devel/kgcc64/kgcc64-10.5.0.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 case ${CHOST} in hppa*) CTARGET=hppa64-${CHOST#*-};; @@ -12,10 +12,16 @@ case ${CHOST} in i?86*) CTARGET=x86_64-${CHOST#*-};; esac export CTARGET + TOOLCHAIN_ALLOWED_LANGS="c" +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="10.5.0" +PATCH_VER="6" +MUSL_VER="2" +MUSL_GCC_VER="10.5.0" GCC_TARGET_NO_MULTILIB=true +PYTHON_COMPAT=( python3_{10..11} ) -PATCH_VER="3" inherit toolchain DESCRIPTION="64bit kernel compiler" diff --git a/sys-devel/kgcc64/kgcc64-8.4.0.ebuild b/sys-devel/kgcc64/kgcc64-11.4.1_p20240111.ebuild index db4031768182..805aef87b2bb 100644 --- a/sys-devel/kgcc64/kgcc64-8.4.0.ebuild +++ b/sys-devel/kgcc64/kgcc64-11.4.1_p20240111.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 case ${CHOST} in hppa*) CTARGET=hppa64-${CHOST#*-};; @@ -12,20 +12,25 @@ case ${CHOST} in i?86*) CTARGET=x86_64-${CHOST#*-};; esac export CTARGET -TOOLCHAIN_ALLOWED_LANGS="c" -GCC_TARGET_NO_MULTILIB=true -PATCH_VER="2" +GCC_TARGET_NO_MULTILIB=true +TOOLCHAIN_ALLOWED_LANGS="c" +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="11.4.0" +PATCH_VER="12" +MUSL_VER="2" +MUSL_GCC_VER="11.4.0" +PYTHON_COMPAT=( python3_{10..11} ) 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-10.2.0.ebuild b/sys-devel/kgcc64/kgcc64-11.4.1_p20240208.ebuild index c8abbd9325b8..1105de63f8d0 100644 --- a/sys-devel/kgcc64/kgcc64-10.2.0.ebuild +++ b/sys-devel/kgcc64/kgcc64-11.4.1_p20240208.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 case ${CHOST} in hppa*) CTARGET=hppa64-${CHOST#*-};; @@ -12,10 +12,15 @@ case ${CHOST} in i?86*) CTARGET=x86_64-${CHOST#*-};; esac export CTARGET -TOOLCHAIN_ALLOWED_LANGS="c" -GCC_TARGET_NO_MULTILIB=true -PATCH_VER="1" +GCC_TARGET_NO_MULTILIB=true +TOOLCHAIN_ALLOWED_LANGS="c" +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="11.4.0" +PATCH_VER="12" +MUSL_VER="2" +MUSL_GCC_VER="11.4.0" +PYTHON_COMPAT=( python3_{10..11} ) inherit toolchain DESCRIPTION="64bit kernel compiler" @@ -25,7 +30,7 @@ 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-12.3.1_p20240112.ebuild b/sys-devel/kgcc64/kgcc64-12.3.1_p20240112.ebuild new file mode 100644 index 000000000000..65514fe59f88 --- /dev/null +++ b/sys-devel/kgcc64/kgcc64-12.3.1_p20240112.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +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" +TOOLCHAIN_PATCH_DEV="sam" +PATCH_VER="2" +PATCH_GCC_VER="12.3.0" +MUSL_VER="1" +MUSL_GCC_VER="12.3.0" +GCC_TARGET_NO_MULTILIB=true +PYTHON_COMPAT=( python3_{10..11} ) +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 +BDEPEND="hppa? ( sys-devel/binutils-hppa64 )" + +src_prepare() { + toolchain_src_prepare + eapply "${FILESDIR}"/gcc-12.3-ccache-ICE.patch +} + +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-12.3.1_p20240209.ebuild b/sys-devel/kgcc64/kgcc64-12.3.1_p20240209.ebuild new file mode 100644 index 000000000000..65514fe59f88 --- /dev/null +++ b/sys-devel/kgcc64/kgcc64-12.3.1_p20240209.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +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" +TOOLCHAIN_PATCH_DEV="sam" +PATCH_VER="2" +PATCH_GCC_VER="12.3.0" +MUSL_VER="1" +MUSL_GCC_VER="12.3.0" +GCC_TARGET_NO_MULTILIB=true +PYTHON_COMPAT=( python3_{10..11} ) +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 +BDEPEND="hppa? ( sys-devel/binutils-hppa64 )" + +src_prepare() { + toolchain_src_prepare + eapply "${FILESDIR}"/gcc-12.3-ccache-ICE.patch +} + +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-8.3.0.ebuild b/sys-devel/kgcc64/kgcc64-13.2.1_p20240113-r1.ebuild index c352f6a87f46..e14486eae1a8 100644 --- a/sys-devel/kgcc64/kgcc64-8.3.0.ebuild +++ b/sys-devel/kgcc64/kgcc64-13.2.1_p20240113-r1.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=8 case ${CHOST} in hppa*) CTARGET=hppa64-${CHOST#*-};; @@ -13,9 +13,13 @@ case ${CHOST} in esac export CTARGET TOOLCHAIN_ALLOWED_LANGS="c" +TOOLCHAIN_PATCH_DEV="sam" +PATCH_VER="12" +PATCH_GCC_VER="13.2.0" +MUSL_VER="2" +MUSL_GCC_VER="13.2.0" GCC_TARGET_NO_MULTILIB=true - -PATCH_VER="1.0" +PYTHON_COMPAT=( python3_{10..11} ) inherit toolchain DESCRIPTION="64bit kernel compiler" @@ -23,16 +27,9 @@ DESCRIPTION="64bit kernel compiler" # Works on hppa and mips; all other archs, refer to bug #228115 KEYWORDS="hppa" -RDEPEND=">=dev-libs/gmp-4.3.2 - >=dev-libs/mpfr-2.4.2 - >=dev-libs/mpc-0.8.1 - >=sys-devel/gcc-config-1.4" # unlike every other target, hppa has not unified the 32/64 bit # ports in binutils yet -DEPEND="${RDEPEND} - hppa? ( sys-devel/binutils-hppa64 ) - >=sys-apps/texinfo-4.8 - >=sys-devel/bison-1.875" +BDEPEND="hppa? ( sys-devel/binutils-hppa64 )" pkg_postinst() { toolchain_pkg_postinst diff --git a/sys-devel/kgcc64/kgcc64-13.2.1_p20240210.ebuild b/sys-devel/kgcc64/kgcc64-13.2.1_p20240210.ebuild new file mode 100644 index 000000000000..71ebd938a35b --- /dev/null +++ b/sys-devel/kgcc64/kgcc64-13.2.1_p20240210.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +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" +TOOLCHAIN_PATCH_DEV="sam" +PATCH_VER="13" +PATCH_GCC_VER="13.2.0" +MUSL_VER="2" +MUSL_GCC_VER="13.2.0" +GCC_TARGET_NO_MULTILIB=true +PYTHON_COMPAT=( python3_{10..11} ) +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 +BDEPEND="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/metadata.xml b/sys-devel/kgcc64/metadata.xml index 3a840c8dcd05..811124770299 100644 --- a/sys-devel/kgcc64/metadata.xml +++ b/sys-devel/kgcc64/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>toolchain@gentoo.org</email> diff --git a/sys-devel/libtool/Manifest b/sys-devel/libtool/Manifest deleted file mode 100644 index 4f2d5bac1893..000000000000 --- a/sys-devel/libtool/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST libtool-2.4.6.tar.xz 973080 BLAKE2B 0865af9f8701ca9dc62eec8294a088d24f4a3ff541bc76acfe7b69f70637d7e8261a17d69f7d54a4177f974c429be68467883a1560edb539061966cbf7d4a356 SHA512 a6eef35f3cbccf2c9e2667f44a476ebc80ab888725eb768e91a3a6c33b8c931afc46eb23efaee76c8696d3e4eed74ab1c71157bcb924f38ee912c8a90a6521a4 diff --git a/sys-devel/libtool/files/libtool-2.2.10-eprefix.patch b/sys-devel/libtool/files/libtool-2.2.10-eprefix.patch deleted file mode 100644 index c4693ee7feeb..000000000000 --- a/sys-devel/libtool/files/libtool-2.2.10-eprefix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/m4/libtool.m4 -+++ b/m4/libtool.m4 -@@ -2087,7 +2087,7 @@ - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; - esac -- sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -+ sys_lib_search_path_spec=`$ECHO "@GENTOO_PORTAGE_EPREFIX@/lib @GENTOO_PORTAGE_EPREFIX@/usr/lib $lt_search_path_spec" | $lt_NL2SP` - else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - fi]) diff --git a/sys-devel/libtool/files/libtool-2.2.6a-darwin-module-bundle.patch b/sys-devel/libtool/files/libtool-2.2.6a-darwin-module-bundle.patch deleted file mode 100644 index 81364d4d02af..000000000000 --- a/sys-devel/libtool/files/libtool-2.2.6a-darwin-module-bundle.patch +++ /dev/null @@ -1,24 +0,0 @@ -In Gentoo Prefix we go by Apple's convention to give modules the .bundle -extension. -http://developer.apple.com/documentation/DeveloperTools/Conceptual/XcodeBuildSystem/500-Linking/bs_linking.html -(Above link was removed by Apple, the link below contains a copy: -http://disanji.net/iOS_Doc/#documentation/DeveloperTools/Conceptual/XcodeBuildSystem/500-Linking/bs_linking.html, -in case it disappears also, the relevant quote: - -Bundle. Bundles are executable files that can be loaded at runtime by -other products. Plug-ins are implemented using bundles. The term bundle -in this context refers to the binary itself, not to a structured -hierarchy. Bundles have the .bundle extension; for example, -MyBundle.bundle.) - ---- a/m4/libtool.m4 -+++ b/m4/libtool.m4 -@@ -2645,7 +2645,7 @@ - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH -- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -+ shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`' - m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' diff --git a/sys-devel/libtool/files/libtool-2.4.3-use-linux-version-in-fbsd.patch b/sys-devel/libtool/files/libtool-2.4.3-use-linux-version-in-fbsd.patch deleted file mode 100644 index aa1e870649b6..000000000000 --- a/sys-devel/libtool/files/libtool-2.4.3-use-linux-version-in-fbsd.patch +++ /dev/null @@ -1,38 +0,0 @@ -Force linux-style versioning when generating shared libraries on -Gentoo/FreeBSD hosts only. - -Patch by Diego Elio Pettenò - -http://bugs.gentoo.org/109105 - ---- a/m4/libtool.m4 -+++ b/m4/libtool.m4 -@@ -2666,7 +2666,14 @@ - *) objformat=elf ;; - esac - fi -- version_type=freebsd-$objformat -+ # Handle Gentoo/FreeBSD as it was Linux -+ case $host_vendor in -+ gentoo) -+ version_type=linux ;; -+ *) -+ version_type=freebsd-$objformat ;; -+ esac -+ - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -@@ -2678,6 +2685,12 @@ - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; -+ linux) -+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -+ soname_spec='${libname}${release}${shared_ext}$major' -+ need_lib_prefix=no -+ need_version=no -+ ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in diff --git a/sys-devel/libtool/files/libtool-2.4.6-darwin-use-linux-version.patch b/sys-devel/libtool/files/libtool-2.4.6-darwin-use-linux-version.patch deleted file mode 100644 index aded304989d2..000000000000 --- a/sys-devel/libtool/files/libtool-2.4.6-darwin-use-linux-version.patch +++ /dev/null @@ -1,13 +0,0 @@ -* revert old 1.5 behaviour - ---- a/m4/libtool.m4 -+++ b/m4/libtool.m4 -@@ -2641,7 +2641,7 @@ - version_type=darwin - need_lib_prefix=no - need_version=no -- library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' -+ library_names_spec='$libname$release$versuffix$shared_ext $libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH diff --git a/sys-devel/libtool/files/libtool-2.4.6-darwin20.patch b/sys-devel/libtool/files/libtool-2.4.6-darwin20.patch deleted file mode 100644 index 12e87bcbc901..000000000000 --- a/sys-devel/libtool/files/libtool-2.4.6-darwin20.patch +++ /dev/null @@ -1,13 +0,0 @@ -macOS Big Sur is 11.0, Darwin 20, after a long line of 10.X releases. - ---- a/m4/libtool.m4 -+++ b/m4/libtool.m4 -@@ -1076,7 +1076,7 @@ - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[[012]][[,.]]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; -- 10.*) -+ 10.*|11.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - esac - ;; diff --git a/sys-devel/libtool/files/libtool-2.4.6-libtoolize-delay-help.patch b/sys-devel/libtool/files/libtool-2.4.6-libtoolize-delay-help.patch deleted file mode 100644 index 974cd44d028c..000000000000 --- a/sys-devel/libtool/files/libtool-2.4.6-libtoolize-delay-help.patch +++ /dev/null @@ -1,53 +0,0 @@ -https://lists.gnu.org/archive/html/libtool-patches/2016-02/msg00002.html - -From 53419307d5b44e5b0cff80d76f88ea02f237b747 Mon Sep 17 00:00:00 2001 -From: Mike Frysinger <vapier@gentoo.org> -Date: Sat, 13 Feb 2016 03:32:20 -0500 -Subject: [PATCH] libtoolize: don't execute automake and autoconf on every - invocation. - -Same fix as applied to libtool in commit 408cfb9c5fa8a666917167ffb806cb -to delay use of automake/autoconf to when the --help option is actually -specified. - -* libtoolize.in (func_help): Override func_help() from -gl/build-aux/options-parser to only run automake --version and -autoconf --version when libtool --help is executed on the command -line. ---- - libtoolize.in | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - -diff --git a/libtoolize.in b/libtoolize.in -index 3fe61ce..0d4af3d 100644 ---- a/libtoolize.in -+++ b/libtoolize.in -@@ -94,7 +94,12 @@ usage_message="Options: - " - - # Additional text appended to 'usage_message' in response to '--help'. --long_help_message=$long_help_message" -+func_help () -+{ -+ $debug_cmd -+ -+ func_usage_message -+ $ECHO "$long_help_message - 'environment' show warnings about LIBTOOLIZE_OPTIONS content - 'file' show warnings about file copying and linking - -@@ -120,8 +125,9 @@ include the following information: - - Report bugs to <@PACKAGE_BUGREPORT@>. - GNU @PACKAGE@ home page: <@PACKAGE_URL@>. --General help using GNU software: <http://www.gnu.org/gethelp/>. --" -+General help using GNU software: <http://www.gnu.org/gethelp/>." -+ exit 0 -+} - - warning_categories='environment file' - --- -2.6.2 - diff --git a/sys-devel/libtool/files/libtool-2.4.6-libtoolize-slow.patch b/sys-devel/libtool/files/libtool-2.4.6-libtoolize-slow.patch deleted file mode 100644 index d27f976ccb40..000000000000 --- a/sys-devel/libtool/files/libtool-2.4.6-libtoolize-slow.patch +++ /dev/null @@ -1,118 +0,0 @@ -From 351a88feee66eda6ce33eb06acdebb8e9c6d6716 Mon Sep 17 00:00:00 2001 -From: Pavel Raiskup <praiskup@redhat.com> -Date: Fri, 18 Sep 2015 23:17:07 +0200 -Subject: [PATCH] libtoolize: fix infinite recursion in m4 - -Some projects use this construct in configure.ac: - - m4_define([version], m4_include([version])) - pkg_version=version - -When the m4_include builtin is undefined (as was done in -libtoolize and extract-trace scripts), the call to this 'version' -macro enters an infinite recursion (until ENOMEM). So rather -re-define all potentially dangerous macros by empty strings, -suggested by Eric Blake. - -While we are on it, merge the macro-"blacklist" with similar list -implemented in gettext, except for 'm4_esyscmd'. It's kept -defined because we already trace AC_INIT macro for package -version, while it is often specified by -m4_esyscmd(git-version-gen). Similarly to m4_include, m4_esyscmd -might be opt-in-blacklisted in future. - -References: -http://lists.gnu.org/archive/html/libtool/2015-09/msg00000.html -https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764580 - -* gl/build-aux/extract-trace (_G_mini): Redefine trace-breaking -macros to empty strings rather than undefining those. Use 'dnl' -for comments. -* bootstrap: Likewise, sync with extract-trace. -* NEWS: Document. -* NO-THANKS: Mention Hiroyuki Sato. - -Signed-off-by: Pavel Raiskup <praiskup@redhat.com> ---- - NEWS | 4 ++++ - NO-THANKS | 1 + - bootstrap | 42 +++++++++++++++++++++++++++--------------- - build-aux/extract-trace | 42 +++++++++++++++++++++++++++--------------- - 4 files changed, 59 insertions(+), 30 deletions(-) - -diff --git a/gl/build-aux/extract-trace b/gl/build-aux/extract-trace -index 315a32a..c6abd21 100755 ---- a/build-aux/extract-trace -+++ b/build-aux/extract-trace -@@ -329,29 +329,41 @@ func_extract_trace () - # arguments to Autocof functions, but without following - # 'm4_s?include' files. - _G_mini=' -- # Initialisation. -+ dnl Initialisation. - m4_changequote([,]) - m4_define([m4_copy], [m4_define([$2], m4_defn([$1]))]) - m4_define([m4_rename], [m4_copy([$1], [$2])m4_undefine([$1])]) - -- # Disable these macros. -- m4_undefine([m4_dnl]) -- m4_undefine([m4_include]) -- m4_undefine([m4_m4exit]) -- m4_undefine([m4_m4wrap]) -- m4_undefine([m4_maketemp]) -+ dnl Replace macros which may abort m4 with a no-op variant. -+ m4_pushdef([m4_assert]) -+ m4_pushdef([m4_exit]) -+ m4_pushdef([m4_fatal]) -+ m4_pushdef([m4_m4exit]) - -- # Copy and rename macros not handled by "m4 --prefix". -+ dnl Replace macros that might break stderr of m4. -+ m4_pushdef([m4_errprint]) -+ m4_pushdef([m4_errprintn]) -+ m4_pushdef([m4_include]) -+ m4_pushdef([m4_warn]) -+ -+ dnl Avoid side-effects of tracing by extract-trace. -+ m4_pushdef([m4_maketemp]) -+ m4_pushdef([m4_mkstemp]) -+ -+ dnl TODO: reasons for this -+ m4_pushdef([m4_dnl]) -+ m4_pushdef([m4_m4wrap]) -+ -+ dnl Copy and rename macros not handled by "m4 --prefix". - m4_define([dnl], [m4_builtin([dnl])]) - m4_copy([m4_define], [m4_defun]) - m4_rename([m4_ifelse], [m4_if]) -- m4_ifdef([m4_mkstemp], [m4_undefine([m4_mkstemp])]) - m4_rename([m4_patsubst], [m4_bpatsubst]) - m4_rename([m4_regexp], [m4_bregexp]) - -- # "m4sugar.mini" - useful m4-time macros for dynamic arguments. -- # If we discover packages that need more m4 macros defined in -- # order to bootstrap correctly, add them here: -+ dnl "m4sugar.mini" - useful m4-time macros for dynamic arguments. -+ dnl If we discover packages that need more m4 macros defined in -+ dnl order to bootstrap correctly, add them here: - m4_define([m4_bmatch], - [m4_if([$#], 0, [], [$#], 1, [], [$#], 2, [$2], - [m4_if(m4_bregexp([$1], [$2]), -1, -@@ -362,11 +374,11 @@ func_extract_trace () - m4_define([m4_require], [$1]) - m4_define([m4_shift3], [m4_shift(m4shift(m4shift($@)))]) - -- # "autoconf.mini" - things from autoconf macros we care about. -+ dnl "autoconf.mini" - things from autoconf macros we care about. - m4_copy([m4_defun], [AC_DEFUN]) - -- # Dummy definitions for the macros we want to trace. -- # AM_INIT_AUTOMAKE at least produces no trace without this. -+ dnl Dummy definitions for the macros we want to trace. -+ dnl AM_INIT_AUTOMAKE at least produces no trace without this. - ' - - _G_save=$IFS --- -2.6.2 - diff --git a/sys-devel/libtool/files/libtool-2.4.6-link-fsanitize.patch b/sys-devel/libtool/files/libtool-2.4.6-link-fsanitize.patch deleted file mode 100644 index 853a22eff54f..000000000000 --- a/sys-devel/libtool/files/libtool-2.4.6-link-fsanitize.patch +++ /dev/null @@ -1,46 +0,0 @@ -https://bugs.gentoo.org/573744 - -From a5c6466528c060cc4660ad0319c00740db0e42ba Mon Sep 17 00:00:00 2001 -From: Jeremy Huddleston Sequoia <jeremyhu@macports.org> -Date: Sun, 18 Oct 2015 21:55:39 -0700 -Subject: [PATCH] libtool: fix GCC/clang linking with -fsanitize=* - -References: -https://lists.gnu.org/archive/html/libtool/2014-04/msg00026.html - -* build-aux/ltmain.in (func_mode_link): Pass -fsanitize=* to the -linker to allow trivial use of the clang address sanitizer. - -Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org> -Copyright-paperwork-exempt: Yes - ---- a/build-aux/ltmain.in -+++ b/build-aux/ltmain.in -@@ -5362,10 +5362,11 @@ - # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization - # -specs=* GCC specs files - # -stdlib=* select c++ std lib with clang -+ # -fsanitize=* Clang/GCC memory and address sanitizer - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ -- -specs=*) -+ -specs=*|-fsanitize=*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - func_append compile_command " $arg" ---- a/build-aux/ltmain.sh -+++ b/build-aux/ltmain.sh -@@ -7274,10 +7274,11 @@ - # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization - # -specs=* GCC specs files - # -stdlib=* select c++ std lib with clang -+ # -fsanitize=* Clang/GCC memory and address sanitizer - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ -- -specs=*) -+ -specs=*|-fsanitize=*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - func_append compile_command " $arg" diff --git a/sys-devel/libtool/files/libtool-2.4.6-link-fuse-ld.patch b/sys-devel/libtool/files/libtool-2.4.6-link-fuse-ld.patch deleted file mode 100644 index f6c0a3dc89f1..000000000000 --- a/sys-devel/libtool/files/libtool-2.4.6-link-fuse-ld.patch +++ /dev/null @@ -1,43 +0,0 @@ -https://lists.gnu.org/archive/html/libtool-patches/2015-03/msg00000.html -https://lists.gnu.org/archive/html/libtool-patches/2016-02/msg00001.html - -From 2f258b87ce4415edede1b2a84a3a7dbcf44555c2 Mon Sep 17 00:00:00 2001 -From: Mike Frysinger <vapier@gentoo.org> -Date: Mon, 16 Mar 2015 18:17:31 -0400 -Subject: [PATCH] libtool: pass through -fuse-ld flags - -Starting with gcc-4.8, there's a -fuse-ld flag that can be used to select -between bfd & gold. Make sure we pass it through to the linking stage. - -* build-aux/ltmain.in (func_mode_link): Pass -fuse-ld=* flags through. - ---- a/build-aux/ltmain.in -+++ b/build-aux/ltmain.in -@@ -5363,10 +5363,11 @@ - # -specs=* GCC specs files - # -stdlib=* select c++ std lib with clang - # -fsanitize=* Clang/GCC memory and address sanitizer -+ # -fuse-ld=* Linker select flags for GCC - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ -- -specs=*|-fsanitize=*) -+ -specs=*|-fsanitize=*|-fuse-ld=*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - func_append compile_command " $arg" ---- a/build-aux/ltmain.sh -+++ b/build-aux/ltmain.sh -@@ -7275,10 +7275,11 @@ - # -specs=* GCC specs files - # -stdlib=* select c++ std lib with clang - # -fsanitize=* Clang/GCC memory and address sanitizer -+ # -fuse-ld=* Linker select flags for GCC - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ -- -specs=*|-fsanitize=*) -+ -specs=*|-fsanitize=*|-fuse-ld=*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - func_append compile_command " $arg" diff --git a/sys-devel/libtool/files/libtool-2.4.6-link-specs.patch b/sys-devel/libtool/files/libtool-2.4.6-link-specs.patch deleted file mode 100644 index c7720935d8fd..000000000000 --- a/sys-devel/libtool/files/libtool-2.4.6-link-specs.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 702a97fbb09bd7088a50f2b239016d1e32843c24 Mon Sep 17 00:00:00 2001 -From: Pavel Raiskup <praiskup@redhat.com> -Date: Fri, 18 Sep 2015 10:36:43 +0200 -Subject: [PATCH] libtool: fix GCC linking with -specs=* - -References: -https://bugzilla.redhat.com/show_bug.cgi?id=985592 - -* build-aux/ltmain.in (func_mode_link): Pass -specs=* -to the linker, Fedora uses this option for hardening. - -Signed-off-by: Pavel Raiskup <praiskup@redhat.com> - ---- a/build-aux/ltmain.in -+++ b/build-aux/ltmain.in -@@ -5360,10 +5360,12 @@ - # -tp=* Portland pgcc target processor selection - # --sysroot=* for sysroot support - # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -+ # -specs=* GCC specs files - # -stdlib=* select c++ std lib with clang - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -- -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) -+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ -+ -specs=*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - func_append compile_command " $arg" ---- a/build-aux/ltmain.sh -+++ b/build-aux/ltmain.sh -@@ -7272,10 +7272,12 @@ - # -tp=* Portland pgcc target processor selection - # --sysroot=* for sysroot support - # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -+ # -specs=* GCC specs files - # -stdlib=* select c++ std lib with clang - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -- -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) -+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ -+ -specs=*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - func_append compile_command " $arg" diff --git a/sys-devel/libtool/files/libtool-2.4.6-mint.patch b/sys-devel/libtool/files/libtool-2.4.6-mint.patch deleted file mode 100644 index 4fe5bcede5a3..000000000000 --- a/sys-devel/libtool/files/libtool-2.4.6-mint.patch +++ /dev/null @@ -1,46 +0,0 @@ -Patch by Alan Hourihane - -http://bugs.gentoo.org/show_bug.cgi?id=266984 - ---- a/configure -+++ b/configure -@@ -5897,6 +5897,11 @@ - lt_cv_sys_max_cmd_len=8192; - ;; - -+ mint*) -+ # On MiNT this can take a long time and run out of memory. -+ lt_cv_sys_max_cmd_len=8192; -+ ;; -+ - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. ---- a/libltdl/configure -+++ b/libltdl/configure -@@ -4782,6 +4782,11 @@ - lt_cv_sys_max_cmd_len=8192; - ;; - -+ mint*) -+ # On MiNT this can take a long time and run out of memory. -+ lt_cv_sys_max_cmd_len=8192; -+ ;; -+ - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. ---- a/m4/libtool.m4 -+++ b/m4/libtool.m4 -@@ -1708,6 +1708,11 @@ - lt_cv_sys_max_cmd_len=8192; - ;; - -+ mint*) -+ # On MiNT this can take a long time and run out of memory. -+ lt_cv_sys_max_cmd_len=8192; -+ ;; -+ - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. diff --git a/sys-devel/libtool/files/libtool-2.4.6-ppc64le.patch b/sys-devel/libtool/files/libtool-2.4.6-ppc64le.patch deleted file mode 100644 index 78d86c72956b..000000000000 --- a/sys-devel/libtool/files/libtool-2.4.6-ppc64le.patch +++ /dev/null @@ -1,111 +0,0 @@ -From 020afd7d6410f73bc205206abe1b88b4890b83b1 Mon Sep 17 00:00:00 2001 -From: Leno Hou <lenohou@gmail.com> -Date: Sun, 24 Apr 2016 00:46:53 +0800 -Subject: [PATCH] [m4/libtool.m4] linker error for powerpc64le-unknown-linux-gnu - -Hi all, - - 1) As we might know, Gentoo has powerpc64le-unknown-linux-gnu compiler - -leno@localhost ~ $ powerpc64le-unknown-linux-gnu-gcc -v - -Using built-in specs. - -COLLECT_GCC=/usr/powerpc64le-unknown-linux-gnu/gcc-bin/5.3.0/powerpc64le-unknown-linux-gnu-gcc - -COLLECT_LTO_WRAPPER=/usr/libexec/gcc/powerpc64le-unknown-linux-gnu/5.3.0/lto-wrapper - -Target: powerpc64le-unknown-linux-gnu - -Configured with: -/var/tmp/portage/sys-devel/gcc-5.3.0/work/gcc-5.3.0/configure ---host=powerpc64le-unknown-linux-gnu --build=powerpc64le-unknown-linux-gnu ---prefix=/usr --bindir=/usr/powerpc64le-unknown-linux-gnu/gcc-bin/5.3.0 ---includedir=/usr/lib/gcc/powerpc64le-unknown-linux-gnu/5.3.0/include ---datadir=/usr/share/gcc-data/powerpc64le-unknown-linux-gnu/5.3.0 ---mandir=/usr/share/gcc-data/powerpc64le-unknown-linux-gnu/5.3.0/man ---infodir=/usr/share/gcc-data/powerpc64le-unknown-linux-gnu/5.3.0/info ---with-gxx-include-dir=/usr/lib/gcc/powerpc64le-unknown-linux-gnu/5.3.0/include/g++-v5 ---with-python-dir=/share/gcc-data/powerpc64le-unknown-linux-gnu/5.3.0/python ---enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt ---disable-werror --with-system-zlib --enable-nls --without-included-gettext ---enable-checking=release --with-bugurl=https://bugs.gentoo.org/ ---with-pkgversion='Gentoo 5.3.0 p1.0, pie-0.6.5' --enable-libstdcxx-time ---enable-shared --enable-threads=posix --enable-__cxa_atexit ---enable-clocale=gnu --disable-multilib --enable-altivec ---disable-fixed-point --enable-targets=all --disable-libgcj ---enable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts ---enable-lto --without-isl --enable-libsanitizer - -Thread model: posix - -gcc version 5.3.0 (Gentoo 5.3.0 p1.0, pie-0.6.5) - - 2) And the supported emulations - -leno@localhost ~ $ powerpc64le-unknown-linux-gnu-ld -V -GNU ld (Gentoo 2.25.1 p1.1) 2.25.1 - Supported emulations: - elf64lppc - elf32lppc - elf32lppclinux - elf32lppcsim - - 3) But when I set CHOST="powerpc64le-unkown-linux-gnu" in Gentoo and -execute aclocal, automake, libtoolize --copy --force, autoconf. When I -glance in the latest m4/libtool.m4 : - -if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in -... - powerpc64le-*linux*) - LD="${LD-ld} -m elf32lppclinux" - ;; - powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; -... - *64-bit*) - case $host in -... - powerpcle-*linux*) - LD="${LD-ld} -m elf64lppc" - ;; - powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; -... - -seems linked to $LD='$LD-ld -m elf64ppc' and failed to compile packages. - - 4) Below is my workaround patch and works fine for this case. If this is -OK for you, Could this to be merged in upstream? Thanks - -URL: https://debbugs.gnu.org/23348 -URL: https://bugs.gentoo.org/581314 ---- - m4/libtool.m4 | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/m4/libtool.m4 b/m4/libtool.m4 -index ee292aff5bca..758b6951ae07 100644 ---- a/m4/libtool.m4 -+++ b/m4/libtool.m4 -@@ -1417,10 +1417,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; -- powerpcle-*linux*) -+ powerpcle-*linux*|powerpc64le-*linux*) - LD="${LD-ld} -m elf64lppc" - ;; -- powerpc-*linux*) -+ powerpc-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) --- -2.11.1 - diff --git a/sys-devel/libtool/files/libtool-2.4.6-pthread.patch b/sys-devel/libtool/files/libtool-2.4.6-pthread.patch deleted file mode 100644 index 49b81c1dcda6..000000000000 --- a/sys-devel/libtool/files/libtool-2.4.6-pthread.patch +++ /dev/null @@ -1,43 +0,0 @@ -http://permalink.gmane.org/gmane.comp.gnu.libtool.patches/11704 -https://bugs.gentoo.org/650876 - -From: Pavel Raiskup <praiskup <at> redhat.com> -Subject: [PATCH] libtool: handle the -pthread{,s} options for g++ -Newsgroups: gmane.comp.gnu.libtool.patches -Date: Thursday 28th November 2013 14:18:05 UTC (over 4 years ago) - -As we are forced to pass -nostdlib to g++ for linking, this option -expectedly disables the effectiveness of passed -pthread flag - so -add the -lpthread explicitly to $deplibs to link correctly. - -References: -http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460 -https://bugzilla.redhat.com/show_bug.cgi?id=661333 -http://lists.gnu.org/archive/html/bug-libtool/2013-01/msg00018.htm - -* build-aux/ltmain.in (func_mode_link): Explicitly add -lpthread -flag into $deplibs when -pthread is passed (for g++ only). ---- - build-aux/ltmain.in | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in -index fba05c1..f202b80 100644 ---- a/build-aux/ltmain.in -+++ b/build-aux/ltmain.in -@@ -5113,6 +5113,16 @@ func_mode_link () - *" $arg "*) ;; - * ) func_append new_inherited_linker_flags " $arg" ;; - esac -+ -+ # As we are forced to pass -nostdlib to g++ during linking, the option -+ # -pthread{,s} is not in effect; add the -lpthread to $deplist -+ # explicitly to link correctly. -+ if test "$tagname" = CXX -a x"$with_gcc" = xyes; then -+ case "$arg" in -+ -pthread*) func_append deplibs " -lpthread" ;; -+ esac -+ fi -+ - continue - ;; diff --git a/sys-devel/libtool/files/libtool-2.4.6-pthread_bootstrapped.patch b/sys-devel/libtool/files/libtool-2.4.6-pthread_bootstrapped.patch deleted file mode 100644 index b093d74266f2..000000000000 --- a/sys-devel/libtool/files/libtool-2.4.6-pthread_bootstrapped.patch +++ /dev/null @@ -1,21 +0,0 @@ -https://bugs.gentoo.org/650876 - ---- a/build-aux/ltmain.sh -+++ b/build-aux/ltmain.sh -@@ -7127,6 +7127,16 @@ - *" $arg "*) ;; - * ) func_append new_inherited_linker_flags " $arg" ;; - esac -+ -+ # As we are forced to pass -nostdlib to g++ during linking, the option -+ # -pthread{,s} is not in effect; add the -lpthread to $deplist -+ # explicitly to link correctly. -+ if test "$tagname" = CXX -a x"$with_gcc" = xyes; then -+ case "$arg" in -+ -pthread*) func_append deplibs " -lpthread" ;; -+ esac -+ fi -+ - continue - ;; - diff --git a/sys-devel/libtool/files/libtool-2.4.6-sed-quote-speedup.patch b/sys-devel/libtool/files/libtool-2.4.6-sed-quote-speedup.patch deleted file mode 100644 index 580d635d04aa..000000000000 --- a/sys-devel/libtool/files/libtool-2.4.6-sed-quote-speedup.patch +++ /dev/null @@ -1,253 +0,0 @@ -https://bugs.gentoo.org/542252 - -From 32f0df9835ac15ac17e04be57c368172c3ad1d19 Mon Sep 17 00:00:00 2001 -From: Pavel Raiskup <praiskup@redhat.com> -Date: Sun, 4 Oct 2015 21:55:03 +0200 -Subject: [PATCH] libtool: mitigate the $sed_quote_subst slowdown - -When it is reasonably possible, use shell implementation for -quoting. - -References: -http://lists.gnu.org/archive/html/libtool/2015-03/msg00005.html -http://lists.gnu.org/archive/html/libtool/2015-02/msg00000.html -https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20006 - -* gl/build-aux/funclib.sh (func_quote): New function that can be -used as substitution for '$SED $sed_quote_subst' call. -* build-aux/ltmain.in (func_emit_wrapper): Use func_quote instead -of '$SED $sed_quote_subst'. -(func_mode_link): Likewise. -* NEWS: Document. -* bootstrap: Sync with funclib.sh. - ---- a/build-aux/ltmain.in -+++ b/build-aux/ltmain.in -@@ -3346,7 +3346,8 @@ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - file=\"\$0\"" - -- qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` -+ func_quote "$ECHO" -+ qECHO=$func_quote_result - $ECHO "\ - - # A function that is used when there is no print builtin or printf. -@@ -8598,8 +8599,8 @@ - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done -- relink_command="(cd `pwd`; $relink_command)" -- relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` -+ func_quote "(cd `pwd`; $relink_command)" -+ relink_command=$func_quote_result - fi - - # Only actually do things if not in dry run mode. -@@ -8845,7 +8846,8 @@ - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" -- relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` -+ func_quote "$relink_command" -+ relink_command=$func_quote_result - if test yes = "$hardcode_automatic"; then - relink_command= - fi ---- a/build-aux/funclib.sh -+++ b/build-aux/funclib.sh -@@ -1,5 +1,5 @@ - # Set a version string for this script. --scriptversion=2015-01-20.17; # UTC -+scriptversion=2015-10-04.22; # UTC - - # General shell script boiler plate, and helper functions. - # Written by Gary V. Vaughan, 2004 -@@ -1026,6 +1026,57 @@ - } - - -+# func_quote ARG -+# -------------- -+# Aesthetically quote one ARG, store the result into $func_quote_result. Note -+# that we keep attention to performance here (so far O(N) complexity as long as -+# func_append is O(1)). -+func_quote () -+{ -+ $debug_cmd -+ -+ func_quote_result=$1 -+ -+ case $func_quote_result in -+ *[\\\`\"\$]*) -+ case $func_quote_result in -+ *[\[\*\?]*) -+ func_quote_result=`$ECHO "$func_quote_result" | $SED "$sed_quote_subst"` -+ return 0 -+ ;; -+ esac -+ -+ func_quote_old_IFS=$IFS -+ for _G_char in '\' '`' '"' '$' -+ do -+ # STATE($1) PREV($2) SEPARATOR($3) -+ set start "" "" -+ func_quote_result=dummy"$_G_char$func_quote_result$_G_char"dummy -+ IFS=$_G_char -+ for _G_part in $func_quote_result -+ do -+ case $1 in -+ quote) -+ func_append func_quote_result "$3$2" -+ set quote "$_G_part" "\\$_G_char" -+ ;; -+ start) -+ set first "" "" -+ func_quote_result= -+ ;; -+ first) -+ set quote "$_G_part" "" -+ ;; -+ esac -+ done -+ IFS=$func_quote_old_IFS -+ done -+ ;; -+ *) ;; -+ esac -+} -+ -+ - # func_quote_for_eval ARG... - # -------------------------- - # Aesthetically quote ARGs to be evaled later. -@@ -1042,12 +1093,8 @@ - func_quote_for_eval_unquoted_result= - func_quote_for_eval_result= - while test 0 -lt $#; do -- case $1 in -- *[\\\`\"\$]*) -- _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; -- *) -- _G_unquoted_arg=$1 ;; -- esac -+ func_quote "$1" -+ _G_unquoted_arg=$func_quote_result - if test -n "$func_quote_for_eval_unquoted_result"; then - func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" - else ---- a/build-aux/ltmain.sh -+++ b/build-aux/ltmain.sh -@@ -64,7 +64,7 @@ - # libraries, which are installed to $pkgauxdir. - - # Set a version string for this script. --scriptversion=2015-01-20.17; # UTC -+scriptversion=2015-10-04.22; # UTC - - # General shell script boiler plate, and helper functions. - # Written by Gary V. Vaughan, 2004 -@@ -1091,6 +1091,57 @@ - } - - -+# func_quote ARG -+# -------------- -+# Aesthetically quote one ARG, store the result into $func_quote_result. Note -+# that we keep attention to performance here (so far O(N) complexity as long as -+# func_append is O(1)). -+func_quote () -+{ -+ $debug_cmd -+ -+ func_quote_result=$1 -+ -+ case $func_quote_result in -+ *[\\\`\"\$]*) -+ case $func_quote_result in -+ *[\[\*\?]*) -+ func_quote_result=`$ECHO "$func_quote_result" | $SED "$sed_quote_subst"` -+ return 0 -+ ;; -+ esac -+ -+ func_quote_old_IFS=$IFS -+ for _G_char in '\' '`' '"' '$' -+ do -+ # STATE($1) PREV($2) SEPARATOR($3) -+ set start "" "" -+ func_quote_result=dummy"$_G_char$func_quote_result$_G_char"dummy -+ IFS=$_G_char -+ for _G_part in $func_quote_result -+ do -+ case $1 in -+ quote) -+ func_append func_quote_result "$3$2" -+ set quote "$_G_part" "\\$_G_char" -+ ;; -+ start) -+ set first "" "" -+ func_quote_result= -+ ;; -+ first) -+ set quote "$_G_part" "" -+ ;; -+ esac -+ done -+ IFS=$func_quote_old_IFS -+ done -+ ;; -+ *) ;; -+ esac -+} -+ -+ - # func_quote_for_eval ARG... - # -------------------------- - # Aesthetically quote ARGs to be evaled later. -@@ -1107,12 +1158,8 @@ - func_quote_for_eval_unquoted_result= - func_quote_for_eval_result= - while test 0 -lt $#; do -- case $1 in -- *[\\\`\"\$]*) -- _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; -- *) -- _G_unquoted_arg=$1 ;; -- esac -+ func_quote "$1" -+ _G_unquoted_arg=$func_quote_result - if test -n "$func_quote_for_eval_unquoted_result"; then - func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" - else -@@ -5258,7 +5305,8 @@ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - file=\"\$0\"" - -- qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` -+ func_quote "$ECHO" -+ qECHO=$func_quote_result - $ECHO "\ - - # A function that is used when there is no print builtin or printf. -@@ -10510,8 +10558,8 @@ - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done -- relink_command="(cd `pwd`; $relink_command)" -- relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` -+ func_quote "(cd `pwd`; $relink_command)" -+ relink_command=$func_quote_result - fi - - # Only actually do things if not in dry run mode. -@@ -10757,7 +10805,8 @@ - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" -- relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` -+ func_quote "$relink_command" -+ relink_command=$func_quote_result - if test yes = "$hardcode_automatic"; then - relink_command= - fi diff --git a/sys-devel/libtool/libtool-2.4.6-r6.ebuild b/sys-devel/libtool/libtool-2.4.6-r6.ebuild deleted file mode 100644 index cf041ceafab1..000000000000 --- a/sys-devel/libtool/libtool-2.4.6-r6.ebuild +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -LIBTOOLIZE="true" #225559 -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 ~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:0" -DEPEND="${RDEPEND}" -[[ ${PV} == *9999 ]] && BDEPEND="sys-apps/help2man" - -PATCHES=( - "${FILESDIR}"/${PN}-2.4.3-use-linux-version-in-fbsd.patch #109105 - "${FILESDIR}"/${PN}-2.4.6-link-specs.patch - "${FILESDIR}"/${PN}-2.4.6-link-fsanitize.patch #573744 - "${FILESDIR}"/${PN}-2.4.6-link-fuse-ld.patch - "${FILESDIR}"/${PN}-2.4.6-libtoolize-slow.patch - "${FILESDIR}"/${PN}-2.4.6-libtoolize-delay-help.patch - "${FILESDIR}"/${PN}-2.4.6-sed-quote-speedup.patch #542252 - "${FILESDIR}"/${PN}-2.4.6-ppc64le.patch #581314 - - "${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 - "${FILESDIR}"/${PN}-2.4.6-darwin20.patch -) - -src_prepare() { - if [[ ${PV} == *9999 ]] ; then - eapply "${FILESDIR}"/${PN}-2.4.6-pthread.patch #650876 - ./bootstrap || die - else - PATCHES+=( - "${FILESDIR}"/${PN}-2.4.6-pthread_bootstrapped.patch #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. #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 deleted file mode 100644 index ea6a7173bed3..000000000000 --- a/sys-devel/libtool/libtool-9999.ebuild +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -LIBTOOLIZE="true" #225559 -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 ~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:0" -DEPEND="${RDEPEND}" -[[ ${PV} == *9999 ]] && BDEPEND="sys-apps/help2man" - -PATCHES=( - "${FILESDIR}"/${PN}-2.4.3-use-linux-version-in-fbsd.patch #109105 - "${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 #650876 - ./bootstrap || die - else - PATCHES+=( - "${FILESDIR}"/${PN}-2.4.6-pthread_bootstrapped.patch #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. #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/metadata.xml b/sys-devel/libtool/metadata.xml deleted file mode 100644 index c9dbcd910423..000000000000 --- a/sys-devel/libtool/metadata.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<maintainer type="project"> - <email>base-system@gentoo.org</email> - <name>Gentoo Base System</name> -</maintainer> -<upstream> - <remote-id type="cpe">cpe:/a:gnu:libtool</remote-id> -</upstream> -</pkgmetadata> diff --git a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-15-r2.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-15-r2.ebuild new file mode 100644 index 000000000000..44a21b6fb09f --- /dev/null +++ b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-15-r2.ebuild @@ -0,0 +1,38 @@ +# Copyright 2022-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib + +DESCRIPTION="Symlinks to use LLD on binutils-free system" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" +S=${WORKDIR} + +LICENSE="public-domain" +SLOT="${PV}" +KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86" +IUSE="multilib-symlinks +native-symlinks" + +RDEPEND=" + sys-devel/lld:${SLOT} +" + +src_install() { + use native-symlinks || return + + local chosts=( "${CHOST}" ) + if use multilib-symlinks; then + local abi + for abi in $(get_all_abis); do + chosts+=( "$(get_abi_CHOST "${abi}")" ) + done + fi + + local dest=/usr/lib/llvm/${SLOT}/bin + dodir "${dest}" + dosym ld.lld "${dest}/ld" + for chost in "${chosts[@]}"; do + dosym ld.lld "${dest}/${chost}-ld" + done +} diff --git a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16-r2.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16-r2.ebuild new file mode 100644 index 000000000000..2eb282b65da9 --- /dev/null +++ b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16-r2.ebuild @@ -0,0 +1,38 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib + +DESCRIPTION="Symlinks to use LLD on binutils-free system" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" +S=${WORKDIR} + +LICENSE="public-domain" +SLOT="${PV}" +KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86 ~arm64-macos" +IUSE="multilib-symlinks +native-symlinks" + +RDEPEND=" + sys-devel/lld:${SLOT} +" + +src_install() { + use native-symlinks || return + + local chosts=( "${CHOST}" ) + if use multilib-symlinks; then + local abi + for abi in $(get_all_abis); do + chosts+=( "$(get_abi_CHOST "${abi}")" ) + done + fi + + local dest=/usr/lib/llvm/${SLOT}/bin + dodir "${dest}" + dosym ld.lld "${dest}/ld" + for chost in "${chosts[@]}"; do + dosym ld.lld "${dest}/${chost}-ld" + done +} diff --git a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-17.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-17.ebuild new file mode 100644 index 000000000000..d8b2ae18b0fb --- /dev/null +++ b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-17.ebuild @@ -0,0 +1,38 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib + +DESCRIPTION="Symlinks to use LLD on binutils-free system" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" +S=${WORKDIR} + +LICENSE="public-domain" +SLOT="${PV}" +KEYWORDS="amd64 arm arm64 ~loong ~ppc ppc64 ~riscv x86 ~arm64-macos" +IUSE="multilib-symlinks +native-symlinks" + +RDEPEND=" + sys-devel/lld:${SLOT} +" + +src_install() { + use native-symlinks || return + + local chosts=( "${CHOST}" ) + if use multilib-symlinks; then + local abi + for abi in $(get_all_abis); do + chosts+=( "$(get_abi_CHOST "${abi}")" ) + done + fi + + local dest=/usr/lib/llvm/${SLOT}/bin + dodir "${dest}" + dosym ld.lld "${dest}/ld" + for chost in "${chosts[@]}"; do + dosym ld.lld "${dest}/${chost}-ld" + done +} diff --git a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-18.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-18.ebuild new file mode 100644 index 000000000000..046a5e6e66f0 --- /dev/null +++ b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-18.ebuild @@ -0,0 +1,38 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib + +DESCRIPTION="Symlinks to use LLD on binutils-free system" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" +S=${WORKDIR} + +LICENSE="public-domain" +SLOT="${PV}" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~arm64-macos" +IUSE="multilib-symlinks +native-symlinks" + +RDEPEND=" + sys-devel/lld:${SLOT} +" + +src_install() { + use native-symlinks || return + + local chosts=( "${CHOST}" ) + if use multilib-symlinks; then + local abi + for abi in $(get_all_abis); do + chosts+=( "$(get_abi_CHOST "${abi}")" ) + done + fi + + local dest=/usr/lib/llvm/${SLOT}/bin + dodir "${dest}" + dosym ld.lld "${dest}/ld" + for chost in "${chosts[@]}"; do + dosym ld.lld "${dest}/${chost}-ld" + done +} diff --git a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-19.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-19.ebuild new file mode 100644 index 000000000000..b85bf912c557 --- /dev/null +++ b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-19.ebuild @@ -0,0 +1,37 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib + +DESCRIPTION="Symlinks to use LLD on binutils-free system" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" +S=${WORKDIR} + +LICENSE="public-domain" +SLOT="${PV}" +IUSE="multilib-symlinks +native-symlinks" + +RDEPEND=" + sys-devel/lld:${SLOT} +" + +src_install() { + use native-symlinks || return + + local chosts=( "${CHOST}" ) + if use multilib-symlinks; then + local abi + for abi in $(get_all_abis); do + chosts+=( "$(get_abi_CHOST "${abi}")" ) + done + fi + + local dest=/usr/lib/llvm/${SLOT}/bin + dodir "${dest}" + dosym ld.lld "${dest}/ld" + for chost in "${chosts[@]}"; do + dosym ld.lld "${dest}/${chost}-ld" + done +} diff --git a/sys-devel/lld-toolchain-symlinks/metadata.xml b/sys-devel/lld-toolchain-symlinks/metadata.xml new file mode 100644 index 000000000000..69ca87c01788 --- /dev/null +++ b/sys-devel/lld-toolchain-symlinks/metadata.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>llvm@gentoo.org</email> + </maintainer> + <use> + <flag name="multilib-symlinks"> + Install symlinks for all ABI CHOSTs. Note that this can + result in gcc being overrode for native builds, as well + as conflict with crossdev if used for the same targets. + </flag> + <flag name="native-symlinks"> + Install generic 'ld' symlink, as well as ${CTARGET}-ld. + These symlinks are installed into slotted LLVM bindir, + so they should not take precedence over symlinks installed + into /usr/bin by <pkg>sys-devel/binutils-config</pkg> + but they can be helpful for binutils-free setups. + </flag> + </use> +</pkgmetadata> diff --git a/sys-devel/lld/Manifest b/sys-devel/lld/Manifest index 09cfebc27697..122b7c41b995 100644 --- a/sys-devel/lld/Manifest +++ b/sys-devel/lld/Manifest @@ -1,5 +1,11 @@ -DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151 -DIST llvmorg-11.0.0.tar.gz 122743665 BLAKE2B 3f95570240789fd68ddb747df817f5c6cdc9da40911bbe9ee3531c15ada9165e5002b1c2f778cf8735858485ea05a8754e3d3a5f4b15bdd6cb33d64a14692984 SHA512 b6d38871ccce0e086e27d35e42887618d68e57d8274735c59e3eabc42dee352412489296293f8d5169fe0044936345915ee7da61ebdc64ec10f7737f6ecd90f2 -DIST llvmorg-11.0.1.tar.gz 122790338 BLAKE2B 0130996b4a8c4d9f757136fd7fb318068c9bfdc565060dec0d4336480c4ab66c4ae3185a7fdb05f13cf9ee8fd4123b09df938881b75d6e5d3689595114b7e32a SHA512 f5e6ef0b3111aae08a89cd01adb2ff4abfa9ef779c68b9190421d0447efd25c2cc00e5aae9f4764805f5fa31434866043d1510ae7389817e28ae53a5442e2fdf -DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81 -DIST llvmorg-12.0.0.tar.gz 134226215 BLAKE2B f9c3ba8c58571855caa4f206fd285c9b5be66672fb0814cb8bc0964a051f57f5d35013aa1e27cbda502652b37df1ec23474129109e76a42066847860db441dbe SHA512 0cff02155c5ac0d6db2b72d60d9819d5b5dd859663b45f721b1c7540239c2fceb1f57d9173f6870c49de851c242ed8e85c5c6d6577a1f8092a7c5dcd12513b26 +DIST llvm-gentoo-patchset-16.0.6-r1.tar.xz 17780 BLAKE2B e7c97916df463ff6d3d6374290bad86b3f2a7189fd9da3c6c808cb84160f904f4de1dffa7e98b32d7cacf904beea2df74116384960b0619ff30b7125839fc950 SHA512 74f86aa11614dd86a4af0cba514e98006d6df8ff15effc0c3598c291c7c6139f9310dc2e3ee25e8a3fa960e8a51986a4c48412a8e7269064197102fd9bbeac7c +DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52 +DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2 +DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d SHA512 89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7 +DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a SHA512 ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447 +DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30 +DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340 +DIST llvm-project-18.1.4.src.tar.xz 132054668 BLAKE2B 94bbad3b185fd07cbace4eff79aba80fbdd5e072739250e3927fe1848bcf3f8d355eb1f384e57306707eb702acc7ab01b732590735be7950221607664d04b0a6 SHA512 b1b214ae91f3705d8ea345547ad53f1e5d7d884c1eb6958bc41c14ac4b3e407771ccc2b693686ff103c8232c2c3942731d6db9a9cb4f735e6c6a0674739d0b29 +DIST llvm-project-18.1.4.src.tar.xz.sig 566 BLAKE2B b74fd219d7bcdf197b4e711cfbb25c40e9d8d2c7341de0215d8c31f330f396e9c166ff63513829cdc9cef349f08238f66a4dc949fa97958a7af496abae369eaa SHA512 4f456edf4fb454815acaef6855b1a0991f229810a32e9369af83388e37f0ef8964308e1e93bd6216024cdd67e86caaadc8d5794467857cc6fe561c9fa6ca7386 +DIST llvm-project-ee284d2da0720dc21191d6f545504cbfcf5dcbcf.tar.gz 208883034 BLAKE2B e37c9f1a6a4d0caa9a3091f979dd09f509d458f8b7b30286c77dd2385aea748b7aac6dd488c79573f82feb655aa321717bd2fb46bba4a12b388b52064f6e13bf SHA512 1335ade87cd2accc47ac47ed2ab302999e375808b158b6c9d31fac9059cbb992d2bdaaadf1fd9a1b37268c1123d43346ea4d150894d6d2e6f80ba790b65b93b1 +DIST llvm-project-f03cd2db91956456f1c5e2da86d3c50183eebd28.tar.gz 209375254 BLAKE2B 1d7e043d04323edb64b2ef2309fbcb4f82a959f45391e815133cc0891d5a497bbb81101aab460e9bf67e75aa906e13ad1877c3850829dcad397ed626dc8f2792 SHA512 6775e03a44b2133bd4a4b473ab007599321daa19dc7f3cc47f95cf9d110e83e982bf48a6b1d43038b0f0a2c0fef2f689aefd20132b25a90ef19342683e2d2e50 diff --git a/sys-devel/lld/lld-10.0.1-r1.ebuild b/sys-devel/lld/lld-10.0.1-r1.ebuild deleted file mode 100644 index 3eb4d030dbbd..000000000000 --- a/sys-devel/lld/lld-10.0.1-r1.ebuild +++ /dev/null @@ -1,51 +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/" -LLVM_COMPONENTS=( lld ) -LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} ) -llvm.org_set_globals - -LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" -IUSE="test" -RESTRICT="!test? ( test )" - -RDEPEND="~sys-devel/llvm-${PV}" -DEPEND="${RDEPEND}" -BDEPEND="test? ( $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") )" - -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)" - ) - cmake_src_configure -} - -src_test() { - local -x LIT_PRESERVES_TMP=1 - cmake_build check-lld -} diff --git a/sys-devel/lld/lld-10.0.1.ebuild b/sys-devel/lld/lld-10.0.1.ebuild deleted file mode 100644 index fe6f699170d5..000000000000 --- a/sys-devel/lld/lld-10.0.1.ebuild +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright 1999-2020 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/" -LLVM_COMPONENTS=( lld ) -LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} ) -llvm.org_set_globals - -LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" -SLOT="0" -KEYWORDS="amd64 arm arm64 ppc64 x86" -IUSE="test" -RESTRICT="!test? ( test )" - -RDEPEND="~sys-devel/llvm-${PV}" -DEPEND="${RDEPEND}" -BDEPEND="test? ( $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") )" - -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)" - ) - - 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-11.0.0-r1.ebuild b/sys-devel/lld/lld-11.0.0-r1.ebuild deleted file mode 100644 index ccb34a35f4b7..000000000000 --- a/sys-devel/lld/lld-11.0.0-r1.ebuild +++ /dev/null @@ -1,55 +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/" -LLVM_COMPONENTS=( lld ) -LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} ) -llvm.org_set_globals - -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}]") - )" - -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.0.0.ebuild b/sys-devel/lld/lld-11.0.0.ebuild deleted file mode 100644 index 738d5deb1cb8..000000000000 --- a/sys-devel/lld/lld-11.0.0.ebuild +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright 1999-2020 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/" -LLVM_COMPONENTS=( lld ) -LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} ) -llvm.org_set_globals - -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}]") - )" - -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-11.0.1-r1.ebuild b/sys-devel/lld/lld-11.0.1-r1.ebuild deleted file mode 100644 index 443ff658f0d3..000000000000 --- a/sys-devel/lld/lld-11.0.1-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.0.1.ebuild b/sys-devel/lld/lld-11.0.1.ebuild deleted file mode 100644 index af60afe03f28..000000000000 --- a/sys-devel/lld/lld-11.0.1.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-11.1.0-r1.ebuild b/sys-devel/lld/lld-11.1.0-r1.ebuild deleted file mode 100644 index 443ff658f0d3..000000000000 --- 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 af60afe03f28..000000000000 --- 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-12.0.0.ebuild b/sys-devel/lld/lld-12.0.0.ebuild deleted file mode 100644 index ed15ed677ced..000000000000 --- a/sys-devel/lld/lld-12.0.0.ebuild +++ /dev/null @@ -1,68 +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 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() { - 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.0.9999.ebuild b/sys-devel/lld/lld-13.0.0.9999.ebuild deleted file mode 100644 index da442603c870..000000000000 --- a/sys-devel/lld/lld-13.0.0.9999.ebuild +++ /dev/null @@ -1,68 +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="" -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 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() { - 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-12.0.0.9999.ebuild b/sys-devel/lld/lld-15.0.7.ebuild index da442603c870..5040684bb927 100644 --- a/sys-devel/lld/lld-12.0.0.9999.ebuild +++ b/sys-devel/lld/lld-15.0.7.ebuild @@ -1,38 +1,48 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{7..9} ) -inherit cmake llvm llvm.org python-any-r1 +PYTHON_COMPAT=( python3_{10..11} ) +inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs DESCRIPTION="The LLVM linker (link editor)" HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" -SLOT="0" -KEYWORDS="" -IUSE="test" +SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" +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} + sys-libs/zlib:= +" +RDEPEND=" + ${DEPEND} + !sys-devel/lld:0 +" BDEPEND=" + sys-devel/llvm:${LLVM_MAJOR} test? ( - >=dev-util/cmake-3.16 - $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") - )" + $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]") + ) +" +PDEPEND=" + >=sys-devel/lld-toolchain-symlinks-15-r2:${LLVM_MAJOR} +" -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 python_check_deps() { - has_version -b "dev-python/lit[${PYTHON_USEDEP}]" + python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]" } pkg_setup() { - LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup + LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup use test && python-any-r1_pkg_setup } @@ -48,17 +58,30 @@ src_unpack() { } 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=( + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" -DBUILD_SHARED_LIBS=ON -DLLVM_INCLUDE_TESTS=$(usex test) -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" + -DLLVM_ENABLE_ZLIB=FORCE_ON ) + use test && mycmakeargs+=( -DLLVM_BUILD_TESTS=ON -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" -DLLVM_LIT_ARGS="$(get_lit_flags)" -DPython3_EXECUTABLE="${PYTHON}" ) + + tc-is-cross-compiler && mycmakeargs+=( + -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen" + ) + cmake_src_configure } diff --git a/sys-devel/lld/lld-16.0.6.ebuild b/sys-devel/lld/lld-16.0.6.ebuild new file mode 100644 index 000000000000..9308190da16c --- /dev/null +++ b/sys-devel/lld/lld-16.0.6.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs + +DESCRIPTION="The LLVM linker (link editor)" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" +KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86 ~arm64-macos" +IUSE="debug test zstd" +RESTRICT="!test? ( test )" + +DEPEND=" + ~sys-devel/llvm-${PV}[zstd=] + sys-libs/zlib:= + zstd? ( app-arch/zstd:= ) +" +RDEPEND=" + ${DEPEND} + !sys-devel/lld:0 +" +BDEPEND=" + sys-devel/llvm:${LLVM_MAJOR} + test? ( + $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]") + ) +" +PDEPEND=" + >=sys-devel/lld-toolchain-symlinks-16-r2:${LLVM_MAJOR} +" + +LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o ) +LLVM_TEST_COMPONENTS=( llvm/utils third-party ) +LLVM_PATCHSET=${PV}-r1 +llvm.org_set_globals + +python_check_deps() { + python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]" +} + +pkg_setup() { + LLVM_MAX_SLOT=${LLVM_MAJOR} 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=( + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" + -DBUILD_SHARED_LIBS=ON + -DLLVM_INCLUDE_TESTS=$(usex test) + -DLLVM_ENABLE_ZLIB=FORCE_ON + -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF) + ) + + use test && mycmakeargs+=( + -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" + -DLLVM_LIT_ARGS="$(get_lit_flags)" + -DPython3_EXECUTABLE="${PYTHON}" + ) + + tc-is-cross-compiler && mycmakeargs+=( + -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen" + ) + + cmake_src_configure +} + +src_test() { + local -x LIT_PRESERVES_TMP=1 + cmake_build check-lld +} diff --git a/sys-devel/lld/lld-17.0.6.ebuild b/sys-devel/lld/lld-17.0.6.ebuild new file mode 100644 index 000000000000..33a9eb571205 --- /dev/null +++ b/sys-devel/lld/lld-17.0.6.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs + +DESCRIPTION="The LLVM linker (link editor)" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" +KEYWORDS="amd64 arm arm64 ~loong ~ppc ppc64 ~riscv x86 ~arm64-macos" +IUSE="debug test zstd" +RESTRICT="!test? ( test )" + +DEPEND=" + ~sys-devel/llvm-${PV}[debug=,zstd=] + sys-libs/zlib:= + zstd? ( app-arch/zstd:= ) +" +RDEPEND=" + ${DEPEND} + !sys-devel/lld:0 +" +BDEPEND=" + sys-devel/llvm:${LLVM_MAJOR} + test? ( + $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]") + ) +" +PDEPEND=" + >=sys-devel/lld-toolchain-symlinks-16-r2:${LLVM_MAJOR} +" + +LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o ) +llvm.org_set_globals + +python_check_deps() { + python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]" +} + +pkg_setup() { + LLVM_MAX_SLOT=${LLVM_MAJOR} 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() { + # ODR violations (https://github.com/llvm/llvm-project/issues/83529, bug #922353) + filter-lto + + # 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=( + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" + -DBUILD_SHARED_LIBS=ON + -DLLVM_INCLUDE_TESTS=$(usex test) + -DLLVM_ENABLE_ZLIB=FORCE_ON + -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF) + ) + + use test && mycmakeargs+=( + -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" + -DLLVM_LIT_ARGS="$(get_lit_flags)" + -DPython3_EXECUTABLE="${PYTHON}" + ) + + tc-is-cross-compiler && mycmakeargs+=( + -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen" + ) + + cmake_src_configure +} + +src_test() { + local -x LIT_PRESERVES_TMP=1 + cmake_build check-lld +} diff --git a/sys-devel/lld/lld-18.1.4.ebuild b/sys-devel/lld/lld-18.1.4.ebuild new file mode 100644 index 000000000000..0d20224dc323 --- /dev/null +++ b/sys-devel/lld/lld-18.1.4.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +inherit cmake flag-o-matic llvm.org llvm-utils python-any-r1 toolchain-funcs + +DESCRIPTION="The LLVM linker (link editor)" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~arm64-macos" +IUSE="debug test zstd" +RESTRICT="!test? ( test )" + +DEPEND=" + ~sys-devel/llvm-${PV}[debug=,zstd=] + sys-libs/zlib:= + zstd? ( app-arch/zstd:= ) +" +RDEPEND=" + ${DEPEND} + !sys-devel/lld:0 +" +BDEPEND=" + sys-devel/llvm:${LLVM_MAJOR} + test? ( + $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]") + ) +" +PDEPEND=" + >=sys-devel/lld-toolchain-symlinks-16-r2:${LLVM_MAJOR} +" + +LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o ) +llvm.org_set_globals + +python_check_deps() { + python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]" +} + +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_prepend_path "${LLVM_MAJOR}" + + # ODR violations (https://github.com/llvm/llvm-project/issues/83529, bug #922353) + filter-lto + + # 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=( + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" + -DBUILD_SHARED_LIBS=ON + -DLLVM_INCLUDE_TESTS=$(usex test) + -DLLVM_ENABLE_ZLIB=FORCE_ON + -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF) + ) + + use test && mycmakeargs+=( + -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" + -DLLVM_LIT_ARGS="$(get_lit_flags)" + -DPython3_EXECUTABLE="${PYTHON}" + ) + + tc-is-cross-compiler && mycmakeargs+=( + -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen" + ) + + cmake_src_configure +} + +src_test() { + local -x LIT_PRESERVES_TMP=1 + cmake_build check-lld +} diff --git a/sys-devel/lld/lld-19.0.0.9999.ebuild b/sys-devel/lld/lld-19.0.0.9999.ebuild new file mode 100644 index 000000000000..5440a5c89919 --- /dev/null +++ b/sys-devel/lld/lld-19.0.0.9999.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +inherit cmake flag-o-matic llvm.org llvm-utils python-any-r1 toolchain-funcs + +DESCRIPTION="The LLVM linker (link editor)" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" +IUSE="+debug test zstd" +RESTRICT="!test? ( test )" + +DEPEND=" + ~sys-devel/llvm-${PV}[debug=,zstd=] + sys-libs/zlib:= + zstd? ( app-arch/zstd:= ) +" +RDEPEND=" + ${DEPEND} + !sys-devel/lld:0 +" +BDEPEND=" + sys-devel/llvm:${LLVM_MAJOR} + test? ( + $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]") + ) +" +PDEPEND=" + >=sys-devel/lld-toolchain-symlinks-16-r2:${LLVM_MAJOR} +" + +LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o ) +llvm.org_set_globals + +python_check_deps() { + python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]" +} + +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_prepend_path "${LLVM_MAJOR}" + + # ODR violations (https://github.com/llvm/llvm-project/issues/83529, bug #922353) + filter-lto + + # 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=( + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" + -DBUILD_SHARED_LIBS=ON + -DLLVM_INCLUDE_TESTS=$(usex test) + -DLLVM_ENABLE_ZLIB=FORCE_ON + -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF) + ) + + use test && mycmakeargs+=( + -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" + -DLLVM_LIT_ARGS="$(get_lit_flags)" + -DPython3_EXECUTABLE="${PYTHON}" + ) + + tc-is-cross-compiler && mycmakeargs+=( + -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen" + ) + + cmake_src_configure +} + +src_test() { + local -x LIT_PRESERVES_TMP=1 + cmake_build check-lld +} diff --git a/sys-devel/lld/lld-19.0.0_pre20240410.ebuild b/sys-devel/lld/lld-19.0.0_pre20240410.ebuild new file mode 100644 index 000000000000..5440a5c89919 --- /dev/null +++ b/sys-devel/lld/lld-19.0.0_pre20240410.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +inherit cmake flag-o-matic llvm.org llvm-utils python-any-r1 toolchain-funcs + +DESCRIPTION="The LLVM linker (link editor)" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" +IUSE="+debug test zstd" +RESTRICT="!test? ( test )" + +DEPEND=" + ~sys-devel/llvm-${PV}[debug=,zstd=] + sys-libs/zlib:= + zstd? ( app-arch/zstd:= ) +" +RDEPEND=" + ${DEPEND} + !sys-devel/lld:0 +" +BDEPEND=" + sys-devel/llvm:${LLVM_MAJOR} + test? ( + $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]") + ) +" +PDEPEND=" + >=sys-devel/lld-toolchain-symlinks-16-r2:${LLVM_MAJOR} +" + +LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o ) +llvm.org_set_globals + +python_check_deps() { + python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]" +} + +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_prepend_path "${LLVM_MAJOR}" + + # ODR violations (https://github.com/llvm/llvm-project/issues/83529, bug #922353) + filter-lto + + # 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=( + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" + -DBUILD_SHARED_LIBS=ON + -DLLVM_INCLUDE_TESTS=$(usex test) + -DLLVM_ENABLE_ZLIB=FORCE_ON + -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF) + ) + + use test && mycmakeargs+=( + -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" + -DLLVM_LIT_ARGS="$(get_lit_flags)" + -DPython3_EXECUTABLE="${PYTHON}" + ) + + tc-is-cross-compiler && mycmakeargs+=( + -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen" + ) + + cmake_src_configure +} + +src_test() { + local -x LIT_PRESERVES_TMP=1 + cmake_build check-lld +} diff --git a/sys-devel/lld/lld-19.0.0_pre20240420.ebuild b/sys-devel/lld/lld-19.0.0_pre20240420.ebuild new file mode 100644 index 000000000000..5440a5c89919 --- /dev/null +++ b/sys-devel/lld/lld-19.0.0_pre20240420.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +inherit cmake flag-o-matic llvm.org llvm-utils python-any-r1 toolchain-funcs + +DESCRIPTION="The LLVM linker (link editor)" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" +IUSE="+debug test zstd" +RESTRICT="!test? ( test )" + +DEPEND=" + ~sys-devel/llvm-${PV}[debug=,zstd=] + sys-libs/zlib:= + zstd? ( app-arch/zstd:= ) +" +RDEPEND=" + ${DEPEND} + !sys-devel/lld:0 +" +BDEPEND=" + sys-devel/llvm:${LLVM_MAJOR} + test? ( + $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]") + ) +" +PDEPEND=" + >=sys-devel/lld-toolchain-symlinks-16-r2:${LLVM_MAJOR} +" + +LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o ) +llvm.org_set_globals + +python_check_deps() { + python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]" +} + +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_prepend_path "${LLVM_MAJOR}" + + # ODR violations (https://github.com/llvm/llvm-project/issues/83529, bug #922353) + filter-lto + + # 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=( + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" + -DBUILD_SHARED_LIBS=ON + -DLLVM_INCLUDE_TESTS=$(usex test) + -DLLVM_ENABLE_ZLIB=FORCE_ON + -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF) + ) + + use test && mycmakeargs+=( + -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" + -DLLVM_LIT_ARGS="$(get_lit_flags)" + -DPython3_EXECUTABLE="${PYTHON}" + ) + + tc-is-cross-compiler && mycmakeargs+=( + -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen" + ) + + cmake_src_configure +} + +src_test() { + local -x LIT_PRESERVES_TMP=1 + cmake_build check-lld +} diff --git a/sys-devel/lld/metadata.xml b/sys-devel/lld/metadata.xml index 89c4bdb96049..072910296ca3 100644 --- a/sys-devel/lld/metadata.xml +++ b/sys-devel/lld/metadata.xml @@ -1,7 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>llvm@gentoo.org</email> </maintainer> + <upstream> + <remote-id type="github">llvm/llvm-project</remote-id> + </upstream> </pkgmetadata> diff --git a/sys-devel/llvm-common/Manifest b/sys-devel/llvm-common/Manifest index 09cfebc27697..bd71f2e58a68 100644 --- a/sys-devel/llvm-common/Manifest +++ b/sys-devel/llvm-common/Manifest @@ -1,5 +1,10 @@ -DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151 -DIST llvmorg-11.0.0.tar.gz 122743665 BLAKE2B 3f95570240789fd68ddb747df817f5c6cdc9da40911bbe9ee3531c15ada9165e5002b1c2f778cf8735858485ea05a8754e3d3a5f4b15bdd6cb33d64a14692984 SHA512 b6d38871ccce0e086e27d35e42887618d68e57d8274735c59e3eabc42dee352412489296293f8d5169fe0044936345915ee7da61ebdc64ec10f7737f6ecd90f2 -DIST llvmorg-11.0.1.tar.gz 122790338 BLAKE2B 0130996b4a8c4d9f757136fd7fb318068c9bfdc565060dec0d4336480c4ab66c4ae3185a7fdb05f13cf9ee8fd4123b09df938881b75d6e5d3689595114b7e32a SHA512 f5e6ef0b3111aae08a89cd01adb2ff4abfa9ef779c68b9190421d0447efd25c2cc00e5aae9f4764805f5fa31434866043d1510ae7389817e28ae53a5442e2fdf -DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81 -DIST llvmorg-12.0.0.tar.gz 134226215 BLAKE2B f9c3ba8c58571855caa4f206fd285c9b5be66672fb0814cb8bc0964a051f57f5d35013aa1e27cbda502652b37df1ec23474129109e76a42066847860db441dbe SHA512 0cff02155c5ac0d6db2b72d60d9819d5b5dd859663b45f721b1c7540239c2fceb1f57d9173f6870c49de851c242ed8e85c5c6d6577a1f8092a7c5dcd12513b26 +DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52 +DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2 +DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d SHA512 89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7 +DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a SHA512 ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447 +DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30 +DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340 +DIST llvm-project-18.1.4.src.tar.xz 132054668 BLAKE2B 94bbad3b185fd07cbace4eff79aba80fbdd5e072739250e3927fe1848bcf3f8d355eb1f384e57306707eb702acc7ab01b732590735be7950221607664d04b0a6 SHA512 b1b214ae91f3705d8ea345547ad53f1e5d7d884c1eb6958bc41c14ac4b3e407771ccc2b693686ff103c8232c2c3942731d6db9a9cb4f735e6c6a0674739d0b29 +DIST llvm-project-18.1.4.src.tar.xz.sig 566 BLAKE2B b74fd219d7bcdf197b4e711cfbb25c40e9d8d2c7341de0215d8c31f330f396e9c166ff63513829cdc9cef349f08238f66a4dc949fa97958a7af496abae369eaa SHA512 4f456edf4fb454815acaef6855b1a0991f229810a32e9369af83388e37f0ef8964308e1e93bd6216024cdd67e86caaadc8d5794467857cc6fe561c9fa6ca7386 +DIST llvm-project-ee284d2da0720dc21191d6f545504cbfcf5dcbcf.tar.gz 208883034 BLAKE2B e37c9f1a6a4d0caa9a3091f979dd09f509d458f8b7b30286c77dd2385aea748b7aac6dd488c79573f82feb655aa321717bd2fb46bba4a12b388b52064f6e13bf SHA512 1335ade87cd2accc47ac47ed2ab302999e375808b158b6c9d31fac9059cbb992d2bdaaadf1fd9a1b37268c1123d43346ea4d150894d6d2e6f80ba790b65b93b1 +DIST llvm-project-f03cd2db91956456f1c5e2da86d3c50183eebd28.tar.gz 209375254 BLAKE2B 1d7e043d04323edb64b2ef2309fbcb4f82a959f45391e815133cc0891d5a497bbb81101aab460e9bf67e75aa906e13ad1877c3850829dcad397ed626dc8f2792 SHA512 6775e03a44b2133bd4a4b473ab007599321daa19dc7f3cc47f95cf9d110e83e982bf48a6b1d43038b0f0a2c0fef2f689aefd20132b25a90ef19342683e2d2e50 diff --git a/sys-devel/llvm-common/llvm-common-10.0.1.ebuild b/sys-devel/llvm-common/llvm-common-10.0.1.ebuild deleted file mode 100644 index af57c8f49eb1..000000000000 --- a/sys-devel/llvm-common/llvm-common-10.0.1.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 - -inherit llvm.org - -DESCRIPTION="Common files shared between multiple slots of LLVM" -HOMEPAGE="https://llvm.org/" -LLVM_COMPONENTS=( llvm/utils/vim ) -llvm.org_set_globals - -LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" -SLOT="0" -KEYWORDS="amd64 arm arm64 ppc64 x86 ~amd64-linux ~ppc-macos ~x64-macos" -IUSE="" - -RDEPEND="!sys-devel/llvm:0" - -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-11.0.0.ebuild b/sys-devel/llvm-common/llvm-common-11.0.0.ebuild deleted file mode 100644 index 5cfc96246771..000000000000 --- a/sys-devel/llvm-common/llvm-common-11.0.0.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 - -inherit llvm.org - -DESCRIPTION="Common files shared between multiple slots of LLVM" -HOMEPAGE="https://llvm.org/" -LLVM_COMPONENTS=( llvm/utils/vim ) -llvm.org_set_globals - -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="" - -RDEPEND="!sys-devel/llvm:0" - -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-11.0.1.ebuild b/sys-devel/llvm-common/llvm-common-11.0.1.ebuild deleted file mode 100644 index cf396cfcb542..000000000000 --- a/sys-devel/llvm-common/llvm-common-11.0.1.ebuild +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -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 ~ppc64 ~riscv x86 ~amd64-linux ~ppc-macos ~x64-macos" -IUSE="" - -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-11.1.0.ebuild b/sys-devel/llvm-common/llvm-common-11.1.0.ebuild deleted file mode 100644 index c38e467e6d65..000000000000 --- a/sys-devel/llvm-common/llvm-common-11.1.0.ebuild +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -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 ~ppc64 ~riscv ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos" -IUSE="" - -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-12.0.0.9999.ebuild b/sys-devel/llvm-common/llvm-common-12.0.0.9999.ebuild deleted file mode 100644 index 4804d9640098..000000000000 --- a/sys-devel/llvm-common/llvm-common-12.0.0.9999.ebuild +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -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="" -IUSE="" - -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-12.0.0.ebuild b/sys-devel/llvm-common/llvm-common-12.0.0.ebuild deleted file mode 100644 index 8c0651665efe..000000000000 --- a/sys-devel/llvm-common/llvm-common-12.0.0.ebuild +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -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 ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos" -IUSE="" - -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.0.9999.ebuild b/sys-devel/llvm-common/llvm-common-13.0.0.9999.ebuild deleted file mode 100644 index 53511a0a20e3..000000000000 --- a/sys-devel/llvm-common/llvm-common-13.0.0.9999.ebuild +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -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="" -IUSE="" - -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-15.0.7.ebuild b/sys-devel/llvm-common/llvm-common-15.0.7.ebuild new file mode 100644 index 000000000000..3419b7207944 --- /dev/null +++ b/sys-devel/llvm-common/llvm-common-15.0.7.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit elisp-common 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" +IUSE="emacs" + +RDEPEND=" + !sys-devel/llvm:0 +" +BDEPEND=" + emacs? ( >=app-editors/emacs-23.1:* ) +" + +LLVM_COMPONENTS=( llvm/utils ) +llvm.org_set_globals + +SITEFILE="50llvm-gentoo.el" +BYTECOMPFLAGS="-L emacs" + +src_compile() { + default + + use emacs && elisp-compile emacs/*.el +} + +src_install() { + insinto /usr/share/vim/vimfiles + doins -r vim/*/ + # some users may find it useful + newdoc vim/README README.vim + dodoc vim/vimrc + + if use emacs ; then + elisp-install llvm emacs/*.{el,elc} + elisp-make-site-file "${SITEFILE}" llvm + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/sys-devel/llvm-common/llvm-common-16.0.6.ebuild b/sys-devel/llvm-common/llvm-common-16.0.6.ebuild new file mode 100644 index 000000000000..ab2cb092abd1 --- /dev/null +++ b/sys-devel/llvm-common/llvm-common-16.0.6.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit elisp-common 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 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" +IUSE="emacs" + +RDEPEND=" + !sys-devel/llvm:0 +" +BDEPEND=" + emacs? ( >=app-editors/emacs-23.1:* ) +" + +LLVM_COMPONENTS=( llvm/utils ) +llvm.org_set_globals + +SITEFILE="50llvm-gentoo.el" +BYTECOMPFLAGS="-L emacs" + +src_compile() { + default + + use emacs && elisp-compile emacs/*.el +} + +src_install() { + insinto /usr/share/vim/vimfiles + doins -r vim/*/ + # some users may find it useful + newdoc vim/README README.vim + dodoc vim/vimrc + + if use emacs ; then + elisp-install llvm emacs/*.{el,elc} + elisp-make-site-file "${SITEFILE}" llvm + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/sys-devel/llvm-common/llvm-common-17.0.6.ebuild b/sys-devel/llvm-common/llvm-common-17.0.6.ebuild new file mode 100644 index 000000000000..ab2cb092abd1 --- /dev/null +++ b/sys-devel/llvm-common/llvm-common-17.0.6.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit elisp-common 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 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" +IUSE="emacs" + +RDEPEND=" + !sys-devel/llvm:0 +" +BDEPEND=" + emacs? ( >=app-editors/emacs-23.1:* ) +" + +LLVM_COMPONENTS=( llvm/utils ) +llvm.org_set_globals + +SITEFILE="50llvm-gentoo.el" +BYTECOMPFLAGS="-L emacs" + +src_compile() { + default + + use emacs && elisp-compile emacs/*.el +} + +src_install() { + insinto /usr/share/vim/vimfiles + doins -r vim/*/ + # some users may find it useful + newdoc vim/README README.vim + dodoc vim/vimrc + + if use emacs ; then + elisp-install llvm emacs/*.{el,elc} + elisp-make-site-file "${SITEFILE}" llvm + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/sys-devel/llvm-common/llvm-common-18.1.4.ebuild b/sys-devel/llvm-common/llvm-common-18.1.4.ebuild new file mode 100644 index 000000000000..32e5c3f51d9b --- /dev/null +++ b/sys-devel/llvm-common/llvm-common-18.1.4.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit elisp-common 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 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" +IUSE="emacs" + +RDEPEND=" + !sys-devel/llvm:0 +" +BDEPEND=" + emacs? ( >=app-editors/emacs-23.1:* ) +" + +LLVM_COMPONENTS=( llvm/utils ) +llvm.org_set_globals + +SITEFILE="50llvm-gentoo.el" +BYTECOMPFLAGS="-L emacs" + +src_compile() { + default + + use emacs && elisp-compile emacs/*.el +} + +src_install() { + insinto /usr/share/vim/vimfiles + doins -r vim/*/ + # some users may find it useful + newdoc vim/README README.vim + dodoc vim/vimrc + + if use emacs ; then + elisp-install llvm emacs/*.{el,elc} + elisp-make-site-file "${SITEFILE}" llvm + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/sys-devel/llvm-common/llvm-common-19.0.0.9999.ebuild b/sys-devel/llvm-common/llvm-common-19.0.0.9999.ebuild new file mode 100644 index 000000000000..2d8f35a84179 --- /dev/null +++ b/sys-devel/llvm-common/llvm-common-19.0.0.9999.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit elisp-common 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" +IUSE="emacs" + +RDEPEND=" + !sys-devel/llvm:0 +" +BDEPEND=" + emacs? ( >=app-editors/emacs-23.1:* ) +" + +LLVM_COMPONENTS=( llvm/utils ) +llvm.org_set_globals + +SITEFILE="50llvm-gentoo.el" +BYTECOMPFLAGS="-L emacs" + +src_compile() { + default + + use emacs && elisp-compile emacs/*.el +} + +src_install() { + insinto /usr/share/vim/vimfiles + doins -r vim/*/ + # some users may find it useful + newdoc vim/README README.vim + dodoc vim/vimrc + + if use emacs ; then + elisp-install llvm emacs/*.{el,elc} + elisp-make-site-file "${SITEFILE}" llvm + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/sys-devel/llvm-common/llvm-common-19.0.0_pre20240410.ebuild b/sys-devel/llvm-common/llvm-common-19.0.0_pre20240410.ebuild new file mode 100644 index 000000000000..2d8f35a84179 --- /dev/null +++ b/sys-devel/llvm-common/llvm-common-19.0.0_pre20240410.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit elisp-common 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" +IUSE="emacs" + +RDEPEND=" + !sys-devel/llvm:0 +" +BDEPEND=" + emacs? ( >=app-editors/emacs-23.1:* ) +" + +LLVM_COMPONENTS=( llvm/utils ) +llvm.org_set_globals + +SITEFILE="50llvm-gentoo.el" +BYTECOMPFLAGS="-L emacs" + +src_compile() { + default + + use emacs && elisp-compile emacs/*.el +} + +src_install() { + insinto /usr/share/vim/vimfiles + doins -r vim/*/ + # some users may find it useful + newdoc vim/README README.vim + dodoc vim/vimrc + + if use emacs ; then + elisp-install llvm emacs/*.{el,elc} + elisp-make-site-file "${SITEFILE}" llvm + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/sys-devel/llvm-common/llvm-common-19.0.0_pre20240420.ebuild b/sys-devel/llvm-common/llvm-common-19.0.0_pre20240420.ebuild new file mode 100644 index 000000000000..2d8f35a84179 --- /dev/null +++ b/sys-devel/llvm-common/llvm-common-19.0.0_pre20240420.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit elisp-common 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" +IUSE="emacs" + +RDEPEND=" + !sys-devel/llvm:0 +" +BDEPEND=" + emacs? ( >=app-editors/emacs-23.1:* ) +" + +LLVM_COMPONENTS=( llvm/utils ) +llvm.org_set_globals + +SITEFILE="50llvm-gentoo.el" +BYTECOMPFLAGS="-L emacs" + +src_compile() { + default + + use emacs && elisp-compile emacs/*.el +} + +src_install() { + insinto /usr/share/vim/vimfiles + doins -r vim/*/ + # some users may find it useful + newdoc vim/README README.vim + dodoc vim/vimrc + + if use emacs ; then + elisp-install llvm emacs/*.{el,elc} + elisp-make-site-file "${SITEFILE}" llvm + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/sys-devel/llvm-common/metadata.xml b/sys-devel/llvm-common/metadata.xml index 89c4bdb96049..072910296ca3 100644 --- a/sys-devel/llvm-common/metadata.xml +++ b/sys-devel/llvm-common/metadata.xml @@ -1,7 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>llvm@gentoo.org</email> </maintainer> + <upstream> + <remote-id type="github">llvm/llvm-project</remote-id> + </upstream> </pkgmetadata> diff --git a/sys-devel/llvm-roc/Manifest b/sys-devel/llvm-roc/Manifest deleted file mode 100644 index 98d12741dbb3..000000000000 --- a/sys-devel/llvm-roc/Manifest +++ /dev/null @@ -1,8 +0,0 @@ -DIST llvm-rocm-ocl-3.10.0.tar.gz 123600166 BLAKE2B 9b69dab6c7d1a8dfe0d90c76b54446ec7f8ef6e59c74ad328208ac07dbf8836ae412dc5c32fdcbfc926a2488e81cd8afef71c3ebca6cd8ff745205028ab380d8 SHA512 3bb7dac13d89cadfb61a231564155f49021437b7c35eae8735b88ceae4a23b7950643f17e3bfebb0868621297202a04d41120d50ea52b6ad8980dabe9bc75509 -DIST llvm-rocm-ocl-3.7.0.tar.gz 116973132 BLAKE2B c1cc8a3b95292d726626d3cb59ec1b96549682bfcbec16030e47cf1318c6ea01bc76f3349f012ce4f1e4d8b9fe192c51a025c2d08cf593622c61fe7c61969ba6 SHA512 0626075bedb3898c96c0bb0be7a2aba4662050a1c738115f661bedc03d744ace7a4581b55c6325060740c13a0e50e72e09272bb02c1186c2c4a40fc9b961dcbe -DIST llvm-rocm-ocl-3.8.0.tar.gz 117004300 BLAKE2B 13c3213f0fb951fb9d574e8f6d76bb6c632fecadfe93dbe68a9720baa22e35aa3269deef8b533c5a5ff50a2c1ee3dd7a1ea0fae4b8ab8573ec5bfc5ca5d04f4f SHA512 4eca387a132c9d1237ebec7c80319e99c80088766209d05a697d09890f4a82c56ba5f48a5c8c8749bb051c177bb5eab67e00405b04d3191681d0ac7cf1ae868c -DIST llvm-rocm-ocl-3.9.0.tar.gz 123591368 BLAKE2B 54b44d705e7704921df1914bac6dc1da8e420f9383efb698a9cf6a339b653d71cad29aa077a9e24d6764ca81fb8dc55fa70abb0cfac004d40f7d811e20ec9945 SHA512 3404390506b33c1de1d05980fafb219692985f38b52d852e9a47ab94e57228caa25ccd0d0d69da656281de32c75e001f60cb9f22453e70fea7b39d065d4333af -DIST llvm-rocm-ocl-4.0.0.tar.gz 123595983 BLAKE2B 69dd47a50a53cf7d8168f872778bcda0e028907c2341b165f40152bdf03b668ee6c209dc60fa1018dde2a946d891f15eb92a38cfbc12bb5798dd132c1ce79bf1 SHA512 2ac3d643e0bee72239089003cd2889711a7cd58dc588467fb0ca0a50bec264fda992aa2e3352d5210011a9dc1eea4dd9eacdc7d0c313cd69c7b491df126a4e4e -DIST llvm-rocm-ocl-4.0.1.tar.gz 123608276 BLAKE2B dd5a4d6bc198c7fb6fdc2514cd8c4533a2df6ded7a574c9b4762cda3cb65498a464a0e78427db94db05b468a29ce78d3d8131ac7c6e42953fc503896732474e3 SHA512 d23dceaee2badf46cda27aa725bce5b82bab2fba7d1c2220fedb4795eee455de5077b4ff7299ecd6850eeb0bbdb131ea12a699357f373aef818758d845550f04 -DIST llvm-rocm-ocl-4.1.0.tar.gz 128913932 BLAKE2B 15a041ec7b9fec91e409c8ab98ff88f2d15ce58822aa8a77a26ff21416378a4a77a5904fce4e26c5447653da4ec2dbbb5bfec4ae70c72e8e64b2a5f5986ffb92 SHA512 8576e5a43754a9587613f166dc6cad18890812f07bfa55e563ab3de150b6f01ae1b5515aaaf4eef238a7f79e87890533ce791ef07528e4557ea8290c2642ebd3 -DIST llvm-rocm-ocl-4.1.1.tar.gz 128914019 BLAKE2B 9806d1da497e9d9864fd015fc92f5e2d8a6077315d96538064357a38347bc9180948c65cdca9e29574b40f8df62c0660762731564822ac9e8b5364bebf016e43 SHA512 0e4c6b9b0c0330d58616f22d8ec6ebdd6c83aef9ce9968765ac56c022bcd76cba8af5a6cdfb47ed560b33cd67832ac5b026502357af6caec4ab699f1443163fd diff --git a/sys-devel/llvm-roc/files/llvm-roc-3.0.0-add_libraries.patch b/sys-devel/llvm-roc/files/llvm-roc-3.0.0-add_libraries.patch deleted file mode 100644 index 120ab819f5b4..000000000000 --- a/sys-devel/llvm-roc/files/llvm-roc-3.0.0-add_libraries.patch +++ /dev/null @@ -1,20 +0,0 @@ -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 -Naur a/clang/lib/Driver/CMakeLists.txt b/clang/lib/Driver/CMakeLists.txt ---- a/clang/lib/Driver/CMakeLists.txt 2019-12-28 07:41:39.521056199 +0100 -+++ b/clang/lib/Driver/CMakeLists.txt 2019-12-28 07:40:23.998056487 +0100 -@@ -79,4 +79,5 @@ - LINK_LIBS - clangBasic - ${system_libs} -+ pthread - ) diff --git a/sys-devel/llvm-roc/files/llvm-roc-3.7.0-current_pos.patch b/sys-devel/llvm-roc/files/llvm-roc-3.7.0-current_pos.patch deleted file mode 100644 index a0d3c1df6d99..000000000000 --- a/sys-devel/llvm-roc/files/llvm-roc-3.7.0-current_pos.patch +++ /dev/null @@ -1,32 +0,0 @@ -https://bugs.llvm.org/show_bug.cgi?id=43235 - -diff --git a/llvm/include/llvm/Support/raw_ostream.h b/llvm/include/llvm/Support/raw_ostream.h -index 705f1790b1d..a0314b2c46a 100644 ---- a/include/llvm/Support/raw_ostream.h -+++ b/include/llvm/Support/raw_ostream.h -@@ -507,9 +507,7 @@ class raw_string_ostream : public raw_ostream { - /// See raw_ostream::write_impl. - void write_impl(const char *Ptr, size_t Size) override; - -- /// Return the current position within the stream, not counting the bytes -- /// currently in the buffer. -- uint64_t current_pos() const override { return OS.size(); } -+ uint64_t current_pos() const override; - - public: - explicit raw_string_ostream(std::string &O) : OS(O) {} -diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp -index 4bb315f824a..742e2aced39 100644 ---- a/lib/Support/raw_ostream.cpp -+++ b/lib/Support/raw_ostream.cpp -@@ -895,6 +895,10 @@ raw_ostream &llvm::nulls() { - // raw_string_ostream - //===----------------------------------------------------------------------===// - -+/// Return the current position within the stream, not counting the bytes -+/// currently in the buffer. -+uint64_t raw_string_ostream::current_pos() const { return OS.size(); } -+ - raw_string_ostream::~raw_string_ostream() { - flush(); - } diff --git a/sys-devel/llvm-roc/files/llvm-roc-3.9.0-tensorflow.patch b/sys-devel/llvm-roc/files/llvm-roc-3.9.0-tensorflow.patch deleted file mode 100644 index 3e1124457ad3..000000000000 --- a/sys-devel/llvm-roc/files/llvm-roc-3.9.0-tensorflow.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- llvm-project-rocm-3.9.0.orig/CMakeLists.txt 2020-11-12 22:03:09.902293395 +0100 -+++ llvm-project-rocm-3.9.0/CMakeLists.txt 2020-11-12 22:07:28.185294853 +0100 -@@ -824,6 +824,11 @@ - ${LLVM_INCLUDE_DIR}/llvm/Config/Targets.def - ) - -+# They are not referenced. See set_output_directory(). -+set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/bin ) -+set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} ) -+set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} ) -+ - # For up-to-date instructions for installing the Tensorflow dependency, refer to - # the bot setup script: https://github.com/google/ml-compiler-opt/blob/master/buildbot/buildbot_init.sh - # In this case, the latest C API library is available for download from -@@ -832,18 +837,13 @@ - # LLVM_HAVE_TF_API, through llvm-config.h, so that a user of the LLVM library may - # also leverage the dependency. - set(TENSORFLOW_C_LIB_PATH "" CACHE PATH "Path to TensorFlow C library install") --find_library(tensorflow_c_api tensorflow PATHS ${TENSORFLOW_C_LIB_PATH}/lib) - --if (tensorflow_c_api) -+if (TENSORFLOW_C_LIB_PATH) -+ find_library(tensorflow_c_api tensorflow PATHS ${TENSORFLOW_C_LIB_PATH}/lib NO_DEFAULT_PATH REQUIRED) - set(LLVM_HAVE_TF_API "ON" CACHE BOOL "Full Tensorflow API available") - include_directories(${TENSORFLOW_C_LIB_PATH}/include) - endif() - --# They are not referenced. See set_output_directory(). --set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/bin ) --set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} ) --set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} ) -- - # For up-to-date instructions for installing the Tensorflow dependency, refer to - # the bot setup script: https://github.com/google/ml-compiler-opt/blob/master/buildbot/buildbot_init.sh - # Specifically, assuming python3 is installed: diff --git a/sys-devel/llvm-roc/files/llvm-roc-4.0.0-hip-location.patch b/sys-devel/llvm-roc/files/llvm-roc-4.0.0-hip-location.patch deleted file mode 100644 index 225adc709666..000000000000 --- a/sys-devel/llvm-roc/files/llvm-roc-4.0.0-hip-location.patch +++ /dev/null @@ -1,84 +0,0 @@ -replace hardcoded hip finder with Gentoo paths. - -It is not necessary to check HIP runtime each time. - -Author: Benda Xu <heroxbd@gentoo.org> - -Index: llvm-project-rocm-4.0.0/clang/lib/Driver/ToolChains/AMDGPU.cpp -=================================================================== ---- llvm-project-rocm-4.0.0.orig/clang/lib/Driver/ToolChains/AMDGPU.cpp -+++ llvm-project-rocm-4.0.0/clang/lib/Driver/ToolChains/AMDGPU.cpp -@@ -116,37 +116,8 @@ RocmInstallationDetector::getInstallatio - return Candidates; - } - -- // Try to find relative to the compiler binary. -- const char *InstallDir = D.getInstalledDir(); -+ Candidates.emplace_back(D.SysRoot + "/usr", /*StrictChecking=*/true); - -- // 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. -- -- // Strip off directory (usually bin) -- StringRef ParentDir = llvm::sys::path::parent_path(InstallDir); -- 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); -- } -- -- // Some versions of the rocm llvm package install to /opt/rocm/llvm/bin -- if (ParentName == "llvm") -- ParentDir = llvm::sys::path::parent_path(ParentDir); -- -- Candidates.emplace_back(ParentDir.str(), /*StrictChecking=*/true); -- -- // Device library may be installed in clang resource directory. -- Candidates.emplace_back(D.ResourceDir, /*StrictChecking=*/true); -- -- Candidates.emplace_back(D.SysRoot + "/opt/rocm", /*StrictChecking=*/true); -- if (ParentName.startswith("aomp")) { -- // Some versions of the aomp package install to /opt/rocm/aomp/bin -- Candidates.emplace_back(ParentDir.str()); -- } - return Candidates; - } - -@@ -273,33 +244,7 @@ void RocmInstallationDetector::detectDev - } - - void RocmInstallationDetector::detectHIPRuntime() { -- auto Candidates = getInstallationPathCandidates(); -- auto &FS = D.getVFS(); -- -- for (const auto &Candidate : Candidates) { -- InstallPath = Candidate.Path; -- if (InstallPath.empty() || !FS.exists(InstallPath)) -- continue; -- -- 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) -- ParseHIPVersionFile((*VersionFile)->getBuffer()); -- -- HasHIPRuntime = true; -- return; -- } -- HasHIPRuntime = false; -+ HasHIPRuntime = true; - } - - void RocmInstallationDetector::print(raw_ostream &OS) const { diff --git a/sys-devel/llvm-roc/files/llvm-roc-4.0.0-remove-isystem-usr-include.patch b/sys-devel/llvm-roc/files/llvm-roc-4.0.0-remove-isystem-usr-include.patch deleted file mode 100644 index f14ec4ac0db2..000000000000 --- a/sys-devel/llvm-roc/files/llvm-roc-4.0.0-remove-isystem-usr-include.patch +++ /dev/null @@ -1,29 +0,0 @@ -Author: Wilfried (justxi) Holzke - -Adopted from https://github.com/justxi/rocm/blob/master/sys-devel/llvm-roc/files/llvm-roc-4.0.0-remove-isystem-usr-include.patch - -Index: llvm-project-rocm-4.0.0/clang/lib/Driver/ToolChains/AMDGPU.cpp -=================================================================== ---- llvm-project-rocm-4.0.0.orig/clang/lib/Driver/ToolChains/AMDGPU.cpp -+++ llvm-project-rocm-4.0.0/clang/lib/Driver/ToolChains/AMDGPU.cpp -@@ -326,11 +326,6 @@ void RocmInstallationDetector::AddHIPInc - // - // ROCm 3.5 does not fully support the wrapper headers. Therefore it needs - // a workaround. -- SmallString<128> P(D.ResourceDir); -- if (UsesRuntimeWrapper) -- llvm::sys::path::append(P, "include", "cuda_wrappers"); -- CC1Args.push_back("-internal-isystem"); -- CC1Args.push_back(DriverArgs.MakeArgString(P)); - } - - if (DriverArgs.hasArg(options::OPT_nogpuinc)) -@@ -341,8 +336,6 @@ void RocmInstallationDetector::AddHIPInc - return; - } - -- CC1Args.push_back("-internal-isystem"); -- CC1Args.push_back(DriverArgs.MakeArgString(getIncludePath())); - if (UsesRuntimeWrapper) - CC1Args.append({"-include", "__clang_hip_runtime_wrapper.h"}); - } diff --git a/sys-devel/llvm-roc/llvm-roc-3.10.0.ebuild b/sys-devel/llvm-roc/llvm-roc-3.10.0.ebuild deleted file mode 100644 index 2d3f39394110..000000000000 --- a/sys-devel/llvm-roc/llvm-roc-3.10.0.ebuild +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright 1999-2020 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="virtual/cblas - dev-libs/libxml2 - sys-libs/zlib - sys-libs/ncurses:=" -DEPEND="${RDEPEND}" -PDEPEND="dev-libs/rocr-runtime" - -S="${WORKDIR}/llvm-project-rocm-${PV}/llvm" - -PATCHES=( - "${FILESDIR}/${PN}-3.7.0-current_pos.patch" - "${FILESDIR}/${PN}-3.9.0-tensorflow.patch" -) - -CMAKE_BUILD_TYPE=RelWithDebInfo - -src_prepare() { - cd "${WORKDIR}/llvm-project-rocm-${PV}" || die - eapply "${FILESDIR}/${PN}-3.0.0-add_libraries.patch" - eapply_user - cmake_src_prepare -} - -src_configure() { - PROJECTS="clang;lld" - - if usex runtime; then - PROJECTS+=";compiler-rt" - fi - - local mycmakeargs=( - -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc" - -DLLVM_ENABLE_PROJECTS="${PROJECTS}" - -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" - -DLLVM_BUILD_DOCS=NO - -DLLVM_ENABLE_OCAMLDOC=OFF - -DLLVM_ENABLE_SPHINX=NO - -DLLVM_ENABLE_DOXYGEN=OFF - -DLLVM_INSTALL_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-3.7.0-r1.ebuild b/sys-devel/llvm-roc/llvm-roc-3.7.0-r1.ebuild deleted file mode 100644 index 6586ec782b77..000000000000 --- a/sys-devel/llvm-roc/llvm-roc-3.7.0-r1.ebuild +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright 1999-2020 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" - -RDEPEND="virtual/cblas - dev-libs/libxml2 - sys-libs/zlib - sys-libs/ncurses:=" -DEPEND="${RDEPEND}" -PDEPEND="dev-libs/rocr-runtime" - -S="${WORKDIR}/llvm-project-rocm-${PV}/llvm" - -PATCHES=( - "${FILESDIR}/${P}-current_pos.patch" -) - -CMAKE_BUILD_TYPE=RelWithDebInfo - -src_prepare() { - cd "${WORKDIR}/llvm-project-rocm-${PV}" || die - eapply "${FILESDIR}/${PN}-3.0.0-add_libraries.patch" - eapply_user - cmake_src_prepare -} - -src_configure() { - local mycmakeargs=( - -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc" - -DLLVM_ENABLE_PROJECTS="clang;lld" - -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" - -DLLVM_BUILD_DOCS=NO - -DLLVM_ENABLE_OCAMLDOC=OFF - -DLLVM_ENABLE_SPHINX=NO - -DLLVM_ENABLE_DOXYGEN=OFF - -DLLVM_INSTALL_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-3.8.0.ebuild b/sys-devel/llvm-roc/llvm-roc-3.8.0.ebuild deleted file mode 100644 index 8bcc3f8ce0eb..000000000000 --- a/sys-devel/llvm-roc/llvm-roc-3.8.0.ebuild +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright 1999-2020 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="virtual/cblas - dev-libs/libxml2 - sys-libs/zlib - sys-libs/ncurses:=" -DEPEND="${RDEPEND}" -PDEPEND="dev-libs/rocr-runtime" - -S="${WORKDIR}/llvm-project-rocm-${PV}/llvm" - -PATCHES=( - "${FILESDIR}/${PN}-3.7.0-current_pos.patch" -) - -CMAKE_BUILD_TYPE=RelWithDebInfo - -src_prepare() { - cd "${WORKDIR}/llvm-project-rocm-${PV}" || die - eapply "${FILESDIR}/${PN}-3.0.0-add_libraries.patch" - eapply_user - cmake_src_prepare -} - -src_configure() { - PROJECTS="clang;lld" - - if usex runtime; then - PROJECTS+=";compiler-rt" - fi - - local mycmakeargs=( - -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc" - -DLLVM_ENABLE_PROJECTS="${PROJECTS}" - -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" - -DLLVM_BUILD_DOCS=NO - -DLLVM_ENABLE_OCAMLDOC=OFF - -DLLVM_ENABLE_SPHINX=NO - -DLLVM_ENABLE_DOXYGEN=OFF - -DLLVM_INSTALL_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-3.9.0.ebuild b/sys-devel/llvm-roc/llvm-roc-3.9.0.ebuild deleted file mode 100644 index bc0fdfcde777..000000000000 --- a/sys-devel/llvm-roc/llvm-roc-3.9.0.ebuild +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright 1999-2020 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="virtual/cblas - dev-libs/libxml2 - sys-libs/zlib - sys-libs/ncurses:=" -DEPEND="${RDEPEND}" -PDEPEND="dev-libs/rocr-runtime" - -S="${WORKDIR}/llvm-project-rocm-${PV}/llvm" - -PATCHES=( - "${FILESDIR}/${PN}-3.7.0-current_pos.patch" - "${FILESDIR}/${P}-tensorflow.patch" -) - -CMAKE_BUILD_TYPE=RelWithDebInfo - -src_prepare() { - cd "${WORKDIR}/llvm-project-rocm-${PV}" || die - eapply "${FILESDIR}/${PN}-3.0.0-add_libraries.patch" - eapply_user - cmake_src_prepare -} - -src_configure() { - PROJECTS="clang;lld" - - if usex runtime; then - PROJECTS+=";compiler-rt" - fi - - local mycmakeargs=( - -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc" - -DLLVM_ENABLE_PROJECTS="${PROJECTS}" - -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" - -DLLVM_BUILD_DOCS=NO - -DLLVM_ENABLE_OCAMLDOC=OFF - -DLLVM_ENABLE_SPHINX=NO - -DLLVM_ENABLE_DOXYGEN=OFF - -DLLVM_INSTALL_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-4.0.0-r2.ebuild b/sys-devel/llvm-roc/llvm-roc-4.0.0-r2.ebuild deleted file mode 100644 index 5714ae9b7198..000000000000 --- a/sys-devel/llvm-roc/llvm-roc-4.0.0-r2.ebuild +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright 1999-2021 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="virtual/cblas - dev-libs/libxml2 - sys-libs/zlib - sys-libs/ncurses:=" -DEPEND="${RDEPEND}" -PDEPEND="dev-libs/rocr-runtime" - -S="${WORKDIR}/llvm-project-rocm-${PV}/llvm" - -PATCHES=( - "${FILESDIR}/${PN}-3.7.0-current_pos.patch" - "${FILESDIR}/${PN}-3.9.0-tensorflow.patch" -) - -CMAKE_BUILD_TYPE=RelWithDebInfo - -src_prepare() { - cd "${WORKDIR}/llvm-project-rocm-${PV}" || die - eapply "${FILESDIR}/${PN}-3.0.0-add_libraries.patch" - eapply "${FILESDIR}/${PN}-4.0.0-remove-isystem-usr-include.patch" - eapply "${FILESDIR}/${PN}-4.0.0-hip-location.patch" - - if [[ -n ${EPREFIX} ]]; then - pushd "${S}"/../clang >/dev/null || die - sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt - 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 - 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 - 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 - - eapply_user - cmake_src_prepare -} - -src_configure() { - PROJECTS="clang;lld" - - if usex runtime; then - PROJECTS+=";compiler-rt" - fi - - local mycmakeargs=( - -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc" - -DLLVM_ENABLE_PROJECTS="${PROJECTS}" - -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" - -DLLVM_BUILD_DOCS=NO - -DLLVM_ENABLE_OCAMLDOC=OFF - -DLLVM_ENABLE_SPHINX=NO - -DLLVM_ENABLE_DOXYGEN=OFF - -DLLVM_INSTALL_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-4.0.0.ebuild b/sys-devel/llvm-roc/llvm-roc-4.0.0.ebuild deleted file mode 100644 index 046488f4cf2a..000000000000 --- a/sys-devel/llvm-roc/llvm-roc-4.0.0.ebuild +++ /dev/null @@ -1,92 +0,0 @@ -# Copyright 1999-2021 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="virtual/cblas - dev-libs/libxml2 - sys-libs/zlib - sys-libs/ncurses:=" -DEPEND="${RDEPEND}" -PDEPEND="dev-libs/rocr-runtime" - -S="${WORKDIR}/llvm-project-rocm-${PV}/llvm" - -PATCHES=( - "${FILESDIR}/${PN}-3.7.0-current_pos.patch" - "${FILESDIR}/${PN}-3.9.0-tensorflow.patch" -) - -CMAKE_BUILD_TYPE=RelWithDebInfo - -src_prepare() { - cd "${WORKDIR}/llvm-project-rocm-${PV}" || die - eapply "${FILESDIR}/${PN}-3.0.0-add_libraries.patch" - - if [[ -n ${EPREFIX} ]]; then - pushd "${S}"/../clang >/dev/null || die - sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt - 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 - 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 - eend $? - popd >/dev/null || die - fi - - sed -e 's:/opt/rocm:/usr/lib/hip:' \ - -i "${S}"/../clang/lib/Driver/ToolChains/AMDGPU.cpp - - eapply_user - cmake_src_prepare -} - -src_configure() { - PROJECTS="clang;lld" - - if usex runtime; then - PROJECTS+=";compiler-rt" - fi - - local mycmakeargs=( - -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc" - -DLLVM_ENABLE_PROJECTS="${PROJECTS}" - -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" - -DLLVM_BUILD_DOCS=NO - -DLLVM_ENABLE_OCAMLDOC=OFF - -DLLVM_ENABLE_SPHINX=NO - -DLLVM_ENABLE_DOXYGEN=OFF - -DLLVM_INSTALL_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-4.0.1.ebuild b/sys-devel/llvm-roc/llvm-roc-4.0.1.ebuild deleted file mode 100644 index 5714ae9b7198..000000000000 --- a/sys-devel/llvm-roc/llvm-roc-4.0.1.ebuild +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright 1999-2021 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="virtual/cblas - dev-libs/libxml2 - sys-libs/zlib - sys-libs/ncurses:=" -DEPEND="${RDEPEND}" -PDEPEND="dev-libs/rocr-runtime" - -S="${WORKDIR}/llvm-project-rocm-${PV}/llvm" - -PATCHES=( - "${FILESDIR}/${PN}-3.7.0-current_pos.patch" - "${FILESDIR}/${PN}-3.9.0-tensorflow.patch" -) - -CMAKE_BUILD_TYPE=RelWithDebInfo - -src_prepare() { - cd "${WORKDIR}/llvm-project-rocm-${PV}" || die - eapply "${FILESDIR}/${PN}-3.0.0-add_libraries.patch" - eapply "${FILESDIR}/${PN}-4.0.0-remove-isystem-usr-include.patch" - eapply "${FILESDIR}/${PN}-4.0.0-hip-location.patch" - - if [[ -n ${EPREFIX} ]]; then - pushd "${S}"/../clang >/dev/null || die - sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt - 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 - 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 - 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 - - eapply_user - cmake_src_prepare -} - -src_configure() { - PROJECTS="clang;lld" - - if usex runtime; then - PROJECTS+=";compiler-rt" - fi - - local mycmakeargs=( - -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc" - -DLLVM_ENABLE_PROJECTS="${PROJECTS}" - -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" - -DLLVM_BUILD_DOCS=NO - -DLLVM_ENABLE_OCAMLDOC=OFF - -DLLVM_ENABLE_SPHINX=NO - -DLLVM_ENABLE_DOXYGEN=OFF - -DLLVM_INSTALL_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-4.1.0.ebuild b/sys-devel/llvm-roc/llvm-roc-4.1.0.ebuild deleted file mode 100644 index eb7e40df837d..000000000000 --- a/sys-devel/llvm-roc/llvm-roc-4.1.0.ebuild +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright 1999-2021 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="virtual/cblas - dev-libs/libxml2 - sys-libs/zlib - sys-libs/ncurses:=" -DEPEND="${RDEPEND}" -PDEPEND="dev-libs/rocr-runtime" - -S="${WORKDIR}/llvm-project-rocm-${PV}/llvm" - -PATCHES=( - "${FILESDIR}/${PN}-3.7.0-current_pos.patch" -) - -CMAKE_BUILD_TYPE=RelWithDebInfo - -src_prepare() { - cd "${WORKDIR}/llvm-project-rocm-${PV}" || die - eapply "${FILESDIR}/${PN}-3.0.0-add_libraries.patch" - eapply "${FILESDIR}/${PN}-4.0.0-remove-isystem-usr-include.patch" - eapply "${FILESDIR}/${PN}-4.0.0-hip-location.patch" - - if [[ -n ${EPREFIX} ]]; then - pushd "${S}"/../clang >/dev/null || die - sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt - 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 - 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 - 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 - - eapply_user - cmake_src_prepare -} - -src_configure() { - PROJECTS="clang;lld" - - if usex runtime; then - PROJECTS+=";compiler-rt" - fi - - local mycmakeargs=( - -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc" - -DLLVM_ENABLE_PROJECTS="${PROJECTS}" - -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" - -DLLVM_BUILD_DOCS=NO - -DLLVM_ENABLE_OCAMLDOC=OFF - -DLLVM_ENABLE_SPHINX=NO - -DLLVM_ENABLE_DOXYGEN=OFF - -DLLVM_INSTALL_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-4.1.1.ebuild b/sys-devel/llvm-roc/llvm-roc-4.1.1.ebuild deleted file mode 100644 index 68939e209441..000000000000 --- a/sys-devel/llvm-roc/llvm-roc-4.1.1.ebuild +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright 1999-2021 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="virtual/cblas - dev-libs/libxml2 - sys-libs/zlib - sys-libs/ncurses:=" -DEPEND="${RDEPEND}" -PDEPEND="dev-libs/rocr-runtime" - -S="${WORKDIR}/llvm-project-rocm-${PV}/llvm" - -PATCHES=( - "${FILESDIR}/${PN}-3.7.0-current_pos.patch" -) - -CMAKE_BUILD_TYPE=RelWithDebInfo - -src_prepare() { - cd "${WORKDIR}/llvm-project-rocm-${PV}" || die - eapply "${FILESDIR}/${PN}-3.0.0-add_libraries.patch" - eapply "${FILESDIR}/${PN}-4.0.0-remove-isystem-usr-include.patch" - eapply "${FILESDIR}/${PN}-4.0.0-hip-location.patch" - - if [[ -n ${EPREFIX} ]]; then - pushd "${S}"/../clang >/dev/null || die - sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt - 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 - 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 - 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 - - eapply_user - cmake_src_prepare -} - -src_configure() { - PROJECTS="clang;lld" - - if usex runtime; then - PROJECTS+=";compiler-rt" - fi - - local mycmakeargs=( - -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc" - -DLLVM_ENABLE_PROJECTS="${PROJECTS}" - -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" - -DLLVM_BUILD_DOCS=NO - -DLLVM_ENABLE_OCAMLDOC=OFF - -DLLVM_ENABLE_SPHINX=NO - -DLLVM_ENABLE_DOXYGEN=OFF - -DLLVM_INSTALL_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/metadata.xml b/sys-devel/llvm-roc/metadata.xml deleted file mode 100644 index bf09a1db7df6..000000000000 --- a/sys-devel/llvm-roc/metadata.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="person"> - <email>candrews@gentoo.org</email> - <name>Craig Andrews</name> - </maintainer> - <upstream> - <remote-id type="github">RadeonOpenCompute/llvm</remote-id> - </upstream> - <use> - <flag name="runtime">Builds the compiler runtime libraries.</flag> - </use> -</pkgmetadata> diff --git a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-15-r1.ebuild b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-15-r1.ebuild new file mode 100644 index 000000000000..63180b2f53b6 --- /dev/null +++ b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-15-r1.ebuild @@ -0,0 +1,47 @@ +# Copyright 2022-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib + +DESCRIPTION="Symlinks to use LLVM on binutils-free system" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" +S=${WORKDIR} + +LICENSE="public-domain" +SLOT="${PV}" +KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~ppc-macos ~x64-macos" +IUSE="multilib-symlinks +native-symlinks" + +RDEPEND=" + sys-devel/llvm:${SLOT} +" + +src_install() { + use native-symlinks || return + + local tools=( + addr2line ar dlltool nm objcopy objdump ranlib readelf size + strings strip windres + ) + local chosts=( "${CHOST}" ) + if use multilib-symlinks; then + local abi + for abi in $(get_all_abis); do + chosts+=( "$(get_abi_CHOST "${abi}")" ) + done + fi + + local chost t + local dest=/usr/lib/llvm/${SLOT}/bin + dodir "${dest}" + for t in "${tools[@]}"; do + dosym "llvm-${t}" "${dest}/${t}" + done + for chost in "${chosts[@]}"; do + for t in "${tools[@]}"; do + dosym "llvm-${t}" "${dest}/${chost}-${t}" + done + done +} diff --git a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-16-r1.ebuild b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-16-r1.ebuild new file mode 100644 index 000000000000..c1c22114f553 --- /dev/null +++ b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-16-r1.ebuild @@ -0,0 +1,47 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib + +DESCRIPTION="Symlinks to use LLVM on binutils-free system" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" +S=${WORKDIR} + +LICENSE="public-domain" +SLOT="${PV}" +KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" +IUSE="multilib-symlinks +native-symlinks" + +RDEPEND=" + sys-devel/llvm:${SLOT} +" + +src_install() { + use native-symlinks || return + + local tools=( + addr2line ar dlltool nm objcopy objdump ranlib readelf size + strings strip windres + ) + local chosts=( "${CHOST}" ) + if use multilib-symlinks; then + local abi + for abi in $(get_all_abis); do + chosts+=( "$(get_abi_CHOST "${abi}")" ) + done + fi + + local chost t + local dest=/usr/lib/llvm/${SLOT}/bin + dodir "${dest}" + for t in "${tools[@]}"; do + dosym "llvm-${t}" "${dest}/${t}" + done + for chost in "${chosts[@]}"; do + for t in "${tools[@]}"; do + dosym "llvm-${t}" "${dest}/${chost}-${t}" + done + done +} diff --git a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-17.ebuild b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-17.ebuild new file mode 100644 index 000000000000..c1c22114f553 --- /dev/null +++ b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-17.ebuild @@ -0,0 +1,47 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib + +DESCRIPTION="Symlinks to use LLVM on binutils-free system" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" +S=${WORKDIR} + +LICENSE="public-domain" +SLOT="${PV}" +KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" +IUSE="multilib-symlinks +native-symlinks" + +RDEPEND=" + sys-devel/llvm:${SLOT} +" + +src_install() { + use native-symlinks || return + + local tools=( + addr2line ar dlltool nm objcopy objdump ranlib readelf size + strings strip windres + ) + local chosts=( "${CHOST}" ) + if use multilib-symlinks; then + local abi + for abi in $(get_all_abis); do + chosts+=( "$(get_abi_CHOST "${abi}")" ) + done + fi + + local chost t + local dest=/usr/lib/llvm/${SLOT}/bin + dodir "${dest}" + for t in "${tools[@]}"; do + dosym "llvm-${t}" "${dest}/${t}" + done + for chost in "${chosts[@]}"; do + for t in "${tools[@]}"; do + dosym "llvm-${t}" "${dest}/${chost}-${t}" + done + done +} diff --git a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-18.ebuild b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-18.ebuild new file mode 100644 index 000000000000..c007ffe5deb6 --- /dev/null +++ b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-18.ebuild @@ -0,0 +1,47 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib + +DESCRIPTION="Symlinks to use LLVM on binutils-free system" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" +S=${WORKDIR} + +LICENSE="public-domain" +SLOT="${PV}" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" +IUSE="multilib-symlinks +native-symlinks" + +RDEPEND=" + sys-devel/llvm:${SLOT} +" + +src_install() { + use native-symlinks || return + + local tools=( + addr2line ar dlltool nm objcopy objdump ranlib readelf size + strings strip windres + ) + local chosts=( "${CHOST}" ) + if use multilib-symlinks; then + local abi + for abi in $(get_all_abis); do + chosts+=( "$(get_abi_CHOST "${abi}")" ) + done + fi + + local chost t + local dest=/usr/lib/llvm/${SLOT}/bin + dodir "${dest}" + for t in "${tools[@]}"; do + dosym "llvm-${t}" "${dest}/${t}" + done + for chost in "${chosts[@]}"; do + for t in "${tools[@]}"; do + dosym "llvm-${t}" "${dest}/${chost}-${t}" + done + done +} diff --git a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-19.ebuild b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-19.ebuild new file mode 100644 index 000000000000..a57062acab8c --- /dev/null +++ b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-19.ebuild @@ -0,0 +1,46 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib + +DESCRIPTION="Symlinks to use LLVM on binutils-free system" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" +S=${WORKDIR} + +LICENSE="public-domain" +SLOT="${PV}" +IUSE="multilib-symlinks +native-symlinks" + +RDEPEND=" + sys-devel/llvm:${SLOT} +" + +src_install() { + use native-symlinks || return + + local tools=( + addr2line ar dlltool nm objcopy objdump ranlib readelf size + strings strip windres + ) + local chosts=( "${CHOST}" ) + if use multilib-symlinks; then + local abi + for abi in $(get_all_abis); do + chosts+=( "$(get_abi_CHOST "${abi}")" ) + done + fi + + local chost t + local dest=/usr/lib/llvm/${SLOT}/bin + dodir "${dest}" + for t in "${tools[@]}"; do + dosym "llvm-${t}" "${dest}/${t}" + done + for chost in "${chosts[@]}"; do + for t in "${tools[@]}"; do + dosym "llvm-${t}" "${dest}/${chost}-${t}" + done + done +} diff --git a/sys-devel/llvm-toolchain-symlinks/metadata.xml b/sys-devel/llvm-toolchain-symlinks/metadata.xml new file mode 100644 index 000000000000..d62775dfc3a3 --- /dev/null +++ b/sys-devel/llvm-toolchain-symlinks/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>llvm@gentoo.org</email> + </maintainer> + <use> + <flag name="multilib-symlinks"> + Install symlinks for all ABI CHOSTs. Note that this can + result in gcc being overrode for native builds, as well + as conflict with crossdev if used for the same targets. + </flag> + <flag name="native-symlinks"> + Install generic tool symlinks like 'objdump' and 'ranlib', + as well as ${CTARGET}-*. These symlinks are installed + into slotted LLVM bindir, so they should not take precedence + over symlinks installed into /usr/bin + by <pkg>sys-devel/binutils-config</pkg> but they can be + helpful for binutils-free setups. + </flag> + </use> +</pkgmetadata> diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest index 57eb19d6fa7c..b037daa082bf 100644 --- a/sys-devel/llvm/Manifest +++ b/sys-devel/llvm/Manifest @@ -1,15 +1,17 @@ -DIST llvm-10.0.1-manpages.tar.bz2 180157 BLAKE2B ddf5951c8f5a2a8a80726fd713e6c818c852851a2261e904b484afdb67ac55f2ce10976ca2ca5d81fe2bf4806a72cc7b59f4068741306491a4f39065ca8fb56e SHA512 d3c2470dbd0f3143d64b380f7534ebcacdcf4bc4f140a6014283150007fe615ebd86247cf13b2432165a681614849e8eaab69a8d077f7a51e4e040e28ed33ebc -DIST llvm-11.0.0-manpages.tar.bz2 179592 BLAKE2B d03dff5e7426f4c648d6112dee0fa7a91edf41584290c94c3f738fc65fa82fc6ef47b49c245fb0e741bdf267fc64534311194c476ece4b447649ba2250e61430 SHA512 1cf598f50c99a85a35b03398e4768cd1eafec9d602f788d401120adb91b3b59965216ed7102da26b7c2af7e1bbca4bca8f1d43bb687fcd8ed418e2f7076bdce4 -DIST llvm-11.0.1-manpages.tar.bz2 180888 BLAKE2B 9d70e83704d77aa5007cc8eb8e667fbb1f4dd3a8df607d0bbf4f3f5049ac04263e6e01bf8da0d212f456a49c90b853485746af68f0a1e2b5f3b704914bd45aaf SHA512 c67df394dd1a94ae632ce55ff1b1aa4cc4aa8b59b17521cd91932c1b44efe90f29e84233a0ebe882d39f54a5b28edf4ef40769e7ecc1a5f1021d64c5f99e33ad -DIST llvm-11.1.0-manpages.tar.bz2 191571 BLAKE2B d6f8e1390dd3e6e8bbcd66c0079ef89f2ff3479743499c36ab32f8bc8281631a96113df9a87f6284058365950f4df3c75dacfcc11920fc5ea7ef0233ba842b77 SHA512 2543e519f51cc7ecb51a732c658ec5d35c5225e30a677f24ead75e81fb1ab793a030e79f21d0b702a2cf6ab6da1a2cba839b49a98e1b0a36384e98076ed5c4b1 -DIST llvm-12.0.0-manpages.tar.bz2 191228 BLAKE2B 60cc736de2512b9368d55cc8c73e8b537c0fb8f0cb923b0c5c9e5866785013df93efc6cb448c91b7635e856a8d663278a3ba40620a2e4c05c006b6fc5b482b4e SHA512 4a4f55da8da0cb7d4d9281b13168864a3c0b10000b3e750b22b93d9b4f68a2d9a2e1da10c94d27081a0bce9694fa55a9d5e723676f9066393dc8001382d1d6da -DIST llvm-gentoo-patchset-10.0.1-1.tar.xz 8320 BLAKE2B 1b7ea7669586e08fece0efcf02b392feed4b7f3e6e9cdd10ab7dcc30082cae5bb1daa6d3314a7b0329c4d70f3c736d0c57ed408c838601dc737d558d2a0a0f26 SHA512 75898a8d719657177bbf587d848be8e53135c09e50603660c19edab00f80b6c2f29e7b6fda2bef381b38df6e24a690d694029a38c525763408322573275fc9f0 -DIST llvm-gentoo-patchset-11.0.0-1.tar.xz 6100 BLAKE2B 6f8fc9b7daa703f04b1283caaeb3665d4bec56ff80b1c5db35917c578fdd92617222bd2d2b83020144b8abdeaa261142b68aa3dee24350133f6721e41a167b78 SHA512 debdd92e6aa3133f474dfbd79f267e76d9d979e4e5d464c8d4343c6e6816b46376ca8080a9ee916152861907af9d0645ce71cf3582ef3dc31ec4ca3410fde9f6 -DIST llvm-gentoo-patchset-11.1.0-1.tar.xz 4032 BLAKE2B e69138a422e315b31a3d9c11faa4ae1ddf1bf9092cee2db0de4d2adef81fd802973488293aab48b764402b51996893b17ca03249ef4620848a576d1f6cdb9698 SHA512 e1c5504dab6c5db9fdf4addfeb12316f22d0258717ba551a9b7b3ba37919491fb6011ac5cca1e793b7509d5c1c186bc6bc4213f7d6155d190612492b216f979b -DIST llvm-gentoo-patchset-12.0.0-1.tar.xz 6364 BLAKE2B bcf96dad8300cdc3e1f416cb90935ae3b1359efc5687118b5a9bbee25de7087a266250f50c6f2abd18f4efeeec19354f59513c8fdd1d61c2cfc8cc2f0115e514 SHA512 76201e169f71a8d568365ffeafcfd37138e74b0536826f47eb6ce89c2280586f10426917e851f99bfb20477cd828cc40daa8cb7a62959981620fbd81e1b22ee1 -DIST llvm-gentoo-patchset-9999-1.tar.xz 4032 BLAKE2B b9413484dafed8ae0c68c2c164b45fd07bb8d5d0898f03abe118fd2120ffcb1fb6c949de9649a97c2e8105f24b9d131a725c67c0a502ca4d4d192c1a0d65f49d SHA512 e64449eeaf756c5bd945109937b84ba4bd8a015222bd792d39cf3947871e87571a4ca57814790e51544cb05ad4c2d1f044e818e4caaac7c2e2a02cb1aa290fcc -DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151 -DIST llvmorg-11.0.0.tar.gz 122743665 BLAKE2B 3f95570240789fd68ddb747df817f5c6cdc9da40911bbe9ee3531c15ada9165e5002b1c2f778cf8735858485ea05a8754e3d3a5f4b15bdd6cb33d64a14692984 SHA512 b6d38871ccce0e086e27d35e42887618d68e57d8274735c59e3eabc42dee352412489296293f8d5169fe0044936345915ee7da61ebdc64ec10f7737f6ecd90f2 -DIST llvmorg-11.0.1.tar.gz 122790338 BLAKE2B 0130996b4a8c4d9f757136fd7fb318068c9bfdc565060dec0d4336480c4ab66c4ae3185a7fdb05f13cf9ee8fd4123b09df938881b75d6e5d3689595114b7e32a SHA512 f5e6ef0b3111aae08a89cd01adb2ff4abfa9ef779c68b9190421d0447efd25c2cc00e5aae9f4764805f5fa31434866043d1510ae7389817e28ae53a5442e2fdf -DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81 -DIST llvmorg-12.0.0.tar.gz 134226215 BLAKE2B f9c3ba8c58571855caa4f206fd285c9b5be66672fb0814cb8bc0964a051f57f5d35013aa1e27cbda502652b37df1ec23474129109e76a42066847860db441dbe SHA512 0cff02155c5ac0d6db2b72d60d9819d5b5dd859663b45f721b1c7540239c2fceb1f57d9173f6870c49de851c242ed8e85c5c6d6577a1f8092a7c5dcd12513b26 +DIST llvm-15.0.7-manpages.tar.bz2 228425 BLAKE2B 573b030a32407cfe241fb2c8c62bed8e7c54f9daf4b8cffdd2d4e5ca2e40b5ec5ed3724475aedf77119be1a4d9de847a989e933d315e6d94908e407a19c98047 SHA512 86d5eeea2757b0a627c8d2d6e70a3265fc0207085f4e473cdd6e8b624c719625dead23fd1737742a1bea27b1c4631ef3e8e3041a1122a85fcb49859e5bfbee49 +DIST llvm-16.0.4-manpages.tar.bz2 243154 BLAKE2B 69308e3ec19d750e7249b7c8cd79224c466b879c67dd900e201339486fa7fa4dd6ef9ef5b033b2443b32c3530cc76564fe2856a76f9b466fdab2b5c64148f089 SHA512 2d2b711adbd20a233d0611f81393faa29a2f32f0e64799a9a48185876045023ca1320becd2da110fbcbfce019a38df0d7c13fcaea3770b4fc23aa732eb11321b +DIST llvm-17.0.1-manpages.tar.bz2 263148 BLAKE2B 6485a261e356eacc4a274f9b8d329b53f11a37a23effea41a12322f6908bbe702dc1a97bfd10293061f01f1dbff8693e9324ab3dce2551e78eab128dbd7fea30 SHA512 963ff1b7aa0cb01ed0c0356a0adc3a315d94e78035e928dc81464f553e722633a17596e421c248968e87e22ae66f1ab9cccda5fd3388d1a6d34b5e9c6140ebcb +DIST llvm-18.1.0-manpages.tar.bz2 270429 BLAKE2B d85d6e23197184dc512019c25805af0aa145eefb4c36215807c1ba70ad47943c05c06dbaafd84a7e6487bdd83814e03277374e095d97b129e3fc8d468c10741c SHA512 5f492c85fad4e04e0148ea509f4b6520de9e2765c51e617363a11aa8e47c2d847f6b0897958ca1d93bccf0f6a9150868b7e04c728bd430c05bf2da30bdeba6cc +DIST llvm-gentoo-patchset-15.0.7-r3.tar.xz 24268 BLAKE2B 6531ae385ecea87bc26dba8ce19b4cde8ff224c80fd81f04c6ded131e305ecfdeb8d29ebd3b68a641d240805dc83eb0ebc7cc85124f02ad0ee66e0f201b91d7e SHA512 66cb33f8b423736b990fb75d4f2d1e5f14c0b03308f403297204dd1a352d72f85f34220fd66d3de5d6df328cdf2ffce03c2a111cb0bb57791cf68a88069ac7df +DIST llvm-gentoo-patchset-16.0.6.tar.xz 17340 BLAKE2B 37cdf4b38367b4256d4f7a25d1b4f41758e5f81be8e20a1c94a10d6c5e36642e9672121b455e73a0bac2eb40467ef2db4b43789b2912a6790593d97b8b5c27e3 SHA512 2c02b9d8a4c5af9fddcd26c95dc66fffae32cb5b7f85c65a1aa4ed00dd8cd5b01cc1975a711aee63c0b8b11e9dc20f2bc05ea753904eb516892b820f02aff825 +DIST llvm-gentoo-patchset-17.0.6.tar.xz 1792 BLAKE2B 21b34b436333c0b37522d4340cccc84a572701f6e267cf7c6adfa9be419913f5a6c9ee40a6be5c62d12fbd868912801d30381573c4459c05676e05785cccaefe SHA512 2d90b5e7fcbb950249ef7133fac1ed3dcb758a4d92732119049526cea0b291bd4e9738c4c0d806d70e7d769e1906f8ef3930066c206c00b6ec7d3509ed0fed19 +DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52 +DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2 +DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d SHA512 89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7 +DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a SHA512 ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447 +DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30 +DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340 +DIST llvm-project-18.1.4.src.tar.xz 132054668 BLAKE2B 94bbad3b185fd07cbace4eff79aba80fbdd5e072739250e3927fe1848bcf3f8d355eb1f384e57306707eb702acc7ab01b732590735be7950221607664d04b0a6 SHA512 b1b214ae91f3705d8ea345547ad53f1e5d7d884c1eb6958bc41c14ac4b3e407771ccc2b693686ff103c8232c2c3942731d6db9a9cb4f735e6c6a0674739d0b29 +DIST llvm-project-18.1.4.src.tar.xz.sig 566 BLAKE2B b74fd219d7bcdf197b4e711cfbb25c40e9d8d2c7341de0215d8c31f330f396e9c166ff63513829cdc9cef349f08238f66a4dc949fa97958a7af496abae369eaa SHA512 4f456edf4fb454815acaef6855b1a0991f229810a32e9369af83388e37f0ef8964308e1e93bd6216024cdd67e86caaadc8d5794467857cc6fe561c9fa6ca7386 +DIST llvm-project-ee284d2da0720dc21191d6f545504cbfcf5dcbcf.tar.gz 208883034 BLAKE2B e37c9f1a6a4d0caa9a3091f979dd09f509d458f8b7b30286c77dd2385aea748b7aac6dd488c79573f82feb655aa321717bd2fb46bba4a12b388b52064f6e13bf SHA512 1335ade87cd2accc47ac47ed2ab302999e375808b158b6c9d31fac9059cbb992d2bdaaadf1fd9a1b37268c1123d43346ea4d150894d6d2e6f80ba790b65b93b1 +DIST llvm-project-f03cd2db91956456f1c5e2da86d3c50183eebd28.tar.gz 209375254 BLAKE2B 1d7e043d04323edb64b2ef2309fbcb4f82a959f45391e815133cc0891d5a497bbb81101aab460e9bf67e75aa906e13ad1877c3850829dcad397ed626dc8f2792 SHA512 6775e03a44b2133bd4a4b473ab007599321daa19dc7f3cc47f95cf9d110e83e982bf48a6b1d43038b0f0a2c0fef2f689aefd20132b25a90ef19342683e2d2e50 diff --git a/sys-devel/llvm/llvm-10.0.1.ebuild b/sys-devel/llvm/llvm-10.0.1.ebuild deleted file mode 100644 index 390045cc96e7..000000000000 --- a/sys-devel/llvm/llvm-10.0.1.ebuild +++ /dev/null @@ -1,476 +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/" -LLVM_COMPONENTS=( llvm ) -LLVM_MANPAGES=pregenerated -LLVM_PATCHSET=10.0.1-1 -llvm.org_set_globals - -# Those are in lib/Targets, without explicit CMakeLists.txt mention -ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC AVR ) -# Keep in sync with CMakeLists.txt -ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM 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 x86 ~amd64-linux ~ppc-macos ~x64-macos" -IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml z3 - kernel_Darwin ${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 - 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} )" - -python_check_deps() { - use doc || return 0 - - has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" && - has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" -} - -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 - - # manpages don't use markdown - if ! use doc; then - sed -i -e '/source_parsers/d' docs/conf.py || die - fi - - 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-ifs - llvm-install-name-tool - llvm-jitlink - llvm-lib - llvm-link - llvm-lipo - llvm-lto - llvm-lto2 - llvm-mc - llvm-mca - 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) - - # 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" - ) - 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_src_compile - - 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-11.0.0.ebuild b/sys-devel/llvm/llvm-11.0.0.ebuild deleted file mode 100644 index 2206aa4141f8..000000000000 --- a/sys-devel/llvm/llvm-11.0.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/" -LLVM_COMPONENTS=( llvm ) -LLVM_MANPAGES=pregenerated -LLVM_PATCHSET=11.0.0-1 -llvm.org_set_globals - -# 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 - kernel_Darwin ${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} )" - -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-11.1.0.ebuild b/sys-devel/llvm/llvm-11.1.0.ebuild deleted file mode 100644 index a85dbb33df5d..000000000000 --- a/sys-devel/llvm/llvm-11.1.0.ebuild +++ /dev/null @@ -1,513 +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 - kernel_Darwin ${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-13.0.0.9999.ebuild b/sys-devel/llvm/llvm-15.0.7-r3.ebuild index 81a972bb2714..6306ee2107c0 100644 --- a/sys-devel/llvm/llvm-13.0.0.9999.ebuild +++ b/sys-devel/llvm/llvm-15.0.7-r3.ebuild @@ -1,23 +1,15 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{7..9} ) -inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \ +PYTHON_COMPAT=( python3_{10..11} ) +inherit cmake flag-o-matic 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 CSKY M68k 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. @@ -25,31 +17,35 @@ ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) # 4. ConvertUTF.h: TODO. LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc" -SLOT="$(ver_cut 1)" -KEYWORDS="" -IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml z3 - kernel_Darwin ${ALL_LLVM_TARGETS[*]}" -REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )" +SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" +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 zstd +" 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 )" + z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] ) + zstd? ( app-arch/zstd:=[${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-libs/libcxx-${LLVM_VERSION}.9999 >=sys-devel/binutils-apple-5.1 ) doc? ( $(python_gen_any_dep ' @@ -57,27 +53,33 @@ 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 - gold? ( >=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 + sys-devel/llvm-toolchain-symlinks:${LLVM_MAJOR} + binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} ) +" + +LLVM_COMPONENTS=( llvm cmake third-party ) +LLVM_MANPAGES=1 +LLVM_PATCHSET=${PV/_/-}-r3 +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}]" + python_has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" && + python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" } -check_live_ebuild() { +check_uptodate() { local prod_targets=( $(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \ | tail -n +2 | head -n -1) @@ -92,8 +94,6 @@ check_live_ebuild() { 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!" @@ -102,10 +102,10 @@ check_live_ebuild() { 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[*]}" + 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 } @@ -142,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}" ) @@ -176,24 +176,12 @@ src_prepare() { # 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 + # Verify that the ebuild is up-to-date + check_uptodate 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-;} @@ -225,6 +213,7 @@ get_distribution_components() { count not yaml-bench + UnicodeNameMappingGenerator # tools bugpoint @@ -246,12 +235,14 @@ get_distribution_components() { llvm-cxxdump llvm-cxxfilt llvm-cxxmap + llvm-debuginfod + llvm-debuginfod-find llvm-diff llvm-dis llvm-dlltool llvm-dwarfdump + llvm-dwarfutil llvm-dwp - llvm-elfabi llvm-exegesis llvm-extract llvm-gsymutil @@ -283,14 +274,19 @@ get_distribution_components() { llvm-readelf llvm-readobj llvm-reduce + llvm-remark-size-diff 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 @@ -316,7 +312,7 @@ get_distribution_components() { docs-llvm-html ) - use gold && out+=( + use binutils-plugin && out+=( LLVMgold ) fi @@ -325,6 +321,16 @@ get_distribution_components() { } multilib_src_configure() { + if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then + # Workaround for bug #880677 + append-flags $(test-flags-CXX -fno-ipa-sra -fno-ipa-modref -fno-ipa-icf) + fi + + # ODR violations (bug #917536, bug #926529). Just do it for GCC for now + # to avoid people grumbling. GCC is, anecdotally, more likely to miscompile + # LLVM with LTO anyway (which is not necessarily its fault). + tc-is-gcc && filter-lto + local ffi_cflags ffi_ldflags if use libffi; then ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi) @@ -336,7 +342,7 @@ multilib_src_configure() { # 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}" + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" -DLLVM_LIBDIR_SUFFIX=${libdir#lib} -DBUILD_SHARED_LIBS=OFF @@ -359,13 +365,15 @@ multilib_src_configure() { -DLLVM_ENABLE_EH=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_Z3_SOLVER=$(usex z3) + -DLLVM_ENABLE_ZLIB=FORCE_ON + -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF) -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) + -DLLVM_HAVE_LIBXAR=$(multilib_native_usex xar 1 0) -DPython3_EXECUTABLE="${PYTHON}" @@ -373,7 +381,7 @@ multilib_src_configure() { -DOCAMLFIND=NO ) - if is_libcxx_linked; then + if [[ $(tc-get-cxx-stdlib) == libc++ ]]; 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. @@ -400,7 +408,7 @@ multilib_src_configure() { if llvm_are_manpages_built; then build_docs=ON mycmakeargs+=( - -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" -DSPHINX_WARNINGS_AS_ERRORS=OFF ) @@ -413,13 +421,13 @@ 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 if tc-is-cross-compiler; then - local tblgen="${EPREFIX}/usr/lib/llvm/${SLOT}/bin/llvm-tblgen" + local tblgen="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen" [[ -x "${tblgen}" ]] \ || die "${tblgen} not found or usable" mycmakeargs+=( @@ -428,16 +436,6 @@ multilib_src_configure() { ) 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" @@ -446,11 +444,14 @@ multilib_src_configure() { use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" cmake_src_configure + grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=${LLVM_MAJOR}$" \ + CMakeCache.txt || + die "Incorrect version, did you update _LLVM_MASTER_MAJOR?" multilib_is_native_abi && check_distribution_components } multilib_src_compile() { - cmake_build distribution + tc-env_build cmake_build distribution pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld pax-mark m "${BUILD_DIR}"/bin/lli @@ -471,7 +472,7 @@ multilib_src_test() { src_install() { local MULTILIB_CHOST_TOOLS=( - /usr/lib/llvm/${SLOT}/bin/llvm-config + /usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-config ) local MULTILIB_WRAPPED_HEADERS=( @@ -482,7 +483,7 @@ src_install() { multilib-minimal_src_install # move wrapped headers back - mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die + mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die } multilib_src_install() { @@ -490,28 +491,28 @@ multilib_src_install() { # move headers to /usr/include for wrapping rm -rf "${ED}"/usr/include || die - mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die + mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die - LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" ) + LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)" ) } multilib_src_install_all() { - local revord=$(( 9999 - ${SLOT} )) + local revord=$(( 9999 - ${LLVM_MAJOR} )) newenvd - "60llvm-${revord}" <<-_EOF_ - PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" + PATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/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" + ROOTPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin" + MANPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" _EOF_ - docompress "/usr/lib/llvm/${SLOT}/share/man" + docompress "/usr/lib/llvm/${LLVM_MAJOR}/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 " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/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)" diff --git a/sys-devel/llvm/llvm-12.0.0.9999.ebuild b/sys-devel/llvm/llvm-16.0.6.ebuild index 09568c1ceda7..aa171c1cd361 100644 --- a/sys-devel/llvm/llvm-12.0.0.9999.ebuild +++ b/sys-devel/llvm/llvm-16.0.6.ebuild @@ -1,23 +1,16 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{7..9} ) -inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \ - toolchain-funcs +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake flag-o-matic llvm.org multilib-minimal pax-utils python-any-r1 +inherit 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 CSKY 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. @@ -25,59 +18,69 @@ ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) # 4. ConvertUTF.h: TODO. LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc" -SLOT="$(ver_cut 1)" -KEYWORDS="" -IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml z3 - kernel_Darwin ${ALL_LLVM_TARGETS[*]}" -REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )" +SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" +KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" +IUSE=" + +binutils-plugin debug doc exegesis libedit +libffi ncurses test xar + xml z3 zstd +" 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 )" + z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] ) + zstd? ( app-arch/zstd:=[${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 + <sys-libs/libcxx-${LLVM_VERSION}.9999 ) 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=build -LLVM_PATCHSET=9999-1 +RDEPEND=" + ${RDEPEND} + !sys-devel/llvm:0 +" +PDEPEND=" + sys-devel/llvm-common + sys-devel/llvm-toolchain-symlinks:${LLVM_MAJOR} + binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} ) +" + +LLVM_COMPONENTS=( llvm cmake ) +LLVM_TEST_COMPONENTS=( 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}]" + python_has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" && + python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" } -check_live_ebuild() { +check_uptodate() { local prod_targets=( $(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \ | tail -n +2 | head -n -1) @@ -92,8 +95,6 @@ check_live_ebuild() { 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!" @@ -102,10 +103,10 @@ check_live_ebuild() { 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[*]}" + 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 } @@ -142,7 +143,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}" ) @@ -176,24 +177,12 @@ src_prepare() { # 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 + # Verify that the ebuild is up-to-date + check_uptodate 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-;} @@ -225,6 +214,7 @@ get_distribution_components() { count not yaml-bench + UnicodeNameMappingGenerator # tools bugpoint @@ -246,12 +236,15 @@ get_distribution_components() { llvm-cxxdump llvm-cxxfilt llvm-cxxmap + llvm-debuginfo-analyzer + llvm-debuginfod + llvm-debuginfod-find llvm-diff llvm-dis llvm-dlltool llvm-dwarfdump + llvm-dwarfutil llvm-dwp - llvm-elfabi llvm-exegesis llvm-extract llvm-gsymutil @@ -274,6 +267,7 @@ get_distribution_components() { llvm-objcopy llvm-objdump llvm-opt-report + llvm-otool llvm-pdbutil llvm-profdata llvm-profgen @@ -282,14 +276,20 @@ get_distribution_components() { llvm-readelf llvm-readobj llvm-reduce + llvm-remark-size-diff + llvm-remarkutil 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 @@ -315,7 +315,7 @@ get_distribution_components() { docs-llvm-html ) - use gold && out+=( + use binutils-plugin && out+=( LLVMgold ) fi @@ -324,6 +324,16 @@ get_distribution_components() { } multilib_src_configure() { + if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then + # Workaround for bug #880677 + append-flags $(test-flags-CXX -fno-ipa-sra -fno-ipa-modref -fno-ipa-icf) + fi + + # ODR violations (bug #917536, bug #926529). Just do it for GCC for now + # to avoid people grumbling. GCC is, anecdotally, more likely to miscompile + # LLVM with LTO anyway (which is not necessarily its fault). + tc-is-gcc && filter-lto + local ffi_cflags ffi_ldflags if use libffi; then ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi) @@ -335,7 +345,7 @@ multilib_src_configure() { # 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}" + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" -DLLVM_LIBDIR_SUFFIX=${libdir#lib} -DBUILD_SHARED_LIBS=OFF @@ -347,6 +357,8 @@ multilib_src_configure() { # is that the former list is explicitly verified at cmake time -DLLVM_TARGETS_TO_BUILD="" -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" + -DLLVM_INCLUDE_BENCHMARKS=OFF + -DLLVM_INCLUDE_TESTS=$(usex test) -DLLVM_BUILD_TESTS=$(usex test) -DLLVM_ENABLE_FFI=$(usex libffi) @@ -358,13 +370,15 @@ multilib_src_configure() { -DLLVM_ENABLE_EH=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_Z3_SOLVER=$(usex z3) + -DLLVM_ENABLE_ZLIB=FORCE_ON + -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF) -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) + -DLLVM_HAVE_LIBXAR=$(multilib_native_usex xar 1 0) -DPython3_EXECUTABLE="${PYTHON}" @@ -372,23 +386,24 @@ multilib_src_configure() { -DOCAMLFIND=NO ) - if is_libcxx_linked; then + local suffix= + if [[ -n ${EGIT_VERSION} && ${EGIT_BRANCH} != release/* ]]; then + # the ABI of the main branch is not stable, so let's include + # the commit id in the SOVERSION to contain the breakage + suffix+="git${EGIT_VERSION::8}" + fi + if [[ $(tc-get-cxx-stdlib) == libc++ ]]; 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. + suffix+="+libcxx" 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 + mycmakeargs+=( + -DLLVM_VERSION_SUFFIX="${suffix}" + ) use test && mycmakeargs+=( -DLLVM_LIT_ARGS="$(get_lit_flags)" @@ -399,7 +414,7 @@ multilib_src_configure() { if llvm_are_manpages_built; then build_docs=ON mycmakeargs+=( - -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" -DSPHINX_WARNINGS_AS_ERRORS=OFF ) @@ -412,30 +427,17 @@ 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 - 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 + # On Macos prefix, Gentoo doesn't split sys-libs/ncurses to libtinfo and + # libncurses, but llvm tries to use libtinfo before libncurses, and ends up + # using libtinfo (actually, libncurses.dylib) from system instead of prefix + use kernel_Darwin && mycmakeargs+=( + -DTerminfo_LIBRARIES=-lncurses + ) # LLVM can have very high memory consumption while linking, # exhausting the limit on 32-bit linker executable @@ -445,11 +447,14 @@ multilib_src_configure() { use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" cmake_src_configure + grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=${LLVM_MAJOR}$" \ + CMakeCache.txt || + die "Incorrect version, did you update _LLVM_MASTER_MAJOR?" multilib_is_native_abi && check_distribution_components } multilib_src_compile() { - cmake_build distribution + tc-env_build cmake_build distribution pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld pax-mark m "${BUILD_DIR}"/bin/lli @@ -470,7 +475,7 @@ multilib_src_test() { src_install() { local MULTILIB_CHOST_TOOLS=( - /usr/lib/llvm/${SLOT}/bin/llvm-config + /usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-config ) local MULTILIB_WRAPPED_HEADERS=( @@ -481,7 +486,7 @@ src_install() { multilib-minimal_src_install # move wrapped headers back - mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die + mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die } multilib_src_install() { @@ -489,28 +494,28 @@ multilib_src_install() { # move headers to /usr/include for wrapping rm -rf "${ED}"/usr/include || die - mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die + mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die - LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" ) + LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)" ) } multilib_src_install_all() { - local revord=$(( 9999 - ${SLOT} )) + local revord=$(( 9999 - ${LLVM_MAJOR} )) newenvd - "60llvm-${revord}" <<-_EOF_ - PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" + PATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/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" + ROOTPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin" + MANPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" _EOF_ - docompress "/usr/lib/llvm/${SLOT}/share/man" + docompress "/usr/lib/llvm/${LLVM_MAJOR}/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 " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/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)" diff --git a/sys-devel/llvm/llvm-12.0.0.ebuild b/sys-devel/llvm/llvm-17.0.6.ebuild index b7e391d58dc0..c32eee3908c7 100644 --- a/sys-devel/llvm/llvm-12.0.0.ebuild +++ b/sys-devel/llvm/llvm-17.0.6.ebuild @@ -1,23 +1,16 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{7..9} ) -inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \ - toolchain-funcs +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake flag-o-matic llvm.org multilib-minimal pax-utils python-any-r1 +inherit 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 CSKY 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. @@ -25,59 +18,72 @@ ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) # 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 - kernel_Darwin ${ALL_LLVM_TARGETS[*]}" -REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )" +SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" +KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" +IUSE=" + +binutils-plugin debug debuginfod doc exegesis libedit +libffi + ncurses test xar xml z3 zstd +" RESTRICT="!test? ( test )" RDEPEND=" sys-libs/zlib:0=[${MULTILIB_USEDEP}] + debuginfod? ( + net-misc/curl:= + dev-cpp/cpp-httplib:= + ) 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}] ) + zstd? ( app-arch/zstd:=[${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 + <sys-libs/libcxx-${LLVM_VERSION}.9999 ) 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=12.0.0-1 +RDEPEND=" + ${RDEPEND} + !sys-devel/llvm:0 +" +PDEPEND=" + sys-devel/llvm-common + sys-devel/llvm-toolchain-symlinks:${LLVM_MAJOR} + binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} ) +" + +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}]" + python_has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" && + python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" } -check_live_ebuild() { +check_uptodate() { local prod_targets=( $(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \ | tail -n +2 | head -n -1) @@ -92,8 +98,6 @@ check_live_ebuild() { 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!" @@ -102,10 +106,10 @@ check_live_ebuild() { 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[*]}" + 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 } @@ -126,6 +130,9 @@ check_distribution_components() { # TableGen lib + deps LLVMDemangle|LLVMSupport|LLVMTableGen) ;; + # testing libraries + LLVMTestingAnnotations|LLVMTestingSupport) + ;; # static libs LLVM*) continue @@ -142,7 +149,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}" ) @@ -170,34 +177,18 @@ check_distribution_components() { } src_prepare() { - # Disable LBR tests that are broken on non-Intel CPUs - # https://bugs.llvm.org/show_bug.cgi?id=48918 - rm -r test/tools/llvm-exegesis/X86/lbr || die - # 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 + # Verify that the ebuild is up-to-date + check_uptodate 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-;} @@ -218,6 +209,12 @@ get_distribution_components() { LLVMDemangle LLVMSupport LLVMTableGen + + # testing libraries + llvm_gtest + llvm_gtest_main + LLVMTestingAnnotations + LLVMTestingSupport ) if multilib_is_native_abi; then @@ -229,6 +226,7 @@ get_distribution_components() { count not yaml-bench + UnicodeNameMappingGenerator # tools bugpoint @@ -250,12 +248,14 @@ get_distribution_components() { llvm-cxxdump llvm-cxxfilt llvm-cxxmap + llvm-debuginfo-analyzer + llvm-debuginfod-find llvm-diff llvm-dis llvm-dlltool llvm-dwarfdump + llvm-dwarfutil llvm-dwp - llvm-elfabi llvm-exegesis llvm-extract llvm-gsymutil @@ -278,6 +278,7 @@ get_distribution_components() { llvm-objcopy llvm-objdump llvm-opt-report + llvm-otool llvm-pdbutil llvm-profdata llvm-profgen @@ -286,14 +287,20 @@ get_distribution_components() { llvm-readelf llvm-readobj llvm-reduce + llvm-remark-size-diff + llvm-remarkutil 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 @@ -319,15 +326,28 @@ get_distribution_components() { docs-llvm-html ) - use gold && out+=( + use binutils-plugin && out+=( LLVMgold ) + use debuginfod && out+=( + llvm-debuginfod + ) fi printf "%s${sep}" "${out[@]}" } multilib_src_configure() { + if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then + # Workaround for bug #880677 + append-flags $(test-flags-CXX -fno-ipa-sra -fno-ipa-modref -fno-ipa-icf) + fi + + # ODR violations (bug #917536, bug #926529). Just do it for GCC for now + # to avoid people grumbling. GCC is, anecdotally, more likely to miscompile + # LLVM with LTO anyway (which is not necessarily its fault). + tc-is-gcc && filter-lto + local ffi_cflags ffi_ldflags if use libffi; then ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi) @@ -339,7 +359,7 @@ multilib_src_configure() { # 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}" + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" -DLLVM_LIBDIR_SUFFIX=${libdir#lib} -DBUILD_SHARED_LIBS=OFF @@ -351,7 +371,10 @@ multilib_src_configure() { # is that the former list is explicitly verified at cmake time -DLLVM_TARGETS_TO_BUILD="" -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" + -DLLVM_INCLUDE_BENCHMARKS=OFF + -DLLVM_INCLUDE_TESTS=ON -DLLVM_BUILD_TESTS=$(usex test) + -DLLVM_INSTALL_GTEST=ON -DLLVM_ENABLE_FFI=$(usex libffi) -DLLVM_ENABLE_LIBEDIT=$(usex libedit) @@ -362,13 +385,17 @@ multilib_src_configure() { -DLLVM_ENABLE_EH=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_Z3_SOLVER=$(usex z3) + -DLLVM_ENABLE_ZLIB=FORCE_ON + -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF) + -DLLVM_ENABLE_CURL=$(usex debuginfod) + -DLLVM_ENABLE_HTTPLIB=$(usex debuginfod) -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) + -DLLVM_HAVE_LIBXAR=$(multilib_native_usex xar 1 0) -DPython3_EXECUTABLE="${PYTHON}" @@ -376,23 +403,24 @@ multilib_src_configure() { -DOCAMLFIND=NO ) - if is_libcxx_linked; then + local suffix= + if [[ -n ${EGIT_VERSION} && ${EGIT_BRANCH} != release/* ]]; then + # the ABI of the main branch is not stable, so let's include + # the commit id in the SOVERSION to contain the breakage + suffix+="git${EGIT_VERSION::8}" + fi + if [[ $(tc-get-cxx-stdlib) == libc++ ]]; 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. + suffix+="+libcxx" 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 + mycmakeargs+=( + -DLLVM_VERSION_SUFFIX="${suffix}" + ) use test && mycmakeargs+=( -DLLVM_LIT_ARGS="$(get_lit_flags)" @@ -403,7 +431,7 @@ multilib_src_configure() { if llvm_are_manpages_built; then build_docs=ON mycmakeargs+=( - -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" -DSPHINX_WARNINGS_AS_ERRORS=OFF ) @@ -416,30 +444,19 @@ 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 - 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 + use kernel_Darwin && mycmakeargs+=( + # On Macos prefix, Gentoo doesn't split sys-libs/ncurses to libtinfo and + # libncurses, but llvm tries to use libtinfo before libncurses, and ends up + # using libtinfo (actually, libncurses.dylib) from system instead of prefix + -DTerminfo_LIBRARIES=-lncurses + # Use our libtool instead of looking it up with xcrun + -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool" + ) # LLVM can have very high memory consumption while linking, # exhausting the limit on 32-bit linker executable @@ -449,11 +466,14 @@ multilib_src_configure() { use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" cmake_src_configure + grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=${LLVM_MAJOR}$" \ + CMakeCache.txt || + die "Incorrect version, did you update _LLVM_MAIN_MAJOR?" multilib_is_native_abi && check_distribution_components } multilib_src_compile() { - cmake_build distribution + tc-env_build cmake_build distribution pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld pax-mark m "${BUILD_DIR}"/bin/lli @@ -474,7 +494,7 @@ multilib_src_test() { src_install() { local MULTILIB_CHOST_TOOLS=( - /usr/lib/llvm/${SLOT}/bin/llvm-config + /usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-config ) local MULTILIB_WRAPPED_HEADERS=( @@ -485,7 +505,7 @@ src_install() { multilib-minimal_src_install # move wrapped headers back - mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die + mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die } multilib_src_install() { @@ -493,28 +513,28 @@ multilib_src_install() { # move headers to /usr/include for wrapping rm -rf "${ED}"/usr/include || die - mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die + mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die - LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" ) + LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)" ) } multilib_src_install_all() { - local revord=$(( 9999 - ${SLOT} )) + local revord=$(( 9999 - ${LLVM_MAJOR} )) newenvd - "60llvm-${revord}" <<-_EOF_ - PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" + PATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/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" + ROOTPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin" + MANPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" _EOF_ - docompress "/usr/lib/llvm/${SLOT}/share/man" + docompress "/usr/lib/llvm/${LLVM_MAJOR}/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 " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/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)" diff --git a/sys-devel/llvm/llvm-18.1.4.ebuild b/sys-devel/llvm/llvm-18.1.4.ebuild new file mode 100644 index 000000000000..8c3d70f01423 --- /dev/null +++ b/sys-devel/llvm/llvm-18.1.4.ebuild @@ -0,0 +1,548 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake flag-o-matic llvm.org multilib-minimal pax-utils python-any-r1 +inherit 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="${LLVM_MAJOR}/${LLVM_SOABI}" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" +IUSE=" + +binutils-plugin debug debuginfod doc exegesis libedit +libffi + ncurses test xml z3 zstd +" +RESTRICT="!test? ( test )" + +RDEPEND=" + sys-libs/zlib:0=[${MULTILIB_USEDEP}] + debuginfod? ( + net-misc/curl:= + dev-cpp/cpp-httplib:= + ) + 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}] ) + xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) + z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] ) + zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] ) +" +DEPEND=" + ${RDEPEND} + binutils-plugin? ( sys-libs/binutils-libs ) +" +BDEPEND=" + ${PYTHON_DEPS} + dev-lang/perl + sys-devel/gnuconfig + kernel_Darwin? ( + <sys-libs/libcxx-${LLVM_VERSION}.9999 + ) + libffi? ( virtual/pkgconfig ) +" +# 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 + sys-devel/llvm-toolchain-symlinks:${LLVM_MAJOR} + binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} ) +" + +LLVM_COMPONENTS=( llvm cmake third-party ) +LLVM_MANPAGES=1 +LLVM_USE_TARGETS=provide +llvm.org_set_globals + +[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" doc? ( " +BDEPEND+=" + $(python_gen_any_dep ' + dev-python/myst-parser[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') +" +[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" ) " + +python_check_deps() { + llvm_are_manpages_built || return 0 + + python_has_version -b "dev-python/myst-parser[${PYTHON_USEDEP}]" && + python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" +} + +check_uptodate() { + 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) + ;; + # used by lldb + LLVMDebuginfod) + ;; + # testing libraries + LLVMTestingAnnotations|LLVMTestingSupport) + ;; + # 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 ebuild is up-to-date + check_uptodate + + llvm.org_src_prepare +} + +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 + + # testing libraries + llvm_gtest + llvm_gtest_main + LLVMTestingAnnotations + LLVMTestingSupport + ) + + if multilib_is_native_abi; then + out+=( + # library used by lldb + LLVMDebuginfod + + # utilities + llvm-tblgen + FileCheck + llvm-PerfectShuffle + count + not + yaml-bench + UnicodeNameMappingGenerator + + # 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-debuginfo-analyzer + llvm-debuginfod-find + llvm-diff + llvm-dis + llvm-dlltool + llvm-dwarfdump + llvm-dwarfutil + 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-readtapi + llvm-reduce + llvm-remarkutil + llvm-rtdyld + llvm-sim + llvm-size + llvm-split + llvm-stress + llvm-strings + llvm-strip + llvm-symbolizer + 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 + ) + use debuginfod && out+=( + llvm-debuginfod + ) + fi + + printf "%s${sep}" "${out[@]}" +} + +multilib_src_configure() { + if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then + # Workaround for bug #880677 + append-flags $(test-flags-CXX -fno-ipa-sra -fno-ipa-modref -fno-ipa-icf) + fi + + # ODR violations (bug #917536, bug #926529). Just do it for GCC for now + # to avoid people grumbling. GCC is, anecdotally, more likely to miscompile + # LLVM with LTO anyway (which is not necessarily its fault). + tc-is-gcc && filter-lto + + 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/${LLVM_MAJOR}" + -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_INCLUDE_BENCHMARKS=OFF + -DLLVM_INCLUDE_TESTS=ON + -DLLVM_BUILD_TESTS=$(usex test) + -DLLVM_INSTALL_GTEST=ON + + -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_ENABLE_ZLIB=FORCE_ON + -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF) + -DLLVM_ENABLE_CURL=$(usex debuginfod) + -DLLVM_ENABLE_HTTPLIB=$(usex debuginfod) + + -DLLVM_HOST_TRIPLE="${CHOST}" + + -DFFI_INCLUDE_DIR="${ffi_cflags#-I}" + -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}" + + -DPython3_EXECUTABLE="${PYTHON}" + + # disable OCaml bindings (now in dev-ml/llvm-ocaml) + -DOCAMLFIND=NO + ) + + local suffix= + if [[ -n ${EGIT_VERSION} && ${EGIT_BRANCH} != release/* ]]; then + # the ABI of the main branch is not stable, so let's include + # the commit id in the SOVERSION to contain the breakage + suffix+="git${EGIT_VERSION::8}" + fi + if [[ $(tc-get-cxx-stdlib) == libc++ ]]; 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. + suffix+="+libcxx" + mycmakeargs+=( + -DLLVM_ENABLE_LIBCXX=ON + ) + fi + mycmakeargs+=( + -DLLVM_VERSION_SUFFIX="${suffix}" + ) + + 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/${LLVM_MAJOR}/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 + + use kernel_Darwin && mycmakeargs+=( + # On Macos prefix, Gentoo doesn't split sys-libs/ncurses to libtinfo and + # libncurses, but llvm tries to use libtinfo before libncurses, and ends up + # using libtinfo (actually, libncurses.dylib) from system instead of prefix + -DTerminfo_LIBRARIES=-lncurses + # Use our libtool instead of looking it up with xcrun + -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool" + ) + + # 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(:.*)?=${LLVM_MAJOR}$" \ + CMakeCache.txt || + die "Incorrect version, did you update _LLVM_MAIN_MAJOR?" + multilib_is_native_abi && check_distribution_components +} + +multilib_src_compile() { + tc-env_build 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/${LLVM_MAJOR}/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/${LLVM_MAJOR}/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/${LLVM_MAJOR}/include "${ED}"/usr/include || die + + LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)" ) +} + +multilib_src_install_all() { + local revord=$(( 9999 - ${LLVM_MAJOR} )) + newenvd - "60llvm-${revord}" <<-_EOF_ + PATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin" + # we need to duplicate it in ROOTPATH for Portage to respect... + ROOTPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin" + MANPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" + LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" + _EOF_ + + docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man" + llvm_install_manpages +} + +pkg_postinst() { + elog "You can find additional opt-viewer utility scripts in:" + elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/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-11.0.1.ebuild b/sys-devel/llvm/llvm-19.0.0.9999.ebuild index a85dbb33df5d..8624219a7e20 100644 --- a/sys-devel/llvm/llvm-11.0.1.ebuild +++ b/sys-devel/llvm/llvm-19.0.0.9999.ebuild @@ -1,23 +1,16 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{7..9} ) -inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \ - toolchain-funcs +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake flag-o-matic llvm.org multilib-minimal pax-utils python-any-r1 +inherit 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. @@ -25,59 +18,74 @@ ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) # 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 - kernel_Darwin ${ALL_LLVM_TARGETS[*]}" -REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )" +SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" +IUSE=" + +binutils-plugin +debug debuginfod doc exegesis libedit +libffi + ncurses test xml z3 zstd +" RESTRICT="!test? ( test )" RDEPEND=" sys-libs/zlib:0=[${MULTILIB_USEDEP}] + debuginfod? ( + net-misc/curl:= + dev-cpp/cpp-httplib:= + ) 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}] ) + zstd? ( app-arch/zstd:=[${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 + <sys-libs/libcxx-${LLVM_VERSION}.9999 ) - 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 +RDEPEND=" + ${RDEPEND} + !sys-devel/llvm:0 +" +PDEPEND=" + sys-devel/llvm-common + sys-devel/llvm-toolchain-symlinks:${LLVM_MAJOR} + binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} ) +" + +LLVM_COMPONENTS=( llvm cmake third-party ) +LLVM_MANPAGES=1 +LLVM_USE_TARGETS=provide llvm.org_set_globals +[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" doc? ( " +BDEPEND+=" + $(python_gen_any_dep ' + dev-python/myst-parser[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') +" +[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" ) " + python_check_deps() { - use doc || return 0 + llvm_are_manpages_built || return 0 - has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" && - has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" + python_has_version -b "dev-python/myst-parser[${PYTHON_USEDEP}]" && + python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" } -check_live_ebuild() { +check_uptodate() { local prod_targets=( $(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \ | tail -n +2 | head -n -1) @@ -92,8 +100,6 @@ check_live_ebuild() { 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!" @@ -102,10 +108,10 @@ check_live_ebuild() { 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[*]}" + 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 } @@ -126,6 +132,12 @@ check_distribution_components() { # TableGen lib + deps LLVMDemangle|LLVMSupport|LLVMTableGen) ;; + # used by lldb + LLVMDebuginfod) + ;; + # testing libraries + LLVMTestingAnnotations|LLVMTestingSupport) + ;; # static libs LLVM*) continue @@ -142,7 +154,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}" ) @@ -176,24 +188,12 @@ src_prepare() { # 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 + # Verify that the ebuild is up-to-date + check_uptodate 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-;} @@ -214,10 +214,19 @@ get_distribution_components() { LLVMDemangle LLVMSupport LLVMTableGen + + # testing libraries + llvm_gtest + llvm_gtest_main + LLVMTestingAnnotations + LLVMTestingSupport ) if multilib_is_native_abi; then out+=( + # library used by lldb + LLVMDebuginfod + # utilities llvm-tblgen FileCheck @@ -225,6 +234,7 @@ get_distribution_components() { count not yaml-bench + UnicodeNameMappingGenerator # tools bugpoint @@ -236,6 +246,7 @@ get_distribution_components() { llvm-ar llvm-as llvm-bcanalyzer + llvm-bitcode-strip llvm-c-test llvm-cat llvm-cfi-verify @@ -245,19 +256,23 @@ get_distribution_components() { llvm-cxxdump llvm-cxxfilt llvm-cxxmap + llvm-debuginfo-analyzer + llvm-debuginfod-find llvm-diff llvm-dis llvm-dlltool llvm-dwarfdump + llvm-dwarfutil llvm-dwp - llvm-elfabi 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 @@ -271,26 +286,34 @@ get_distribution_components() { llvm-objcopy llvm-objdump llvm-opt-report + llvm-otool llvm-pdbutil llvm-profdata + llvm-profgen llvm-ranlib llvm-rc llvm-readelf llvm-readobj + llvm-readtapi llvm-reduce + llvm-remarkutil llvm-rtdyld + llvm-sim llvm-size llvm-split llvm-stress llvm-strings llvm-strip llvm-symbolizer + llvm-tli-checker llvm-undname + llvm-windres llvm-xray obj2yaml opt sancov sanstats + split-file verify-uselistorder yaml2obj @@ -310,15 +333,28 @@ get_distribution_components() { docs-llvm-html ) - use gold && out+=( + use binutils-plugin && out+=( LLVMgold ) + use debuginfod && out+=( + llvm-debuginfod + ) fi printf "%s${sep}" "${out[@]}" } multilib_src_configure() { + if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then + # Workaround for bug #880677 + append-flags $(test-flags-CXX -fno-ipa-sra -fno-ipa-modref -fno-ipa-icf) + fi + + # ODR violations (bug #917536, bug #926529). Just do it for GCC for now + # to avoid people grumbling. GCC is, anecdotally, more likely to miscompile + # LLVM with LTO anyway (which is not necessarily its fault). + tc-is-gcc && filter-lto + local ffi_cflags ffi_ldflags if use libffi; then ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi) @@ -330,7 +366,7 @@ multilib_src_configure() { # 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}" + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" -DLLVM_LIBDIR_SUFFIX=${libdir#lib} -DBUILD_SHARED_LIBS=OFF @@ -342,7 +378,10 @@ multilib_src_configure() { # is that the former list is explicitly verified at cmake time -DLLVM_TARGETS_TO_BUILD="" -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}" + -DLLVM_INCLUDE_BENCHMARKS=OFF + -DLLVM_INCLUDE_TESTS=ON -DLLVM_BUILD_TESTS=$(usex test) + -DLLVM_INSTALL_GTEST=ON -DLLVM_ENABLE_FFI=$(usex libffi) -DLLVM_ENABLE_LIBEDIT=$(usex libedit) @@ -353,13 +392,15 @@ multilib_src_configure() { -DLLVM_ENABLE_EH=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_Z3_SOLVER=$(usex z3) + -DLLVM_ENABLE_ZLIB=FORCE_ON + -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF) + -DLLVM_ENABLE_CURL=$(usex debuginfod) + -DLLVM_ENABLE_HTTPLIB=$(usex debuginfod) -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}" @@ -367,23 +408,24 @@ multilib_src_configure() { -DOCAMLFIND=NO ) - if is_libcxx_linked; then + local suffix= + if [[ -n ${EGIT_VERSION} && ${EGIT_BRANCH} != release/* ]]; then + # the ABI of the main branch is not stable, so let's include + # the commit id in the SOVERSION to contain the breakage + suffix+="git${EGIT_VERSION::8}" + fi + if [[ $(tc-get-cxx-stdlib) == libc++ ]]; 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. + suffix+="+libcxx" 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 + mycmakeargs+=( + -DLLVM_VERSION_SUFFIX="${suffix}" + ) use test && mycmakeargs+=( -DLLVM_LIT_ARGS="$(get_lit_flags)" @@ -394,7 +436,7 @@ multilib_src_configure() { if llvm_are_manpages_built; then build_docs=ON mycmakeargs+=( - -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" -DSPHINX_WARNINGS_AS_ERRORS=OFF ) @@ -407,30 +449,19 @@ 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 - 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 + use kernel_Darwin && mycmakeargs+=( + # On Macos prefix, Gentoo doesn't split sys-libs/ncurses to libtinfo and + # libncurses, but llvm tries to use libtinfo before libncurses, and ends up + # using libtinfo (actually, libncurses.dylib) from system instead of prefix + -DTerminfo_LIBRARIES=-lncurses + # Use our libtool instead of looking it up with xcrun + -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool" + ) # LLVM can have very high memory consumption while linking, # exhausting the limit on 32-bit linker executable @@ -440,11 +471,14 @@ multilib_src_configure() { use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" cmake_src_configure + grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=${LLVM_MAJOR}$" \ + CMakeCache.txt || + die "Incorrect version, did you update _LLVM_MAIN_MAJOR?" multilib_is_native_abi && check_distribution_components } multilib_src_compile() { - cmake_build distribution + tc-env_build cmake_build distribution pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld pax-mark m "${BUILD_DIR}"/bin/lli @@ -465,7 +499,7 @@ multilib_src_test() { src_install() { local MULTILIB_CHOST_TOOLS=( - /usr/lib/llvm/${SLOT}/bin/llvm-config + /usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-config ) local MULTILIB_WRAPPED_HEADERS=( @@ -476,7 +510,7 @@ src_install() { multilib-minimal_src_install # move wrapped headers back - mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die + mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include || die } multilib_src_install() { @@ -484,28 +518,28 @@ multilib_src_install() { # move headers to /usr/include for wrapping rm -rf "${ED}"/usr/include || die - mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die + mv "${ED}"/usr/lib/llvm/${LLVM_MAJOR}/include "${ED}"/usr/include || die - LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" ) + LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)" ) } multilib_src_install_all() { - local revord=$(( 9999 - ${SLOT} )) + local revord=$(( 9999 - ${LLVM_MAJOR} )) newenvd - "60llvm-${revord}" <<-_EOF_ - PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" + PATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/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" + ROOTPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin" + MANPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" _EOF_ - docompress "/usr/lib/llvm/${SLOT}/share/man" + docompress "/usr/lib/llvm/${LLVM_MAJOR}/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 " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/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)" diff --git a/sys-devel/llvm/llvm-19.0.0_pre20240410.ebuild b/sys-devel/llvm/llvm-19.0.0_pre20240410.ebuild new file mode 100644 index 000000000000..8624219a7e20 --- /dev/null +++ b/sys-devel/llvm/llvm-19.0.0_pre20240410.ebuild @@ -0,0 +1,547 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake flag-o-matic llvm.org multilib-minimal pax-utils python-any-r1 +inherit 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="${LLVM_MAJOR}/${LLVM_SOABI}" +IUSE=" + +binutils-plugin +debug debuginfod doc exegesis libedit +libffi + ncurses test xml z3 zstd +" +RESTRICT="!test? ( test )" + +RDEPEND=" + sys-libs/zlib:0=[${MULTILIB_USEDEP}] + debuginfod? ( + net-misc/curl:= + dev-cpp/cpp-httplib:= + ) + 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}] ) + xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) + z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] ) + zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] ) +" +DEPEND=" + ${RDEPEND} + binutils-plugin? ( sys-libs/binutils-libs ) +" +BDEPEND=" + ${PYTHON_DEPS} + dev-lang/perl + sys-devel/gnuconfig + kernel_Darwin? ( + <sys-libs/libcxx-${LLVM_VERSION}.9999 + ) + libffi? ( virtual/pkgconfig ) +" +# 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 + sys-devel/llvm-toolchain-symlinks:${LLVM_MAJOR} + binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} ) +" + +LLVM_COMPONENTS=( llvm cmake third-party ) +LLVM_MANPAGES=1 +LLVM_USE_TARGETS=provide +llvm.org_set_globals + +[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" doc? ( " +BDEPEND+=" + $(python_gen_any_dep ' + dev-python/myst-parser[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') +" +[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" ) " + +python_check_deps() { + llvm_are_manpages_built || return 0 + + python_has_version -b "dev-python/myst-parser[${PYTHON_USEDEP}]" && + python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" +} + +check_uptodate() { + 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) + ;; + # used by lldb + LLVMDebuginfod) + ;; + # testing libraries + LLVMTestingAnnotations|LLVMTestingSupport) + ;; + # 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 ebuild is up-to-date + check_uptodate + + llvm.org_src_prepare +} + +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 + + # testing libraries + llvm_gtest + llvm_gtest_main + LLVMTestingAnnotations + LLVMTestingSupport + ) + + if multilib_is_native_abi; then + out+=( + # library used by lldb + LLVMDebuginfod + + # utilities + llvm-tblgen + FileCheck + llvm-PerfectShuffle + count + not + yaml-bench + UnicodeNameMappingGenerator + + # 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-debuginfo-analyzer + llvm-debuginfod-find + llvm-diff + llvm-dis + llvm-dlltool + llvm-dwarfdump + llvm-dwarfutil + 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-readtapi + llvm-reduce + llvm-remarkutil + llvm-rtdyld + llvm-sim + llvm-size + llvm-split + llvm-stress + llvm-strings + llvm-strip + llvm-symbolizer + 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 + ) + use debuginfod && out+=( + llvm-debuginfod + ) + fi + + printf "%s${sep}" "${out[@]}" +} + +multilib_src_configure() { + if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then + # Workaround for bug #880677 + append-flags $(test-flags-CXX -fno-ipa-sra -fno-ipa-modref -fno-ipa-icf) + fi + + # ODR violations (bug #917536, bug #926529). Just do it for GCC for now + # to avoid people grumbling. GCC is, anecdotally, more likely to miscompile + # LLVM with LTO anyway (which is not necessarily its fault). + tc-is-gcc && filter-lto + + 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/${LLVM_MAJOR}" + -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_INCLUDE_BENCHMARKS=OFF + -DLLVM_INCLUDE_TESTS=ON + -DLLVM_BUILD_TESTS=$(usex test) + -DLLVM_INSTALL_GTEST=ON + + -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_ENABLE_ZLIB=FORCE_ON + -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF) + -DLLVM_ENABLE_CURL=$(usex debuginfod) + -DLLVM_ENABLE_HTTPLIB=$(usex debuginfod) + + -DLLVM_HOST_TRIPLE="${CHOST}" + + -DFFI_INCLUDE_DIR="${ffi_cflags#-I}" + -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}" + + -DPython3_EXECUTABLE="${PYTHON}" + + # disable OCaml bindings (now in dev-ml/llvm-ocaml) + -DOCAMLFIND=NO + ) + + local suffix= + if [[ -n ${EGIT_VERSION} && ${EGIT_BRANCH} != release/* ]]; then + # the ABI of the main branch is not stable, so let's include + # the commit id in the SOVERSION to contain the breakage + suffix+="git${EGIT_VERSION::8}" + fi + if [[ $(tc-get-cxx-stdlib) == libc++ ]]; 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. + suffix+="+libcxx" + mycmakeargs+=( + -DLLVM_ENABLE_LIBCXX=ON + ) + fi + mycmakeargs+=( + -DLLVM_VERSION_SUFFIX="${suffix}" + ) + + 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/${LLVM_MAJOR}/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 + + use kernel_Darwin && mycmakeargs+=( + # On Macos prefix, Gentoo doesn't split sys-libs/ncurses to libtinfo and + # libncurses, but llvm tries to use libtinfo before libncurses, and ends up + # using libtinfo (actually, libncurses.dylib) from system instead of prefix + -DTerminfo_LIBRARIES=-lncurses + # Use our libtool instead of looking it up with xcrun + -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool" + ) + + # 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(:.*)?=${LLVM_MAJOR}$" \ + CMakeCache.txt || + die "Incorrect version, did you update _LLVM_MAIN_MAJOR?" + multilib_is_native_abi && check_distribution_components +} + +multilib_src_compile() { + tc-env_build 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/${LLVM_MAJOR}/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/${LLVM_MAJOR}/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/${LLVM_MAJOR}/include "${ED}"/usr/include || die + + LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)" ) +} + +multilib_src_install_all() { + local revord=$(( 9999 - ${LLVM_MAJOR} )) + newenvd - "60llvm-${revord}" <<-_EOF_ + PATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin" + # we need to duplicate it in ROOTPATH for Portage to respect... + ROOTPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin" + MANPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" + LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" + _EOF_ + + docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man" + llvm_install_manpages +} + +pkg_postinst() { + elog "You can find additional opt-viewer utility scripts in:" + elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/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-19.0.0_pre20240420.ebuild b/sys-devel/llvm/llvm-19.0.0_pre20240420.ebuild new file mode 100644 index 000000000000..8624219a7e20 --- /dev/null +++ b/sys-devel/llvm/llvm-19.0.0_pre20240420.ebuild @@ -0,0 +1,547 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake flag-o-matic llvm.org multilib-minimal pax-utils python-any-r1 +inherit 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="${LLVM_MAJOR}/${LLVM_SOABI}" +IUSE=" + +binutils-plugin +debug debuginfod doc exegesis libedit +libffi + ncurses test xml z3 zstd +" +RESTRICT="!test? ( test )" + +RDEPEND=" + sys-libs/zlib:0=[${MULTILIB_USEDEP}] + debuginfod? ( + net-misc/curl:= + dev-cpp/cpp-httplib:= + ) + 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}] ) + xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) + z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] ) + zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] ) +" +DEPEND=" + ${RDEPEND} + binutils-plugin? ( sys-libs/binutils-libs ) +" +BDEPEND=" + ${PYTHON_DEPS} + dev-lang/perl + sys-devel/gnuconfig + kernel_Darwin? ( + <sys-libs/libcxx-${LLVM_VERSION}.9999 + ) + libffi? ( virtual/pkgconfig ) +" +# 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 + sys-devel/llvm-toolchain-symlinks:${LLVM_MAJOR} + binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} ) +" + +LLVM_COMPONENTS=( llvm cmake third-party ) +LLVM_MANPAGES=1 +LLVM_USE_TARGETS=provide +llvm.org_set_globals + +[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" doc? ( " +BDEPEND+=" + $(python_gen_any_dep ' + dev-python/myst-parser[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') +" +[[ -n ${LLVM_MANPAGE_DIST} ]] && BDEPEND+=" ) " + +python_check_deps() { + llvm_are_manpages_built || return 0 + + python_has_version -b "dev-python/myst-parser[${PYTHON_USEDEP}]" && + python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" +} + +check_uptodate() { + 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) + ;; + # used by lldb + LLVMDebuginfod) + ;; + # testing libraries + LLVMTestingAnnotations|LLVMTestingSupport) + ;; + # 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 ebuild is up-to-date + check_uptodate + + llvm.org_src_prepare +} + +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 + + # testing libraries + llvm_gtest + llvm_gtest_main + LLVMTestingAnnotations + LLVMTestingSupport + ) + + if multilib_is_native_abi; then + out+=( + # library used by lldb + LLVMDebuginfod + + # utilities + llvm-tblgen + FileCheck + llvm-PerfectShuffle + count + not + yaml-bench + UnicodeNameMappingGenerator + + # 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-debuginfo-analyzer + llvm-debuginfod-find + llvm-diff + llvm-dis + llvm-dlltool + llvm-dwarfdump + llvm-dwarfutil + 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-readtapi + llvm-reduce + llvm-remarkutil + llvm-rtdyld + llvm-sim + llvm-size + llvm-split + llvm-stress + llvm-strings + llvm-strip + llvm-symbolizer + 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 + ) + use debuginfod && out+=( + llvm-debuginfod + ) + fi + + printf "%s${sep}" "${out[@]}" +} + +multilib_src_configure() { + if use ppc && tc-is-gcc && [[ $(gcc-major-version) -lt 14 ]]; then + # Workaround for bug #880677 + append-flags $(test-flags-CXX -fno-ipa-sra -fno-ipa-modref -fno-ipa-icf) + fi + + # ODR violations (bug #917536, bug #926529). Just do it for GCC for now + # to avoid people grumbling. GCC is, anecdotally, more likely to miscompile + # LLVM with LTO anyway (which is not necessarily its fault). + tc-is-gcc && filter-lto + + 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/${LLVM_MAJOR}" + -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_INCLUDE_BENCHMARKS=OFF + -DLLVM_INCLUDE_TESTS=ON + -DLLVM_BUILD_TESTS=$(usex test) + -DLLVM_INSTALL_GTEST=ON + + -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_ENABLE_ZLIB=FORCE_ON + -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF) + -DLLVM_ENABLE_CURL=$(usex debuginfod) + -DLLVM_ENABLE_HTTPLIB=$(usex debuginfod) + + -DLLVM_HOST_TRIPLE="${CHOST}" + + -DFFI_INCLUDE_DIR="${ffi_cflags#-I}" + -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}" + + -DPython3_EXECUTABLE="${PYTHON}" + + # disable OCaml bindings (now in dev-ml/llvm-ocaml) + -DOCAMLFIND=NO + ) + + local suffix= + if [[ -n ${EGIT_VERSION} && ${EGIT_BRANCH} != release/* ]]; then + # the ABI of the main branch is not stable, so let's include + # the commit id in the SOVERSION to contain the breakage + suffix+="git${EGIT_VERSION::8}" + fi + if [[ $(tc-get-cxx-stdlib) == libc++ ]]; 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. + suffix+="+libcxx" + mycmakeargs+=( + -DLLVM_ENABLE_LIBCXX=ON + ) + fi + mycmakeargs+=( + -DLLVM_VERSION_SUFFIX="${suffix}" + ) + + 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/${LLVM_MAJOR}/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 + + use kernel_Darwin && mycmakeargs+=( + # On Macos prefix, Gentoo doesn't split sys-libs/ncurses to libtinfo and + # libncurses, but llvm tries to use libtinfo before libncurses, and ends up + # using libtinfo (actually, libncurses.dylib) from system instead of prefix + -DTerminfo_LIBRARIES=-lncurses + # Use our libtool instead of looking it up with xcrun + -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool" + ) + + # 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(:.*)?=${LLVM_MAJOR}$" \ + CMakeCache.txt || + die "Incorrect version, did you update _LLVM_MAIN_MAJOR?" + multilib_is_native_abi && check_distribution_components +} + +multilib_src_compile() { + tc-env_build 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/${LLVM_MAJOR}/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/${LLVM_MAJOR}/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/${LLVM_MAJOR}/include "${ED}"/usr/include || die + + LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)" ) +} + +multilib_src_install_all() { + local revord=$(( 9999 - ${LLVM_MAJOR} )) + newenvd - "60llvm-${revord}" <<-_EOF_ + PATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin" + # we need to duplicate it in ROOTPATH for Portage to respect... + ROOTPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin" + MANPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man" + LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" + _EOF_ + + docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man" + llvm_install_manpages +} + +pkg_postinst() { + elog "You can find additional opt-viewer utility scripts in:" + elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/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/metadata.xml b/sys-devel/llvm/metadata.xml index 1f534c1999e7..1277d338a5de 100644 --- a/sys-devel/llvm/metadata.xml +++ b/sys-devel/llvm/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>llvm@gentoo.org</email> @@ -10,13 +10,18 @@ 3. A compiler infrastructure - LLVM is also a collection of source code that implements the language and compilation strategy. The primary components of the LLVM infrastructure are a GCC-based C and C++ front-end, a link-time optimization framework with a growing set of global and interprocedural analyses and transformations, static back-ends for many popular (and some obscure) architectures, a back-end which emits portable C code, and a Just-In-Time compilers for several architectures. 4. LLVM does not imply things that you would expect from a high-level virtual machine. It does not require garbage collection or run-time code generation (In fact, LLVM makes a great static compiler!). Note that optional LLVM components can be used to build high-level virtual machines and other systems that need these services.</longdescription> <use> + <flag name="binutils-plugin">Build the binutils plugin</flag> + <flag name="debuginfod">Install llvm-debuginfod (requires <pkg>net-misc/curl</pkg> and <pkg>dev-cpp/cpp-httplib</pkg>)</flag> <flag name="doc">Build and install the HTML documentation and regenerate the man pages</flag> <flag name="exegesis">Enable performance counter support for llvm-exegesis tool that can be used to measure host machine instruction characteristics</flag> - <flag name="gold">Build the gold linker plugin</flag> <flag name="ncurses">Support querying terminal properties using ncurses' terminfo</flag> <flag name="xar">Support dumping LLVM bitcode sections in Mach-O files (uses <pkg>app-arch/xar</pkg>)</flag> <flag name="z3">Enable support for <pkg>sci-mathematics/z3</pkg> constraint solver</flag> </use> + <upstream> + <remote-id type="github">llvm/llvm-project</remote-id> + <remote-id type="cpe">cpe:/a:llvm:llvm</remote-id> + </upstream> </pkgmetadata> diff --git a/sys-devel/llvmgold/llvmgold-11.ebuild b/sys-devel/llvmgold/llvmgold-15.ebuild index db2354e9c210..484ce44cf3f7 100644 --- a/sys-devel/llvmgold/llvmgold-11.ebuild +++ b/sys-devel/llvmgold/llvmgold-15.ebuild @@ -1,21 +1,20 @@ -# 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="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-10.ebuild b/sys-devel/llvmgold/llvmgold-16.ebuild index 065dea585bc2..5eca5d655d97 100644 --- a/sys-devel/llvmgold/llvmgold-10.ebuild +++ b/sys-devel/llvmgold/llvmgold-16.ebuild @@ -1,21 +1,20 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2023 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 x86 ~amd64-linux" -IUSE="" - -RDEPEND="sys-devel/llvm:${PV}[gold] - !sys-devel/llvm:0" +KEYWORDS="amd64 arm arm64 ~loong ~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-12.ebuild b/sys-devel/llvmgold/llvmgold-17.ebuild index 2237d20d0a2c..ad52f2c99dcd 100644 --- a/sys-devel/llvmgold/llvmgold-12.ebuild +++ b/sys-devel/llvmgold/llvmgold-17.ebuild @@ -1,20 +1,20 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 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" - -RDEPEND="sys-devel/llvm:${PV}[gold] - !sys-devel/llvm:0" +KEYWORDS="amd64 arm arm64 ~loong ~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-18.ebuild b/sys-devel/llvmgold/llvmgold-18.ebuild new file mode 100644 index 000000000000..c169127837a0 --- /dev/null +++ b/sys-devel/llvmgold/llvmgold-18.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2024 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/" +S=${WORKDIR} + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux" + +RDEPEND=" + sys-devel/llvm:${PV}[binutils-plugin] + !sys-devel/llvm:0 +" + +src_install() { + dodir "/usr/${CHOST}/binutils-bin/lib/bfd-plugins" + dosym "../../../../lib/llvm/${PV}/$(get_libdir)/LLVMgold.so" \ + "/usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so" +} diff --git a/sys-devel/llvmgold/llvmgold-13.ebuild b/sys-devel/llvmgold/llvmgold-19.ebuild index 3bb1b5358af3..cc4a41d311fc 100644 --- a/sys-devel/llvmgold/llvmgold-13.ebuild +++ b/sys-devel/llvmgold/llvmgold-19.ebuild @@ -1,22 +1,19 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 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="" -IUSE="" -PROPERTIES="live" - -RDEPEND="sys-devel/llvm:${PV}[gold] - !sys-devel/llvm:0" -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/metadata.xml b/sys-devel/llvmgold/metadata.xml index 89c4bdb96049..072910296ca3 100644 --- a/sys-devel/llvmgold/metadata.xml +++ b/sys-devel/llvmgold/metadata.xml @@ -1,7 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>llvm@gentoo.org</email> </maintainer> + <upstream> + <remote-id type="github">llvm/llvm-project</remote-id> + </upstream> </pkgmetadata> diff --git a/sys-devel/m4/Manifest b/sys-devel/m4/Manifest index b703cf937046..90afb460c0a7 100644 --- a/sys-devel/m4/Manifest +++ b/sys-devel/m4/Manifest @@ -1 +1,3 @@ -DIST m4-1.4.18.tar.xz 1207688 BLAKE2B debfaa4d25af6f583e2cd703e77b73775790f48f34e878eddd820c6b244a065c69495473ce5067be1f20ca07b2d6af9f90cffd33e12c18fd719c0d234eb5462a SHA512 06f583efc3855cd8477d8347544f4ae5153a3e50aea74d21968afa7214784ea3ddfc02d0a2b11324120d76a19f2e804d20de11a456b5da929eb6ae469519b174 +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 000000000000..d5243357928b --- /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/m4-1.4.18-darwin17-printf-n.patch b/sys-devel/m4/files/m4-1.4.18-darwin17-printf-n.patch deleted file mode 100644 index 1c77ed773c28..000000000000 --- a/sys-devel/m4/files/m4-1.4.18-darwin17-printf-n.patch +++ /dev/null @@ -1,30 +0,0 @@ -http://lists.gnu.org/archive/html/bug-gnulib/2017-07/txtmumXtpD69v.txt - -extract of only the relevant hunk to avoid irrelevant conflicts - -From c41f233c4c38e84023a16339782ee306f03e7f59 Mon Sep 17 00:00:00 2001 -From: Paul Eggert <address@hidden> -Date: Fri, 7 Jul 2017 14:10:20 -0700 -Subject: [PATCH] vasnprintf: port to macOS 10.13 - -Problem reported by comex in: -http://lists.gnu.org/archive/html/bug-gnulib/2017-07/msg00056.html -* lib/vasnprintf.c (VASNPRINTF): Don’t use %n on macOS. - -diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c -index 9c2af0e..fecaf27 100644 ---- a/lib/vasnprintf.c -+++ b/lib/vasnprintf.c -@@ -4869,7 +4869,11 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, - #endif - *fbp = dp->conversion; - #if USE_SNPRINTF --# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) -+# if ! (((__GLIBC__ > 2 \ -+ || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) \ -+ && !defined __UCLIBC__) \ -+ || (defined __APPLE__ && defined __MACH__) \ -+ || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) - fbp[1] = '%'; - fbp[2] = 'n'; - fbp[3] = '\0'; diff --git a/sys-devel/m4/files/m4-1.4.18-glibc228.patch b/sys-devel/m4/files/m4-1.4.18-glibc228.patch deleted file mode 100644 index 6b5593bfa639..000000000000 --- a/sys-devel/m4/files/m4-1.4.18-glibc228.patch +++ /dev/null @@ -1,310 +0,0 @@ -Fix build failure on glibc-2.28: - fseeko.c: In function 'rpl_fseeko': - fseeko.c:110:4: error: #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib." - #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib." - -Patch by milan hodoscek. - -https://bugs.gentoo.org/663924 ---- a/old/stdio-impl.h -+++ b/lib/stdio-impl.h -@@ -1,5 +1,5 @@ - /* Implementation details of FILE streams. -- Copyright (C) 2007-2008, 2010-2016 Free Software Foundation, Inc. -+ Copyright (C) 2007-2008, 2010-2018 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by -@@ -12,12 +12,18 @@ - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. */ -+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ - - /* Many stdio implementations have the same logic and therefore can share - the same implementation of stdio extension API, except that some fields - have different naming conventions, or their access requires some casts. */ - -+/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this -+ problem by defining it ourselves. FIXME: Do not rely on glibc -+ internals. */ -+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN -+# define _IO_IN_BACKUP 0x100 -+#endif - - /* BSD stdio derived implementations. */ - -@@ -29,10 +35,10 @@ - #include <errno.h> /* For detecting Plan9. */ - - #if defined __sferror || defined __DragonFly__ || defined __ANDROID__ -- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */ -+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ - - # if defined __DragonFly__ /* DragonFly */ -- /* See <http://www.dragonflybsd.org/cvsweb/src/lib/libc/stdio/priv_stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>. */ -+ /* See <https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/lib/libc/stdio/priv_stdio.h>. */ - # define fp_ ((struct { struct __FILE_public pub; \ - struct { unsigned char *_base; int _size; } _bf; \ - void *cookie; \ -@@ -49,30 +55,84 @@ - fpos_t _offset; \ - /* More fields, not relevant here. */ \ - } *) fp) -- /* See <http://www.dragonflybsd.org/cvsweb/src/include/stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>. */ -+ /* See <https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/include/stdio.h>. */ - # define _p pub._p - # define _flags pub._flags - # define _r pub._r - # define _w pub._w -+# elif defined __ANDROID__ /* Android */ -+ /* Up to this commit from 2015-10-12 -+ <https://android.googlesource.com/platform/bionic.git/+/f0141dfab10a4b332769d52fa76631a64741297a> -+ the innards of FILE were public, and fp_ub could be defined like for OpenBSD, -+ see <https://android.googlesource.com/platform/bionic.git/+/e78392637d5086384a5631ddfdfa8d7ec8326ee3/libc/stdio/fileext.h> -+ and <https://android.googlesource.com/platform/bionic.git/+/e78392637d5086384a5631ddfdfa8d7ec8326ee3/libc/stdio/local.h>. -+ After this commit, the innards of FILE are hidden. */ -+# define fp_ ((struct { unsigned char *_p; \ -+ int _r; \ -+ int _w; \ -+ int _flags; \ -+ int _file; \ -+ struct { unsigned char *_base; size_t _size; } _bf; \ -+ int _lbfsize; \ -+ void *_cookie; \ -+ void *_close; \ -+ void *_read; \ -+ void *_seek; \ -+ void *_write; \ -+ struct { unsigned char *_base; size_t _size; } _ext; \ -+ unsigned char *_up; \ -+ int _ur; \ -+ unsigned char _ubuf[3]; \ -+ unsigned char _nbuf[1]; \ -+ struct { unsigned char *_base; size_t _size; } _lb; \ -+ int _blksize; \ -+ fpos_t _offset; \ -+ /* More fields, not relevant here. */ \ -+ } *) fp) - # else - # define fp_ fp - # endif - --# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __ANDROID__ /* NetBSD >= 1.5ZA, OpenBSD, Android */ -+# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __minix /* NetBSD >= 1.5ZA, OpenBSD, Minix 3 */ - /* See <http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup> -- and <http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup> */ -+ and <https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup> -+ and <https://github.com/Stichting-MINIX-Research-Foundation/minix/blob/master/lib/libc/stdio/fileext.h> */ - struct __sfileext - { - struct __sbuf _ub; /* ungetc buffer */ - /* More fields, not relevant here. */ - }; - # define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub --# else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, Mac OS X, Cygwin, Android */ -+# elif defined __ANDROID__ /* Android */ -+ struct __sfileext -+ { -+ struct { unsigned char *_base; size_t _size; } _ub; /* ungetc buffer */ -+ /* More fields, not relevant here. */ -+ }; -+# define fp_ub ((struct __sfileext *) fp_->_ext._base)->_ub -+# else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, Mac OS X, Cygwin */ - # define fp_ub fp_->_ub - # endif - - # define HASUB(fp) (fp_ub._base != NULL) - -+# if defined __ANDROID__ /* Android */ -+ /* Needed after this commit from 2016-01-25 -+ <https://android.googlesource.com/platform/bionic.git/+/e70e0e9267d069bf56a5078c99307e08a7280de7> */ -+# ifndef __SEOF -+# define __SLBF 1 -+# define __SNBF 2 -+# define __SRD 4 -+# define __SWR 8 -+# define __SRW 0x10 -+# define __SEOF 0x20 -+# define __SERR 0x40 -+# endif -+# ifndef __SOFF -+# define __SOFF 0x1000 -+# endif -+# endif -+ - #endif - - -@@ -81,7 +141,7 @@ - #ifdef __TANDEM /* NonStop Kernel */ - # ifndef _IOERR - /* These values were determined by the program 'stdioext-flags' at -- <http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00165.html>. */ -+ <https://lists.gnu.org/r/bug-gnulib/2010-12/msg00165.html>. */ - # define _IOERR 0x40 - # define _IOREAD 0x80 - # define _IOWRT 0x4 -@@ -99,6 +159,8 @@ - int _file; \ - unsigned int _flag; \ - } *) fp) -+# elif defined __VMS /* OpenVMS */ -+# define fp_ ((struct _iobuf *) fp) - # else - # define fp_ fp - # endif -@@ -110,7 +172,7 @@ - # define _flag __flag - # endif - --#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* newer Windows with MSVC */ -+#elif defined _WIN32 && ! defined __CYGWIN__ /* newer Windows with MSVC */ - - /* <stdio.h> does not define the innards of FILE any more. */ - # define WINDOWS_OPAQUE_FILE -@@ -130,7 +192,7 @@ struct _gl_real_FILE - # define fp_ ((struct _gl_real_FILE *) fp) - - /* These values were determined by a program similar to the one at -- <http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00165.html>. */ -+ <https://lists.gnu.org/r/bug-gnulib/2010-12/msg00165.html>. */ - # define _IOREAD 0x1 - # define _IOWRT 0x2 - # define _IORW 0x4 ---- a/old/fseeko.c -+++ b/lib/fseeko.c -@@ -1,5 +1,5 @@ - /* An fseeko() function that, together with fflush(), is POSIX compliant. -- Copyright (C) 2007-2016 Free Software Foundation, Inc. -+ Copyright (C) 2007-2018 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by -@@ -12,7 +12,7 @@ - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along -- with this program; if not, see <http://www.gnu.org/licenses/>. */ -+ with this program; if not, see <https://www.gnu.org/licenses/>. */ - - #include <config.h> - -@@ -33,9 +33,9 @@ fseeko (FILE *fp, off_t offset, int whence) - #endif - #if _GL_WINDOWS_64_BIT_OFF_T - # undef fseeko --# if HAVE__FSEEKI64 /* msvc, mingw64 */ -+# if HAVE__FSEEKI64 && HAVE_DECL__FSEEKI64 /* msvc, mingw since msvcrt8.0, mingw64 */ - # define fseeko _fseeki64 --# else /* mingw */ -+# else /* mingw before msvcrt8.0 */ - # define fseeko fseeko64 - # endif - #endif -@@ -47,12 +47,13 @@ fseeko (FILE *fp, off_t offset, int whence) - #endif - - /* These tests are based on fpurge.c. */ --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 -+ /* GNU libc, BeOS, Haiku, Linux libc5 */ - if (fp->_IO_read_end == fp->_IO_read_ptr - && fp->_IO_write_ptr == fp->_IO_write_base - && fp->_IO_save_base == NULL) - #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ -- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */ -+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ - # if defined __SL64 && defined __SCLE /* Cygwin */ - if ((fp->_flags & __SL64) == 0) - { -@@ -80,7 +81,7 @@ fseeko (FILE *fp, off_t offset, int whence) - #elif defined __minix /* Minix */ - if (fp_->_ptr == fp_->_buf - && (fp_->_ptr == NULL || fp_->_count == 0)) --#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */ -+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */ - if (fp_->_ptr == fp_->_base - && (fp_->_ptr == NULL || fp_->_cnt == 0)) - #elif defined __UCLIBC__ /* uClibc */ -@@ -117,18 +118,19 @@ fseeko (FILE *fp, off_t offset, int whence) - if (pos == -1) - { - #if defined __sferror || defined __DragonFly__ || defined __ANDROID__ -- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */ -+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ - fp_->_flags &= ~__SOFF; - #endif - return -1; - } - --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 -+ /* GNU libc, BeOS, Haiku, Linux libc5 */ - fp->_flags &= ~_IO_EOF_SEEN; - fp->_offset = pos; - #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ -- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */ --# if defined __CYGWIN__ || (defined __NetBSD__ && __NetBSD_Version__ >= 600000000) -+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ -+# if defined __CYGWIN__ || (defined __NetBSD__ && __NetBSD_Version__ >= 600000000) || defined __minix - /* fp_->_offset is typed as an integer. */ - fp_->_offset = pos; - # else -@@ -150,7 +152,7 @@ fseeko (FILE *fp, off_t offset, int whence) - fp_->_flags &= ~__SEOF; - #elif defined __EMX__ /* emx+gcc */ - fp->_flags &= ~_IOEOF; --#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */ -+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */ - fp_->_flag &= ~_IOEOF; - #elif defined __MINT__ /* Atari FreeMiNT */ - fp->__offset = pos; ---- a/old/freadahead.c -+++ b/lib/freadahead.c -@@ -1,5 +1,5 @@ - /* Retrieve information about a FILE stream. -- Copyright (C) 2007-2016 Free Software Foundation, Inc. -+ Copyright (C) 2007-2018 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by -@@ -12,7 +12,7 @@ - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. */ -+ along with this program. If not, see <https://www.gnu.org/licenses/>. */ - - #include <config.h> - -@@ -22,17 +22,26 @@ - #include <stdlib.h> - #include "stdio-impl.h" - -+#if defined __DragonFly__ -+/* Defined in libc, but not declared in <stdio.h>. */ -+extern size_t __sreadahead (FILE *); -+#endif -+ -+/* This file is not used on systems that have the __freadahead function, -+ namely musl libc. */ -+ - size_t - freadahead (FILE *fp) - { --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 -+ /* GNU libc, BeOS, Haiku, Linux libc5 */ - if (fp->_IO_write_ptr > fp->_IO_write_base) - return 0; - return (fp->_IO_read_end - fp->_IO_read_ptr) - + (fp->_flags & _IO_IN_BACKUP ? fp->_IO_save_end - fp->_IO_save_base : - 0); - #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ -- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */ -+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ - if ((fp_->_flags & __SWR) != 0 || fp_->_r < 0) - return 0; - # if defined __DragonFly__ diff --git a/sys-devel/m4/files/m4-1.4.19-fortify-source.patch b/sys-devel/m4/files/m4-1.4.19-fortify-source.patch new file mode 100644 index 000000000000..d07fe620c3df --- /dev/null +++ b/sys-devel/m4/files/m4-1.4.19-fortify-source.patch @@ -0,0 +1,50 @@ +https://lists.gnu.org/archive/html/m4-patches/2023-01/msg00001.html +https://bugs.gentoo.org/890273 + +From 960b9b4d0774f78d286932251d6f53f638aefb19 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Mon, 9 Jan 2023 08:00:34 +0000 +Subject: [PATCH] build: Don't add _FORTIFY_SOURCE if already set by + user/toolchain + +Newer toolchains (GCC 12+ or Clang 9+, glibc-2.34) allow _FORTIFY_SOURCE=3. + +The current macro used in configure.ac will forcefully downgrade to F_S=2 +and emit a warning if the user set something else: +``` +x86_64-pc-linux-gnu-gcc -DEXEEXT=\"\" -I. -I../lib -DIN_M4_GNULIB_TESTS=1 -I. -I. -I.. -I./.. -I../lib -I./../lib -O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -Wreturn-type -ggdb3 -Werror=implicit-function-declaration -Werror=implicit-int -c -o glthread/thread.o glthread/thread.c +In file included from glthread/thread.c:20: +../lib/config.h:202: warning: "_FORTIFY_SOURCE" redefined + 202 | # define _FORTIFY_SOURCE 2 + | +<built-in>: note: this is the location of the previous definition +``` + +See: 390d259efe8e1c7e4b6babb4738fef7427416857 +Signed-off-by: Sam James <sam@gentoo.org> +--- a/configure.ac ++++ b/configure.ac +@@ -133,7 +133,9 @@ if test "$gl_gcc_warnings" = yes; then + [/* Enable compile-time and run-time bounds-checking, and some warnings, + without upsetting newer glibc. */ + #if defined __OPTIMIZE__ && __OPTIMIZE__ +- # define _FORTIFY_SOURCE 2 ++ # ifndef _FORTIFY_SOURCE ++ # define _FORTIFY_SOURCE 2 ++ # endif + #endif + ]) + fi +--- a/lib/config.hin ++++ b/lib/config.hin +@@ -198,7 +198,9 @@ + /* Enable compile-time and run-time bounds-checking, and some warnings, + without upsetting newer glibc. */ + #if defined __OPTIMIZE__ && __OPTIMIZE__ +- # define _FORTIFY_SOURCE 2 ++ # ifndef _FORTIFY_SOURCE ++ # define _FORTIFY_SOURCE 2 ++ # endif + #endif + + diff --git a/sys-devel/m4/files/m4-1.4.19-make-4.4-tests.patch b/sys-devel/m4/files/m4-1.4.19-make-4.4-tests.patch new file mode 100644 index 000000000000..f7bc3f0e9b35 --- /dev/null +++ b/sys-devel/m4/files/m4-1.4.19-make-4.4-tests.patch @@ -0,0 +1,38 @@ +https://bugs.gentoo.org/879061 + +https://savannah.gnu.org/bugs/index.php?63307 (make bug) +https://savannah.gnu.org/support/?110767 (M4 bug) + +https://lists.gnu.org/archive/html/bug-m4/2022-11/msg00003.html +https://savannah.gnu.org/support/download.php?file_id=53951 + +From ed64def45d68b2af53f1d3d783cc98e9dbe2ff74 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Sat, 12 Nov 2022 15:18:41 +0100 +Subject: [PATCH] test-execute-main.c: set default handler for SIGPIPE in tests + 3 and 4 + +make 4.4 sets this to SIG_IGN and the tests fail + +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- a/tests/test-execute-main.c ++++ b/tests/test-execute-main.c +@@ -132,6 +132,7 @@ main (int argc, char *argv[]) + #if !(defined _WIN32 && !defined __CYGWIN__) + { + /* Check SIGPIPE handling with ignore_sigpipe = false. */ ++ signal(SIGPIPE, SIG_DFL); + const char *prog_argv[3] = { prog_path, "3", NULL }; + int termsig = 0x7DEADBEE; + int ret = execute (progname, prog_argv[0], prog_argv, NULL, +@@ -145,6 +146,7 @@ main (int argc, char *argv[]) + #if !(defined _WIN32 && !defined __CYGWIN__) + { + /* Check SIGPIPE handling with ignore_sigpipe = true. */ ++ signal(SIGPIPE, SIG_DFL); + const char *prog_argv[3] = { prog_path, "4", NULL }; + int termsig = 0x7DEADBEE; + int ret = execute (progname, prog_argv[0], prog_argv, NULL, +-- +2.30.2 + diff --git a/sys-devel/m4/files/m4-1.4.19-race-condition-tests.patch b/sys-devel/m4/files/m4-1.4.19-race-condition-tests.patch new file mode 100644 index 000000000000..c212777dcd3e --- /dev/null +++ b/sys-devel/m4/files/m4-1.4.19-race-condition-tests.patch @@ -0,0 +1,34 @@ +https://lists.gnu.org/archive/html/bug-m4/2022-12/msg00000.html +https://lists.gnu.org/archive/html/bug-m4/2022-12/txtmGJxjX3osy.txt + +Fix a sporadic failure of the test-posix_spawn-script test. + +From a3efddb96f5f121b8a5bb1310dc82407546fd255 Mon Sep 17 00:00:00 2001 +From: Paul Eggert <eggert@cs.ucla.edu> +Date: Thu, 22 Dec 2022 21:19:34 -0800 +Subject: [PATCH] posix_spawnp-tests: fix filename typo + +Problem reported for GNU m4 by Mitchell Dorrell in: +https://lists.gnu.org/r/bug-m4/2022-12/msg00000.html +* tests/test-posix_spawnp-script.c (DATA_FILENAME): +Fix typo in file name that caused race with +test-posix_spawn-script.c. +--- + tests/test-posix_spawnp-script.c | 2 +- + 2 files changed, 10 insertions(+), 1 deletion(-) + +diff --git a/tests/test-posix_spawnp-script.c b/tests/test-posix_spawnp-script.c +index 1e5fc5c110..d2035ed63e 100644 +--- a/tests/test-posix_spawnp-script.c ++++ b/tests/test-posix_spawnp-script.c +@@ -28,7 +28,7 @@ + + #include "macros.h" + +-#define DATA_FILENAME "test-posix_spawn-script.tmp" ++#define DATA_FILENAME "test-posix_spawnp-script.tmp" + + int + main () +-- +2.25.1 diff --git a/sys-devel/m4/files/ppc-musl.patch b/sys-devel/m4/files/ppc-musl.patch new file mode 100644 index 000000000000..4aff0ba1cf5c --- /dev/null +++ b/sys-devel/m4/files/ppc-musl.patch @@ -0,0 +1,19 @@ +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; + /* both should be equivalent */ + # if 0 + # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.regs->gpr[1] +-# else ++# elif defined(__GLIBC__) + # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.uc_regs->gregs[1] ++# else ++# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.gregs[1] + # endif + # endif + diff --git a/sys-devel/m4/m4-1.4.18-r2.ebuild b/sys-devel/m4/m4-1.4.18-r2.ebuild deleted file mode 100644 index 6350bc24bdca..000000000000 --- a/sys-devel/m4/m4-1.4.18-r2.ebuild +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DESCRIPTION="GNU macro processor" -HOMEPAGE="https://www.gnu.org/software/m4/m4.html" -SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" - -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" -IUSE="examples" - -# remember: cannot dep on autoconf since it needs us -BDEPEND="app-arch/xz-utils" - -PATCHES=( - "${FILESDIR}"/${P}-darwin17-printf-n.patch - "${FILESDIR}"/${P}-glibc228.patch #663924 -) - -src_configure() { - local -a myeconfargs=( - --enable-changeword - - # Disable automagic dependency over libsigsegv; see bug #278026 - ac_cv_libsigsegv=no - ) - - [[ ${USERLAND} != GNU ]] && myeconfargs+=( --program-prefix=g ) - - econf "${myeconfargs[@]}" -} - -src_test() { - [[ -d /none ]] && die "m4 tests will fail with /none/" #244396 - emake check -} - -src_install() { - default - # autoconf-2.60 for instance, first checks gm4, then m4. If we don't have - # gm4, it might find gm4 from outside the prefix on for instance Darwin - use prefix && dosym m4 /usr/bin/gm4 - if use examples ; then - dodoc -r examples - rm -f "${ED}"/usr/share/doc/${PF}/examples/Makefile* - fi -} diff --git a/sys-devel/m4/m4-1.4.19-r2.ebuild b/sys-devel/m4/m4-1.4.19-r2.ebuild new file mode 100644 index 000000000000..6c21702d71ba --- /dev/null +++ b/sys-devel/m4/m4-1.4.19-r2.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/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 + MY_P="${PN}-1.4.18d" + 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" + 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 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi + +LICENSE="GPL-3" +SLOT="0" +IUSE="examples nls" + +RDEPEND=" + virtual/libiconv + nls? ( + sys-devel/gettext + virtual/libintl + )" +DEPEND="${RDEPEND}" +# Remember: cannot dep on autoconf since it needs us +BDEPEND="app-arch/xz-utils + nls? ( sys-devel/gettext ) + verify-sig? ( sec-keys/openpgp-keys-m4 )" + +PATCHES=( + "${FILESDIR}"/ppc-musl.patch + "${FILESDIR}"/loong-fix-build.patch + "${FILESDIR}"/${PN}-1.4.19-make-4.4-tests.patch + "${WORKDIR}"/${P}-test-198-sysval-r1.patch + "${FILESDIR}"/${P}-fortify-source.patch + "${FILESDIR}"/${P}-race-condition-tests.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 +} + +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=( + --enable-changeword + + --with-packager="Gentoo Linux" + --with-packager-version="${PVR}" + --with-packager-bug-reports="https://bugs.gentoo.org/" + + $(usex nls '' '--disable-nls') + + # Disable automagic dependency over libsigsegv; see bug #278026 + ac_cv_libsigsegv=no + ) + + econf "${myeconfargs[@]}" +} + +src_test() { + [[ -d /none ]] && die "m4 tests will fail with /none/" #244396 + emake check +} + +src_install() { + default + + # autoconf-2.60 for instance, first checks gm4, then m4. If we don't have + # gm4, it might find gm4 from outside the prefix on for instance Darwin + use prefix && dosym m4 /usr/bin/gm4 + + if use examples ; then + dodoc -r examples + rm -f "${ED}"/usr/share/doc/${PF}/examples/Makefile* + fi +} diff --git a/sys-devel/m4/metadata.xml b/sys-devel/m4/metadata.xml index 56c124413057..dce0ffc83fe5 100644 --- a/sys-devel/m4/metadata.xml +++ b/sys-devel/m4/metadata.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!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> + <upstream> + <remote-id type="savannah">m4</remote-id> + </upstream> </pkgmetadata> diff --git a/sys-devel/make/Manifest b/sys-devel/make/Manifest deleted file mode 100644 index df3d822af62d..000000000000 --- a/sys-devel/make/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST make-4.2.1.tar.bz2 1407126 BLAKE2B fa6d43f5fd46182182a296c58dcd138a1a4568104eda760bbb3c241c023dee216789cf3128e5ac2b416cec76e1ba82d5b5e7852da12e86138a7d0865c85a42b4 SHA512 9cf00869a2f938492554f71d8cb288b5b009b3bd0489ef164f2c8f6532fc37db5c7e20af1dea288536e7c9710ee0bc6e1ddcdfc4928a8540e6e43661741825b8 -DIST make-4.3.tar.gz 2317073 BLAKE2B 5a82ce1f30eb034366ac3b87d2ec6698aae17d7b1a611941cf42136b2453b34236ab55382eab0a593c43cee8b036ba4a054f966c41ba766fdbd2862942be5dff SHA512 9a1185cc468368f4ec06478b1cfa343bf90b5cd7c92c0536567db0315b0ee909af53ecce3d44cfd93dd137dbca1ed13af5713e8663590c4fdd21ea635d78496b 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 deleted file mode 100644 index d2f60ec91cc0..000000000000 --- a/sys-devel/make/files/make-3.82-darwin-library_search-dylib.patch +++ /dev/null @@ -1,17 +0,0 @@ -Fixed default libpatttern on Darwin, imported from prefix overlay. -Got merged upstream: -https://savannah.gnu.org/bugs/?37197 ---- a/default.c -+++ b/default.c -@@ -509,7 +509,11 @@ - #ifdef __MSDOS__ - ".LIBPATTERNS", "lib%.a $(DJDIR)/lib/lib%.a", - #else -+#ifdef __APPLE__ -+ ".LIBPATTERNS", "lib%.dylib lib%.a", -+#else - ".LIBPATTERNS", "lib%.so lib%.a", -+#endif - #endif - #endif - diff --git a/sys-devel/make/files/make-4.2-default-cxx.patch b/sys-devel/make/files/make-4.2-default-cxx.patch deleted file mode 100644 index 4d592086a6ff..000000000000 --- a/sys-devel/make/files/make-4.2-default-cxx.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/default.c b/default.c -index 3d865c7..e8b3ed6 100644 ---- a/default.c -+++ b/default.c -@@ -530,7 +530,7 @@ static const char *default_variables[] = - "OBJC", "gcc", - #else - "CC", "cc", -- "CXX", "g++", -+ "CXX", "c++", - "OBJC", "cc", - #endif - diff --git a/sys-devel/make/files/make-4.2.1-glob-internals.patch b/sys-devel/make/files/make-4.2.1-glob-internals.patch deleted file mode 100644 index 9f70ae2084f0..000000000000 --- a/sys-devel/make/files/make-4.2.1-glob-internals.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 193f1e81edd6b1b56b0eb0ff8aa4b41c7b4257b4 Mon Sep 17 00:00:00 2001 -From: Paul Eggert <eggert@cs.ucla.edu> -Date: Sun, 24 Sep 2017 09:12:58 -0400 -Subject: [PATCH] glob: Do not assume glibc glob internals. - -It has been proposed that glibc glob start using gl_lstat, -which the API allows it to do. GNU 'make' should not get in -the way of this. See: -https://sourceware.org/ml/libc-alpha/2017-09/msg00409.html - -* dir.c (local_lstat): New function, like local_stat. -(dir_setup_glob): Use it to initialize gl_lstat too, as the API -requires. ---- - dir.c | 29 +++++++++++++++++++++++++++-- - 1 file changed, 27 insertions(+), 2 deletions(-) - -diff --git a/dir.c b/dir.c -index adbb8a9..c343e4c 100644 ---- a/dir.c -+++ b/dir.c -@@ -1299,15 +1299,40 @@ local_stat (const char *path, struct stat *buf) - } - #endif - -+/* Similarly for lstat. */ -+#if !defined(lstat) && !defined(WINDOWS32) || defined(VMS) -+# ifndef VMS -+# ifndef HAVE_SYS_STAT_H -+int lstat (const char *path, struct stat *sbuf); -+# endif -+# else -+ /* We are done with the fake lstat. Go back to the real lstat */ -+# ifdef lstat -+# undef lstat -+# endif -+# endif -+# define local_lstat lstat -+#elif defined(WINDOWS32) -+/* Windows doesn't support lstat(). */ -+# define local_lstat local_stat -+#else -+static int -+local_lstat (const char *path, struct stat *buf) -+{ -+ int e; -+ EINTRLOOP (e, lstat (path, buf)); -+ return e; -+} -+#endif -+ - void - dir_setup_glob (glob_t *gl) - { - gl->gl_opendir = open_dirstream; - gl->gl_readdir = read_dirstream; - gl->gl_closedir = free; -+ gl->gl_lstat = local_lstat; - gl->gl_stat = local_stat; -- /* We don't bother setting gl_lstat, since glob never calls it. -- The slot is only there for compatibility with 4.4 BSD. */ - } - - void --- -2.16.1 - diff --git a/sys-devel/make/files/make-4.2.1-glob-v2.patch b/sys-devel/make/files/make-4.2.1-glob-v2.patch deleted file mode 100644 index e55a7790a3f6..000000000000 --- a/sys-devel/make/files/make-4.2.1-glob-v2.patch +++ /dev/null @@ -1,30 +0,0 @@ -http://git.savannah.gnu.org/cgit/make.git/commit/?id=48c8a116a914a325a0497721f5d8b58d5bba34d4 - ---- make-4.2.1/configure 2016-06-11 01:03:21.000000000 +0200 -+++ make-4.2.1/configure 2016-06-11 01:03:21.000000000 +0200 -@@ -11481,10 +11481,9 @@ - #include <glob.h> - #include <fnmatch.h> - --#define GLOB_INTERFACE_VERSION 1 - #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1 - # include <gnu-versions.h> --# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION -+# if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 - gnu glob - # endif - #endif ---- make-4.2.1/configure.ac 2016-06-06 14:27:31.000000000 +0200 -+++ make-4.2.1/configure.ac 2016-06-06 14:27:31.000000000 +0200 -@@ -399,10 +399,9 @@ - #include <glob.h> - #include <fnmatch.h> - --#define GLOB_INTERFACE_VERSION 1 - #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1 - # include <gnu-versions.h> --# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION -+# if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 - gnu glob - # endif - #endif], diff --git a/sys-devel/make/files/make-4.2.1-guile-2.2.patch b/sys-devel/make/files/make-4.2.1-guile-2.2.patch deleted file mode 100644 index b7f9eb50b786..000000000000 --- a/sys-devel/make/files/make-4.2.1-guile-2.2.patch +++ /dev/null @@ -1,320 +0,0 @@ -https://git.savannah.gnu.org/cgit/make.git/commit/?id=fbf71ec25a5986d9003ac16ee9e23675feac9053 -https://bugs.gentoo.org/650608 - ---- make-4.2.1/configure 2016-06-11 01:03:21.000000000 +0200 -+++ make-4.2.1/configure 2016-06-11 01:03:21.000000000 +0200 -@@ -9694,6 +9694,15 @@ - - # See if the user wants to add (or not) GNU Guile support - -+# Check whether --with-guile was given. -+if test "${with_guile+set}" = set; then : -+ withval=$with_guile; -+fi -+ -+ -+# Annoyingly, each version of Guile comes with it's own PC file so we have to -+# specify them as individual packages. Ugh. -+ - - - -@@ -9814,75 +9823,25 @@ - fi - fi - --# Check whether --with-guile was given. --if test "${with_guile+set}" = set; then : -- withval=$with_guile; --fi -- -- --# For some strange reason, at least on Ubuntu, each version of Guile --# comes with it's own PC file so we have to specify them as individual --# packages. Ugh. - if test "x$with_guile" != xno; then : -- --pkg_failed=no --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUILE" >&5 --$as_echo_n "checking for GUILE... " >&6; } -- --if test -n "$GUILE_CFLAGS"; then -- pkg_cv_GUILE_CFLAGS="$GUILE_CFLAGS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"guile-2.0\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "guile-2.0") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then -- pkg_cv_GUILE_CFLAGS=`$PKG_CONFIG --cflags "guile-2.0" 2>/dev/null` -- test "x$?" != "x0" && pkg_failed=yes --else -- pkg_failed=yes --fi -- else -- pkg_failed=untried --fi --if test -n "$GUILE_LIBS"; then -- pkg_cv_GUILE_LIBS="$GUILE_LIBS" -- elif test -n "$PKG_CONFIG"; then -+ guile_versions="2.2 2.0 1.8" -+ guile_version=no -+ have_guile=no -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Guile" >&5 -+$as_echo_n "checking for GNU Guile... " >&6; } -+ for v in $guile_versions; do - if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"guile-2.0\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "guile-2.0") 2>&5 -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"guile-\$v\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "guile-$v") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then -- pkg_cv_GUILE_LIBS=`$PKG_CONFIG --libs "guile-2.0" 2>/dev/null` -- test "x$?" != "x0" && pkg_failed=yes --else -- pkg_failed=yes -+ guile_version=$v; have_guile=yes; break - fi -- else -- pkg_failed=untried --fi -- -- -- --if test $pkg_failed = yes; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- --if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -- _pkg_short_errors_supported=yes --else -- _pkg_short_errors_supported=no --fi -- if test $_pkg_short_errors_supported = yes; then -- GUILE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "guile-2.0" 2>&1` -- else -- GUILE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "guile-2.0" 2>&1` -- fi -- # Put the nasty error message in config.log where it belongs -- echo "$GUILE_PKG_ERRORS" >&5 -- -+ done -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $guile_version" >&5 -+$as_echo "$guile_version" >&6; } -+ if test "$have_guile" = yes; then - - pkg_failed=no - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUILE" >&5 -@@ -9892,12 +9851,12 @@ - pkg_cv_GUILE_CFLAGS="$GUILE_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"guile-1.8\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "guile-1.8") 2>&5 -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"guile-\$guile_version\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "guile-$guile_version") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then -- pkg_cv_GUILE_CFLAGS=`$PKG_CONFIG --cflags "guile-1.8" 2>/dev/null` -+ pkg_cv_GUILE_CFLAGS=`$PKG_CONFIG --cflags "guile-$guile_version" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes - else - pkg_failed=yes -@@ -9909,12 +9868,12 @@ - pkg_cv_GUILE_LIBS="$GUILE_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"guile-1.8\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "guile-1.8") 2>&5 -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"guile-\$guile_version\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "guile-$guile_version") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then -- pkg_cv_GUILE_LIBS=`$PKG_CONFIG --libs "guile-1.8" 2>/dev/null` -+ pkg_cv_GUILE_LIBS=`$PKG_CONFIG --libs "guile-$guile_version" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes - else - pkg_failed=yes -@@ -9935,113 +9894,50 @@ - _pkg_short_errors_supported=no - fi - if test $_pkg_short_errors_supported = yes; then -- GUILE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "guile-1.8" 2>&1` -+ GUILE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "guile-$guile_version" 2>&1` - else -- GUILE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "guile-1.8" 2>&1` -+ GUILE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "guile-$guile_version" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$GUILE_PKG_ERRORS" >&5 - -- have_guile=no --elif test $pkg_failed = untried; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- have_guile=no --else -- GUILE_CFLAGS=$pkg_cv_GUILE_CFLAGS -- GUILE_LIBS=$pkg_cv_GUILE_LIBS -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -- have_guile=yes --fi --elif test $pkg_failed = untried; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -+ as_fn_error $? "Package requirements (guile-$guile_version) were not met: - --pkg_failed=no --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUILE" >&5 --$as_echo_n "checking for GUILE... " >&6; } -+$GUILE_PKG_ERRORS - --if test -n "$GUILE_CFLAGS"; then -- pkg_cv_GUILE_CFLAGS="$GUILE_CFLAGS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"guile-1.8\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "guile-1.8") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then -- pkg_cv_GUILE_CFLAGS=`$PKG_CONFIG --cflags "guile-1.8" 2>/dev/null` -- test "x$?" != "x0" && pkg_failed=yes --else -- pkg_failed=yes --fi -- else -- pkg_failed=untried --fi --if test -n "$GUILE_LIBS"; then -- pkg_cv_GUILE_LIBS="$GUILE_LIBS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"guile-1.8\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "guile-1.8") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then -- pkg_cv_GUILE_LIBS=`$PKG_CONFIG --libs "guile-1.8" 2>/dev/null` -- test "x$?" != "x0" && pkg_failed=yes --else -- pkg_failed=yes --fi -- else -- pkg_failed=untried --fi -- -- -- --if test $pkg_failed = yes; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- --if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -- _pkg_short_errors_supported=yes --else -- _pkg_short_errors_supported=no --fi -- if test $_pkg_short_errors_supported = yes; then -- GUILE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "guile-1.8" 2>&1` -- else -- GUILE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "guile-1.8" 2>&1` -- fi -- # Put the nasty error message in config.log where it belongs -- echo "$GUILE_PKG_ERRORS" >&5 -+Consider adjusting the PKG_CONFIG_PATH environment variable if you -+installed software in a non-standard prefix. - -- have_guile=no -+Alternatively, you may set the environment variables GUILE_CFLAGS -+and GUILE_LIBS to avoid the need to call pkg-config. -+See the pkg-config man page for more details." "$LINENO" 5 - elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 - $as_echo "no" >&6; } -- have_guile=no --else -- GUILE_CFLAGS=$pkg_cv_GUILE_CFLAGS -- GUILE_LIBS=$pkg_cv_GUILE_LIBS -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -- have_guile=yes --fi -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -+is in your PATH or set the PKG_CONFIG environment variable to the full -+path to pkg-config. -+ -+Alternatively, you may set the environment variables GUILE_CFLAGS -+and GUILE_LIBS to avoid the need to call pkg-config. -+See the pkg-config man page for more details. -+ -+To get pkg-config, see <http://pkg-config.freedesktop.org/>. -+See \`config.log' for more details" "$LINENO" 5; } - else - GUILE_CFLAGS=$pkg_cv_GUILE_CFLAGS - GUILE_LIBS=$pkg_cv_GUILE_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 - $as_echo "yes" >&6; } -- have_guile=yes --fi - - fi - --if test "$have_guile" = yes; then : -- - $as_echo "#define HAVE_GUILE 1" >>confdefs.h - -+ fi -+ - fi - - if test "$have_guile" = yes; then ---- make-4.2.1/configure.ac 2016-06-06 14:27:31.000000000 +0200 -+++ make-4.2.1/configure.ac 2016-06-06 14:27:31.000000000 +0200 -@@ -160,22 +160,28 @@ - AC_FUNC_CLOSEDIR_VOID - - # See if the user wants to add (or not) GNU Guile support --PKG_PROG_PKG_CONFIG - AC_ARG_WITH([guile], [AS_HELP_STRING([--with-guile], - [Support GNU Guile for embedded scripting])]) - --# For some strange reason, at least on Ubuntu, each version of Guile --# comes with it's own PC file so we have to specify them as individual --# packages. Ugh. -+# Annoyingly, each version of Guile comes with it's own PC file so we have to -+# specify them as individual packages. Ugh. -+PKG_PROG_PKG_CONFIG -+ - AS_IF([test "x$with_guile" != xno], --[ PKG_CHECK_MODULES([GUILE], [guile-2.0], [have_guile=yes], -- [PKG_CHECK_MODULES([GUILE], [guile-1.8], [have_guile=yes], -- [have_guile=no])]) -+[ guile_versions="2.2 2.0 1.8" -+ guile_version=no -+ have_guile=no -+ AC_MSG_CHECKING([for GNU Guile]) -+ for v in $guile_versions; do -+ PKG_CHECK_EXISTS([guile-$v], [guile_version=$v; have_guile=yes; break], []) -+ done -+ AC_MSG_RESULT([$guile_version]) -+ if test "$have_guile" = yes; then -+ PKG_CHECK_MODULES(GUILE, [guile-$guile_version]) -+ AC_DEFINE([HAVE_GUILE], [1], [Embed GNU Guile support]) -+ fi - ]) - --AS_IF([test "$have_guile" = yes], -- [AC_DEFINE([HAVE_GUILE], [1], [Embed GNU Guile support])]) -- - AM_CONDITIONAL([HAVE_GUILE], [test "$have_guile" = yes]) - - AC_FUNC_GETLOADAVG diff --git a/sys-devel/make/files/make-4.2.1-perl526.patch b/sys-devel/make/files/make-4.2.1-perl526.patch deleted file mode 100644 index a935d1314ebb..000000000000 --- a/sys-devel/make/files/make-4.2.1-perl526.patch +++ /dev/null @@ -1,26 +0,0 @@ -From d9d4e06084a4c7da480bd49a3487aadf6ba77b54 Mon Sep 17 00:00:00 2001 -From: Enrique Olaizola <enrique_olaizola16@hotmail.com> -Date: Sat, 27 May 2017 14:24:33 -0400 -Subject: [PATCH] * tests/run_make_tests.pl: [SV 50902] Find Perl modules - ---- - tests/run_make_tests.pl | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/tests/run_make_tests.pl b/tests/run_make_tests.pl -index a74417a..a844094 100644 ---- a/tests/run_make_tests.pl -+++ b/tests/run_make_tests.pl -@@ -64,6 +64,9 @@ if ($^O eq 'VMS') - $CMD_rmfile = 'delete_file -no_ask'; - } - -+use FindBin; -+use lib "$FindBin::Bin"; -+ - require "test_driver.pl"; - require "config-flags.pm"; - --- -2.16.1 - diff --git a/sys-devel/make/files/make-4.2.1-pselect-non-blocking.patch b/sys-devel/make/files/make-4.2.1-pselect-non-blocking.patch deleted file mode 100644 index 61e19516f3c3..000000000000 --- a/sys-devel/make/files/make-4.2.1-pselect-non-blocking.patch +++ /dev/null @@ -1,172 +0,0 @@ -https://bugs.gentoo.org/664632 - -From b552b05251980f693c729e251f93f5225b400714 Mon Sep 17 00:00:00 2001 -From: Paul Smith <psmith@gnu.org> -Date: Sat, 3 Jun 2017 16:20:51 -0400 -Subject: [SV 51159] Use a non-blocking read with pselect to avoid hangs. - -* posixos.c (set_blocking): Set blocking on a file descriptor. -(jobserver_setup): Set non-blocking on the jobserver read side. -(jobserver_parse_auth): Ditto. -(jobserver_acquire_all): Set blocking to avoid a busy-wait loop. -(jobserver_acquire): If the non-blocking read() returns without -taking a token then try again. ---- - posixos.c | 97 ++++++++++++++++++++++++++++++++++++++++++++++----------------- - 1 file changed, 71 insertions(+), 26 deletions(-) - -diff --git a/posixos.c b/posixos.c -index e642d7f..dbafa51 100644 ---- a/posixos.c -+++ b/posixos.c -@@ -62,6 +62,24 @@ make_job_rfd (void) - #endif - } - -+static void -+set_blocking (int fd, int blocking) -+{ -+ // If we're not using pselect() don't change the blocking -+#ifdef HAVE_PSELECT -+ int flags; -+ EINTRLOOP (flags, fcntl (fd, F_GETFL)); -+ if (flags >= 0) -+ { -+ int r; -+ flags = blocking ? (flags & ~O_NONBLOCK) : (flags | O_NONBLOCK); -+ EINTRLOOP (r, fcntl (fd, F_SETFL, flags)); -+ if (r < 0) -+ pfatal_with_name ("fcntl(O_NONBLOCK)"); -+ } -+#endif -+} -+ - unsigned int - jobserver_setup (int slots) - { -@@ -86,6 +104,9 @@ jobserver_setup (int slots) - pfatal_with_name (_("init jobserver pipe")); - } - -+ /* When using pselect() we want the read to be non-blocking. */ -+ set_blocking (job_fds[0], 0); -+ - return 1; - } - -@@ -121,6 +142,9 @@ jobserver_parse_auth (const char *auth) - return 0; - } - -+ /* When using pselect() we want the read to be non-blocking. */ -+ set_blocking (job_fds[0], 0); -+ - return 1; - } - -@@ -169,7 +193,10 @@ jobserver_acquire_all (void) - { - unsigned int tokens = 0; - -- /* Close the write side, so the read() won't hang. */ -+ /* Use blocking reads to wait for all outstanding jobs. */ -+ set_blocking (job_fds[0], 1); -+ -+ /* Close the write side, so the read() won't hang forever. */ - close (job_fds[1]); - job_fds[1] = -1; - -@@ -236,18 +263,12 @@ jobserver_pre_acquire (void) - unsigned int - jobserver_acquire (int timeout) - { -- sigset_t empty; -- fd_set readfds; - struct timespec spec; - struct timespec *specp = NULL; -- int r; -- char intake; -+ sigset_t empty; - - sigemptyset (&empty); - -- FD_ZERO (&readfds); -- FD_SET (job_fds[0], &readfds); -- - if (timeout) - { - /* Alarm after one second (is this too granular?) */ -@@ -256,28 +277,52 @@ jobserver_acquire (int timeout) - specp = &spec; - } - -- r = pselect (job_fds[0]+1, &readfds, NULL, NULL, specp, &empty); -- -- if (r == -1) -+ while (1) - { -- /* Better be SIGCHLD. */ -- if (errno != EINTR) -- pfatal_with_name (_("pselect jobs pipe")); -- return 0; -- } -+ fd_set readfds; -+ int r; -+ char intake; - -- if (r == 0) -- /* Timeout. */ -- return 0; -+ FD_ZERO (&readfds); -+ FD_SET (job_fds[0], &readfds); - -- /* The read FD is ready: read it! */ -- EINTRLOOP (r, read (job_fds[0], &intake, 1)); -- if (r < 0) -- pfatal_with_name (_("read jobs pipe")); -+ r = pselect (job_fds[0]+1, &readfds, NULL, NULL, specp, &empty); -+ if (r < 0) -+ switch (errno) -+ { -+ case EINTR: -+ /* SIGCHLD will show up as an EINTR. */ -+ return 0; -+ -+ case EBADF: -+ /* Someone closed the jobs pipe. -+ That shouldn't happen but if it does we're done. */ -+ O (fatal, NILF, _("job server shut down")); - -- /* What does it mean if read() returns 0? It shouldn't happen because only -- the master make can reap all the tokens and close the write side...?? */ -- return r > 0; -+ default: -+ pfatal_with_name (_("pselect jobs pipe")); -+ } -+ -+ if (r == 0) -+ /* Timeout. */ -+ return 0; -+ -+ /* The read FD is ready: read it! This is non-blocking. */ -+ EINTRLOOP (r, read (job_fds[0], &intake, 1)); -+ -+ if (r < 0) -+ { -+ /* Someone sniped our token! Try again. */ -+ if (errno == EAGAIN) -+ continue; -+ -+ pfatal_with_name (_("read jobs pipe")); -+ } -+ -+ /* read() should never return 0: only the master make can reap all the -+ tokens and close the write side...?? */ -+ return r > 0; -+ } - } - - #else --- -cgit v1.0-41-gc330 - diff --git a/sys-devel/make/make-4.2.1-r4.ebuild b/sys-devel/make/make-4.2.1-r4.ebuild deleted file mode 100644 index d5fead12467a..000000000000 --- a/sys-devel/make/make-4.2.1-r4.ebuild +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit flag-o-matic - -DESCRIPTION="Standard tool to compile source trees" -HOMEPAGE="https://www.gnu.org/software/make/make.html" -SRC_URI="mirror://gnu//make/${P}.tar.bz2" - -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" -IUSE="guile nls static" - -CDEPEND="guile? ( >=dev-scheme/guile-1.8:= )" -DEPEND="${CDEPEND} - nls? ( sys-devel/gettext )" -RDEPEND="${CDEPEND} - nls? ( virtual/libintl )" - -PATCHES=( - "${FILESDIR}"/${PN}-3.82-darwin-library_search-dylib.patch - "${FILESDIR}"/${PN}-4.2-default-cxx.patch - "${FILESDIR}"/${PN}-4.2.1-perl526.patch - "${FILESDIR}"/${PN}-4.2.1-glob-internals.patch - "${FILESDIR}"/${PN}-4.2.1-pselect-non-blocking.patch -) - -src_prepare() { - default - # These patches require special handling as they modify configure.ac - # which in turn triggers maintainer-mode when being applied the - # usual way. - eapply -Z "${FILESDIR}"/${PN}-4.2.1-glob-v2.patch \ - "${FILESDIR}"/${P}-guile-2.2.patch -} - -src_configure() { - use static && append-ldflags -static - local myeconfargs=( - --program-prefix=g - $(use_with guile) - $(use_enable nls) - ) - econf "${myeconfargs[@]}" -} - -src_install() { - emake DESTDIR="${D}" install - dodoc AUTHORS NEWS README* - if [[ ${USERLAND} == "GNU" ]] ; then - # we install everywhere as 'gmake' but on GNU systems, - # symlink 'make' to 'gmake' - dosym gmake /usr/bin/make - dosym gmake.1 /usr/share/man/man1/make.1 - fi -} diff --git a/sys-devel/make/make-4.3.ebuild b/sys-devel/make/make-4.3.ebuild deleted file mode 100644 index bd0a3434e14e..000000000000 --- a/sys-devel/make/make-4.3.ebuild +++ /dev/null @@ -1,55 +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="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" -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" -fi -LICENSE="GPL-3+" -SLOT="0" -IUSE="guile nls static" - -DEPEND="guile? ( >=dev-scheme/guile-1.8:= )" -BDEPEND="nls? ( sys-devel/gettext )" -RDEPEND="${DEPEND} - nls? ( virtual/libintl )" - -PATCHES=( - "${FILESDIR}"/${PN}-3.82-darwin-library_search-dylib.patch - "${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=( - --program-prefix=g - $(use_with guile) - $(use_enable nls) - ) - econf "${myeconfargs[@]}" -} - -src_install() { - emake DESTDIR="${D}" install - dodoc AUTHORS NEWS README* - if [[ ${USERLAND} == "GNU" ]] ; then - # we install everywhere as 'gmake' but on GNU systems, - # symlink 'make' to 'gmake' - dosym gmake /usr/bin/make - dosym gmake.1 /usr/share/man/man1/make.1 - fi -} diff --git a/sys-devel/make/metadata.xml b/sys-devel/make/metadata.xml deleted file mode 100644 index 578976c4fb51..000000000000 --- a/sys-devel/make/metadata.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<maintainer type="project"> - <email>base-system@gentoo.org</email> - <name>Gentoo Base System</name> -</maintainer> -<upstream> - <remote-id type="cpe">cpe:/a:gnu:make</remote-id> -</upstream> -</pkgmetadata> diff --git a/sys-devel/metadata.xml b/sys-devel/metadata.xml index f21134fef4e4..676c45b74707 100644 --- a/sys-devel/metadata.xml +++ b/sys-devel/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE catmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <catmetadata> <longdescription lang="en"> The sys-devel category contains various core system development tools diff --git a/sys-devel/mold/Manifest b/sys-devel/mold/Manifest new file mode 100644 index 000000000000..c1d532776618 --- /dev/null +++ b/sys-devel/mold/Manifest @@ -0,0 +1,4 @@ +DIST mold-2.1.0.tar.gz 9278811 BLAKE2B b31e13f92177553adf5069cf35c8c75c7bc28f0af4d1726cdc0c6abc1c9d3baaa5be512c3a8fb9bc3c3110096a79e1c6751c701171769595a2234fc1fa8c441a SHA512 f1c98d349b35b4042109d71f7db6eb8d7d089dc3241735bbd7b5402d513dcc85ca17904828779e5fc8234650fa9fb97f47c3a2f3e89cc2fb3cb9e9110439e5a2 +DIST mold-2.30.0.tar.gz 9957539 BLAKE2B f45924598029dabfb2c02298e1f89aae848cd64e2e87dd80f500de323517db92e62df798feee8a2cd81cb930eff0640c2b9957808a4080f0027884015994ce64 SHA512 7cfba4f0fb332799ad267d3eafb8e2f0057af4484467b3e3fbaf8044220163a2c7e26cd1786510f250844c8b57e30c15167c8dd9688af1773abc580c5605abf3 +DIST mold-2.4.0.tar.gz 9974233 BLAKE2B 0710d9ce0407b64b05a23e04db142d603b38d41cd9e5e322b650680ee2bd8684f57647e9a0b5efc23b2106eb1e38e38143be7d4b357b2d32e4fe0b6a99e41cca SHA512 e332d027f783dfb0a4f48b1fb7daf98e11e830f8de82b971b58ee8a7bae59eaa30b8155e7491b6057f0ce8e0b09ddd0ab1d364f01ea15517e1d089fdb292a4e5 +DIST mold-2.4.1.tar.gz 9957259 BLAKE2B 17aab84c0793dc305d53a3c2f372ddc92395b6941ffe372af55cf94f4dd65ea8d63d4e85dcdb3e76622811e5f95577d6f10612102c373835d6f75f2a3d0bcfed SHA512 d61ee4306ecaa6ba5b4ce120636e70db081bb824a482bb3014429e13294134bc2560b1a9b477c47378f1062107f1c32dba2810e41be199cd6882cd1146971245 diff --git a/sys-devel/mold/files/mold-2.3.0-no-pch.patch b/sys-devel/mold/files/mold-2.3.0-no-pch.patch new file mode 100644 index 000000000000..e61b5df01f54 --- /dev/null +++ b/sys-devel/mold/files/mold-2.3.0-no-pch.patch @@ -0,0 +1,12 @@ +We generally disable PCH in Gentoo because of how buggy it is. +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -400,7 +400,7 @@ endif() + + # Add frequently included header files for pre-compiling. + # target_precompile_headers is supported by CMake 3.16.0 or newer. +-if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0") ++if(FALSE) + if(MOLD_IS_SOLD) + target_precompile_headers(mold PRIVATE + "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_SOURCE_DIR}/elf/mold.h>" diff --git a/sys-devel/mold/metadata.xml b/sys-devel/mold/metadata.xml new file mode 100644 index 000000000000..f8a85299d5bb --- /dev/null +++ b/sys-devel/mold/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <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> +</pkgmetadata> diff --git a/sys-devel/mold/mold-2.1.0.ebuild b/sys-devel/mold/mold-2.1.0.ebuild new file mode 100644 index 000000000000..4140d61806dd --- /dev/null +++ b/sys-devel/mold/mold-2.1.0.ebuild @@ -0,0 +1,89 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake 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 ~arm64 ~loong ~ppc64 ~riscv ~x86" +fi + +# mold (MIT) +# - xxhash (BSD-2) +LICENSE="MIT BSD-2" +SLOT="0" + +RDEPEND=" + app-arch/zstd:= + >=dev-cpp/tbb-2021.7.0-r1:= + sys-libs/zlib + !kernel_Darwin? ( + >=dev-libs/mimalloc-2:= + dev-libs/openssl:= + ) +" +DEPEND="${RDEPEND}" + +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() { + cmake_src_prepare + + # 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_configure() { + local mycmakeargs=( + -DMOLD_ENABLE_QEMU_TESTS=OFF + -DMOLD_LTO=OFF # Should be up to the user to decide this with CXXFLAGS. + -DMOLD_USE_SYSTEM_MIMALLOC=ON + -DMOLD_USE_SYSTEM_TBB=ON + ) + cmake_src_configure +} + +src_install() { + dobin "${BUILD_DIR}"/${PN} + + # https://bugs.gentoo.org/872773 + insinto /usr/$(get_libdir)/mold + doins "${BUILD_DIR}"/${PN}-wrapper.so + + dodoc docs/{design,execstack}.md + doman docs/${PN}.1 + + dosym ${PN} /usr/bin/ld.${PN} + dosym ${PN} /usr/bin/ld64.${PN} + dosym ../../../usr/bin/${PN} /usr/libexec/${PN}/ld +} diff --git a/sys-devel/mold/mold-2.30.0.ebuild b/sys-devel/mold/mold-2.30.0.ebuild new file mode 100644 index 000000000000..ac067b811ef2 --- /dev/null +++ b/sys-devel/mold/mold-2.30.0.ebuild @@ -0,0 +1,99 @@ +# Copyright 2021-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake 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 ~arm ~arm64 ~loong ~riscv ~sparc ~x86" +fi + +# mold (MIT) +# - xxhash (BSD-2) +LICENSE="MIT BSD-2" +SLOT="0" + +RDEPEND=" + app-arch/zstd:= + >=dev-cpp/tbb-2021.7.0-r1:= + dev-libs/blake3:= + sys-libs/zlib + !kernel_Darwin? ( + >=dev-libs/mimalloc-2:= + ) +" +DEPEND="${RDEPEND}" + +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() { + cmake_src_prepare + + # 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_configure() { + local mycmakeargs=( + -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON + -DMOLD_ENABLE_QEMU_TESTS=OFF + -DMOLD_LTO=OFF # Should be up to the user to decide this with CXXFLAGS. + -DMOLD_USE_MIMALLOC=$(usex !kernel_Darwin) + -DMOLD_USE_SYSTEM_MIMALLOC=ON + -DMOLD_USE_SYSTEM_TBB=ON + ) + cmake_src_configure +} + +src_install() { + dobin "${BUILD_DIR}"/${PN} + + # https://bugs.gentoo.org/872773 + insinto /usr/$(get_libdir)/mold + doins "${BUILD_DIR}"/${PN}-wrapper.so + + dodoc docs/{design,execstack}.md + doman docs/${PN}.1 + + dosym ${PN} /usr/bin/ld.${PN} + dosym ${PN} /usr/bin/ld64.${PN} + dosym -r /usr/bin/${PN} /usr/libexec/${PN}/ld +} + +src_test() { + export TEST_CC="$(tc-getCC)" \ + TEST_GCC="$(tc-getCC)" \ + TEST_CXX="$(tc-getCXX)" \ + TEST_GXX="$(tc-getCXX)" + cmake_src_test +} diff --git a/sys-devel/mold/mold-2.4.0.ebuild b/sys-devel/mold/mold-2.4.0.ebuild new file mode 100644 index 000000000000..52d41ed470e9 --- /dev/null +++ b/sys-devel/mold/mold-2.4.0.ebuild @@ -0,0 +1,103 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake 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 ~arm ~arm64 ~loong ~riscv ~sparc ~x86" +fi + +# mold (MIT) +# - xxhash (BSD-2) +LICENSE="MIT BSD-2" +SLOT="0" + +RDEPEND=" + app-arch/zstd:= + >=dev-cpp/tbb-2021.7.0-r1:= + dev-libs/blake3:= + sys-libs/zlib + !kernel_Darwin? ( + >=dev-libs/mimalloc-2:= + ) +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-2.3.0-no-pch.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() { + cmake_src_prepare + + # 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_configure() { + local mycmakeargs=( + -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON + -DMOLD_ENABLE_QEMU_TESTS=OFF + -DMOLD_LTO=OFF # Should be up to the user to decide this with CXXFLAGS. + -DMOLD_USE_MIMALLOC=$(usex !kernel_Darwin) + -DMOLD_USE_SYSTEM_MIMALLOC=ON + -DMOLD_USE_SYSTEM_TBB=ON + ) + cmake_src_configure +} + +src_install() { + dobin "${BUILD_DIR}"/${PN} + + # https://bugs.gentoo.org/872773 + insinto /usr/$(get_libdir)/mold + doins "${BUILD_DIR}"/${PN}-wrapper.so + + dodoc docs/{design,execstack}.md + doman docs/${PN}.1 + + dosym ${PN} /usr/bin/ld.${PN} + dosym ${PN} /usr/bin/ld64.${PN} + dosym -r /usr/bin/${PN} /usr/libexec/${PN}/ld +} + +src_test() { + export TEST_CC="$(tc-getCC)" \ + TEST_GCC="$(tc-getCC)" \ + TEST_CXX="$(tc-getCXX)" \ + TEST_GXX="$(tc-getCXX)" + cmake_src_test +} diff --git a/sys-devel/mold/mold-2.4.1.ebuild b/sys-devel/mold/mold-2.4.1.ebuild new file mode 100644 index 000000000000..ac067b811ef2 --- /dev/null +++ b/sys-devel/mold/mold-2.4.1.ebuild @@ -0,0 +1,99 @@ +# Copyright 2021-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake 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 ~arm ~arm64 ~loong ~riscv ~sparc ~x86" +fi + +# mold (MIT) +# - xxhash (BSD-2) +LICENSE="MIT BSD-2" +SLOT="0" + +RDEPEND=" + app-arch/zstd:= + >=dev-cpp/tbb-2021.7.0-r1:= + dev-libs/blake3:= + sys-libs/zlib + !kernel_Darwin? ( + >=dev-libs/mimalloc-2:= + ) +" +DEPEND="${RDEPEND}" + +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() { + cmake_src_prepare + + # 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_configure() { + local mycmakeargs=( + -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON + -DMOLD_ENABLE_QEMU_TESTS=OFF + -DMOLD_LTO=OFF # Should be up to the user to decide this with CXXFLAGS. + -DMOLD_USE_MIMALLOC=$(usex !kernel_Darwin) + -DMOLD_USE_SYSTEM_MIMALLOC=ON + -DMOLD_USE_SYSTEM_TBB=ON + ) + cmake_src_configure +} + +src_install() { + dobin "${BUILD_DIR}"/${PN} + + # https://bugs.gentoo.org/872773 + insinto /usr/$(get_libdir)/mold + doins "${BUILD_DIR}"/${PN}-wrapper.so + + dodoc docs/{design,execstack}.md + doman docs/${PN}.1 + + dosym ${PN} /usr/bin/ld.${PN} + dosym ${PN} /usr/bin/ld64.${PN} + dosym -r /usr/bin/${PN} /usr/libexec/${PN}/ld +} + +src_test() { + export TEST_CC="$(tc-getCC)" \ + TEST_GCC="$(tc-getCC)" \ + TEST_CXX="$(tc-getCXX)" \ + TEST_GXX="$(tc-getCXX)" + cmake_src_test +} diff --git a/sys-devel/mold/mold-9999.ebuild b/sys-devel/mold/mold-9999.ebuild new file mode 100644 index 000000000000..ac067b811ef2 --- /dev/null +++ b/sys-devel/mold/mold-9999.ebuild @@ -0,0 +1,99 @@ +# Copyright 2021-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake 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 ~arm ~arm64 ~loong ~riscv ~sparc ~x86" +fi + +# mold (MIT) +# - xxhash (BSD-2) +LICENSE="MIT BSD-2" +SLOT="0" + +RDEPEND=" + app-arch/zstd:= + >=dev-cpp/tbb-2021.7.0-r1:= + dev-libs/blake3:= + sys-libs/zlib + !kernel_Darwin? ( + >=dev-libs/mimalloc-2:= + ) +" +DEPEND="${RDEPEND}" + +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() { + cmake_src_prepare + + # 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_configure() { + local mycmakeargs=( + -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON + -DMOLD_ENABLE_QEMU_TESTS=OFF + -DMOLD_LTO=OFF # Should be up to the user to decide this with CXXFLAGS. + -DMOLD_USE_MIMALLOC=$(usex !kernel_Darwin) + -DMOLD_USE_SYSTEM_MIMALLOC=ON + -DMOLD_USE_SYSTEM_TBB=ON + ) + cmake_src_configure +} + +src_install() { + dobin "${BUILD_DIR}"/${PN} + + # https://bugs.gentoo.org/872773 + insinto /usr/$(get_libdir)/mold + doins "${BUILD_DIR}"/${PN}-wrapper.so + + dodoc docs/{design,execstack}.md + doman docs/${PN}.1 + + dosym ${PN} /usr/bin/ld.${PN} + dosym ${PN} /usr/bin/ld64.${PN} + dosym -r /usr/bin/${PN} /usr/libexec/${PN}/ld +} + +src_test() { + export TEST_CC="$(tc-getCC)" \ + TEST_GCC="$(tc-getCC)" \ + TEST_CXX="$(tc-getCXX)" \ + TEST_GXX="$(tc-getCXX)" + cmake_src_test +} diff --git a/sys-devel/multilib-gcc-wrapper/metadata.xml b/sys-devel/multilib-gcc-wrapper/metadata.xml index 0319eec4c8be..076793e3f54b 100644 --- a/sys-devel/multilib-gcc-wrapper/metadata.xml +++ b/sys-devel/multilib-gcc-wrapper/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person"> <email>mgorny@gentoo.org</email> diff --git a/sys-devel/native-cctools/files/aix-2/ld b/sys-devel/native-cctools/files/aix-2/ld deleted file mode 100644 index 8f9841ef32ee..000000000000 --- a/sys-devel/native-cctools/files/aix-2/ld +++ /dev/null @@ -1,143 +0,0 @@ -#! /usr/bin/env /bin/ksh -# Copyright 1999-2018 Gentoo Foundation; Distributed under the GPL v2 - -# Upon '-soname' and similar flags, create a "shared library" on AIX being an -# archive file containing an Import File and the shared object file, as in: -# http://lists.gnu.org/archive/html/libtool/2011-01/msg00023.html -# with updates in: -# http://lists.gnu.org/archive/html/libtool/2011-02/msg00000.html -# -# This helper script is meant not depend on anything Gentoo specific. - -ld=/usr/ccs/bin/ld -ar=/usr/ccs/bin/ar -strip=/usr/ccs/bin/strip -dump=/usr/sbin/dump -awk=/usr/bin/awk -rm=/usr/bin/rm -mkdir=/usr/bin/mkdir -mv=/usr/bin/mv -ln=/usr/bin/ln - -oldargs= -output= -soname= -newargs= -OBJECT_MODE=${OBJECT_MODE:-32} - -while [[ $# -gt 0 ]] -do - arg=$1 - shift - case ${arg} in - -rpath=*) - arg="-R${arg#-rpath=}" - ;; - esac - oldargs="${oldargs} '${arg}'" - case ${arg} in - -o) - newargs="${newargs} -o '$1'" - output=$1 - oldargs="${oldargs} '$1'" - shift - ;; - -bM:SRE) - newargs="${newargs} '-G' '-bernotok'" - ;; - -soname=*) - soname=${arg#-soname=} - ;; - -h*) - soname=${arg#-h} - ;; - -soname|-h) - soname=$1 - shift - ;; - -b32) - newargs="${newargs} '${arg}'" - OBJECT_MODE=32 - ;; - -b64) - newargs="${newargs} '${arg}'" - OBJECT_MODE=64 - ;; - *) - newargs="${newargs} '${arg}'" - ;; - esac -done - -if [[ -z ${output} || -z ${soname} ]]; then - eval "exec ${ld} ${oldargs}" - exit 1 -fi - -# Running ld against the orginal target file to retain -# ld error message when there's a problem with it: -eval "${ld} -o '${output}' ${newargs}" || exit 1 - -workdir="${output}.$$" - -${rm} -rf "${workdir}" || exit 1 -trap "${rm} -rf '${workdir}'" 0 - -case ${soname} in -*\(*\)) - shro=${soname#*\(} - shro=${shro%\)} - shri=${shro%.*}.imp - ;; -*\[*\]) - shro=${soname#*\[} - shro=${shro%\]} - shri=${shro%.*}.imp - ;; -none) # loadable only module, not linkable: no import file - shro='shr.o' - soname="${output##*/}(${shro})" - shri= - ;; -auto) - shro='shr.o' - soname=${output##*/} - if [[ ${soname} == lib*.so* ]]; then - # linkable library: need import file - shri=${shro%.*}.imp - else - # loadable only module, not linkable: no import file - shri= - fi - soname="${soname}(${shro})" - ;; -*) - shro='shr.o' - shri=${shro%.*}.imp - soname="${soname}(${shro})" - ;; -esac - -export OBJECT_MODE - -${mkdir} "${workdir}" || exit 1 -${strip} -e "${output}" || exit 1 -if [[ -n ${shri} ]]; then - ${dump} -Tv "${output}" > "${workdir}"/syms || exit 1 - ${awk} ' - BEGIN { - print "#! '"${soname}"'" - print "# '"${OBJECT_MODE}"'" - } - { - if ($4 == "EXP" || $4 == "ImpExp") { - print $8 - } else - if ($4 == "wEXP") { - print $8" weak" - } - }' <"${workdir}"/syms > "${workdir}"/${shri} || exit 1 -fi -${mv} "${output}" "${workdir}/${shro}" || exit 1 -${ar} rc "${output}" ${shri:+"${workdir}/${shri}"} "${workdir}/${shro}" || exit 1 -exit 0 diff --git a/sys-devel/native-cctools/files/aix-2/mkexpfile b/sys-devel/native-cctools/files/aix-2/mkexpfile deleted file mode 100644 index 4e79e4647b06..000000000000 --- a/sys-devel/native-cctools/files/aix-2/mkexpfile +++ /dev/null @@ -1,70 +0,0 @@ -#! /bin/sh - -nm="${0%mkexpfile}nm" -showwith= -expfile="ld.aix.exports.$$" -srcobjs= - -# /bin/sort does not allow TMPDIR to be longer than 85 characters -test ${#TMPDIR} -le 85 || TMPDIR=/tmp export TMPDIR - -while test $# -gt 0 -do - arg=$1 - shift - - case ${arg} in - --) for arg in "$@" - do - srcobjs="${srcobjs} '${arg}'" - done - break - ;; - --show-with=*) showwith="${arg#--show-with=}" ;; - -o) expfile="${1}"; shift ;; - -o*) expfile="${arg#-o}"; ;; - *) srcobjs="${srcobjs} '${arg}'" ;; - esac -done - -/bin/rm -f "${expfile}" || exit 1 - -if ! type "${nm}" >/dev/null 2>&1 -then - case ${nm} in - *-nm) nm=${nm##*/} ;; # use "powerpc-ibm-aix7.1.0.0-nm" from PATH - */nm|nm) nm=/usr/ccs/bin/nm ;; # native anyway - esac - type "${nm}" >/dev/null || exit 1 # let 'type' yell when necessary -fi - -if "${nm}" -V 2>&1 | /bin/grep 'GNU' >/dev/null -then - eval "${nm}" -Bpg ${srcobjs} | - /bin/awk '{ - if ((($2 == "T") || ($2 == "D") || ($2 == "B") || ($2 == "W")) && (substr($3,1,1) != ".")) { - if ($2 == "W") { - print $3 " weak" - } else { - print $3 - } - } - }' | - /bin/sort -u > "${expfile}" || exit 1 -else - eval "${nm}" -PCpgl ${srcobjs} | - /bin/awk '{ - if ((($2 == "T") || ($2 == "D") || ($2 == "B") || ($2 == "W") || ($2 == "V") || ($2 == "Z")) && (substr($1,1,1) != ".")) { - if (($2 == "W") || ($2 == "V") || ($2 == "Z")) { - print $1 " weak" - } else { - print $1 - } - } - }' | - /bin/sort -u > "${expfile}" || exit 1 -fi - -echo "${showwith}${expfile}" - -exit 0 diff --git a/sys-devel/native-cctools/files/aix-2/nm b/sys-devel/native-cctools/files/aix-2/nm deleted file mode 100644 index 5ba1d650d23a..000000000000 --- a/sys-devel/native-cctools/files/aix-2/nm +++ /dev/null @@ -1,6 +0,0 @@ -#! /bin/sh - -# /usr/bin/sort (used by nm) cannot work with TMPDIR longer than 85 characters. -test ${#TMPDIR} -le 85 || TMPDIR=/tmp export TMPDIR - -exec /usr/ccs/bin/nm ${1+"$@"} diff --git a/sys-devel/native-cctools/metadata.xml b/sys-devel/native-cctools/metadata.xml index d33cce94b0d4..76983c31094e 100644 --- a/sys-devel/native-cctools/metadata.xml +++ b/sys-devel/native-cctools/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>prefix@gentoo.org</email> diff --git a/sys-devel/native-cctools/native-cctools-4.ebuild b/sys-devel/native-cctools/native-cctools-4.ebuild deleted file mode 100644 index f961a43cc039..000000000000 --- a/sys-devel/native-cctools/native-cctools-4.ebuild +++ /dev/null @@ -1,114 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit eutils - -DESCRIPTION="Host OS native assembler as and static linker ld" -HOMEPAGE="https://prefix.gentoo.org/" -SRC_URI="" - -LICENSE="GPL-2" # actually, we don't know, the wrapper is -SLOT="0" - -AIX_V='aix-2' - -KEYWORDS="~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris" - -IUSE="" - -DEPEND="sys-devel/binutils-config" -RDEPEND="${DEPEND}" - -src_unpack() { - mkdir -p "${S}" -} - -src_install() { - LIBPATH=/usr/$(get_libdir)/binutils/${CHOST}/native-${PV} - BINPATH=/usr/${CHOST}/binutils-bin/native-${PV} - - keepdir ${LIBPATH} || die - dodir ${BINPATH} - - # allow for future hosts with different paths - nativepath="" - wrappers=() - case ${CHOST} in - *-solaris*) - nativepath=/usr/sfw/bin - ;; - *-aix*) - nativepath=/usr/ccs/bin - wrappers=("${wrappers[@]}" "ld=${FILESDIR}/${AIX_V}/ld") - wrappers=("${wrappers[@]}" "nm=${FILESDIR}/${AIX_V}/nm") - wrappers=("${wrappers[@]}" "mkexpfile=${FILESDIR}/${AIX_V}/mkexpfile") - ;; - *-apple-darwin*|*-netbsd*|*-openbsd*) - nativepath=/usr/bin - ;; - *-interix*) - nativepath=/opt/gcc.3.3/bin - ;; - *) - die "Don't know where the native linker for your platform is" - ;; - esac - - what="addr2line as ar c++filt gprof ld nm objcopy objdump \ - ranlib readelf elfdump size strings strip" - # Darwin things - what="${what} install_name_tool ld64 libtool lipo nmedit \ - otool otool64 pagestuff redo_prebinding segedit" - - # copy from the host os - cd "${ED}${BINPATH}" - for b in ${what} ; do - if [[ ${CHOST} == *-darwin* && ${b} == libtool ]] ; then - echo "linking darwin libtool ${nativepath}/${b}" - ln -s "${nativepath}/${b}" "${b}" - elif [[ -x ${nativepath}/g${b} ]] ; then - einfo "linking ${nativepath}/g${b}" - ln -s "${nativepath}/g${b}" "${b}" - elif [[ -x ${nativepath}/${b} ]] ; then - einfo "linking ${nativepath}/${b}" - ln -s "${nativepath}/${b}" "${b}" - else - ewarn "skipping ${b} (not in ${nativepath})" - fi - done - - # post fix for Darwin's ranlib (doesn't like it when its called other than - # that, as libtool and ranlib are one tool) - if [[ ${CHOST} == *-darwin* ]] ; then - rm -f ranlib - cat <<-EOF > ranlib - #!/usr/bin/env bash - exec ${nativepath}/ranlib "\$@" - EOF - chmod 755 ranlib - fi - - exeinto ${BINPATH} - local wrapper source target - for wrapper in "${wrappers[@]}" ; do - source=${wrapper#*=} - target=${wrapper%%=*} - rm -f "${target}" - newexe "${source}" "${target}" || die - done - # Generate an env.d entry for this binutils - insinto /etc/env.d/binutils - cat <<-EOF > "${T}"/env.d - TARGET="${CHOST}" - VER="native-${PV}" - LIBPATH="${EPREFIX}/${LIBPATH}" - FAKE_TARGETS="${CHOST}" - EOF - newins "${T}"/env.d ${CHOST}-native-${PV} -} - -pkg_postinst() { - binutils-config ${CHOST}-native-${PV} -} diff --git a/sys-devel/native-cctools/native-cctools-5.ebuild b/sys-devel/native-cctools/native-cctools-5-r1.ebuild index 821c9fafacdf..6ebf381895db 100644 --- a/sys-devel/native-cctools/native-cctools-5.ebuild +++ b/sys-devel/native-cctools/native-cctools-5-r1.ebuild @@ -1,9 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="6" - -inherit eutils +EAPI="8" DESCRIPTION="Host OS native assembler as and static linker ld" HOMEPAGE="https://prefix.gentoo.org/" @@ -12,9 +10,7 @@ SRC_URI="" LICENSE="GPL-2" # actually, we don't know, the wrapper is SLOT="0" -AIX_V='aix-2' - -KEYWORDS="~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris" +KEYWORDS="~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" IUSE="" @@ -39,18 +35,9 @@ src_install() { *-solaris*) nativepath=/usr/sfw/bin ;; - *-aix*) - nativepath=/usr/ccs/bin - wrappers=("${wrappers[@]}" "ld=${FILESDIR}/${AIX_V}/ld") - wrappers=("${wrappers[@]}" "nm=${FILESDIR}/${AIX_V}/nm") - wrappers=("${wrappers[@]}" "mkexpfile=${FILESDIR}/${AIX_V}/mkexpfile") - ;; - *-apple-darwin*|*-netbsd*|*-openbsd*) + *-apple-darwin*) nativepath=/usr/bin ;; - *-interix*) - nativepath=/opt/gcc.3.3/bin - ;; *) die "Don't know where the native linker for your platform is" ;; diff --git a/sys-devel/nvptx-tools/Manifest b/sys-devel/nvptx-tools/Manifest new file mode 100644 index 000000000000..59a28d80175c --- /dev/null +++ b/sys-devel/nvptx-tools/Manifest @@ -0,0 +1 @@ +DIST nvptx-tools-0_pre20230122.tar.gz 789116 BLAKE2B f05b922827c0215a2484c4f91f3424ca866bb91435a3d60559fc9f1f63c06559377f1c8071c9e8e5607ec4dbff1c22d095385ac86d35f43ade29d9df6699f3ff SHA512 9d3bceef2ef7942ea6ec8b6c6b1b9144f0a020bfabc2583ba4ef73db8ef299ffadbc6dbe27748c728bd16aee0ecd6f0fbe1f8bb064bde986bb4e0475b2494870 diff --git a/sys-devel/nvptx-tools/metadata.xml b/sys-devel/nvptx-tools/metadata.xml new file mode 100644 index 000000000000..26ea6434862c --- /dev/null +++ b/sys-devel/nvptx-tools/metadata.xml @@ -0,0 +1,11 @@ +<?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> + <upstream> + <remote-id type="github">SourceryTools/nvptx-tools</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-devel/nvptx-tools/nvptx-tools-0_pre20230122.ebuild b/sys-devel/nvptx-tools/nvptx-tools-0_pre20230122.ebuild new file mode 100644 index 000000000000..a73728161032 --- /dev/null +++ b/sys-devel/nvptx-tools/nvptx-tools-0_pre20230122.ebuild @@ -0,0 +1,52 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Collection of tools for use with nvptx-none GCC toolchains" +HOMEPAGE="https://github.com/SourceryTools/nvptx-tools https://gcc.gnu.org/wiki/nvptx" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/SourceryTools/nvptx-tools" + inherit git-r3 +else + MY_COMMIT="93e00909ceb9cbbc104f0fcba56c0361ffb3ca4b" + SRC_URI="https://github.com/SourceryTools/nvptx-tools/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}"/${PN}-${MY_COMMIT} + + KEYWORDS="~amd64" +fi + +LICENSE="GPL-3" +SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" + +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +BDEPEND=" + test? ( + dev-python/lit + dev-util/dejagnu + ) +" + +is_crosscompile() { + [[ ${CHOST} != ${CTARGET} ]] +} + +pkg_setup() { + # Reject newlib-on-glibc type installs + if [[ ${CTARGET} == ${CHOST} ]] ; then + case ${CHOST} in + *-newlib|nvptx-*) ;; + *) die "Use sys-devel/crossdev to build a nvptx(-none) toolchain" ;; + esac + fi +} diff --git a/sys-devel/nvptx-tools/nvptx-tools-9999.ebuild b/sys-devel/nvptx-tools/nvptx-tools-9999.ebuild new file mode 100644 index 000000000000..a73728161032 --- /dev/null +++ b/sys-devel/nvptx-tools/nvptx-tools-9999.ebuild @@ -0,0 +1,52 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Collection of tools for use with nvptx-none GCC toolchains" +HOMEPAGE="https://github.com/SourceryTools/nvptx-tools https://gcc.gnu.org/wiki/nvptx" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/SourceryTools/nvptx-tools" + inherit git-r3 +else + MY_COMMIT="93e00909ceb9cbbc104f0fcba56c0361ffb3ca4b" + SRC_URI="https://github.com/SourceryTools/nvptx-tools/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}"/${PN}-${MY_COMMIT} + + KEYWORDS="~amd64" +fi + +LICENSE="GPL-3" +SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" + +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +BDEPEND=" + test? ( + dev-python/lit + dev-util/dejagnu + ) +" + +is_crosscompile() { + [[ ${CHOST} != ${CTARGET} ]] +} + +pkg_setup() { + # Reject newlib-on-glibc type installs + if [[ ${CTARGET} == ${CHOST} ]] ; then + case ${CHOST} in + *-newlib|nvptx-*) ;; + *) die "Use sys-devel/crossdev to build a nvptx(-none) toolchain" ;; + esac + fi +} diff --git a/sys-devel/parity/Manifest b/sys-devel/parity/Manifest deleted file mode 100644 index c3d3a17e4c48..000000000000 --- a/sys-devel/parity/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST parity-2.0.1.tar.bz2 371662 BLAKE2B c0fca272665bbe346d5d5ca18e06c65209df61454310811b939239f8ba25ec7a08ad2f864fb43780329dc1f0120afdb6ea4ee2b4b42d2888860358aa1dc176f4 SHA512 3c96c87b87f40cb7affd6ee9a87c8e7cf628aedb44a2d3d89370a5b5e32a43cb15a897ae27425e9d6a00581ffd50a70c7a7481f1ca259eddd1e6f2310b554eb9 diff --git a/sys-devel/parity/metadata.xml b/sys-devel/parity/metadata.xml deleted file mode 100644 index 781b5c6cf53b..000000000000 --- a/sys-devel/parity/metadata.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="person"> - <email>haubi@gentoo.org</email> - <name>Michael Haubenwallner</name> - </maintainer> - <upstream> - <remote-id type="github">haubi/parity</remote-id> - </upstream> - <use> - <flag name="vc8_0">Enable support for Visual Studio 2005</flag> - <flag name="vc9_0">Enable support for Visual Studio 2008</flag> - <flag name="vc10_0">Enable support for Visual Studio 2010</flag> - <flag name="vc11_0">Enable support for Visual Studio 2012</flag> - <flag name="vc12_0">Enable support for Visual Studio 2013</flag> - <flag name="vc14_0">Enable support for Visual Studio 2015</flag> - <flag name="vc15">Enable support for Visual Studio 2017</flag> - <flag name="vc16">Enable support for Visual Studio 2019</flag> - <flag name="vcx64">Enable support for 64bit Visual Studio compilers</flag> - <flag name="vcx86">Enable support for 32bit Visual Studio compilers</flag> - </use> -</pkgmetadata> diff --git a/sys-devel/parity/parity-2.0.1.ebuild b/sys-devel/parity/parity-2.0.1.ebuild deleted file mode 100644 index 7f41d7bf06e6..000000000000 --- a/sys-devel/parity/parity-2.0.1.ebuild +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright 1999-2020 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:haubi/parity.git https://github.com/haubi/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/parity/parity-9999.ebuild b/sys-devel/parity/parity-9999.ebuild deleted file mode 100644 index 7f41d7bf06e6..000000000000 --- a/sys-devel/parity/parity-9999.ebuild +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright 1999-2020 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:haubi/parity.git https://github.com/haubi/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 15f0b1675c72..612a9aae3b54 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/files/patch-2.7.6-fix-test-suite.patch b/sys-devel/patch/files/patch-2.7.6-fix-test-suite.patch index 3aff5c0f77ba..5571209c4930 100644 --- a/sys-devel/patch/files/patch-2.7.6-fix-test-suite.patch +++ b/sys-devel/patch/files/patch-2.7.6-fix-test-suite.patch @@ -1,5 +1,6 @@ -http://git.savannah.gnu.org/cgit/patch.git/commit/?id=f6bc5b14bd193859851d15a049bafb1007acd288 -http://git.savannah.gnu.org/cgit/patch.git/commit/?id=074e2395f81d0ecaa66b71a6c228c70b49db72e5 +https://git.savannah.gnu.org/cgit/patch.git/commit/?id=f6bc5b14bd193859851d15a049bafb1007acd288 +https://git.savannah.gnu.org/cgit/patch.git/commit/?id=074e2395f81d0ecaa66b71a6c228c70b49db72e5 +https://git.savannah.gnu.org/cgit/patch.git/commit/?id=7623b2dc0d1837ecfd58f32efc78e35834deeb38 --- a/tests/crlf-handling +++ b/tests/crlf-handling @@ -117,4 +118,16 @@ http://git.savannah.gnu.org/cgit/patch.git/commit/?id=074e2395f81d0ecaa66b71a6c2 while test $# -gt 0 ; do echo "$1" shift --- + +--- a/tests/test-lib.sh ++++ b/tests/test-lib.sh +@@ -113,7 +113,7 @@ cleanup() { + exit $status + } + +-if eval 'test -n "${BASH_LINENO[0]}" 2>/dev/null'; then ++if ( eval 'test -n "${BASH_LINENO[0]}"' 2>/dev/null ); then + eval ' + _start_test() { + printf "[${BASH_LINENO[2]}] %s -- " "$*" + diff --git a/sys-devel/patch/metadata.xml b/sys-devel/patch/metadata.xml index a3b432e703b6..fae1c61df32e 100644 --- a/sys-devel/patch/metadata.xml +++ b/sys-devel/patch/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>base-system@gentoo.org</email> diff --git a/sys-devel/patch/patch-2.7.6-r4.ebuild b/sys-devel/patch/patch-2.7.6-r4.ebuild index 5919bbb39640..0ea78585b038 100644 --- a/sys-devel/patch/patch-2.7.6-r4.ebuild +++ b/sys-devel/patch/patch-2.7.6-r4.ebuild @@ -1,23 +1,26 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="7" -inherit flag-o-matic +VERIFY_SIG_OPENPGP_KEY_PATH=/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 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-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 @@ -39,7 +42,6 @@ src_configure() { local myeconfargs=( $(use_enable xattr) - --program-prefix="$(use userland_BSD && echo g)" ) # Do not let $ED mess up the search for `ed` 470210. ac_cv_path_ED=$(type -P ed) \ diff --git a/sys-devel/patch/patch-2.7.6-r5.ebuild b/sys-devel/patch/patch-2.7.6-r5.ebuild new file mode 100644 index 000000000000..e1dfc88fa933 --- /dev/null +++ b/sys-devel/patch/patch-2.7.6-r5.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/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 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="static test xattr" +RESTRICT="!test? ( test )" + +RDEPEND="xattr? ( sys-apps/attr )" +DEPEND="${RDEPEND}" +BDEPEND="test? ( sys-apps/ed ) + verify-sig? ( sec-keys/openpgp-keys-patch )" + +PATCHES=( + "${FILESDIR}"/${P}-fix-test-suite.patch + "${FILESDIR}"/${PN}-2.7.6-fix-error-handling-with-git-style-patches.patch + "${FILESDIR}"/${PN}-2.7.6-CVE-2018-6951.patch + "${FILESDIR}"/${PN}-2.7.6-allow-input-files-to-be-missing-for-ed-style-patches.patch + "${FILESDIR}"/${PN}-2.7.6-CVE-2018-1000156.patch + "${FILESDIR}"/${PN}-2.7.6-CVE-2018-6952.patch + "${FILESDIR}"/${PN}-2.7.6-Do-not-crash-when-RLIMIT_NOFILE-is-set-to-RLIM_INFINITY.patch + "${FILESDIR}"/${PN}-2.7.6-CVE-2018-1000156-fix1.patch + "${FILESDIR}"/${PN}-2.7.6-CVE-2018-1000156-fix2.patch + "${FILESDIR}"/${PN}-2.7.6-CVE-2019-13636.patch + "${FILESDIR}"/${PN}-2.7.6-CVE-2019-13638.patch + "${FILESDIR}"/${PN}-2.7.6-Avoid-invalid-memory-access-in-context-format-diffs.patch +) + +src_configure() { + use static && append-ldflags -static + + local myeconfargs=( + $(use_enable xattr) + # rename to gpatch for better BSD compatibility + --program-prefix=g + ) + # Do not let $ED mess up the search for `ed` 470210. + ac_cv_path_ED=$(type -P ed) \ + econf "${myeconfargs[@]}" +} + +src_install() { + default + + # symlink to the standard name + dosym gpatch /usr/bin/patch + dosym gpatch.1 /usr/share/man/man1/patch.1 +} diff --git a/sys-devel/pmake/Manifest b/sys-devel/pmake/Manifest deleted file mode 100644 index 149a5aafe345..000000000000 --- a/sys-devel/pmake/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST pmake_1.111-3.3.debian.tar.gz 31648 BLAKE2B 31aca433bbeac4275d4c2af0cfd33ef81b0086b0dec107edfc1fba55b15480367ebf62abccd6e2e48f0c7ccc25c59f0b07eed7ac950a5037b73c267b066a9638 SHA512 b22a1d9e371712732f196d91ac3eb9239fa98ee8ee05754576e7a5878cab88976cb10bb6be90706df5ac738373f519468403c23f6a3ff3860a2968b3222a66ed -DIST pmake_1.111.orig.tar.gz 264383 BLAKE2B 54dd510251441b54c9f5d7f6061109b0222191b3acdded1394b51b72b87bbd4255edd80fab46976d92c58929693b6809a9f2c4f001cab8c9cdaabfac9f3adac9 SHA512 ad48708ea014d6a38ad36303504c52992b51a1e815564f1710849d859b1fc3cd58c4a1a71f54ec902c9b69112e9cd1e1a64282ff738439cdb209a4f75c364c22 diff --git a/sys-devel/pmake/files/pmake-1.111.1-ldflags.patch b/sys-devel/pmake/files/pmake-1.111.1-ldflags.patch deleted file mode 100644 index d6047d48994b..000000000000 --- a/sys-devel/pmake/files/pmake-1.111.1-ldflags.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: pmake/Makefile.boot -=================================================================== ---- pmake.orig/Makefile.boot -+++ pmake/Makefile.boot -@@ -36,7 +36,7 @@ LIBOBJ= lst.lib/lstAppend.o lst.lib/lstA - - bmake: ${OBJ} ${LIBOBJ} - # @echo 'make of make and make.0 started.' -- ${CC} ${CFLAGS} ${OBJ} ${LIBOBJ} -o bmake ${LIBS} -+ ${CC} ${LDFLAGS} ${CFLAGS} ${OBJ} ${LIBOBJ} -o bmake ${LIBS} - @ls -l $@ - # nroff -h -man make.1 > make.0 - # @echo 'make of make and make.0 completed.' diff --git a/sys-devel/pmake/files/pmake-1.98-skipdots.patch b/sys-devel/pmake/files/pmake-1.98-skipdots.patch deleted file mode 100644 index 6783a9799919..000000000000 --- a/sys-devel/pmake/files/pmake-1.98-skipdots.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN pmake-2.0.orig/dir.c pmake-2.0/dir.c ---- pmake-2.0.orig/dir.c 2005-02-08 09:26:28.932978574 -0500 -+++ pmake-2.0/dir.c 2005-02-08 09:36:18.208704201 -0500 -@@ -1528,6 +1528,8 @@ - Hash_InitTable (&p->files, -1); - - while ((dp = readdir (d)) != (struct dirent *) NULL) { -+ if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) -+ continue; - #if defined(sun) && defined(d_ino) /* d_ino is a sunos4 #define for d_fileno */ - /* - * The sun directory library doesn't check for a 0 inode diff --git a/sys-devel/pmake/metadata.xml b/sys-devel/pmake/metadata.xml deleted file mode 100644 index 6f49eba8f496..000000000000 --- a/sys-devel/pmake/metadata.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<!-- maintainer-needed --> -</pkgmetadata> diff --git a/sys-devel/pmake/pmake-1.111.3.3.ebuild b/sys-devel/pmake/pmake-1.111.3.3.ebuild deleted file mode 100644 index 53db11c875df..000000000000 --- a/sys-devel/pmake/pmake-1.111.3.3.ebuild +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit toolchain-funcs linux-info - -MY_P="${PN}-$(ver_cut 1-2)" -DEBIAN_SOURCE="${PN}_$(ver_cut 1-2).orig.tar.gz" -DEBIAN_PATCH="${PN}_$(ver_rs 2 '-').debian.tar.gz" - -DESCRIPTION="BSD build tool to create programs in parallel. Debian's version of NetBSD's make" -HOMEPAGE="http://www.netbsd.org/" -SRC_URI=" - mirror://debian/pool/main/p/pmake/${DEBIAN_SOURCE} - mirror://debian/pool/main/p/pmake/${DEBIAN_PATCH}" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~alpha amd64 arm ~arm64 ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux" - -S="${WORKDIR}/${PN}" - -PATCHES=( - "${WORKDIR}"/debian/patches - - # pmake makes the assumption that . and .. are the first two - # entries in a directory, which doesn't always appear to be the - # case on ext3... (05 Apr 2004 agriffis) - "${FILESDIR}"/${PN}-1.98-skipdots.patch - - # Don't ignore ldflags - "${FILESDIR}"/${PN}-1.111.1-ldflags.patch -) - -src_compile() { - # The following CFLAGS are almost directly from Red Hat 8.0 and - # debian/rules, so assume it's okay to void out the __COPYRIGHT - # and __RCSID. I've checked the source and don't see the point, - # but whatever... (07 Feb 2004 agriffis) - CFLAGS="${CFLAGS} -Wall -Wno-unused -D_GNU_SOURCE \ - -DHAVE_STRERROR -DHAVE_STRDUP -DHAVE_SETENV \ - -D__COPYRIGHT\(x\)= -D__RCSID\(x\)= -I. \ - -DMACHINE=\\\"gentoo\\\" -DMACHINE_ARCH=\\\"$(tc-arch-kernel)\\\" \ - -D_PATH_DEFSHELLDIR=\\\"${EPREFIX}/bin\\\" \ - -D_PATH_DEFSYSPATH=\\\"${EPREFIX}/usr/share/mk\\\" \ - -DHAVE_VSNPRINTF" - if [[ "${USERLAND}" == "GNU" ]]; then - CFLAGS="${CFLAGS} -D_PATH_DEFSYSPATH=\\\"${EPREFIX}/usr/share/mk/${PN}\\\"" - fi - - emake -f Makefile.boot \ - CC="$(tc-getCC)" \ - CFLAGS="${CFLAGS}" -} - -src_install() { - # Don't install these on BSD, else they conflict - if [[ ${USERLAND} == GNU ]]; then - insinto /usr/share/mk/${PN} - doins -r mk/. - fi - - newbin bmake pmake - dobin mkdep - - doman mkdep.1 - newman make.1 pmake.1 - - dodoc PSD.doc/tutorial.ms - - if [[ ${USERLAND} == BSD ]]; then - dosym pmake /usr/bin/make - dosym pmake.1.gz /usr/share/man/man1/make.1.gz - fi -} diff --git a/sys-devel/prelink/Manifest b/sys-devel/prelink/Manifest deleted file mode 100644 index 139e3eee1b83..000000000000 --- 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 5a9fffb838f9..000000000000 --- 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 9233a4114827..000000000000 --- 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 6b89b8c1f1fd..000000000000 --- 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 067fc2ea97a2..000000000000 --- 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 dcdbf813a0e4..000000000000 --- 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 5d58d437158e..000000000000 --- 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 e396f3755977..000000000000 --- a/sys-devel/prelink/metadata.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://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 17c39b3993ef..000000000000 --- 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 dfe534db6194..000000000000 --- 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/qbe/Manifest b/sys-devel/qbe/Manifest new file mode 100644 index 000000000000..739ffea8e281 --- /dev/null +++ b/sys-devel/qbe/Manifest @@ -0,0 +1,5 @@ +DIST qbe-1.1.tar.xz 244740 BLAKE2B fdadca56ff5a6b56f30e0a99724908e356b3c1b545e5b35a27080a92ca0d417ff53deb8f4c0a31b9289acab58fb79568384669004b0275cddd83afb198a7a5aa SHA512 1e5d7d1df3d73849dbf19dd1d84c9bba63a5041622823a5a239496032f9d82bd1640dd2bbd03e28c8a180b8e66a1fe10deb940b5d8fde996bf593f7e8d943e8b +DIST qbe-1.2.tar.xz 246364 BLAKE2B b4cf4562caf6db191f1b2bfd078e2dfebfbe526a454552691ff78fba7b2d6c27b09df8ea5c795b49b9509a73b6981c17684d6e887999878f6e5bc7923c5047ef SHA512 b3ffd172e95346b3bfae1d2aff4c22a32af8bd4443d073f6fbb711f41db01f072ca7a8108901508cd4a8366567dab46510e0438716d35548591fdf37cee49971 +DIST qbe-dbgfile.patch 3813 BLAKE2B fbe0dd9c4fab8399054c091bb50fd8002c43108c53f2177ea000784f0707e9fb4fe432d637d03ccd87247f0ab1d232d5ba81e3a3e61347b7e1f31bb61b701c62 SHA512 41694848c95341f16618cd8f8d3222415e551b36b3428467e7ad066e257bc235dedbae4a1da4a6ae9034d102e359ecd69f51c580ad3f613e0e427df1882d1c65 +DIST qbe-info-tracking.patch 6305 BLAKE2B 03cb80de722e642812558fe7fe93eb3683f0fb54a2d78a1ceacf68016c779dee47f314651f0a6f1690d8b3ddc3089d41a894caafa83ec408d46b9375d24c9e3d SHA512 00d37894fca754f23024a8d64591e22f74b8f50022de77c1b25b474a68d204f0d89f2f3dbbfb822c5293ebccdadd923516c28b1e3c358c07de7a284fa0ef722f +DIST qbe-parseline-tweaks.patch 1519 BLAKE2B 88940d42dbed988a5ecff68f18a1fab9c5024d5fb4d8219a1984f676808f9b5dbc4c4a729bf419358e0be71244aa4b97e23b3575aa4458a5c4059f7f1cd2151e SHA512 8701657032f26f8f7fe0de768573c5f111f80e5cc9d62fb4bfcf895b421532f039f08234bca8b4156b097f80893483fa8323cde3a8f3c8a5c729412328097bb2 diff --git a/sys-devel/qconf/metadata.xml b/sys-devel/qbe/metadata.xml index 9c39d19d47cb..fc3c6c671309 100644 --- a/sys-devel/qconf/metadata.xml +++ b/sys-devel/qbe/metadata.xml @@ -2,14 +2,11 @@ <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person" proxied="yes"> - <email>rion4ik@gmail.com</email> - <name>Sergey Ilinykh</name> + <email>contact@hacktivis.me</email> + <name>Haelwenn (lanodan) Monnier</name> </maintainer> <maintainer type="project" proxied="proxy"> <email>proxy-maint@gentoo.org</email> <name>Proxy Maintainers</name> </maintainer> - <upstream> - <remote-id type="github">psi-plus/qconf</remote-id> - </upstream> </pkgmetadata> diff --git a/sys-devel/qbe/qbe-1.1-r1.ebuild b/sys-devel/qbe/qbe-1.1-r1.ebuild new file mode 100644 index 000000000000..375946b25243 --- /dev/null +++ b/sys-devel/qbe/qbe-1.1-r1.ebuild @@ -0,0 +1,46 @@ +# Copyright 2021-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="git://c9x.me/qbe.git" + inherit git-r3 +else + SRC_URI=" + https://c9x.me/compile/release/${P}.tar.xz + https://c9x.me/git/qbe.git/patch/?id=0d929287d77ccc3fb52ca8bd072678b5ae2c81c8 -> qbe-info-tracking.patch + https://c9x.me/git/qbe.git/patch/?id=baf11b7175c468d3d9408d332b1c0d529a4957ee -> qbe-parseline-tweaks.patch + https://c9x.me/git/qbe.git/patch/?id=36946a5142c40b733d25ea5ca469f7949ee03439 -> qbe-dbgfile.patch + " + + # 64-bit RISC-V only + KEYWORDS="~amd64 ~arm64 ~riscv" +fi + +DESCRIPTION="Pure-C embeddable compiler backend" +HOMEPAGE="https://c9x.me/compile/" + +LICENSE="MIT" +SLOT="0" + +DOCS=( README doc ) + +PATCHES=( + "${DISTDIR}/qbe-info-tracking.patch" + "${DISTDIR}/qbe-parseline-tweaks.patch" + "${DISTDIR}/qbe-dbgfile.patch" +) + +src_compile() { + tc-export CC + + emake CFLAGS="-std=c99 ${CPPFLAGS} ${CFLAGS}" +} + +src_install() { + einstalldocs + emake install DESTDIR="${ED}" PREFIX=/usr +} diff --git a/sys-devel/qbe/qbe-1.2.ebuild b/sys-devel/qbe/qbe-1.2.ebuild new file mode 100644 index 000000000000..baaab97b66c1 --- /dev/null +++ b/sys-devel/qbe/qbe-1.2.ebuild @@ -0,0 +1,41 @@ +# Copyright 2021-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="git://c9x.me/qbe.git" + inherit git-r3 +else + SRC_URI="https://c9x.me/compile/release/${P}.tar.xz" + + # 64-bit RISC-V only + KEYWORDS="~amd64 ~arm64 ~riscv" +fi + +DESCRIPTION="Pure-C embeddable compiler backend" +HOMEPAGE="https://c9x.me/compile/" + +LICENSE="MIT" +SLOT="0" + +DOCS=( README doc ) + +src_prepare() { + default + + sed -i 's;^CC *=.*;CC ?= cc;' Makefile || die +} + +src_compile() { + tc-export CC + + emake CFLAGS="-std=c99 ${CPPFLAGS} ${CFLAGS}" +} + +src_install() { + einstalldocs + emake install DESTDIR="${ED}" PREFIX=/usr +} diff --git a/sys-devel/qbe/qbe-9999.ebuild b/sys-devel/qbe/qbe-9999.ebuild new file mode 100644 index 000000000000..baaab97b66c1 --- /dev/null +++ b/sys-devel/qbe/qbe-9999.ebuild @@ -0,0 +1,41 @@ +# Copyright 2021-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="git://c9x.me/qbe.git" + inherit git-r3 +else + SRC_URI="https://c9x.me/compile/release/${P}.tar.xz" + + # 64-bit RISC-V only + KEYWORDS="~amd64 ~arm64 ~riscv" +fi + +DESCRIPTION="Pure-C embeddable compiler backend" +HOMEPAGE="https://c9x.me/compile/" + +LICENSE="MIT" +SLOT="0" + +DOCS=( README doc ) + +src_prepare() { + default + + sed -i 's;^CC *=.*;CC ?= cc;' Makefile || die +} + +src_compile() { + tc-export CC + + emake CFLAGS="-std=c99 ${CPPFLAGS} ${CFLAGS}" +} + +src_install() { + einstalldocs + emake install DESTDIR="${ED}" PREFIX=/usr +} diff --git a/sys-devel/qconf/Manifest b/sys-devel/qconf/Manifest deleted file mode 100644 index 87fc52a38213..000000000000 --- a/sys-devel/qconf/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST qconf-2.5.tar.gz 100704 BLAKE2B 01dcca053e020cfc76e8595927dd3cedb6c82ade24381c95935c87994037ca5129f5e9e0ec58dd0e0fc6815b1500249b767367fbf7a16549459f814bb1591368 SHA512 4ce032eb5b9ba2d584807b3283b0dd5cf973c2fdd6792dfec13c54bb7c639d23eeaab03eb52f1a395113d973d2b01d87bf713d717e691641203865b934c7da5e diff --git a/sys-devel/qconf/qconf-2.5.ebuild b/sys-devel/qconf/qconf-2.5.ebuild deleted file mode 100644 index ca303a7e0854..000000000000 --- a/sys-devel/qconf/qconf-2.5.ebuild +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit qmake-utils - -DESCRIPTION="./configure like generator for qmake-based projects" -HOMEPAGE="https://github.com/psi-im/qconf" -SRC_URI="https://github.com/psi-im/qconf/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 ~arm ~hppa ppc ppc64 ~sparc x86" -IUSE="" - -DEPEND=" - dev-qt/qtcore:5 - dev-qt/qtxml:5 -" -RDEPEND="${DEPEND}" - -src_configure() { - # not autotools configure, so don't use econf - ./configure \ - --prefix="${EPREFIX}"/usr \ - --qtdir="$(qt5_get_libdir)/qt5" \ - --extraconf=QMAKE_STRIP= \ - --verbose || die "configure failed" - - # just to set all the Gentoo toolchain flags - eqmake5 -} - -src_install() { - emake INSTALL_ROOT="${D}" install - einstalldocs - dodoc -r examples -} diff --git a/sys-devel/reflex/Manifest b/sys-devel/reflex/Manifest new file mode 100644 index 000000000000..62eca417a802 --- /dev/null +++ b/sys-devel/reflex/Manifest @@ -0,0 +1,2 @@ +DIST reflex-20230523.tgz 480999 BLAKE2B a7306367bdf5bfb542a44f29c382a5d889a176059d95539916ab3132de06401edfd0c6a476ec66f433d56398039524d79c6879e1f24b4e813ebbba98ea434ed3 SHA512 9704b6dc3327bc017175bef21f34f53ff6614a76692deacb4af99c29bd4330e5fb7f71af6497d233acceab148bc8a7911d41d3ca224110812e5883c90cc801f2 +DIST reflex-20230523.tgz.asc 729 BLAKE2B 0249d1bc4f6d6395be0f51f90e1f9834bc63cd7e4b5565e71ff0502746f45ea04b611c8db70d62513dfe95d492512cf1935f4e70d582c960f38d11e06853f54f SHA512 48e2f84c8932a038366159ea6a26eac73510bb69b6bc3c5027195682ade4ef3a33ade082b41e4d08af0c23c6692abc8ee46b261796d72709aa9568070c16c20b diff --git a/sys-devel/reflex/metadata.xml b/sys-devel/reflex/metadata.xml new file mode 100644 index 000000000000..f885e82281a5 --- /dev/null +++ b/sys-devel/reflex/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>sam@gentoo.org</email> + <name>Sam James</name> + </maintainer> + <upstream> + <changelog>https://invisible-island.net/reflex/NEWS.html</changelog> + <remote-id type="github">ThomasDickey/reflex-snapshots</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-devel/reflex/reflex-20230523.ebuild b/sys-devel/reflex/reflex-20230523.ebuild new file mode 100644 index 000000000000..08eac7186712 --- /dev/null +++ b/sys-devel/reflex/reflex-20230523.ebuild @@ -0,0 +1,22 @@ +# Copyright 2022-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/thomasdickey.asc +inherit verify-sig + +DESCRIPTION="This is a variant of the flex fast lexical scanner" +HOMEPAGE="https://invisible-island.net/reflex/" +SRC_URI="https://invisible-island.net/archives/${PN}/${P}.tgz" +SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/${PN}/${P}.tgz.asc )" + +LICENSE="FLEX" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ppc ppc64 ~riscv ~s390 sparc x86" + +BDEPEND="verify-sig? ( sec-keys/openpgp-keys-thomasdickey )" + +src_configure() { + econf --with-manpage-format=formatted +} diff --git a/sys-devel/remake/Manifest b/sys-devel/remake/Manifest deleted file mode 100644 index 447199aacc99..000000000000 --- a/sys-devel/remake/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST remake-4.2.1+dbg-1.4.tar.bz2 1508613 BLAKE2B f83bf8b1154d87d3c729b51797011511c6d9a249dffd212a551602a2af1c874d50d631d0f0e3f00d1b4484db758b7d167c416b0be185ad2a16897a077d04e9f4 SHA512 ffb7d641e0bc99794c17f634fe0aa5bf909c1e1c8eb14873dd27f2950d913db393c3532c34f417307eba351e8732c366131a23e661f5fec9529edc5d778da0d1 diff --git a/sys-devel/remake/files/make-4.2.1-glob-v2.patch b/sys-devel/remake/files/make-4.2.1-glob-v2.patch deleted file mode 100644 index e55a7790a3f6..000000000000 --- a/sys-devel/remake/files/make-4.2.1-glob-v2.patch +++ /dev/null @@ -1,30 +0,0 @@ -http://git.savannah.gnu.org/cgit/make.git/commit/?id=48c8a116a914a325a0497721f5d8b58d5bba34d4 - ---- make-4.2.1/configure 2016-06-11 01:03:21.000000000 +0200 -+++ make-4.2.1/configure 2016-06-11 01:03:21.000000000 +0200 -@@ -11481,10 +11481,9 @@ - #include <glob.h> - #include <fnmatch.h> - --#define GLOB_INTERFACE_VERSION 1 - #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1 - # include <gnu-versions.h> --# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION -+# if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 - gnu glob - # endif - #endif ---- make-4.2.1/configure.ac 2016-06-06 14:27:31.000000000 +0200 -+++ make-4.2.1/configure.ac 2016-06-06 14:27:31.000000000 +0200 -@@ -399,10 +399,9 @@ - #include <glob.h> - #include <fnmatch.h> - --#define GLOB_INTERFACE_VERSION 1 - #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1 - # include <gnu-versions.h> --# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION -+# if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 - gnu glob - # endif - #endif], diff --git a/sys-devel/remake/files/remake-4.2.1.1.4-fno-common.patch b/sys-devel/remake/files/remake-4.2.1.1.4-fno-common.patch deleted file mode 100644 index 4367bf9332b3..000000000000 --- a/sys-devel/remake/files/remake-4.2.1.1.4-fno-common.patch +++ /dev/null @@ -1,127 +0,0 @@ ---- a/dep.h -+++ b/dep.h -@@ -134,7 +134,7 @@ - struct goaldep *read_all_makefiles (const char **makefiles); - - /*! The chain of makefiles read by read_makefile. */ --struct goaldep *read_makefiles; -+extern struct goaldep *read_makefiles; - - void eval_buffer (char *buffer, const gmk_floc *floc); - enum update_status update_goal_chain (struct goaldep *goals); ---- a/globals.c -+++ b/globals.c -@@ -120,8 +120,6 @@ - of each job stay together. */ - int output_sync = OUTPUT_SYNC_NONE; - --const char *default_shell; -- - char *remote_description = 0; - - /* Remember the original value of the SHELL variable, from the environment. */ ---- a/globals.h -+++ b/globals.h -@@ -85,6 +85,12 @@ - extern bool b_debugger_preread; - - /* Remember the original value of the SHELL variable, from the environment. */ --struct variable shell_var; -+extern struct variable shell_var; -+ -+/**! The default value of SHELL and the shell that is used when issuing -+ commands on targets. -+*/ -+extern const char *default_shell; -+ - - #endif /*GLOBALS_H*/ ---- a/main.c -+++ b/main.c -@@ -40,6 +40,8 @@ - # include <fcntl.h> - #endif - -+struct goaldep *read_makefiles; -+ - extern void initialize_stopchar_map (); - - #if defined HAVE_WAITPID || defined HAVE_WAIT3 ---- a/main.h -+++ b/main.h -@@ -35,10 +35,5 @@ - /* is default_shell unixy? */ - extern int unixy_shell; - --/**! The default value of SHELL and the shell that is used when issuing -- commands on targets. --*/ --extern char *default_shell; -- - /*! Print version information. */ - extern void print_version (void); ---- a/make.h -+++ b/make.h -@@ -333,7 +333,7 @@ - #endif - #ifdef SET_STACK_SIZE - # include <sys/resource.h> --struct rlimit stack_limit; -+extern struct rlimit stack_limit; - #endif - - /* We have to have stdarg.h or varargs.h AND v*printf or doprnt to use ---- a/print.h -+++ b/print.h -@@ -39,7 +39,7 @@ - - /* Think of the below not as an enumeration but as #defines done in a - way that we'll be able to use the value in a gdb. */ --enum debug_print_enums_e { -+extern enum debug_print_enums_e { - MAX_STACK_SHOW = 1000, - } debug_print_enums1; - ---- a/variable.c -+++ b/variable.c -@@ -29,6 +29,7 @@ - #endif - #include "hash.h" - #include "main.h" -+#include "globals.h" - - /* Incremented every time we add or remove a global variable. */ - static unsigned long variable_changenum; ---- a/variable.h -+++ b/variable.h -@@ -115,7 +115,6 @@ - extern char *variable_buffer; - extern struct variable_set_list *current_variable_set_list; - extern struct variable *default_goal_var; --extern struct variable shell_var; - - /* expand.c */ - char *variable_buffer_output (char *ptr, const char *string, unsigned int length); ---- a/debugger/file2line.h -+++ b/debugger/file2line.h -@@ -19,7 +19,7 @@ - Boston, MA 02111-1307, USA. */ - #ifndef REMAKE_FILE2LINE - #define REMAKE_FILE2LINE --struct hash_table file2lines; -+extern struct hash_table file2lines; - - typedef enum { - F2L_TARGET, ---- a/debugger/file2line.c -+++ b/debugger/file2line.c -@@ -26,6 +26,8 @@ - #include "../rule.h" - #include "./file2line.h" - -+struct hash_table file2lines; -+ - unsigned long - file2lines_hash_1 (const void *key) - { - diff --git a/sys-devel/remake/metadata.xml b/sys-devel/remake/metadata.xml deleted file mode 100644 index ab51d946705e..000000000000 --- a/sys-devel/remake/metadata.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<maintainer type="project"> - <email>base-system@gentoo.org</email> - <name>Gentoo Base System</name> -</maintainer> -<upstream> - <remote-id type="sourceforge">bashdb</remote-id> -</upstream> -</pkgmetadata> diff --git a/sys-devel/remake/remake-4.2.1.1.4-r1.ebuild b/sys-devel/remake/remake-4.2.1.1.4-r1.ebuild deleted file mode 100644 index 447b79c7375e..000000000000 --- a/sys-devel/remake/remake-4.2.1.1.4-r1.ebuild +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -MY_P="${PN}-${PV:0:5}+dbg-${PV:6}" - -DESCRIPTION="patched version of GNU make with improved error reporting, tracing and debugging" -HOMEPAGE="http://bashdb.sourceforge.net/remake/" -SRC_URI="mirror://sourceforge/bashdb/${MY_P}.tar.bz2" - -LICENSE="GPL-1" -SLOT="0" -KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ppc ~ppc64 ~s390 ~sparc x86" -IUSE="guile readline" - -RDEPEND="readline? ( sys-libs/readline:0= ) - guile? ( >=dev-scheme/guile-1.8:= )" -DEPEND="${RDEPEND}" - -S=${WORKDIR}/${MY_P} - -PATCHES=( - "${FILESDIR}"/make-4.2.1-glob-v2.patch - "${FILESDIR}"/${P}-fno-common.patch -) - -src_configure() { - use readline || export vl_cv_lib_readline=no - econf $(use_with guile) -} - -src_install() { - default - - # delete files GNU make owns and remake doesn't care about. - rm -r "${ED}"/usr/include || die - rm "${ED}"/usr/share/info/make.info* || die -} diff --git a/sys-devel/rust-std/Manifest b/sys-devel/rust-std/Manifest index 20f19f738bc3..c313ce130552 100644 --- a/sys-devel/rust-std/Manifest +++ b/sys-devel/rust-std/Manifest @@ -1,5 +1,8 @@ -DIST rustc-1.46.0-src.tar.xz 101868452 BLAKE2B da9798596b124a10d79c236a871228f05e5f571d22c2259328e7026c91e088c85f5de9c0536a16531e0cb10477bfcd16d3ac11467979f5561cb6199442b877ef SHA512 099857f1d295043587a4e2a65ef3e6a90e12c8b6958e98535a1656c113c553f9a9b621aba8a19cf21bd8d2c79d27cbfa4b8e6fabbcb3cbfee23b545be7b450b4 -DIST rustc-1.47.0-src.tar.xz 104143736 BLAKE2B 0454094dde35275488046826da87655e51bf0795481d6d08fd70d644bfc12481bca8641166106ef32f20494906025244715b16ff21a1c023f4bd2818aab42521 SHA512 6ba83c0158f8130ddeae7e070417a2121d8a548c8fe97e28bce116d84048636c75aaee78e0c92cd43a50f5679a1223fc226cc8c5ba9bbd1465e84c5c6034d5c9 -DIST rustc-1.48.0-src.tar.xz 105951736 BLAKE2B 42468fc5ac5e80c4793cfe0913cbb8e43a8def28cc8cf5ed25ab989561e2bf33e155c83e180183362535cbc9008f341eb1273087a2364672b1a4032ac2d6ca45 SHA512 4e12baa6893238a8d336ec9ebe891477d18676f271b32763474fa7a6a8b58fb3187dd4e2aa95bce482989b692cc2e1360221669d6811eec71b326f22a1756c23 -DIST rustc-1.49.0-src.tar.xz 108330280 BLAKE2B 65e36253482ded2df225cbbf15253b6c9a8ae935053b071d9fb9e7b1d47d5d3ac47a138876e4a5cfeda455c655ac06ceff2658c8668cef7d2206116906740653 SHA512 fd8bc67ec0a73d3b6bf9c1fabb7ea981ef817644b4e6ced982fa90b12eae9b55de074634a670bdfb38bfee6588603e818ddcbcc2f2a05f83057c061b4194b4b7 -DIST rustc-1.50.0-src.tar.xz 108666272 BLAKE2B abb1b6f57093334bae5892dd99c964ffaf5e2b906cc92f0b92d5786cf80484cff923643169f24f4f92a5724c21b8bd671c72531c2cd1f6fbe0ea7107b5bd923b SHA512 df3c83c0fdc9ebce6fdccddda781dea0cdbd88d2b2a8220cac40cc3a8fa957923ae834d1fa45283d4ad227b334bd9e220e37a4a1ad7a1c7aeb806ed9ed387245 +DIST rustc-1.68.2-src.tar.xz 147835648 BLAKE2B 4b6deab818d915afe67a96f4d32a758c15a832041a77d9da5d065a903ea2718e0e7ebbc0cd1baaa436b655bdb93a62e0fb76f9e37aed595c064e0857201bb091 SHA512 8b085d0351e19100e9abc24b10c44a0939a1d35ba23421da4ece345d7373f7dbad1dc6a2ae153c1259404dd96b41e2682e711cf2b0b63fd03a196760cddbcdd3 +DIST rustc-1.71.1-src.tar.xz 151983068 BLAKE2B 3dfdbc246feb84a79ae94c2de978c5585ee06cf6b683d2245869b62e28f7c79f89cc589f5431537713bf088236a0b824acefc1b68e418e9eb72e1eea98054e3f SHA512 fd0e5a16bdbeb539184513583089e55f681cb772810df357b6b1464853f7022ac02edab3dd155b2262ed0047e2a25dea3808dd078dcdfce9d399384465009db4 +DIST rustc-1.72.0-src.tar.xz 151630408 BLAKE2B 7b26e5a9335f9262567b2a6aaf3b8ad6dc813688f532c54502c12c7b59d02082a082fe49ae370b0748fb13f8245dad13a58927d8563ba96fdf3639d4a128f236 SHA512 aed27c1babfec7f9b0815bc395302cff4f8e8ed83d8d3bde202f6c86fba4aec14ad2d3e99f4e22618c6727d876262511bfbcd83513731ea4b9c664462c97945b +DIST rustc-1.73.0-src.tar.xz 154319536 BLAKE2B 077bdedb36fdbc30db3c6331ac6014615eb79393ad42e38488d037ba38eaa6542467d39b2a14228d0bf6717110f915bf6fdcf0074c6293f413720cc748316eff SHA512 75c59680a82cb9d076b9434744a1c65908524ef769293952f5d9c5779d9a9c6fa4d9aa0c7e7d6b7566a21a50a27cd6ae452b5283a4d4606b2fa1acc24dfd8e0c +DIST rustc-1.74.1-src.tar.xz 155968724 BLAKE2B e05f2379ac94b286f85791a138e1928e5b5b5a7749f0981d82c40c2a12860f55bf96bb2f0e924e35a0f8b2447b13052d38adea909aaa3199105787bb5a4861b3 SHA512 14c7e7ed2f38ab60299d8c7d41d78f042b6b57ef822d577b5138e60bdde31cf141eccd4332a25bc5da3d58eb5313d63c1448b5dfe9e11b8055bb8ea133a9038d +DIST rustc-1.75.0-src.tar.xz 159624388 BLAKE2B 8937b80585eddaa3e1f1ef948899d14a170308518c6fef9fe569560cdd870053776956743f796055f2119399b9ca6c0df12fedd789ae46324d071e5126c4e495 SHA512 7b0f25d91b1b5c317980fc88e059200bd43b56a70b445fbc72fb9b96e09775bfd3a98e9bd9d662af80f0ce3aef527c777ee82777e96ca876f47a972d63da8606 +DIST rustc-1.76.0-src.tar.xz 162267908 BLAKE2B 0cf726841a837d9906d82a6216e65edad1e3e4a798ccd1ca3824c2098d0c45473854b8bf183c6e9ca70ba095752e77c4f5ef575d98c07243d609857214175f5e SHA512 92e16cfdeb91bde341fe6c2774d92868275b07aa1d46d870ddc9291eadfe4ea9af93e06586fa7d6b8d60534903945cbbe706d354c90272712989c58d2bf174bf +DIST rustc-1.77.1-src.tar.xz 162796048 BLAKE2B 18a9fd095808ba78bf50ec94f7fd4087a1033ec79750aa593bacf64219c77ef90c030d41a7d8bc43f7ec8eb30b316c225024be4aeb517100ff6723487f8bb282 SHA512 e057ae638e4c3e54fdb367d48f4b85458121cee0d0ee1ed72f346940b8acad2f16cd9cc8abc16fcf4a17bf244b3300bb56a7e7be3bd0c23b034692c983b84fe8 diff --git a/sys-devel/rust-std/files/1.75.0-handle-vendored-sources.patch b/sys-devel/rust-std/files/1.75.0-handle-vendored-sources.patch new file mode 100644 index 000000000000..c68ceba15e82 --- /dev/null +++ b/sys-devel/rust-std/files/1.75.0-handle-vendored-sources.patch @@ -0,0 +1,45 @@ +From 4b7e0a0b56aa2446e670dfd6558380a1039a86aa Mon Sep 17 00:00:00 2001 +From: Arlo Siemsen <arsiem@microsoft.com> +Date: Thu, 4 Jan 2024 11:40:56 -0600 +Subject: [PATCH] Handle vendored sources when remapping paths + +Signed-off-by: Randy Barlow <randy@electronsweatshop.com> +--- + src/bootstrap/src/core/builder.rs | 19 ++++++++++++------- + 1 file changed, 12 insertions(+), 7 deletions(-) + +diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs +index 4e20babc55a..3770d0687b2 100644 +--- a/src/bootstrap/src/core/builder.rs ++++ b/src/bootstrap/src/core/builder.rs +@@ -1799,15 +1799,20 @@ pub fn cargo( + } + + if self.config.rust_remap_debuginfo { +- // FIXME: handle vendored sources +- let registry_src = t!(home::cargo_home()).join("registry").join("src"); + let mut env_var = OsString::new(); +- for entry in t!(std::fs::read_dir(registry_src)) { +- if !env_var.is_empty() { +- env_var.push("\t"); +- } +- env_var.push(t!(entry).path()); ++ if self.config.vendor { ++ let vendor = self.build.src.join("vendor"); ++ env_var.push(vendor); + env_var.push("=/rust/deps"); ++ } else { ++ let registry_src = t!(home::cargo_home()).join("registry").join("src"); ++ for entry in t!(std::fs::read_dir(registry_src)) { ++ if !env_var.is_empty() { ++ env_var.push("\t"); ++ } ++ env_var.push(t!(entry).path()); ++ env_var.push("=/rust/deps"); ++ } + } + cargo.env("RUSTC_CARGO_REGISTRY_SRC_TO_REMAP", env_var); + } +-- +2.43.0 + diff --git a/sys-devel/rust-std/metadata.xml b/sys-devel/rust-std/metadata.xml index c736f846eb11..99067849043d 100644 --- a/sys-devel/rust-std/metadata.xml +++ b/sys-devel/rust-std/metadata.xml @@ -1,9 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="person"> - <email>gyakovlev@gentoo.org</email> - <name>Georgy Yakovlev</name> + <maintainer type="person" proxied="yes"> + <email>randy@electronsweatshop.com</email> + <name>Randy Barlow</name> + </maintainer> + <maintainer type="person" proxied="yes"> + <email>navi@vlhl.dev</email> + <name>Anna Figueiredo Gomes</name> </maintainer> <maintainer type="project"> <email>rust@gentoo.org</email> diff --git a/sys-devel/rust-std/rust-std-1.46.0.ebuild b/sys-devel/rust-std/rust-std-1.46.0.ebuild deleted file mode 100644 index f3d2f32b9f2e..000000000000 --- a/sys-devel/rust-std/rust-std-1.46.0.ebuild +++ /dev/null @@ -1,146 +0,0 @@ -# Copyright 2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7,8} ) - -inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs - -DESCRIPTION="Rust standard library, standalone (for crossdev)" -HOMEPAGE="https://www.rust-lang.org" -SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz" - -LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" -SLOT="stable/$(ver_cut 1-2)" -# please do not keyword yet -#KEYWORDS="" #nowarn -IUSE="debug" - -BDEPEND=" - ${PYTHON_DEPS} - ~dev-lang/rust-${PV}:= -" - -DEPEND="|| - ( - >="${CATEGORY}"/gcc-4.7:* - >="${CATEGORY}"/clang-3.5:* - ) -" - -RDEPEND="${DEPEND}" - -# need full compiler to run tests -RESTRICT="test" - -QA_FLAGS_IGNORED="usr/lib.*/rust-.*/rustlib/.*/lib/lib.*.so" - -S="${WORKDIR}/${P/-std/c}-src" - -# -# The cross magic -# -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY} == cross-* ]] ; then - export CTARGET=${CATEGORY#cross-} - fi -fi - -is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } - -toml_usex() { - usex "$1" true false -} - -pkg_pretend() { - is_cross || die "${PN} should only be used for cross" -} - -pkg_setup() { - python-any-r1_pkg_setup -} - -src_prepare() { - default -} - -src_configure() { - # do the great cleanup - strip-flags - filter-flags '-mcpu=*' '-march=*' '-mtune=*' '-m32' '-m64' - strip-unsupported-flags - - local rust_root x - rust_root="$(rustc --print sysroot)" - rtarget="$(rust_abi ${CTARGET})" - rtarget="${ERUST_STD_RTARGET:-${rtarget}}" # some targets need to be custom. - rbuild="$(rust_abi ${CBUILD})" - rhost="$(rust_abi ${CHOST})" - - echo - for x in CATEGORY rust_root rbuild rhost rtarget RUSTFLAGS CFLAGS CXXFLAGS LDFLAGS; do - einfo "$(printf '%10s' ${x^^}:) ${!x}" - done - - cat <<- EOF > "${S}"/config.toml - [build] - build = "${rbuild}" - host = ["${rhost}"] - target = ["${rtarget}"] - cargo = "${rust_root}/bin/cargo" - rustc = "${rust_root}/bin/rustc" - submodules = false - python = "${EPYTHON}" - locked-deps = true - vendor = true - extended = true - verbose = 2 - cargo-native-static = false - [install] - prefix = "${EPREFIX}/usr" - libdir = "$(get_libdir)/${P/-std/}" - [rust] - optimize = true - debug = $(toml_usex debug) - debug-assertions = $(toml_usex debug) - debuginfo-level-rustc = 0 - backtrace = true - incremental = false - default-linker = "$(tc-getCC)" - rpath = false - dist-src = false - remap-debuginfo = true - jemalloc = false - [dist] - src-tarball = false - [target.${rtarget}] - cc = "$(tc-getCC ${CTARGET})" - cxx = "$(tc-getCXX ${CTARGET})" - linker = "$(tc-getCC ${CTARGET})" - ar = "$(tc-getAR ${CTARGET})" - $(usex elibc_musl 'crt-static = false' '') - EOF - - einfo "${PN^} configured with the following settings:" - cat "${S}"/config.toml || die -} - -src_compile() { - env RUST_BACKTRACE=1 \ - "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) \ - src/libstd --stage 0 || die -} - -src_test() { - ewarn "${PN} can't run tests" -} - -src_install() { - local rustlib="$(get_libdir)/${P/-std/}/rustlib" - dodir "/usr/${rustlib}" - pushd "build/${rhost}/stage0-sysroot/${rustlib}" > /dev/null || die - cp -pPRv "${rtarget}" "${ED}/usr/${rustlib}" || die - popd > /dev/null || die -} diff --git a/sys-devel/rust-std/rust-std-1.50.0.ebuild b/sys-devel/rust-std/rust-std-1.68.2.ebuild index 7ca481644a6a..dec75d768962 100644 --- a/sys-devel/rust-std/rust-std-1.50.0.ebuild +++ b/sys-devel/rust-std/rust-std-1.68.2.ebuild @@ -1,9 +1,9 @@ -# Copyright 2020-2021 Gentoo Authors +# Copyright 2020-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{7,8,9} ) +PYTHON_COMPAT=( python3_{9..11} ) inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs @@ -124,11 +124,12 @@ src_configure() { [dist] src-tarball = false [target.${rtarget}] + ar = "$(tc-getAR ${CTARGET})" cc = "$(tc-getCC ${CTARGET})" cxx = "$(tc-getCXX ${CTARGET})" linker = "$(tc-getCC ${CTARGET})" - ar = "$(tc-getAR ${CTARGET})" - $(usex elibc_musl 'crt-static = false' '') + ranlib = "$(tc-getRANLIB ${CTARGET})" + $(usev elibc_musl 'crt-static = false') EOF einfo "${PN^} configured with the following settings:" diff --git a/sys-devel/rust-std/rust-std-1.47.0.ebuild b/sys-devel/rust-std/rust-std-1.71.1.ebuild index e0bcdc1d61fc..dec75d768962 100644 --- a/sys-devel/rust-std/rust-std-1.47.0.ebuild +++ b/sys-devel/rust-std/rust-std-1.71.1.ebuild @@ -1,9 +1,9 @@ -# Copyright 2020 Gentoo Authors +# Copyright 2020-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{7,8,9} ) +PYTHON_COMPAT=( python3_{9..11} ) inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs @@ -124,11 +124,12 @@ src_configure() { [dist] src-tarball = false [target.${rtarget}] + ar = "$(tc-getAR ${CTARGET})" cc = "$(tc-getCC ${CTARGET})" cxx = "$(tc-getCXX ${CTARGET})" linker = "$(tc-getCC ${CTARGET})" - ar = "$(tc-getAR ${CTARGET})" - $(usex elibc_musl 'crt-static = false' '') + ranlib = "$(tc-getRANLIB ${CTARGET})" + $(usev elibc_musl 'crt-static = false') EOF einfo "${PN^} configured with the following settings:" diff --git a/sys-devel/rust-std/rust-std-1.48.0.ebuild b/sys-devel/rust-std/rust-std-1.72.0.ebuild index e0bcdc1d61fc..dec75d768962 100644 --- a/sys-devel/rust-std/rust-std-1.48.0.ebuild +++ b/sys-devel/rust-std/rust-std-1.72.0.ebuild @@ -1,9 +1,9 @@ -# Copyright 2020 Gentoo Authors +# Copyright 2020-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{7,8,9} ) +PYTHON_COMPAT=( python3_{9..11} ) inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs @@ -124,11 +124,12 @@ src_configure() { [dist] src-tarball = false [target.${rtarget}] + ar = "$(tc-getAR ${CTARGET})" cc = "$(tc-getCC ${CTARGET})" cxx = "$(tc-getCXX ${CTARGET})" linker = "$(tc-getCC ${CTARGET})" - ar = "$(tc-getAR ${CTARGET})" - $(usex elibc_musl 'crt-static = false' '') + ranlib = "$(tc-getRANLIB ${CTARGET})" + $(usev elibc_musl 'crt-static = false') EOF einfo "${PN^} configured with the following settings:" diff --git a/sys-devel/rust-std/rust-std-1.49.0.ebuild b/sys-devel/rust-std/rust-std-1.73.0.ebuild index 7ca481644a6a..1432096c3a0d 100644 --- a/sys-devel/rust-std/rust-std-1.49.0.ebuild +++ b/sys-devel/rust-std/rust-std-1.73.0.ebuild @@ -1,9 +1,9 @@ -# Copyright 2020-2021 Gentoo Authors +# Copyright 2020-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{7,8,9} ) +PYTHON_COMPAT=( python3_{9..12} ) inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs @@ -11,7 +11,7 @@ DESCRIPTION="Rust standard library, standalone (for crossdev)" HOMEPAGE="https://www.rust-lang.org" SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz" -LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4" SLOT="stable/$(ver_cut 1-2)" # please do not keyword #KEYWORDS="" #nowarn @@ -124,11 +124,12 @@ src_configure() { [dist] src-tarball = false [target.${rtarget}] + ar = "$(tc-getAR ${CTARGET})" cc = "$(tc-getCC ${CTARGET})" cxx = "$(tc-getCXX ${CTARGET})" linker = "$(tc-getCC ${CTARGET})" - ar = "$(tc-getAR ${CTARGET})" - $(usex elibc_musl 'crt-static = false' '') + ranlib = "$(tc-getRANLIB ${CTARGET})" + $(usev elibc_musl 'crt-static = false') EOF einfo "${PN^} configured with the following settings:" diff --git a/sys-devel/rust-std/rust-std-1.74.1.ebuild b/sys-devel/rust-std/rust-std-1.74.1.ebuild new file mode 100644 index 000000000000..1432096c3a0d --- /dev/null +++ b/sys-devel/rust-std/rust-std-1.74.1.ebuild @@ -0,0 +1,155 @@ +# Copyright 2020-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..12} ) + +inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs + +DESCRIPTION="Rust standard library, standalone (for crossdev)" +HOMEPAGE="https://www.rust-lang.org" +SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz" + +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4" +SLOT="stable/$(ver_cut 1-2)" +# please do not keyword +#KEYWORDS="" #nowarn +IUSE="debug" + +BDEPEND=" + ${PYTHON_DEPS} + ~dev-lang/rust-${PV}:= +" + +DEPEND="|| + ( + >="${CATEGORY}"/gcc-4.7:* + >="${CATEGORY}"/clang-3.5:* + ) +" + +RDEPEND="${DEPEND}" + +# need full compiler to run tests +RESTRICT="test" + +QA_FLAGS_IGNORED="usr/lib/rust/${PV}/rustlib/.*/lib/lib.*.so" + +S="${WORKDIR}/${P/-std/c}-src" + +# +# The cross magic +# +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +is_cross() { + [[ ${CHOST} != ${CTARGET} ]] +} + +toml_usex() { + usex "$1" true false +} + +pkg_pretend() { + is_cross || die "${PN} should only be used for cross" +} + +pkg_setup() { + python-any-r1_pkg_setup +} + +src_prepare() { + default +} + +src_configure() { + # do the great cleanup + strip-flags + filter-flags '-mcpu=*' '-march=*' '-mtune=*' '-m32' '-m64' + strip-unsupported-flags + + local rust_root x + rust_root="$(rustc --print sysroot)" + rtarget="$(rust_abi ${CTARGET})" + rtarget="${ERUST_STD_RTARGET:-${rtarget}}" # some targets need to be custom. + rbuild="$(rust_abi ${CBUILD})" + rhost="$(rust_abi ${CHOST})" + + echo + for x in CATEGORY rust_root rbuild rhost rtarget RUSTFLAGS CFLAGS CXXFLAGS LDFLAGS; do + einfo "$(printf '%10s' ${x^^}:) ${!x}" + done + + cat <<- EOF > "${S}"/config.toml + [build] + build = "${rbuild}" + host = ["${rhost}"] + target = ["${rtarget}"] + cargo = "${rust_root}/bin/cargo" + rustc = "${rust_root}/bin/rustc" + submodules = false + python = "${EPYTHON}" + locked-deps = true + vendor = true + extended = true + verbose = 2 + cargo-native-static = false + [install] + prefix = "${EPREFIX}/usr/lib/${PN}/${PV}" + sysconfdir = "etc" + docdir = "share/doc/rust" + bindir = "bin" + libdir = "lib" + mandir = "share/man" + [rust] + # https://github.com/rust-lang/rust/issues/54872 + codegen-units-std = 1 + optimize = true + debug = $(toml_usex debug) + debug-assertions = $(toml_usex debug) + debuginfo-level-rustc = 0 + backtrace = true + incremental = false + default-linker = "$(tc-getCC)" + rpath = false + dist-src = false + remap-debuginfo = true + jemalloc = false + [dist] + src-tarball = false + [target.${rtarget}] + ar = "$(tc-getAR ${CTARGET})" + cc = "$(tc-getCC ${CTARGET})" + cxx = "$(tc-getCXX ${CTARGET})" + linker = "$(tc-getCC ${CTARGET})" + ranlib = "$(tc-getRANLIB ${CTARGET})" + $(usev elibc_musl 'crt-static = false') + EOF + + einfo "${PN^} configured with the following settings:" + cat "${S}"/config.toml || die +} + +src_compile() { + env RUST_BACKTRACE=1 \ + "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) \ + library/std --stage 0 || die +} + +src_test() { + ewarn "${PN} can't run tests" +} + +src_install() { + local rustlib="lib/rust/${PV}/lib/rustlib" + dodir "/usr/${rustlib}" + pushd "build/${rhost}/stage0-sysroot/lib/rustlib" > /dev/null || die + cp -pPRv "${rtarget}" "${ED}/usr/${rustlib}" || die + popd > /dev/null || die +} diff --git a/sys-devel/rust-std/rust-std-1.75.0.ebuild b/sys-devel/rust-std/rust-std-1.75.0.ebuild new file mode 100644 index 000000000000..c63efccf3b0c --- /dev/null +++ b/sys-devel/rust-std/rust-std-1.75.0.ebuild @@ -0,0 +1,159 @@ +# Copyright 2020-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..12} ) + +inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs + +DESCRIPTION="Rust standard library, standalone (for crossdev)" +HOMEPAGE="https://www.rust-lang.org" +SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz" + +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4" +SLOT="stable/$(ver_cut 1-2)" +# please do not keyword +#KEYWORDS="" #nowarn +IUSE="debug" + +BDEPEND=" + ${PYTHON_DEPS} + ~dev-lang/rust-${PV}:= +" + +DEPEND="|| + ( + >="${CATEGORY}"/gcc-4.7:* + >="${CATEGORY}"/clang-3.5:* + ) +" + +RDEPEND="${DEPEND}" + +# need full compiler to run tests +RESTRICT="test" + +QA_FLAGS_IGNORED="usr/lib/rust/${PV}/rustlib/.*/lib/lib.*.so" + +PATCHES=( + "${FILESDIR}"/1.75.0-handle-vendored-sources.patch # remove for >=1.77.0 +) + +S="${WORKDIR}/${P/-std/c}-src" + +# +# The cross magic +# +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +is_cross() { + [[ ${CHOST} != ${CTARGET} ]] +} + +toml_usex() { + usex "$1" true false +} + +pkg_pretend() { + is_cross || die "${PN} should only be used for cross" +} + +pkg_setup() { + python-any-r1_pkg_setup +} + +src_prepare() { + default +} + +src_configure() { + # do the great cleanup + strip-flags + filter-flags '-mcpu=*' '-march=*' '-mtune=*' '-m32' '-m64' + strip-unsupported-flags + + local rust_root x + rust_root="$(rustc --print sysroot)" + rtarget="$(rust_abi ${CTARGET})" + rtarget="${ERUST_STD_RTARGET:-${rtarget}}" # some targets need to be custom. + rbuild="$(rust_abi ${CBUILD})" + rhost="$(rust_abi ${CHOST})" + + echo + for x in CATEGORY rust_root rbuild rhost rtarget RUSTFLAGS CFLAGS CXXFLAGS LDFLAGS; do + einfo "$(printf '%10s' ${x^^}:) ${!x}" + done + + cat <<- EOF > "${S}"/config.toml + [build] + build = "${rbuild}" + host = ["${rhost}"] + target = ["${rtarget}"] + cargo = "${rust_root}/bin/cargo" + rustc = "${rust_root}/bin/rustc" + submodules = false + python = "${EPYTHON}" + locked-deps = true + vendor = true + extended = true + verbose = 2 + cargo-native-static = false + [install] + prefix = "${EPREFIX}/usr/lib/${PN}/${PV}" + sysconfdir = "etc" + docdir = "share/doc/rust" + bindir = "bin" + libdir = "lib" + mandir = "share/man" + [rust] + # https://github.com/rust-lang/rust/issues/54872 + codegen-units-std = 1 + optimize = true + debug = $(toml_usex debug) + debug-assertions = $(toml_usex debug) + debuginfo-level-rustc = 0 + backtrace = true + incremental = false + default-linker = "$(tc-getCC)" + rpath = false + dist-src = false + remap-debuginfo = true + jemalloc = false + [dist] + src-tarball = false + [target.${rtarget}] + ar = "$(tc-getAR ${CTARGET})" + cc = "$(tc-getCC ${CTARGET})" + cxx = "$(tc-getCXX ${CTARGET})" + linker = "$(tc-getCC ${CTARGET})" + ranlib = "$(tc-getRANLIB ${CTARGET})" + $(usev elibc_musl 'crt-static = false') + EOF + + einfo "${PN^} configured with the following settings:" + cat "${S}"/config.toml || die +} + +src_compile() { + env RUST_BACKTRACE=1 \ + "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) \ + library/std --stage 0 || die +} + +src_test() { + ewarn "${PN} can't run tests" +} + +src_install() { + local rustlib="lib/rust/${PV}/lib/rustlib" + dodir "/usr/${rustlib}" + pushd "build/${rhost}/stage0-sysroot/lib/rustlib" > /dev/null || die + cp -pPRv "${rtarget}" "${ED}/usr/${rustlib}" || die + popd > /dev/null || die +} diff --git a/sys-devel/rust-std/rust-std-1.76.0.ebuild b/sys-devel/rust-std/rust-std-1.76.0.ebuild new file mode 100644 index 000000000000..c63efccf3b0c --- /dev/null +++ b/sys-devel/rust-std/rust-std-1.76.0.ebuild @@ -0,0 +1,159 @@ +# Copyright 2020-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..12} ) + +inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs + +DESCRIPTION="Rust standard library, standalone (for crossdev)" +HOMEPAGE="https://www.rust-lang.org" +SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz" + +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4" +SLOT="stable/$(ver_cut 1-2)" +# please do not keyword +#KEYWORDS="" #nowarn +IUSE="debug" + +BDEPEND=" + ${PYTHON_DEPS} + ~dev-lang/rust-${PV}:= +" + +DEPEND="|| + ( + >="${CATEGORY}"/gcc-4.7:* + >="${CATEGORY}"/clang-3.5:* + ) +" + +RDEPEND="${DEPEND}" + +# need full compiler to run tests +RESTRICT="test" + +QA_FLAGS_IGNORED="usr/lib/rust/${PV}/rustlib/.*/lib/lib.*.so" + +PATCHES=( + "${FILESDIR}"/1.75.0-handle-vendored-sources.patch # remove for >=1.77.0 +) + +S="${WORKDIR}/${P/-std/c}-src" + +# +# The cross magic +# +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +is_cross() { + [[ ${CHOST} != ${CTARGET} ]] +} + +toml_usex() { + usex "$1" true false +} + +pkg_pretend() { + is_cross || die "${PN} should only be used for cross" +} + +pkg_setup() { + python-any-r1_pkg_setup +} + +src_prepare() { + default +} + +src_configure() { + # do the great cleanup + strip-flags + filter-flags '-mcpu=*' '-march=*' '-mtune=*' '-m32' '-m64' + strip-unsupported-flags + + local rust_root x + rust_root="$(rustc --print sysroot)" + rtarget="$(rust_abi ${CTARGET})" + rtarget="${ERUST_STD_RTARGET:-${rtarget}}" # some targets need to be custom. + rbuild="$(rust_abi ${CBUILD})" + rhost="$(rust_abi ${CHOST})" + + echo + for x in CATEGORY rust_root rbuild rhost rtarget RUSTFLAGS CFLAGS CXXFLAGS LDFLAGS; do + einfo "$(printf '%10s' ${x^^}:) ${!x}" + done + + cat <<- EOF > "${S}"/config.toml + [build] + build = "${rbuild}" + host = ["${rhost}"] + target = ["${rtarget}"] + cargo = "${rust_root}/bin/cargo" + rustc = "${rust_root}/bin/rustc" + submodules = false + python = "${EPYTHON}" + locked-deps = true + vendor = true + extended = true + verbose = 2 + cargo-native-static = false + [install] + prefix = "${EPREFIX}/usr/lib/${PN}/${PV}" + sysconfdir = "etc" + docdir = "share/doc/rust" + bindir = "bin" + libdir = "lib" + mandir = "share/man" + [rust] + # https://github.com/rust-lang/rust/issues/54872 + codegen-units-std = 1 + optimize = true + debug = $(toml_usex debug) + debug-assertions = $(toml_usex debug) + debuginfo-level-rustc = 0 + backtrace = true + incremental = false + default-linker = "$(tc-getCC)" + rpath = false + dist-src = false + remap-debuginfo = true + jemalloc = false + [dist] + src-tarball = false + [target.${rtarget}] + ar = "$(tc-getAR ${CTARGET})" + cc = "$(tc-getCC ${CTARGET})" + cxx = "$(tc-getCXX ${CTARGET})" + linker = "$(tc-getCC ${CTARGET})" + ranlib = "$(tc-getRANLIB ${CTARGET})" + $(usev elibc_musl 'crt-static = false') + EOF + + einfo "${PN^} configured with the following settings:" + cat "${S}"/config.toml || die +} + +src_compile() { + env RUST_BACKTRACE=1 \ + "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) \ + library/std --stage 0 || die +} + +src_test() { + ewarn "${PN} can't run tests" +} + +src_install() { + local rustlib="lib/rust/${PV}/lib/rustlib" + dodir "/usr/${rustlib}" + pushd "build/${rhost}/stage0-sysroot/lib/rustlib" > /dev/null || die + cp -pPRv "${rtarget}" "${ED}/usr/${rustlib}" || die + popd > /dev/null || die +} diff --git a/sys-devel/rust-std/rust-std-1.77.1.ebuild b/sys-devel/rust-std/rust-std-1.77.1.ebuild new file mode 100644 index 000000000000..7037dfd72e6f --- /dev/null +++ b/sys-devel/rust-std/rust-std-1.77.1.ebuild @@ -0,0 +1,155 @@ +# Copyright 2020-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..12} ) + +inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs + +DESCRIPTION="Rust standard library, standalone (for crossdev)" +HOMEPAGE="https://www.rust-lang.org" +SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz" + +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4" +SLOT="stable/$(ver_cut 1-2)" +# please do not keyword +#KEYWORDS="" #nowarn +IUSE="debug" + +BDEPEND=" + ${PYTHON_DEPS} + ~dev-lang/rust-${PV}:= +" + +DEPEND="|| + ( + >="${CATEGORY}"/gcc-4.7:* + >="${CATEGORY}"/clang-3.5:* + ) +" + +RDEPEND="${DEPEND}" + +# need full compiler to run tests +RESTRICT="test" + +QA_FLAGS_IGNORED="usr/lib/rust/${PV}/rustlib/.*/lib/lib.*.so" + +S="${WORKDIR}/${P/-std/c}-src" + +# +# The cross magic +# +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +is_cross() { + [[ ${CHOST} != ${CTARGET} ]] +} + +toml_usex() { + usex "$1" true false +} + +pkg_pretend() { + is_cross || die "${PN} should only be used for cross" +} + +pkg_setup() { + python-any-r1_pkg_setup +} + +src_prepare() { + default +} + +src_configure() { + # do the great cleanup + strip-flags + filter-flags '-mcpu=*' '-march=*' '-mtune=*' '-m32' '-m64' + strip-unsupported-flags + + local rust_root x + rust_root="$(rustc --print sysroot)" + rtarget="$(rust_abi ${CTARGET})" + rtarget="${ERUST_STD_RTARGET:-${rtarget}}" # some targets need to be custom. + rbuild="$(rust_abi ${CBUILD})" + rhost="$(rust_abi ${CHOST})" + + echo + for x in CATEGORY rust_root rbuild rhost rtarget RUSTFLAGS CFLAGS CXXFLAGS LDFLAGS; do + einfo "$(printf '%10s' ${x^^}:) ${!x}" + done + + cat <<- EOF > "${S}"/config.toml + [build] + build = "${rbuild}" + host = ["${rhost}"] + target = ["${rtarget}"] + cargo = "${rust_root}/bin/cargo" + rustc = "${rust_root}/bin/rustc" + submodules = false + python = "${EPYTHON}" + locked-deps = true + vendor = true + extended = true + verbose = 2 + cargo-native-static = false + [install] + prefix = "${EPREFIX}/usr/lib/${PN}/${PV}" + sysconfdir = "etc" + docdir = "share/doc/rust" + bindir = "bin" + libdir = "lib" + mandir = "share/man" + [rust] + # https://github.com/rust-lang/rust/issues/54872 + codegen-units-std = 1 + optimize = true + debug = $(toml_usex debug) + debug-assertions = $(toml_usex debug) + debuginfo-level-rustc = 0 + backtrace = true + incremental = false + default-linker = "$(tc-getCC)" + rpath = false + dist-src = false + remap-debuginfo = true + jemalloc = false + [dist] + src-tarball = false + [target.${rtarget}] + ar = "$(tc-getAR ${CTARGET})" + cc = "$(tc-getCC ${CTARGET})" + cxx = "$(tc-getCXX ${CTARGET})" + linker = "$(tc-getCC ${CTARGET})" + ranlib = "$(tc-getRANLIB ${CTARGET})" + $(usev elibc_musl 'crt-static = false') + EOF + + einfo "${PN^} configured with the following settings:" + cat "${S}"/config.toml || die +} + +src_compile() { + env RUST_BACKTRACE=1 \ + "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) \ + library/std --stage 0 || die +} + +src_test() { + ewarn "${PN} can't run tests" +} + +src_install() { + local rustlib="lib/rust/${PV}/lib/rustlib" + dodir "/usr/${rustlib}" + pushd "build/${rhost}/stage0-sysroot/lib/rustlib" > /dev/null || die + cp -pPRv "${rtarget}" "${ED}/usr/${rustlib}" || die + popd > /dev/null || die +} diff --git a/sys-devel/slibtool/Manifest b/sys-devel/slibtool/Manifest deleted file mode 100644 index a01b497510e1..000000000000 --- a/sys-devel/slibtool/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST slibtool-0.5.32.tar.xz 72820 BLAKE2B 2098af643b9591d85a9fa2d34c4a0c06af664786acd15f26ebebe966d4fbac2085fa8525cdb28d7087bd59e16334f793bbb87ada7011572a8ac7ada0ca5ab770 SHA512 60c6bb8cd2e49d5a417b61c96b81fd25534bc9915d8b3db0078ae6469685591997a503fcabb0cf1b336f883e61c32892dc9d39d69b4041ef9d49d6cd52f760a5 -DIST slibtool-0.5.33.tar.xz 74100 BLAKE2B ae4901fb116c1c9463d7a817dc0c3aff2de0983b19d0ca84d5081aa4ac0f6b7a386ccf4cc3916c799ecc8d053a1b8dd71f7f8aafeae358d3931ce4ebc68932e0 SHA512 d4fd15669f8792a09f162f124ff92544efbc0e963b0ed5e8b9f3521f8da204380c6d9f175cfac818e769d5e90ae5d52eddfccdecf82880c11083997dca676ae4 diff --git a/sys-devel/slibtool/slibtool-0.5.32.ebuild b/sys-devel/slibtool/slibtool-0.5.32.ebuild deleted file mode 100644 index 515a39ae78f4..000000000000 --- a/sys-devel/slibtool/slibtool-0.5.32.ebuild +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit toolchain-funcs - -# git.foss21.org is the official repository per upstream -DESCRIPTION="A skinny libtool implementation, written in C" -HOMEPAGE="https://git.foss21.org/slibtool" -if [[ "${PV}" == *9999 ]] ; then - inherit git-r3 - EGIT_REPO_URI="https://git.foss21.org/slibtool" -else - SRC_URI="https://dl.midipix.org/slibtool/${P}.tar.xz" - KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x64-macos" -fi - -LICENSE="MIT" -SLOT="0" - -src_configure() { - # Custom configure script (not generated by autoconf) - ./configure \ - --compiler=$(tc-getCC) \ - --host=${CHOST} \ - --prefix="${EPREFIX}"/usr \ - || die -} diff --git a/sys-devel/slibtool/slibtool-0.5.33.ebuild b/sys-devel/slibtool/slibtool-0.5.33.ebuild deleted file mode 100644 index 515a39ae78f4..000000000000 --- a/sys-devel/slibtool/slibtool-0.5.33.ebuild +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit toolchain-funcs - -# git.foss21.org is the official repository per upstream -DESCRIPTION="A skinny libtool implementation, written in C" -HOMEPAGE="https://git.foss21.org/slibtool" -if [[ "${PV}" == *9999 ]] ; then - inherit git-r3 - EGIT_REPO_URI="https://git.foss21.org/slibtool" -else - SRC_URI="https://dl.midipix.org/slibtool/${P}.tar.xz" - KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x64-macos" -fi - -LICENSE="MIT" -SLOT="0" - -src_configure() { - # Custom configure script (not generated by autoconf) - ./configure \ - --compiler=$(tc-getCC) \ - --host=${CHOST} \ - --prefix="${EPREFIX}"/usr \ - || die -} diff --git a/sys-devel/slibtool/slibtool-9999.ebuild b/sys-devel/slibtool/slibtool-9999.ebuild deleted file mode 100644 index 515a39ae78f4..000000000000 --- a/sys-devel/slibtool/slibtool-9999.ebuild +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit toolchain-funcs - -# git.foss21.org is the official repository per upstream -DESCRIPTION="A skinny libtool implementation, written in C" -HOMEPAGE="https://git.foss21.org/slibtool" -if [[ "${PV}" == *9999 ]] ; then - inherit git-r3 - EGIT_REPO_URI="https://git.foss21.org/slibtool" -else - SRC_URI="https://dl.midipix.org/slibtool/${P}.tar.xz" - KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x64-macos" -fi - -LICENSE="MIT" -SLOT="0" - -src_configure() { - # Custom configure script (not generated by autoconf) - ./configure \ - --compiler=$(tc-getCC) \ - --host=${CHOST} \ - --prefix="${EPREFIX}"/usr \ - || die -} diff --git a/sys-devel/smatch/Manifest b/sys-devel/smatch/Manifest index 758f2f837322..9ca3a1ada7b3 100644 --- a/sys-devel/smatch/Manifest +++ b/sys-devel/smatch/Manifest @@ -1 +1 @@ -DIST smatch-1.60.tar.gz 558479 BLAKE2B d5e564c32e33dc38847f9a258b4b47285f190652181db9b8850c832c0cf4d8a3302d989a7b42592e73a713927a29565565e83a9be1b0a5c9d10869fce278a0be SHA512 2920c9d4c500db36cfa60db5be70d157ed16abd729279462faef6f79e0756bd017ec91b8f857d19fdebd8a9d709b0555635700a2864cf0a84daa61cf2ca3eecd +DIST smatch-1.72.tar.gz 1431923 BLAKE2B ec4119fce985876afc9a46a74a0a56e8e8cb271a964c16496972c59ade95aa3d2df3a839a819e31cb081ca8a3b1f6bf6934ec97d73209091cfd86c87c1433557 SHA512 6d12e9ba85f332fcc56657296596e811cf3b75d4ad37007e07feb31baa4b315732361915972a2139ae13f75b8a73f953488ceb9de41529db9e84c81fb6fde77e diff --git a/sys-devel/smatch/metadata.xml b/sys-devel/smatch/metadata.xml index b88d066159b6..d9eaaf746001 100644 --- a/sys-devel/smatch/metadata.xml +++ b/sys-devel/smatch/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>toolchain@gentoo.org</email> diff --git a/sys-devel/smatch/smatch-1.60.ebuild b/sys-devel/smatch/smatch-1.72.ebuild index 9423f1d108f6..adff98d916f1 100644 --- a/sys-devel/smatch/smatch-1.60.ebuild +++ b/sys-devel/smatch/smatch-1.72.ebuild @@ -1,33 +1,33 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 inherit toolchain-funcs -if [[ ${PV} == "9999" ]] ; then - EGIT_REPO_URI="git://repo.or.cz/${PN}.git - http://repo.or.cz/r/${PN}.git" +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://repo.or.cz/${PN}.git + https://repo.or.cz/r/${PN}.git" inherit git-r3 else SRC_URI="http://repo.or.cz/w/smatch.git/snapshot/${PV}.tar.gz -> ${P}.tar.gz mirror://gentoo/${P}.tar.gz" + # Update on bumps + S="${WORKDIR}"/${P}-7f4b936 + KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86" - S=${WORKDIR}/${PN} fi -DESCRIPTION="static analysis tool for C" +DESCRIPTION="Static analysis tool for C" HOMEPAGE="http://smatch.sourceforge.net/" -LICENSE="OSL-1.1" +# bug #853733 +LICENSE="GPL-2+ MIT OSL-1.1" SLOT="0" -IUSE="" RDEPEND="dev-db/sqlite" DEPEND="${RDEPEND}" BDEPEND="virtual/pkgconfig" -S=${WORKDIR}/${P}-7a4fdad - src_prepare() { default diff --git a/sys-devel/smatch/smatch-9999.ebuild b/sys-devel/smatch/smatch-9999.ebuild index 8ba49a55ed46..adff98d916f1 100644 --- a/sys-devel/smatch/smatch-9999.ebuild +++ b/sys-devel/smatch/smatch-9999.ebuild @@ -1,25 +1,28 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 inherit toolchain-funcs -if [[ ${PV} == "9999" ]] ; then +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://repo.or.cz/${PN}.git + https://repo.or.cz/r/${PN}.git" inherit git-r3 - EGIT_REPO_URI="https://repo.or.cz/r/${PN}.git" else SRC_URI="http://repo.or.cz/w/smatch.git/snapshot/${PV}.tar.gz -> ${P}.tar.gz mirror://gentoo/${P}.tar.gz" + # Update on bumps + S="${WORKDIR}"/${P}-7f4b936 + KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86" - S=${WORKDIR}/${PN} fi -DESCRIPTION="static analysis tool for C" +DESCRIPTION="Static analysis tool for C" HOMEPAGE="http://smatch.sourceforge.net/" -LICENSE="OSL-1.1" +# bug #853733 +LICENSE="GPL-2+ MIT OSL-1.1" SLOT="0" -IUSE="" RDEPEND="dev-db/sqlite" DEPEND="${RDEPEND}" diff --git a/sys-devel/sparse/Manifest b/sys-devel/sparse/Manifest index a706e2ac3fcc..283b98fc1480 100644 --- a/sys-devel/sparse/Manifest +++ b/sys-devel/sparse/Manifest @@ -1 +1 @@ -DIST sparse-0.6.3.tar.xz 350676 BLAKE2B 5c8f54f3b7d2095df30b9a59a151e307ebedac5dbb6910ab5684b298c2b427e55dd43697e698fd289fb0d8e824ba4d72c2761772babb9f438e622f439ab3448d SHA512 33170065ea5967d7c640a7551acc78d7efee9f7aa6a9edf6afe2cdd8a04ea5cebe7b5dcdeebf791d384542b8bcdd4e818c75e7ae2e7aa4e1edbd56b68367b28f +DIST sparse-0.6.4.tar.xz 370840 BLAKE2B 4b21d26c87df65f08928438c311582a45f4cbbb5ed2bb399c3521d1e40630006d794b4f1e545693e82225f086968cf686c5bfb29059644a31812120f07caebe2 SHA512 4ada31e588469d15862579dd7eb926ce1ad717bf96d38d425b9153f2efe73949fdda5bc59d05d926614a08d70e656e4ff531a5f0a1cf8e7725c596dcdba169f9 diff --git a/sys-devel/sparse/metadata.xml b/sys-devel/sparse/metadata.xml index ee8e0692a0ca..4eec8f82d259 100644 --- a/sys-devel/sparse/metadata.xml +++ b/sys-devel/sparse/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person"> <email>zx2c4@gentoo.org</email> @@ -10,7 +10,7 @@ <name>Gentoo Toolchain Project</name> </maintainer> <use> - <flag name="gtk">Build the test-inspect utility (requires <pkg>x11-libs/gtk+</pkg> version 2)</flag> + <flag name="gtk">Build the test-inspect utility (requires <pkg>x11-libs/gtk+</pkg>:3)</flag> <flag name="llvm">Build the sparse-llvm utility</flag> <flag name="xml">Build the c2xml utility (requires <pkg>dev-libs/libxml2</pkg>)</flag> </use> diff --git a/sys-devel/sparse/sparse-0.6.3.ebuild b/sys-devel/sparse/sparse-0.6.4-r2.ebuild index 0fcda7847330..726fd8b0cfe3 100644 --- a/sys-devel/sparse/sparse-0.6.3.ebuild +++ b/sys-devel/sparse/sparse-0.6.4-r2.ebuild @@ -1,9 +1,10 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit llvm multilib toolchain-funcs +LLVM_MAX_SLOT=14 +inherit llvm toolchain-funcs DESCRIPTION="C semantic parser" HOMEPAGE="https://sparse.wiki.kernel.org/index.php/Main_Page" @@ -21,16 +22,19 @@ SLOT="0" IUSE="gtk llvm sqlite test xml" RESTRICT="!test? ( test )" -LLVM_MAX_SLOT=10 - -RDEPEND="gtk? ( x11-libs/gtk+:2 ) - llvm? ( sys-devel/llvm:${LLVM_MAX_SLOT}= ) +RDEPEND="gtk? ( x11-libs/gtk+:3 ) + llvm? ( <sys-devel/llvm-$((${LLVM_MAX_SLOT} + 1)):= ) sqlite? ( dev-db/sqlite:= ) xml? ( dev-libs/libxml2 )" -DEPEND="${RDEPEND} - gtk? ( virtual/pkgconfig ) +DEPEND="${RDEPEND}" +BDEPEND="gtk? ( virtual/pkgconfig ) xml? ( virtual/pkgconfig )" +llvm_check_deps() { + has_version "sys-devel/llvm:${LLVM_SLOT}" && \ + has_version -r "sys-devel/llvm:${LLVM_SLOT}" +} + pkg_setup() { use llvm && llvm_pkg_setup } @@ -44,15 +48,12 @@ _emake() { AR="$(tc-getAR)" \ CFLAGS="${CFLAGS}" \ PKG_CONFIG="$(tc-getPKG_CONFIG)" \ - \ HAVE_GTK=$(usex gtk) \ HAVE_LLVM=$(usex llvm) \ HAVE_SQLITE=$(usex sqlite) \ HAVE_LIBXML=$(usex xml) \ - \ V=1 \ PREFIX="${EPREFIX}/usr" \ - \ "$@" } diff --git a/sys-devel/sparse/sparse-9999.ebuild b/sys-devel/sparse/sparse-9999.ebuild index 0fcda7847330..726fd8b0cfe3 100644 --- a/sys-devel/sparse/sparse-9999.ebuild +++ b/sys-devel/sparse/sparse-9999.ebuild @@ -1,9 +1,10 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit llvm multilib toolchain-funcs +LLVM_MAX_SLOT=14 +inherit llvm toolchain-funcs DESCRIPTION="C semantic parser" HOMEPAGE="https://sparse.wiki.kernel.org/index.php/Main_Page" @@ -21,16 +22,19 @@ SLOT="0" IUSE="gtk llvm sqlite test xml" RESTRICT="!test? ( test )" -LLVM_MAX_SLOT=10 - -RDEPEND="gtk? ( x11-libs/gtk+:2 ) - llvm? ( sys-devel/llvm:${LLVM_MAX_SLOT}= ) +RDEPEND="gtk? ( x11-libs/gtk+:3 ) + llvm? ( <sys-devel/llvm-$((${LLVM_MAX_SLOT} + 1)):= ) sqlite? ( dev-db/sqlite:= ) xml? ( dev-libs/libxml2 )" -DEPEND="${RDEPEND} - gtk? ( virtual/pkgconfig ) +DEPEND="${RDEPEND}" +BDEPEND="gtk? ( virtual/pkgconfig ) xml? ( virtual/pkgconfig )" +llvm_check_deps() { + has_version "sys-devel/llvm:${LLVM_SLOT}" && \ + has_version -r "sys-devel/llvm:${LLVM_SLOT}" +} + pkg_setup() { use llvm && llvm_pkg_setup } @@ -44,15 +48,12 @@ _emake() { AR="$(tc-getAR)" \ CFLAGS="${CFLAGS}" \ PKG_CONFIG="$(tc-getPKG_CONFIG)" \ - \ HAVE_GTK=$(usex gtk) \ HAVE_LLVM=$(usex llvm) \ HAVE_SQLITE=$(usex sqlite) \ HAVE_LIBXML=$(usex xml) \ - \ V=1 \ PREFIX="${EPREFIX}/usr" \ - \ "$@" } diff --git a/sys-devel/ucpp/Manifest b/sys-devel/ucpp/Manifest deleted file mode 100644 index d8c1bac0241b..000000000000 --- a/sys-devel/ucpp/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST ucpp-1.3.4.tar.xz 274488 BLAKE2B be43b8c88de2cd32514ecf7dc429c0ca5e88150594c9868fd6d8c3d90a0aabfc6e0f0741d75e4f558de426df7d6c54a3bc7e8e362c5066672f5fe9096cbedc18 SHA512 f9ea88e8f53e728a5b0fcb9084d6d6e140737b00fe350a9c6bc53ef2bb5f7b09d3c9d9a4a2147f635d796247e1b920fd3fea0cdce3ec3f4578694162c2f4c2a6 -DIST ucpp-1.3.5.tar.xz 289468 BLAKE2B 6a038cc5d02f080747a321a55af66f2072503a5c0a554492ea8aed34ff9c3b7b85e3778114e18c3e09f06f1472a1479f39c96997404e0345153a1f84e3f9daee SHA512 3ded8f7bc2b238adb6e7f4162aee48e039dfe7cee31b700c38e8f147634d47cd1ceaf39c343549b0d4a58358e6b9743f7e84f87b253dc19c05e543d68ade24ce diff --git a/sys-devel/ucpp/metadata.xml b/sys-devel/ucpp/metadata.xml deleted file mode 100644 index 834ac83006d0..000000000000 --- a/sys-devel/ucpp/metadata.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>office@gentoo.org</email> - <name>Gentoo Office project</name> - </maintainer> - <maintainer type="project"> - <email>sci@gentoo.org</email> - <name>Gentoo Science Project</name> - </maintainer> - <upstream> - <remote-id type="gitlab">scarabeusiv/ucpp</remote-id> - </upstream> -</pkgmetadata> diff --git a/sys-devel/ucpp/ucpp-1.3.4.ebuild b/sys-devel/ucpp/ucpp-1.3.4.ebuild deleted file mode 100644 index febb7024590c..000000000000 --- a/sys-devel/ucpp/ucpp-1.3.4.ebuild +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DESCRIPTION="Library for preprocessing C compliant to ISO-C99" -HOMEPAGE="https://gitlab.com/scarabeusiv/ucpp" -SRC_URI="http://dev.gentooexperimental.org/~scarabeus/${P}.tar.xz" -LICENSE="BSD" -SLOT="0" -KEYWORDS="amd64 ~arm arm64 ppc ~ppc64 x86 ~amd64-linux" -IUSE="static-libs" - -src_configure() { - econf \ - --disable-werror \ - $(use_enable static-libs static) -} - -src_install() { - default - - # package provides .pc files - find "${D}" -name '*.la' -delete || die -} diff --git a/sys-devel/ucpp/ucpp-1.3.5.ebuild b/sys-devel/ucpp/ucpp-1.3.5.ebuild deleted file mode 100644 index 858f87bb784f..000000000000 --- a/sys-devel/ucpp/ucpp-1.3.5.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="Library for preprocessing C compliant to ISO-C99" -HOMEPAGE="https://gitlab.com/scarabeusiv/ucpp" -SRC_URI="https://gitlab.com/scarabeusiv/${PN}/uploads/79f08e39c676f15ed8a59335f6c9b924/${P}.tar.xz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux" - -src_configure() { - econf \ - --disable-werror \ - --disable-static -} - -src_install() { - default - - # no static archives - find "${ED}" -name '*.la' -type f -delete || die -} |