commit:     c9ab1c9214a660b15d843450c661665572530e23
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Thu Dec  9 20:04:23 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Thu Dec  9 20:55:25 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9ab1c92

sys-libs/glibc: 2.34 revbump, rewritten env code in ebuild

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-libs/glibc/Manifest                            |  1 +
 .../{glibc-9999.ebuild => glibc-2.34-r4.ebuild}    | 27 ++++++++++++++--------
 sys-libs/glibc/glibc-9999.ebuild                   | 17 +++++++-------
 3 files changed, 28 insertions(+), 17 deletions(-)

diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest
index c54232241af5..0dd6d9f18599 100644
--- a/sys-libs/glibc/Manifest
+++ b/sys-libs/glibc/Manifest
@@ -16,6 +16,7 @@ DIST glibc-2.33-patches-6.tar.xz 64632 BLAKE2B 
f04ca4320d65c8796c67471cb56d3bf00
 DIST glibc-2.33.tar.xz 17031280 BLAKE2B 
703d12121c1e2c5d9e0c6ba5341f5fb5c4d9111611a83f2360029b5de9c6e5a5611249d1833684a58ed4afdf49cae614365d87ec8721ba0e5d218f593b1f229d
 SHA512 
4cb5777b68b22b746cc51669e0e9282b43c83f6944e42656e6db7195ebb68f2f9260f130fdeb4e3cfc64efae4f58d96c43d388f52be1eb024ca448084684abdb
 DIST glibc-2.34-patches-5.tar.xz 56832 BLAKE2B 
e5f5e8e41551d9f90355e9fc854e541cdcd5dd172e12dafa84256b7aeb999c0980ec6e7299701b78b0257980f5cf91019edfdf9796bec6b886434aa1960b2d6c
 SHA512 
bc56fe2870629700d931150e1ebdc6e9b3318e8dabf5491d3645efd4db11032e21562e9276d97fc052c45362bfbca7f3d80d93277c2bf8aa3e05a5001df75c60
 DIST glibc-2.34-patches-6.tar.xz 58396 BLAKE2B 
c25696e2aceef9ea4724716acde377d91b8a76b2edca2b293fcd6c89f635f63a612f8c1ecd861367b1394ebacc4b0151b0c6b68c2b08a7bde3a54a76400f35c5
 SHA512 
343922492e448d978dbcad1718804f892d002b6d4ce366da4cf571d97145ed850fb4b2862645681f487a9a18a77ea48f23010c0c61ea7cf914d26fd149b8271d
+DIST glibc-2.34-patches-8.tar.xz 61284 BLAKE2B 
a042d3bfd85cb9732f033eb1489fc4a9d5b42ec599bb320a97a9633047819d1d02b2f00dce601ddb02036f8bf0d67f9b0d6463785965db72d9ac2ce13765fa07
 SHA512 
1d92abb82ae404b90841217bba3b1ccb7e03799e5f21656b0a2eaaf06bd4a5a2f0fd7ebf927acc72fce0e2af6bb1a2e8658bac431423d07e75dce1f2868bd029
 DIST glibc-2.34.tar.xz 17301232 BLAKE2B 
874031192f2f5a3b35c3f5b044a467d4be4e67e8593e070e5b49b901ce8ea6bde2f8d2f6c92fa33b3f61eb723572a9e5f2b45e56064168df80a96d3fdb6fa30c
 SHA512 
15252affd9ef4523a8001db16d497f4fdcb3ddf4cde7fe80e075df0bd3cc6524dc29fbe20229dbf5f97af580556e6b1fac0de321a5fe25322bc3e72f93beb624
 DIST glibc-systemd-20210729.tar.gz 1480 BLAKE2B 
37722c7579df782d890e44dbab99c3de52ab466eb9de80d82405e9bb5620bf39ffc8c5f466a435bdb86ef6d36dd7019c0736573916bda6c67d02a2581e0ec979
 SHA512 
efd75af58b50522c28cdac7abd1fc56555bc1bb042512c90d8340c1ec09c5791b3872a305bf83723252bbde5855b75d958c041083457765c4cfd170732d09238
 DIST glibc-systemd-20210814.tar.gz 1469 BLAKE2B 
10fa7bcb46d4fdce9c0ab353cbd30871e9b09a347a13a9c9a3b5777f931aa3c826c158d2e49532c604d4a834f2fab4089b67495fb88d0398945dc50d45ad9ef1
 SHA512 
5346a9ea459a1e6ccf665389f2a294de1e16f1e3e05cdf07e3dd99ed0e4f6f8b52cc333d4bff3c75ac90ab6ce70cd4ab2b3e126f920ce7979abd6dda56315efc

diff --git a/sys-libs/glibc/glibc-9999.ebuild 
b/sys-libs/glibc/glibc-2.34-r4.ebuild
similarity index 98%
copy from sys-libs/glibc/glibc-9999.ebuild
copy to sys-libs/glibc/glibc-2.34-r4.ebuild
index 22f47562ff94..062f592828cb 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-2.34-r4.ebuild
@@ -23,7 +23,7 @@ SLOT="2.2"
 EMULTILIB_PKG="true"
 
 # Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=2
+PATCH_VER=8
 PATCH_DEV=dilfridge
 
 if [[ ${PV} == 9999* ]]; then
@@ -327,6 +327,14 @@ setup_target_flags() {
                                export CFLAGS_x86="${CFLAGS_x86} -march=${t}"
                                einfo "Auto adding -march=${t} to CFLAGS_x86 
#185404 (ABI=${ABI})"
                        fi
+
+                       # Workaround for https://bugs.gentoo.org/823780. This 
really should
+                       # be removed when the upstream bug 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103275
+                       # is fixed in our tree, either via 11.3 or an 11.2p2 
patch set.
+                       if [[ ${ABI} == x86 ]] && tc-is-gcc && 
(($(gcc-major-version) == 11)) && (($(gcc-minor-version) <= 2)) && 
(($(gcc-micro-version) == 0)); then
+                               export CFLAGS_x86="${CFLAGS_x86} -mno-avx512f"
+                               einfo "Auto adding -mno-avx512f to CFLAGS_x86 
(bug #823780) (ABI=${ABI})"
+                       fi
                ;;
                mips)
                        # The mips abi cannot support the GNU style hashes. 
#233233
@@ -526,8 +534,13 @@ setup_env() {
                export MAKEINFO=/dev/null
        fi
 
-       # Reset CC to the value at start of emerge
-       export CC=${__ORIG_CC:-${CC}}
+       # Reset CC and CXX to the value at start of emerge
+       export CC=${__ORIG_CC:-${CC:-$(tc-getCC ${CTARGET})}}
+       export CXX=${__ORIG_CXX:-${CXX:-$(tc-getCXX ${CTARGET})}}
+
+       # and make sure __ORIC_CC and __ORIG_CXX is defined now.
+       export __ORIG_CC=${CC}
+       export __ORIG_CXX=${CXX}
 
        if tc-is-clang && ! use custom-cflags && ! is_crosscompile ; then
 
@@ -544,8 +557,6 @@ setup_env() {
                local current_gcc_path=$(gcc-config -B)
                einfo "Overriding clang configuration, since it won't work here"
 
-               export __ORIG_CC=${CC}
-
                export CC="${current_gcc_path}/gcc"
                export CXX="${current_gcc_path}/g++"
                export LD="${current_binutils_path}/ld.bfd"
@@ -568,8 +579,6 @@ setup_env() {
 
                # this is the "normal" case
 
-               export __ORIG_CC=${CC}
-
                export CC="$(tc-getCC ${CTARGET})"
                export CXX="$(tc-getCXX ${CTARGET})"
 
@@ -598,10 +607,10 @@ setup_env() {
        # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific 
CFLAGS
        # and breaks multiarch support. See 659030#c3 for an example.
        # The glibc configure script doesn't properly use LDFLAGS all the time.
-       export CC="${__GLIBC_CC} ${__abi_CFLAGS} ${LDFLAGS}"
+       export CC="${__GLIBC_CC} ${__abi_CFLAGS} ${CFLAGS} ${LDFLAGS}"
 
        # Some of the tests are written in C++, so we need to force our multlib 
abis in, bug 623548
-       export CXX="${__GLIBC_CXX} ${__abi_CFLAGS}"
+       export CXX="${__GLIBC_CXX} ${__abi_CFLAGS} ${CFLAGS}"
 
        if is_crosscompile; then
                # Assume worst-case bootstrap: glibc is buil first time

diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index 22f47562ff94..250af42f3f0a 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -526,8 +526,13 @@ setup_env() {
                export MAKEINFO=/dev/null
        fi
 
-       # Reset CC to the value at start of emerge
-       export CC=${__ORIG_CC:-${CC}}
+       # Reset CC and CXX to the value at start of emerge
+       export CC=${__ORIG_CC:-${CC:-$(tc-getCC ${CTARGET})}}
+       export CXX=${__ORIG_CXX:-${CXX:-$(tc-getCXX ${CTARGET})}}
+
+       # and make sure __ORIC_CC and __ORIG_CXX is defined now.
+       export __ORIG_CC=${CC}
+       export __ORIG_CXX=${CXX}
 
        if tc-is-clang && ! use custom-cflags && ! is_crosscompile ; then
 
@@ -544,8 +549,6 @@ setup_env() {
                local current_gcc_path=$(gcc-config -B)
                einfo "Overriding clang configuration, since it won't work here"
 
-               export __ORIG_CC=${CC}
-
                export CC="${current_gcc_path}/gcc"
                export CXX="${current_gcc_path}/g++"
                export LD="${current_binutils_path}/ld.bfd"
@@ -568,8 +571,6 @@ setup_env() {
 
                # this is the "normal" case
 
-               export __ORIG_CC=${CC}
-
                export CC="$(tc-getCC ${CTARGET})"
                export CXX="$(tc-getCXX ${CTARGET})"
 
@@ -598,10 +599,10 @@ setup_env() {
        # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific 
CFLAGS
        # and breaks multiarch support. See 659030#c3 for an example.
        # The glibc configure script doesn't properly use LDFLAGS all the time.
-       export CC="${__GLIBC_CC} ${__abi_CFLAGS} ${LDFLAGS}"
+       export CC="${__GLIBC_CC} ${__abi_CFLAGS} ${CFLAGS} ${LDFLAGS}"
 
        # Some of the tests are written in C++, so we need to force our multlib 
abis in, bug 623548
-       export CXX="${__GLIBC_CXX} ${__abi_CFLAGS}"
+       export CXX="${__GLIBC_CXX} ${__abi_CFLAGS} ${CFLAGS}"
 
        if is_crosscompile; then
                # Assume worst-case bootstrap: glibc is buil first time

Reply via email to