Diff binutils-2.36.1-r2 with a binutils-2.37_p1-r2

/usr/portage/sys-devel/binutils/binutils-2.37_p1-r2.ebuild 2023-10-09 14:52:35.476368501 +0300
8 8
DESCRIPTION="Tools necessary to build programs"
9 9
HOMEPAGE="https://sourceware.org/binutils/"
10 10
LICENSE="GPL-3+"
11
IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test vanilla"
11
IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
12 12
REQUIRED_USE="default-gold? ( gold )"
13 13

  
14 14
# Variables that can be set here  (ignored for live ebuilds)
......
19 19
# PATCH_DEV          - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
20 20
#                      for the patchsets
21 21

  
22
PATCH_VER=5
22
PATCH_VER=2
23 23
PATCH_DEV=dilfridge
24 24

  
25 25
if [[ ${PV} == 9999* ]]; then
......
27 27
	SLOT=${PV}
28 28
else
29 29
	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
30
	PATCH_DEV=${PATCH_DEV:-slyfox}
31
	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
30
	PATCH_DEV=${PATCH_DEV:-dilfridge}
31
	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
32 32
	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
33 33
		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
34 34
	SLOT=$(ver_cut 1-2)
35
	KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
35
	KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
36 36
fi
37 37

  
38 38
#
......
81 81
		EGIT_CHECKOUT_DIR=${S}
82 82
		git-r3_src_unpack
83 83
	else
84
		unpack ${P}.tar.xz
84
		unpack ${P/-hppa64/}.tar.xz
85 85

  
86 86
		cd "${WORKDIR}" || die
87 87
		unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
88

  
89
		# _p patch versions are Gentoo specific tarballs ...
90
		local dir=${P%_p?}
91
		dir=${dir/-hppa64/}
92

  
93
		S=${WORKDIR}/${dir}
88 94
	fi
89 95

  
90 96
	cd "${WORKDIR}" || die
......
171 177
		append-ldflags -Wl,--undefined-version
172 178
	fi
173 179

  
180
	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
181

  
174 182
	local x
175 183
	echo
176 184
	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
......
247 255
		--enable-install-libiberty
248 256
		# Available from 2.35 on
249 257
		--enable-textrel-check=warning
258
		# Works better than vapier's patch... #808787
259
		--enable-new-dtags
250 260
		--disable-werror
251 261
		--with-bugurl="$(toolchain-binutils_bugurl)"
252 262
		--with-pkgversion="$(toolchain-binutils_pkgversion)"
......
270 280
		# But the check does not quite work on i686: bug #760926.
271 281
		$(use_enable cet)
272 282
	)
283

  
284
	if ! is_cross ; then
285
		myconf+=( $(use_enable pgo pgo-build lto) )
286

  
287
		if use pgo ; then
288
			export BUILD_CFLAGS="${CFLAGS}"
289
		fi
290
	fi
291

  
273 292
	echo ./configure "${myconf[@]}"
274 293
	"${S}"/configure "${myconf[@]}" || die
275 294

  
Thank you!