Diff binutils-2.40-r9 with a binutils-2.41-r2

/usr/portage/sys-devel/binutils/binutils-2.41-r2.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 debuginfod doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla zstd"
12
IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd"
13 13

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

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

  
25 25
if [[ ${PV} == 9999* ]]; then
......
260 260
		--enable-obsolete
261 261
		--enable-shared
262 262
		--enable-threads
263
		# Newer versions (>=2.27) offer a configure flag now.
264 263
		--enable-relro
265
		# Newer versions (>=2.24) make this an explicit option, bug #497268
266 264
		--enable-install-libiberty
267
		# Available from 2.35 on
268
		--enable-textrel-check=warning
269

  
270
		# These hardening options are available from 2.39+ but
271
		# they unconditionally enable the behaviour even on arches
272
		# where e.g. execstacks can't be avoided.
273
		# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
274
		#--enable-warn-execstack
275
		#--enable-warn-rwx-segments
276
		#--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
277

  
265
		--enable-textrel-check=$(usex hardened error warning)
278 266
		# Things to think about
279 267
		#--enable-deterministic-archives
280

  
281
		# Works better than vapier's patch, bug #808787
282 268
		--enable-new-dtags
283

  
284 269
		--disable-jansson
285 270
		--disable-werror
286 271
		--with-bugurl="$(toolchain-binutils_bugurl)"
......
290 275

  
291 276
		# Disable modules that are in a combined binutils/gdb tree, bug #490566
292 277
		--disable-{gdb,libdecnumber,readline,sim}
293
		# Strip out broken static link flags.
294
		# https://gcc.gnu.org/PR56750
278
		# Strip out broken static link flags: https://gcc.gnu.org/PR56750
295 279
		--without-stage1-ldflags
296
		# Change SONAME to avoid conflict across
297
		# {native,cross}/binutils, binutils-libs. bug #666100
280
		# Change SONAME to avoid conflict across {native,cross}/binutils, binutils-libs. bug #666100
298 281
		--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
299 282

  
300 283
		$(use_with debuginfod)
......
316 299
		$(use_enable gprofng)
317 300
	)
318 301

  
302
	case ${CTARGET} in
303
		x86_64-*|aarch64*|arm64*|i[3456]*)
304
			# These hardening options are available from 2.39+ but
305
			# they unconditionally enable the behaviour even on arches
306
			# where e.g. execstacks can't be avoided.
307
			# See https://sourceware.org/bugzilla/show_bug.cgi?id=29592.
308
			#
309
			# TODO: Get the logic for this fixed upstream so it doesn't
310
			# create impossible broken combinations on some arches, like mips.
311
			#
312
			# TODO: Get the logic for this fixed upstream so --disable-* works
313
			# as expected.
314
			myconf+=(
315
				--enable-warn-execstack=yes
316
				--enable-warn-rwx-segments=yes
317
			)
318

  
319
			if use hardened ; then
320
				myconf+=(
321
					--enable-default-execstack=no
322
				)
323
			fi
324
			;;
325
		*)
326
			;;
327
	esac
328

  
329
	if use elibc_musl ; then
330
		# Override our earlier setting for musl, as textrels don't
331
		# work there at all. See bug #707660.
332
		myconf+=(
333
			--enable-textrel-check=error
334
		)
335
	fi
336

  
319 337
	if ! is_cross ; then
320 338
		myconf+=( $(use_enable pgo pgo-build lto) )
321 339

  
......
324 342
		fi
325 343
	fi
326 344

  
327
	ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
345
	ECONF_SOURCE="${S}" econf "${myconf[@]}"
328 346

  
329 347
	# Prevent makeinfo from running if doc is unset.
330 348
	if ! use doc ; then
Thank you!