Diff glibc-2.43 with a glibc-9999

/usr/portage/sys-libs/glibc/glibc-9999.ebuild 2026-06-23 19:41:04.244895853 +0300
6 6
# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc
7 7
# Please read & adapt the page as necessary if obsolete.
8 8

  
9
PYTHON_COMPAT=( python3_{10..14} )
9
PYTHON_COMPAT=( python3_{11..14} )
10 10
TMPFILES_OPTIONAL=1
11 11

  
12 12
EMULTILIB_PKG="true"
13 13

  
14 14
# Gentoo patchset (ignored for live ebuilds)
15 15
PATCH_VER=1
16
PATCH_DEV=dilfridge
17 16

  
18 17
# gcc mulitilib bootstrap files version
19 18
GCC_BOOTSTRAP_VER=20201208
......
43 42
if [[ ${PV} == *9999 ]]; then
44 43
	inherit git-r3
45 44
else
46
	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
45
	#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
47 46
	SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
47
	SRC_URI+=" https://distfiles.gentoo.org/pub/proj/toolchain/glibc/patches/${P}-patches-${PATCH_VER}.tar.xz"
48 48
	SRC_URI+=" verify-sig? ( mirror://gnu/glibc/${P}.tar.xz.sig )"
49
	SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
50 49
fi
51 50

  
52 51
SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )"
......
223 222
	tst-aarch64-pkey
224 223
	tst-bz21269
225 224
	tst-mlock2
225
	tst-mseal-pkey
226 226
	tst-ntp_gettime
227 227
	tst-ntp_gettime-time64
228 228
	tst-ntp_gettimex
......
356 356
	just_headers && return 0
357 357

  
358 358
	case $(tc-arch) in
359
		alpha)
360
			# glibc selects its hand-written assembly mem*/str* routines by the
361
			# host triplet's machine prefix (sysdeps/alpha/preconfigure does
362
			# machine=alpha/$machine), NOT by the -mcpu codegen flag.  With the
363
			# bare alpha-*-* CHOST only the generic C is built.  Map -mcpu to the
364
			# most specific sysdeps/alpha/alphaev* dir that exists (Implies chain
365
			# alphaev67 -> alphaev6 -> alphaev5) so the tuned asm is selected.
366
			local cpu
367
			case $(get-flag mcpu) in
368
			21264a|ev67)           cpu="alphaev67" ;;
369
			21264|ev6)             cpu="alphaev6" ;;
370
			21164*|ev5|ev56|pca56) cpu="alphaev5" ;;
371
			esac
372
			[[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}"
373
		;;
359 374
		x86)
360 375
			# -march needed for #185404 #199334
361 376
			# TODO: When creating the first glibc cross-compile, this test will
......
387 402
					[[ ${t} == "x86_64" ]] && t="x86-64"
388 403
					filter-flags '-march=*'
389 404
					# ugly, ugly, ugly.  ugly.
390
					CFLAGS_x86=$(CFLAGS=${CFLAGS_x86}; filter-flags '-march=*'; echo "${CFLAGS}")
405
					CFLAGS_x86=$(
406
						CFLAGS=${CFLAGS_x86}
407
						filter-flags '-march=*'
408
						is-flagq '-mfpmath=sse' && append-cflags -msse
409
						echo "${CFLAGS}"
410
					)
391 411
					export CFLAGS_x86="${CFLAGS_x86} -march=${t}"
392 412
					einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})"
393 413
				fi
......
846 866
			[[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system."
847 867
		fi
848 868

  
849
		if ! do_run_test '#include <unistd.h>\n#include <sys/syscall.h>\nint main(){return syscall(1000)!=-1;}\n' ; then
869
		if is_linux && ! do_run_test '#include <unistd.h>\n#include <sys/syscall.h>\nint main(){return syscall(1000)!=-1;}\n' ; then
850 870
			eerror "Your old kernel is broken. You need to update it to a newer"
851 871
			eerror "version as syscall(<bignum>) will break. See bug 279260."
852 872
			[[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Old and broken kernel."
......
903 923
			die "Found directory (${ESYSROOT}/usr/lib/include) which will break build (bug #833620)!"
904 924
		fi
905 925

  
906
		if [[ ${CTARGET} == *-linux* ]] ; then
926
		if is_linux ; then
907 927
			local run_kv build_kv want_kv
908 928

  
909 929
			run_kv=$(g_get_running_KV)
......
1028 1048

  
1029 1049
		# Patches we should apply only for Hurd to be conservative
1030 1050
		if is_hurd ; then
1031
			eapply "${FILESDIR}"/glibc-2.43-hurd-link-helpers.patch
1032 1051
			eapply "${FILESDIR}"/glibc-2.43-hurd-CLOCK_MONOTONIC.patch
1033
			eapply "${FILESDIR}"/glibc-2.43-hurd-ldconfig.patch
1034 1052
		fi
1035 1053
	fi
1036 1054

  
......
1368 1386
		done
1369 1387
	fi
1370 1388

  
1389
	# https://inbox.sourceware.org/libc-alpha/lhuikb5ibey.fsf@oldenburg.str.redhat.com/
1390
	local -x GAWK_GNU_MATCHERS=1
1391

  
1371 1392
	# sandbox does not understand unshare() and prevents
1372 1393
	# writes to /proc/, which makes many tests fail
1373 1394

  
......
1595 1616

  
1596 1617
	if is_hurd && has amd64 $(get_install_abis) ; then
1597 1618
		# First, let's check for sanity
1598
		if [[ -f "$(alt_prefix)/lib/ld-x86-64.so.1" ]] ; then
1619
		if [[ -f "${D}/$(alt_prefix)/lib/ld-x86-64.so.1" ]] ; then
1599 1620
			die "Somehow your amd64 hurd glibc installed /lib/ld-x86-64.so.1 ... this should not happen."
1600 1621
		fi
1601 1622

  
......
1605 1626

  
1606 1627
	if is_hurd && has x86 $(get_install_abis) ; then
1607 1628
		# First, let's check for sanity
1608
		if [[ -f "$(alt_prefix)/$(get_abi_LIBDIR x86)/ld.so" ]] ; then
1629
		if [[ -f "${D}/$(alt_prefix)/$(get_abi_LIBDIR x86)/ld.so" ]] ; then
1609 1630
			die "Somehow your x86 hurd glibc installed ld.so ... this should not happen."
1610 1631
		fi
1611 1632

  
Thank you!