Diff glibc-2.33-r14 with a glibc-2.34-r14

/usr/portage/sys-libs/glibc/glibc-2.34-r14.ebuild 2023-10-09 14:52:35.544368503 +0300
20 20
EMULTILIB_PKG="true"
21 21

  
22 22
# Gentoo patchset (ignored for live ebuilds)
23
PATCH_VER=11
23
PATCH_VER=17
24 24
PATCH_DEV=dilfridge
25 25

  
26 26
if [[ ${PV} == 9999* ]]; then
......
37 37

  
38 38
LOCALE_GEN_VER=2.22
39 39

  
40
GLIBC_SYSTEMD_VER=20210814
40
GLIBC_SYSTEMD_VER=20210729
41 41

  
42 42
SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${LOCALE_GEN_VER}.tar.gz"
43 43
SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )"
44 44
SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git/snapshot/glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz )"
45 45

  
46
IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib multilib-bootstrap nscd profile selinux +ssp +static-libs static-pie suid systemd systemtap test vanilla"
46
IUSE="audit caps cet +clone3 compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib multilib-bootstrap nscd profile selinux +ssp +static-libs static-pie suid systemd systemtap test vanilla"
47 47

  
48 48
# Minimum kernel version that glibc requires
49 49
MIN_KERN_VER="3.2.0"
50
# Minimum pax-utils version needed (which contains any new syscall changes for
51
# its seccomp filter!). Please double check this!
52
MIN_PAX_UTILS_VER="1.3.3"
50 53

  
51 54
# Here's how the cross-compile logic breaks down ...
52 55
#  CTARGET - machine that will target the binaries
......
100 103

  
101 104
BDEPEND="
102 105
	${PYTHON_DEPS}
103
	>=app-misc/pax-utils-1.3.1
106
	>=app-misc/pax-utils-${MIN_PAX_UTILS_VER}
104 107
	sys-devel/bison
105 108
	doc? ( sys-apps/texinfo )
106 109
	!compile-locales? (
......
132 135
	sys-apps/grep
133 136
	app-alternatives/awk
134 137
	sys-apps/gentoo-functions
135
	!<app-misc/pax-utils-1.3.1
138
	!<app-misc/pax-utils-${MIN_PAX_UTILS_VER}
136 139
	!<net-misc/openssh-8.1_p1-r2
137 140
"
138 141

  
......
163 166
# The following tests fail due to the Gentoo build system and are thus
164 167
# executed but ignored:
165 168
XFAIL_TEST_LIST=(
166
	# 9) Failures of unknown origin
167
	tst-latepthread
168

  
169 169
	# buggy test, assumes /dev/ and /dev/null on a single filesystem
170 170
	# 'mount --bind /dev/null /chroot/dev/null' breaks it.
171 171
	# https://sourceware.org/PR25909
172 172
	tst-support_descriptors
173 173

  
174
	# Flaky test, known to fail occasionally:
175
	# https://sourceware.org/PR19329
176
	# https://bugs.gentoo.org/719674#c12
177
	tst-stack4
178

  
179 174
	# The following tests fail only inside portage
180 175
	# https://bugs.gentoo.org/831267
181 176
	tst-system
......
326 321
				export CFLAGS_x86="${CFLAGS_x86} -march=${t}"
327 322
				einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})"
328 323
			fi
324

  
325
			# Workaround for https://bugs.gentoo.org/823780. This really should
326
			# be removed when the upstream bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103275
327
			# is fixed in our tree, either via 11.3 or an 11.2p2 patch set.
328
			if [[ ${ABI} == x86 ]] && tc-is-gcc && (($(gcc-major-version) == 11)) && (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)); then
329
				export CFLAGS_x86="${CFLAGS_x86} -mno-avx512f"
330
				einfo "Auto adding -mno-avx512f to CFLAGS_x86 (bug #823780) (ABI=${ABI})"
331
			fi
329 332
		;;
330 333
		mips)
331 334
			# The mips abi cannot support the GNU style hashes. #233233
......
400 403
		filter-flags '-O?'
401 404
		append-flags -O2
402 405
	fi
406

  
403 407
	strip-unsupported-flags
404 408
	filter-lto
405 409
	filter-flags -m32 -m64 '-mabi=*'
......
434 438
	replace-flags -O0 -O1
435 439

  
436 440
	filter-flags '-fstack-protector*'
441

  
442
	# See end of bug #830454; we handle this via USE=cet
443
	filter-flags '-fcf-protection='
437 444
}
438 445

  
439 446
use_multiarch() {
......
519 526
		# a good start into that direction.
520 527
		# Also, if you're crosscompiling, let's assume you know what you are doing.
521 528
		# Hopefully.
529
		# Last, we need the settings of the *build* environment, not of the
530
		# target environment...
522 531

  
523
		local current_binutils_path=$(binutils-config -B)
524
		local current_gcc_path=$(gcc-config -B)
532
		local current_binutils_path=$(env ROOT="${BROOT}" binutils-config -B)
533
		local current_gcc_path=$(env ROOT="${BROOT}" gcc-config -B)
525 534
		einfo "Overriding clang configuration, since it won't work here"
526 535

  
527 536
		export CC="${current_gcc_path}/gcc"
......
754 763

  
755 764
	# When we actually have to compile something...
756 765
	if ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; then
766
		if [[ -d "${ESYSROOT}"/usr/lib/include ]] ; then
767
			# bug #833620, bug #643302
768
			eerror "Found ${ESYSROOT}/usr/lib/include directory!"
769
			eerror "This is known to break glibc's build."
770
			eerror "Please backup its contents then remove the directory."
771
			die "Found directory (${ESYSROOT}/usr/lib/include) which will break build (bug #833620)!"
772
		fi
773

  
757 774
		if [[ ${CTARGET} == *-linux* ]] ; then
758 775
			local run_kv build_kv want_kv
759 776

  
......
789 806
				ewarn "After upgrading glibc, please restart all running processes."
790 807
				ewarn "Be sure to include init (telinit u) or systemd (systemctl daemon-reexec)."
791 808
				ewarn "Alternatively, reboot your system."
809
				ewarn "(See bug #660556, bug #741116, bug #823756, etc)"
792 810
				break
793 811
			fi
794 812
		done
......
857 875
		einfo "Done."
858 876
	fi
859 877

  
878
	if use clone3 ; then
879
		append-cppflags -DGENTOO_USE_CLONE3
880
	else
881
		# See e.g. bug #827386, bug #819045.
882
		elog "Disabling the clone3 syscall for compatibility with older Electron apps."
883
		elog "Please re-enable this flag before filing bugs!"
884
	fi
885

  
860 886
	default
861 887

  
862 888
	gnuconfig_update
......
1001 1027
	export libc_cv_rootsbindir="$(host_eprefix)/sbin"
1002 1028
	export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)"
1003 1029

  
1004
	# We take care of patching our binutils to use both hash styles,
1005
	# and many people like to force gnu hash style only, so disable
1006
	# this overriding check.  #347761
1007
	export libc_cv_hashstyle=no
1008

  
1009 1030
	local builddir=$(builddir nptl)
1010 1031
	mkdir -p "${builddir}"
1011 1032
	cd "${builddir}"
......
1496 1517

  
1497 1518
	# first let's find the actual dynamic linker here
1498 1519
	# symlinks may point to the wrong abi
1499
	local newldso=$(find . -maxdepth 1 -name 'ld-*so' -type f -print -quit)
1520
	local newldso=$(find . -maxdepth 1 -name 'ld*so.?' -type f -print -quit)
1500 1521

  
1501 1522
	einfo Last-minute run tests with ${newldso} in /$(get_libdir) ...
1502 1523

  
Thank you!