Diff binutils-2.39-r5 with a binutils-2.40-r5

/usr/portage/sys-devel/binutils/binutils-2.40-r5.ebuild 2023-10-09 14:52:35.476368501 +0300
9 9
HOMEPAGE="https://sourceware.org/binutils/"
10 10

  
11 11
LICENSE="GPL-3+"
12
IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
13
REQUIRED_USE="default-gold? ( gold )"
12
IUSE="cet doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla zstd"
14 13

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

  
23
PATCH_VER=6
22
PATCH_VER=5
24 23
PATCH_DEV=dilfridge
25 24

  
26 25
if [[ ${PV} == 9999* ]]; then
......
29 28
else
30 29
	PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
31 30
	PATCH_DEV=${PATCH_DEV:-dilfridge}
32
	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
31
	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"
33 32
	[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
34 33
		https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
35 34
	SLOT=$(ver_cut 1-2)
......
53 52
RDEPEND="
54 53
	>=sys-devel/binutils-config-3
55 54
	sys-libs/zlib
55
	zstd? ( app-arch/zstd:= )
56 56
"
57 57
DEPEND="${RDEPEND}"
58 58
BDEPEND="
......
62 62
		sys-devel/bc
63 63
	)
64 64
	nls? ( sys-devel/gettext )
65
	zstd? ( virtual/pkgconfig )
65 66
	sys-devel/flex
66 67
	app-alternatives/yacc
67 68
"
......
111 112
			einfo "Applying binutils patchset ${patchsetname}"
112 113
			eapply "${WORKDIR}/patch"
113 114
			einfo "Done."
115

  
116
			# This is applied conditionally for now just out of caution.
117
			# It should be okay on non-prefix systems though. See bug #892549.
118
			use prefix && eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch
114 119
		fi
115 120
	fi
116 121

  
......
170 175

  
171 176
	# Keep things sane
172 177
	strip-flags
178
	use cet && filter-flags -mindirect-branch -mindirect-branch=*
179
	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
173 180

  
174 181
	# ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
175 182
	# https://github.com/gentoo/gentoo/pull/28355
......
178 185
		append-ldflags -Wl,--undefined-version
179 186
	fi
180 187

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

  
183 188
	local x
184 189
	echo
185 190
	for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
......
196 201
	# enable gold (installed as ld.gold) and ld's plugin architecture
197 202
	if use gold ; then
198 203
		myconf+=( --enable-gold )
199
		if use default-gold; then
200
			myconf+=( --enable-gold=default )
201
		fi
202 204
	fi
203 205

  
204 206
	if use nls ; then
......
274 276
		--with-bugurl="$(toolchain-binutils_bugurl)"
275 277
		--with-pkgversion="$(toolchain-binutils_pkgversion)"
276 278
		$(use_enable static-libs static)
279
		$(use_with zstd)
280

  
277 281
		# Disable modules that are in a combined binutils/gdb tree, bug #490566
278 282
		--disable-{gdb,libdecnumber,readline,sim}
279 283
		# Strip out broken static link flags.
Thank you!