summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel/binutils/binutils-2.38-r2.ebuild')
-rw-r--r--sys-devel/binutils/binutils-2.38-r2.ebuild43
1 files changed, 23 insertions, 20 deletions
diff --git a/sys-devel/binutils/binutils-2.38-r2.ebuild b/sys-devel/binutils/binutils-2.38-r2.ebuild
index 4a491aa88c86..c384b5f5ae0b 100644
--- a/sys-devel/binutils/binutils-2.38-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.38-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -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 ~loong ~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
#
@@ -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 )"
@@ -119,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
@@ -152,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
@@ -170,6 +164,8 @@ 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
@@ -228,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}
@@ -296,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
@@ -311,10 +310,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
+ emake -k V=1 check
}
src_install() {
@@ -322,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