Diff glibc-2.42-r5 with a glibc-2.43

/usr/portage/sys-libs/glibc/glibc-2.43.ebuild 2026-03-31 11:46:08.448653281 +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_{11..14} )
9
PYTHON_COMPAT=( python3_{10..14} )
10 10
TMPFILES_OPTIONAL=1
11 11

  
12 12
EMULTILIB_PKG="true"
13 13

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

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

  
55 55
LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
56 56
SLOT="2.2"
57
IUSE="audit caps cet compile-locales custom-cflags doc gd hash-sysv-compat headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux sframe +ssp stack-realign +static-libs suid systemd systemtap test vanilla"
57
IUSE="audit caps cet clang compile-locales custom-cflags doc gd hash-sysv-compat headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux sframe +ssp stack-realign +static-libs suid systemd systemtap test vanilla"
58 58

  
59 59
# Here's how the cross-compile logic breaks down ...
60 60
#  CTARGET - machine that will target the binaries
......
151 151
		>=${CATEGORY}/binutils-2.27
152 152
		>=${CATEGORY}/gcc-6.2
153 153
	)"
154
	[[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
154

  
155
	case ${CATEGORY} in
156
		*-linux*)
157
			DEPEND+=" ${CATEGORY}/linux-headers"
158
			;;
159
		*-gnu)
160
			DEPEND+=" ${CATEGORY}/gnumach[-headers-only]"
161
			;;
162
	esac
155 163
else
156 164
	BDEPEND+="
157 165
		>=sys-devel/binutils-2.27
158
		>=sys-devel/gcc-6.2
166
		clang? ( || ( ( >=sys-devel/gcc-6.2 )
167
			( >=sys-devel/gcc-6.2 >=llvm-core/clang-18 )
168
			( >=llvm-core/clang-18 >=llvm-runtimes/libgcc-18 ) ) )
169
		!clang? ( >=sys-devel/gcc-6.2 )
159 170
	"
160 171
	DEPEND+=" virtual/os-headers "
161 172
	RDEPEND+="
......
382 393
				# For compatibility with older binaries at slight performance cost.
383 394
				use stack-realign && export CFLAGS_x86+=" -mstackrealign"
384 395
			fi
396

  
397
			if is_hurd ; then
398
				# doesnt build with -march=native and probably other values, debugging required
399
				filter-flags '-march=*'
400
			fi
385 401
		;;
386 402
		mips)
387 403
			# The mips abi cannot support the GNU style hashes. #233233
......
488 504
		append-ldflags '-Wl,--hash-style=both'
489 505
	fi
490 506

  
507
	# clang warns about linker flags unused during compilation, but we don't
508
	# want that to turn into errors!
509
	# Let's turn the warning off entirely since it spams.
510
	append-flags -Wno-unused-command-line-argument
511

  
491 512
	# #492892
492 513
	filter-flags -frecord-gcc-switches
493 514

  
......
500 521
	# #829583
501 522
	filter-lfs-flags
502 523

  
524
	case ${CTARGET} in
525
		*-linux*)
526
			;;
527
		*-gnu)
528
			# -g3 confuses MIG which relies on preprocessed input
529
			replace-flags -ggdb[3-9] -ggdb2
530
			replace-flags -g3 -g
531
			;;
532
	esac
533

  
503 534
	unset CBUILD_OPT CTARGET_OPT
504 535
	if use multilib ; then
505 536
		CTARGET_OPT=$(get_abi_CTARGET)
......
619 650
	export glibc__ORIG_CXX=${CXX}
620 651
	export glibc__ORIG_CPP=${CPP}
621 652

  
622
	if tc-is-clang && ! use custom-cflags && ! is_crosscompile ; then
653
	if tc-is-clang && ! ( use clang || use custom-cflags ) && ! is_crosscompile ; then
623 654
		export glibc__force_gcc=yes
624 655
		# once this is toggled on, it needs to stay on, since with CPP manipulated
625 656
		# tc-is-clang does not work correctly anymore...
......
630 661
		# recover the proper gcc and binutils settings here, at least until glibc
631 662
		# is finally building with clang. So let's override everything that is
632 663
		# set in the clang profiles.
633
		# Want to shoot yourself into the foot? Set USE=custom-cflags, that's always
634
		# a good start into that direction.
635
		# Also, if you're crosscompiling, let's assume you know what you are doing.
664
		# Want to shoot yourself into the foot? Set USE="clang" or USE="custom-cflags".
665
		# Also, if you are crosscompiling, let's assume you know what you are doing.
636 666
		# Hopefully.
637 667
		# Last, we need the settings of the *build* environment, not of the
638 668
		# target environment...
......
661 691
		filter-flags '-D_FORTIFY_SOURCE=*'
662 692

  
663 693
	else
664

  
665 694
		# this is the "normal" case
666 695

  
667
		export CC="$(tc-getCC ${CTARGET})"
668
		export CXX="$(tc-getCXX ${CTARGET})"
669
		export CPP="$(tc-getCPP ${CTARGET})"
670

  
671 696
		# Always use tuple-prefixed toolchain. For non-native ABI glibc's configure
672 697
		# can't detect them automatically due to ${CHOST} mismatch and fallbacks
673 698
		# to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup().
699
		export CC="$(tc-getCC ${CTARGET})"
700
		export CXX="$(tc-getCXX ${CTARGET})"
701
		export CPP="$(tc-getCPP ${CTARGET})"
674 702
		export NM="$(tc-getNM ${CTARGET})"
675 703
		export READELF="$(tc-getREADELF ${CTARGET})"
676 704

  
677 705
	fi
678 706

  
679
	# We need to export CFLAGS with abi information in them because glibc's
680
	# configure script checks CFLAGS for some targets (like mips).  Keep
681
	# around the original clean value to avoid appending multiple ABIs on
682
	# top of each other. (Why does the comment talk about CFLAGS if the code
683
	# acts on CC?)
707
	# We need to move CFLAGS with abi information into CC etc per glibc upstream
708
	# requirement. Keep around the original clean value to avoid appending
709
	# multiple ABIs on top of each other.
684 710
	export glibc__GLIBC_CC=${CC}
685 711
	export glibc__GLIBC_CXX=${CXX}
686 712
	export glibc__GLIBC_CPP=${CPP}
......
998 1024
		einfo "Applying Gentoo Glibc patchset ${patchsetname}"
999 1025
		eapply "${WORKDIR}"/patches
1000 1026
		einfo "Done."
1027

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

  
1003 1036
	case ${CTARGET} in
......
1103 1136
		--with-bugurl=https://bugs.gentoo.org/
1104 1137
		--with-pkgversion="$(glibc_banner)"
1105 1138
		$(use_multiarch || echo --disable-multi-arch)
1106
		$(use_enable systemtap)
1107 1139
		$(use_enable nscd)
1108 1140

  
1109 1141
		# /usr/bin/mtrace has a Perl shebang. Gentoo Prefix QA checks fail if
......
1129 1161
	# We rely on sys-libs/timezone-data for timezone tools normally.
1130 1162
	myconf+=( $(use_enable vanilla timezone-tools) )
1131 1163

  
1164
	if is_crosscompile ; then
1165
		myconf+=( --disable-systemtap )
1166
	else
1167
		myconf+=( $(use_enable systemtap) )
1168
	fi
1169

  
1132 1170
	# These libs don't have configure flags.
1133 1171
	ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no)
1134 1172
	ac_cv_lib_cap_cap_init=$(usex caps || echo no)
Thank you!