mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-08 13:46:39 +02:00
sys-libs/glibc: Sync with Gentoo
It's from Gentoo commit 9886f45b1b7740e894c59c31982e0d399c375b8b. Signed-off-by: Flatcar Buildbot <buildbot@flatcar-linux.org>
This commit is contained in:
parent
3e8165940f
commit
7b85765bde
@ -28,9 +28,11 @@ DIST glibc-2.40.tar.xz 18752204 BLAKE2B 8593cab5b2549b77159b6866fbb40b917e491fd5
|
||||
DIST glibc-2.41-patches-12.tar.xz 168252 BLAKE2B c844fba0871e7aa60af636c0569d01beebd314367081313635598074643449cc047a07b88979d341ba8327ac7becd3aef8b20662c8490565d29c49ade474cb8b SHA512 b780db3e31f3724cc19129bc11f49e4ad649a1a2b8174f990041640c81e03fcda3c5f3c25dffd215c7b1173e5ebb226312af58112e9798ba7254889d7b05f454
|
||||
DIST glibc-2.41.tar.xz 19344868 BLAKE2B 4da62f489ba7a95bb069c2cfea8cf78e4d37e3a5f7e1736239670ba1dca12b69aa77bd00ced078c27d91b1e622c58cbd70258161a9d18c5b3bcc95863b8d744d SHA512 894a3e5a796bc13df30c26a5bfbe4d60b5dbdaac54e7763432235124b547070c7dda88c50584536870cab79183d8cad73a3ac6ed09bfe54fa8482aad07253169
|
||||
DIST glibc-2.42-patches-7.tar.xz 69864 BLAKE2B 59c1ec784d49ccce40c14a3b09c3edb7ad557677dc9ab9af526ca27b3716fa3727e10ef34c2c1ea09a9855ec0d8553ce873cbbf75af57e6e0717ef97d1d37def SHA512 9ac6ba2392b76dce2cf39f6e7b054166d0fc07395b7958b9a84bbb1654ae3e3548113e5fe5bfcd4b9000668c4ea07a70c8c1e5688c0e72e613462383222ae48f
|
||||
DIST glibc-2.42-patches-8.tar.xz 77696 BLAKE2B dfde3bce38f34d99e1011532ce19fdb34cc1f59fae0d8d6df4b285520e7e7c2995d14be84dc0127346b38ab9e313c4aa0eb4c112a49dc6f28822f55f16bec206 SHA512 d482b7aff496db59efb0c91f2eb4b5302374986fa241e9f9248bfceb6296c1b65ca26160019564b3f40c7d0f7512ed096d771b98ce563d4889a3499880cd9c27
|
||||
DIST glibc-2.42.tar.xz 19930508 BLAKE2B 6ffabfe7942034a5a4fb5097679cb47bc3431eb2a3864af07cea0cb6aa5db63fbaf6f026b3c9299e00268058a6762eb21e92499f012d552ed87d65c7ffbd0bbe SHA512 73a617db8e0f0958c0575f7a1c5a35b72b7e070b6cbdd02a9bb134995ca7ca0909f1e50d7362c53d2572d72f1879bb201a61d5275bac16136895d9a34ef0c068
|
||||
DIST glibc-2.42.tar.xz.sig 981 BLAKE2B 890e637c444982b2b07fac4607ce3e9f416c9c7688267ebd135e53878d93db95c609facfa1f347c59f23776cafb4b5df8ffb60235c89be451276202dd676dab2 SHA512 d868220778e98d24aead10a585e6a903892e4d043cd96a404634c8aa03d001d624a46a5c0fe13c86f83f66396a1f360a10990966fe377e98a722914b5087575d
|
||||
DIST glibc-2.43-patches-1.tar.xz 23328 BLAKE2B 4d7d719d234af725861b06eee6b86c269c88386efbd6dc411fa52c196b00541c07247ef8d0e2eea02d0369da0f09c440c8ccef4a03881aad568a84978eecb17e SHA512 33d260fcfe96e5b9bf85bd12cc8f83915b197b1bf512f6c06f8542df01803b1b5152dd2e60723b193ad26885fb1473f750d556a1abfe213d39d6df30ad19b9a1
|
||||
DIST glibc-2.43-patches-2.tar.xz 90172 BLAKE2B 9927b0bfc836597047e2c268a1d5c7b593f0be1e89f5ed5156c8bb34298f13bdd4d80fd813b4535442ce6d1c535753b6f3cbca4f3f0e9bdda890029e1e3d2de3 SHA512 363f815b41e9ffe809e1db61864efa4c61666e7033df95191d58da44582a64555cedb9197e6d6a8fb2a6c6f0609cf07ca5cab2ab2f840f723bbbc4a099d3d00e
|
||||
DIST glibc-2.43.tar.xz 20297012 BLAKE2B a764edf3d0d52809aa94cf1a8f73341159d226ecc2a595aa3c9e1d1fd4b2d4eb9a599d70bda8812b73d8ef58b39746efdd34026772e38c0f091fe071d461ea98 SHA512 25765f86bf54a22fc69dd13023ec9be59bd7e1f9d6ea1630cf21851898df2043bb8a01538c4b5fdd06495d0163289362b0768b391b0617f709b89a777168291c
|
||||
DIST glibc-2.43.tar.xz.sig 1018 BLAKE2B 99fb3f296795498f6de8090d537e32d8af0bfa75c7d8145ba4c35ca1b54c281fd2b9cb121886aef1800c0a6e508244914a2de67339d113561a9fc2c515110924 SHA512 6e26f0edee146710bcb73c3890c455e8b479009f99d284c43ea695b73bfe45e4ba47d1460300ce8c7496689b0c21a1c77e6359e005957973648b86755160c8f5
|
||||
DIST glibc-systemd-20210729.tar.gz 1480 BLAKE2B 37722c7579df782d890e44dbab99c3de52ab466eb9de80d82405e9bb5620bf39ffc8c5f466a435bdb86ef6d36dd7019c0736573916bda6c67d02a2581e0ec979 SHA512 efd75af58b50522c28cdac7abd1fc56555bc1bb042512c90d8340c1ec09c5791b3872a305bf83723252bbde5855b75d958c041083457765c4cfd170732d09238
|
||||
|
||||
@ -0,0 +1,100 @@
|
||||
From 9fdd7c3b7c89ea240f24ad8d900639904c3064e5 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <9fdd7c3b7c89ea240f24ad8d900639904c3064e5.1774310363.git.sam@gentoo.org>
|
||||
From: Samuel Thibault <sthibault@debian.org>
|
||||
Date: Sat, 12 Nov 2011 14:03:09 +0000
|
||||
Subject: [PATCH 1/2] hurd: use normal clocks for raw & coarse clock
|
||||
|
||||
Use the normal clocks for the raw & coarse clock for now.
|
||||
|
||||
vlc doesn't build when _POSIX_CLOCK_SELECTION is enabled but _POSIX_TIMERS is
|
||||
not, and they refuse to fix that (see #765578), so disable the former.
|
||||
|
||||
Imported-from: https://salsa.debian.org/glibc-team/glibc/-/blob/c2bff774aba6fc93eb9c3baef4746db56a2be24c/debian/patches/hurd-i386/local-clock_gettime_MONOTONIC.diff
|
||||
---
|
||||
rt/timer_create.c | 2 +-
|
||||
sysdeps/mach/clock_gettime.c | 3 +++
|
||||
sysdeps/mach/clock_nanosleep.c | 2 +-
|
||||
sysdeps/mach/hurd/bits/posix_opt.h | 4 ++--
|
||||
sysdeps/posix/clock_getres.c | 4 ++++
|
||||
5 files changed, 11 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/rt/timer_create.c b/rt/timer_create.c
|
||||
index 4f03dcb867..f8c57e1b50 100644
|
||||
--- a/rt/timer_create.c
|
||||
+++ b/rt/timer_create.c
|
||||
@@ -47,7 +47,7 @@ timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid)
|
||||
return -1;
|
||||
}
|
||||
|
||||
- if (clock_id != CLOCK_REALTIME)
|
||||
+ if (clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC && clock_id != CLOCK_MONOTONIC_RAW && clock_id != CLOCK_REALTIME_COARSE && clock_id != CLOCK_MONOTONIC_COARSE)
|
||||
{
|
||||
__set_errno (EINVAL);
|
||||
return -1;
|
||||
diff --git a/sysdeps/mach/clock_gettime.c b/sysdeps/mach/clock_gettime.c
|
||||
index 2e8b92b1e0..a04d85d1d7 100644
|
||||
--- a/sysdeps/mach/clock_gettime.c
|
||||
+++ b/sysdeps/mach/clock_gettime.c
|
||||
@@ -33,6 +33,8 @@ __clock_gettime (clockid_t clock_id, struct timespec *ts)
|
||||
switch (clock_id) {
|
||||
|
||||
case CLOCK_MONOTONIC:
|
||||
+ case CLOCK_MONOTONIC_RAW:
|
||||
+ case CLOCK_MONOTONIC_COARSE:
|
||||
/* If HAVE_HOST_GET_UPTIME64 is not defined or not available,
|
||||
CLOCK_MONOTONIC will be equivalent to CLOCK_REALTIME. */
|
||||
#ifdef HAVE_HOST_GET_UPTIME64
|
||||
@@ -56,6 +58,7 @@ __clock_gettime (clockid_t clock_id, struct timespec *ts)
|
||||
/* FALLTHROUGH */
|
||||
|
||||
case CLOCK_REALTIME:
|
||||
+ case CLOCK_REALTIME_COARSE:
|
||||
{
|
||||
#ifdef HAVE_HOST_GET_TIME64
|
||||
time_value64_t tv_64;
|
||||
diff --git a/sysdeps/mach/clock_nanosleep.c b/sysdeps/mach/clock_nanosleep.c
|
||||
index 65b488d952..b8de6d40f6 100644
|
||||
--- a/sysdeps/mach/clock_nanosleep.c
|
||||
+++ b/sysdeps/mach/clock_nanosleep.c
|
||||
@@ -67,7 +67,7 @@ int
|
||||
__clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
|
||||
struct timespec *rem)
|
||||
{
|
||||
- if ((clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC)
|
||||
+ if ((clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC && clock_id != CLOCK_MONOTONIC_RAW && clock_id != CLOCK_REALTIME_COARSE && clock_id != CLOCK_MONOTONIC_COARSE)
|
||||
|| req->tv_sec < 0
|
||||
|| !valid_nanoseconds (req->tv_nsec)
|
||||
|| (flags != 0 && flags != TIMER_ABSTIME))
|
||||
diff --git a/sysdeps/mach/hurd/bits/posix_opt.h b/sysdeps/mach/hurd/bits/posix_opt.h
|
||||
index a1a0707d25..c9f9d3ae5a 100644
|
||||
--- a/sysdeps/mach/hurd/bits/posix_opt.h
|
||||
+++ b/sysdeps/mach/hurd/bits/posix_opt.h
|
||||
@@ -165,8 +165,8 @@
|
||||
/* The monotonic clock might be available. */
|
||||
#define _POSIX_MONOTONIC_CLOCK 200809L
|
||||
|
||||
-/* The clock selection interfaces are available. */
|
||||
-#define _POSIX_CLOCK_SELECTION 200809L
|
||||
+/* The clock selection interfaces are not really available yet. */
|
||||
+#define _POSIX_CLOCK_SELECTION -1
|
||||
|
||||
/* Advisory information interfaces could be available in future. */
|
||||
#define _POSIX_ADVISORY_INFO 0
|
||||
diff --git a/sysdeps/posix/clock_getres.c b/sysdeps/posix/clock_getres.c
|
||||
index 2c5adcd0e9..4d171aa5ad 100644
|
||||
--- a/sysdeps/posix/clock_getres.c
|
||||
+++ b/sysdeps/posix/clock_getres.c
|
||||
@@ -55,6 +55,10 @@ __clock_getres (clockid_t clock_id, struct timespec *res)
|
||||
switch (clock_id)
|
||||
{
|
||||
case CLOCK_REALTIME:
|
||||
+ case CLOCK_MONOTONIC:
|
||||
+ case CLOCK_MONOTONIC_RAW:
|
||||
+ case CLOCK_REALTIME_COARSE:
|
||||
+ case CLOCK_MONOTONIC_COARSE:
|
||||
retval = realtime_getres (res);
|
||||
break;
|
||||
|
||||
--
|
||||
2.53.0
|
||||
|
||||
45
sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/glibc-2.43-hurd-ldconfig.patch
vendored
Normal file
45
sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/glibc-2.43-hurd-ldconfig.patch
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
From c4d83b933e688fabc0ef24c770ac04df88cebb9d Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <c4d83b933e688fabc0ef24c770ac04df88cebb9d.1774310363.git.sam@gentoo.org>
|
||||
In-Reply-To: <9fdd7c3b7c89ea240f24ad8d900639904c3064e5.1774310363.git.sam@gentoo.org>
|
||||
References: <9fdd7c3b7c89ea240f24ad8d900639904c3064e5.1774310363.git.sam@gentoo.org>
|
||||
From: Jeff Bailey <jbailey@nisa.net>
|
||||
Date: Fri, 25 Apr 2003 03:40:46 +0000
|
||||
Subject: [PATCH 2/2] hurd: enable ldconfig
|
||||
|
||||
DP: Description: Enable ldconfig and such on hurd-i386
|
||||
DP: Author: Jeff Bailey <jbailey@nisa.net>
|
||||
DP: Upstream status: Not submitted
|
||||
DP: Status Details: Upstream disagrees with this patch, but I'm
|
||||
DP: putting it in so that we have expected Debian behaviour on the
|
||||
DP: Hurd. We should review this when the ELF standard supports runpath.
|
||||
DP: Date: 08 Apr 2003
|
||||
Imported-from: https://salsa.debian.org/glibc-team/glibc/-/blob/93d5069240943c4dcc950f6255028f7d1fcc2df0/debian/patches/hurd-i386/local-enable-ldconfig.diff
|
||||
---
|
||||
sysdeps/mach/hurd/configure | 3 ++-
|
||||
sysdeps/mach/hurd/configure.ac | 2 ++
|
||||
2 files changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sysdeps/mach/hurd/configure b/sysdeps/mach/hurd/configure
|
||||
index 743bad5fcb..44ba9ff0f5 100644
|
||||
--- a/sysdeps/mach/hurd/configure
|
||||
+++ b/sysdeps/mach/hurd/configure
|
||||
@@ -222,4 +222,5 @@ fi
|
||||
pthread_in_libc=no
|
||||
# Hurd already provides abort implementation for the loader
|
||||
abort_in_ld=yes
|
||||
-
|
||||
+# We want ldconfig
|
||||
+use_ldconfig=yes
|
||||
diff --git a/sysdeps/mach/hurd/configure.ac b/sysdeps/mach/hurd/configure.ac
|
||||
index 6d33feed0e..30fef74bed 100644
|
||||
--- a/sysdeps/mach/hurd/configure.ac
|
||||
+++ b/sysdeps/mach/hurd/configure.ac
|
||||
@@ -50,3 +50,5 @@ fi
|
||||
pthread_in_libc=no
|
||||
# Hurd already provides abort implementation for the loader
|
||||
abort_in_ld=yes
|
||||
+# We want ldconfig
|
||||
+use_ldconfig=yes
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -0,0 +1,34 @@
|
||||
https://salsa.debian.org/glibc-team/glibc/-/raw/sid/debian/patches/hurd-i386/tg-mach-hurd-link.diff
|
||||
|
||||
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||
Subject: [PATCH] Add -lmachuser -lhurduser to libc.so on GNU/Hurd.
|
||||
|
||||
http://lists.gnu.org/archive/html/bug-hurd/2011-03/msg00112.html
|
||||
|
||||
2011-03-29 Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||
|
||||
* Makerules ($(inst_libdir)/libc.so): Add -lmachuser -lhurduser to
|
||||
libc.so on GNU/Hurd.
|
||||
|
||||
It's still unclear what we want to aim for.
|
||||
|
||||
---
|
||||
Makerules | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/Makerules b/Makerules
|
||||
index 53eabfaba8..b0f5e1b3a0 100644
|
||||
--- a/Makerules
|
||||
+++ b/Makerules
|
||||
@@ -1066,6 +1066,9 @@ $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
|
||||
'$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
|
||||
' AS_NEEDED (' $(rtlddir)/$(rtld-installed-name) ') )' \
|
||||
) > $@.new
|
||||
+ifeq ($(patsubst gnu%,,$(config-os)),)
|
||||
+ echo 'INPUT ( AS_NEEDED ( -lmachuser -lhurduser ) )' >> $@.new
|
||||
+endif
|
||||
mv -f $@.new $@
|
||||
|
||||
endif
|
||||
--
|
||||
tg: (7bb5f8a836..) t/mach-hurd-link (depends on: baseline)
|
||||
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@ -1055,7 +1055,7 @@ run_locale_gen() {
|
||||
# number of processors saved in the environment of a binary package may
|
||||
# differ strongly from the number of processes available during postinst
|
||||
if [[ ${EMERGE_FROM} != binary ]]; then
|
||||
localegen_args+=( --jobs "$(makeopts_jobs)" )
|
||||
localegen_args+=( --jobs "$(get_makeopts_jobs)" )
|
||||
fi
|
||||
|
||||
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
@ -1193,7 +1193,7 @@ run_locale_gen() {
|
||||
# number of processors saved in the environment of a binary package may
|
||||
# differ strongly from the number of processes available during postinst
|
||||
if [[ ${EMERGE_FROM} != binary ]]; then
|
||||
localegen_args+=( --jobs "$(makeopts_jobs)" )
|
||||
localegen_args+=( --jobs "$(get_makeopts_jobs)" )
|
||||
fi
|
||||
|
||||
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
@ -1222,7 +1222,7 @@ run_locale_gen() {
|
||||
# number of processors saved in the environment of a binary package may
|
||||
# differ strongly from the number of processes available during postinst
|
||||
if [[ ${EMERGE_FROM} != binary ]]; then
|
||||
localegen_args+=( --jobs "$(makeopts_jobs)" )
|
||||
localegen_args+=( --jobs "$(get_makeopts_jobs)" )
|
||||
fi
|
||||
|
||||
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
@ -1244,7 +1244,7 @@ run_locale_gen() {
|
||||
# number of processors saved in the environment of a binary package may
|
||||
# differ strongly from the number of processes available during postinst
|
||||
if [[ ${EMERGE_FROM} != binary ]]; then
|
||||
localegen_args+=( --jobs "$(makeopts_jobs)" )
|
||||
localegen_args+=( --jobs "$(get_makeopts_jobs)" )
|
||||
fi
|
||||
|
||||
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
@ -1265,7 +1265,7 @@ run_locale_gen() {
|
||||
# number of processors saved in the environment of a binary package may
|
||||
# differ strongly from the number of processes available during postinst
|
||||
if [[ ${EMERGE_FROM} != binary ]]; then
|
||||
localegen_args+=( --jobs "$(makeopts_jobs)" )
|
||||
localegen_args+=( --jobs "$(get_makeopts_jobs)" )
|
||||
fi
|
||||
|
||||
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
@ -1273,7 +1273,7 @@ run_locale_gen() {
|
||||
# number of processors saved in the environment of a binary package may
|
||||
# differ strongly from the number of processes available during postinst
|
||||
if [[ ${EMERGE_FROM} != binary ]]; then
|
||||
localegen_args+=( --jobs "$(makeopts_jobs)" )
|
||||
localegen_args+=( --jobs "$(get_makeopts_jobs)" )
|
||||
fi
|
||||
|
||||
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
@ -1303,7 +1303,7 @@ run_locale_gen() {
|
||||
# number of processors saved in the environment of a binary package may
|
||||
# differ strongly from the number of processes available during postinst
|
||||
if [[ ${EMERGE_FROM} != binary ]]; then
|
||||
localegen_args+=( --jobs "$(makeopts_jobs)" )
|
||||
localegen_args+=( --jobs "$(get_makeopts_jobs)" )
|
||||
fi
|
||||
|
||||
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@ -1320,7 +1320,7 @@ run_locale_gen() {
|
||||
# number of processors saved in the environment of a binary package may
|
||||
# differ strongly from the number of processes available during postinst
|
||||
if [[ ${EMERGE_FROM} != binary ]]; then
|
||||
localegen_args+=( --jobs "$(makeopts_jobs)" )
|
||||
localegen_args+=( --jobs "$(get_makeopts_jobs)" )
|
||||
fi
|
||||
|
||||
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@ -1339,7 +1339,7 @@ run_locale_gen() {
|
||||
# number of processors saved in the environment of a binary package may
|
||||
# differ strongly from the number of processes available during postinst
|
||||
if [[ ${EMERGE_FROM} != binary ]]; then
|
||||
localegen_args+=( --jobs "$(makeopts_jobs)" )
|
||||
localegen_args+=( --jobs "$(get_makeopts_jobs)" )
|
||||
fi
|
||||
|
||||
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@ -1347,7 +1347,7 @@ run_locale_gen() {
|
||||
# number of processors saved in the environment of a binary package may
|
||||
# differ strongly from the number of processes available during postinst
|
||||
if [[ ${EMERGE_FROM} != binary ]]; then
|
||||
localegen_args+=( --jobs "$(makeopts_jobs)" )
|
||||
localegen_args+=( --jobs "$(get_makeopts_jobs)" )
|
||||
fi
|
||||
|
||||
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@ -1327,7 +1327,7 @@ run_locale_gen() {
|
||||
# number of processors saved in the environment of a binary package may
|
||||
# differ strongly from the number of processes available during postinst
|
||||
if [[ ${EMERGE_FROM} != binary ]]; then
|
||||
localegen_args+=( --jobs "$(makeopts_jobs)" )
|
||||
localegen_args+=( --jobs "$(get_makeopts_jobs)" )
|
||||
fi
|
||||
|
||||
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
|
||||
|
||||
@ -1343,7 +1343,7 @@ run_locale_gen() {
|
||||
# number of processors saved in the environment of a binary package may
|
||||
# differ strongly from the number of processes available during postinst
|
||||
if [[ ${EMERGE_FROM} != binary ]]; then
|
||||
localegen_args+=( --jobs "$(makeopts_jobs)" )
|
||||
localegen_args+=( --jobs "$(get_makeopts_jobs)" )
|
||||
fi
|
||||
|
||||
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
|
||||
|
||||
@ -246,6 +246,15 @@ is_crosscompile() {
|
||||
[[ ${CHOST} != ${CTARGET} ]]
|
||||
}
|
||||
|
||||
is_linux() {
|
||||
[[ ${CTARGET} == *-linux-* ]]
|
||||
}
|
||||
|
||||
is_hurd() {
|
||||
# Let's hope this holds for a long time
|
||||
[[ ${CTARGET} != *-linux-* ]]
|
||||
}
|
||||
|
||||
just_headers() {
|
||||
is_crosscompile && use headers-only
|
||||
}
|
||||
@ -1368,7 +1377,7 @@ run_locale_gen() {
|
||||
# number of processors saved in the environment of a binary package may
|
||||
# differ strongly from the number of processes available during postinst
|
||||
if [[ ${EMERGE_FROM} != binary ]]; then
|
||||
localegen_args+=( --jobs "$(makeopts_jobs)" )
|
||||
localegen_args+=( --jobs "$(get_makeopts_jobs)" )
|
||||
fi
|
||||
|
||||
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
|
||||
@ -1454,47 +1463,56 @@ glibc_do_src_install() {
|
||||
# if the main library set isn't installed into the right place. Maybe
|
||||
# we should query the active gcc for info instead of hardcoding it ?
|
||||
local i ldso_abi ldso_name
|
||||
local ldso_abi_list=(
|
||||
# x86
|
||||
amd64 /lib64/ld-linux-x86-64.so.2
|
||||
x32 /libx32/ld-linux-x32.so.2
|
||||
x86 /lib/ld-linux.so.2
|
||||
# mips
|
||||
o32 /lib/ld.so.1
|
||||
n32 /lib32/ld.so.1
|
||||
n64 /lib64/ld.so.1
|
||||
# powerpc
|
||||
ppc /lib/ld.so.1
|
||||
# riscv
|
||||
ilp32d /lib/ld-linux-riscv32-ilp32d.so.1
|
||||
ilp32 /lib/ld-linux-riscv32-ilp32.so.1
|
||||
lp64d /lib/ld-linux-riscv64-lp64d.so.1
|
||||
lp64 /lib/ld-linux-riscv64-lp64.so.1
|
||||
# s390
|
||||
s390 /lib/ld.so.1
|
||||
s390x /lib/ld64.so.1
|
||||
# sparc
|
||||
sparc32 /lib/ld-linux.so.2
|
||||
sparc64 /lib64/ld-linux.so.2
|
||||
)
|
||||
case $(tc-endian) in
|
||||
little)
|
||||
ldso_abi_list+=(
|
||||
# arm
|
||||
arm64 /lib/ld-linux-aarch64.so.1
|
||||
# ELFv2 (glibc does not support ELFv1 on LE)
|
||||
ppc64 /lib64/ld64.so.2
|
||||
if is_linux ; then
|
||||
local ldso_abi_list=(
|
||||
# x86
|
||||
amd64 /lib64/ld-linux-x86-64.so.2
|
||||
x32 /libx32/ld-linux-x32.so.2
|
||||
x86 /lib/ld-linux.so.2
|
||||
# mips
|
||||
o32 /lib/ld.so.1
|
||||
n32 /lib32/ld.so.1
|
||||
n64 /lib64/ld.so.1
|
||||
# powerpc
|
||||
ppc /lib/ld.so.1
|
||||
# riscv
|
||||
ilp32d /lib/ld-linux-riscv32-ilp32d.so.1
|
||||
ilp32 /lib/ld-linux-riscv32-ilp32.so.1
|
||||
lp64d /lib/ld-linux-riscv64-lp64d.so.1
|
||||
lp64 /lib/ld-linux-riscv64-lp64.so.1
|
||||
# s390
|
||||
s390 /lib/ld.so.1
|
||||
s390x /lib/ld64.so.1
|
||||
# sparc
|
||||
sparc32 /lib/ld-linux.so.2
|
||||
sparc64 /lib64/ld-linux.so.2
|
||||
)
|
||||
;;
|
||||
big)
|
||||
ldso_abi_list+=(
|
||||
# arm
|
||||
arm64 /lib/ld-linux-aarch64_be.so.1
|
||||
# ELFv1 (glibc does not support ELFv2 on BE)
|
||||
ppc64 /lib64/ld64.so.1
|
||||
case $(tc-endian) in
|
||||
little)
|
||||
ldso_abi_list+=(
|
||||
# arm
|
||||
arm64 /lib/ld-linux-aarch64.so.1
|
||||
# ELFv2 (glibc does not support ELFv1 on LE)
|
||||
ppc64 /lib64/ld64.so.2
|
||||
)
|
||||
;;
|
||||
big)
|
||||
ldso_abi_list+=(
|
||||
# arm
|
||||
arm64 /lib/ld-linux-aarch64_be.so.1
|
||||
# ELFv1 (glibc does not support ELFv2 on BE)
|
||||
ppc64 /lib64/ld64.so.1
|
||||
)
|
||||
;;
|
||||
esac
|
||||
else
|
||||
# we must be using hurd then
|
||||
local ldso_abi_list=(
|
||||
# x86
|
||||
amd64 /lib64/ld-x86-64.so.1
|
||||
x86 /lib/ld.so.1
|
||||
)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then
|
||||
dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib
|
||||
fi
|
||||
@ -1508,26 +1526,53 @@ glibc_do_src_install() {
|
||||
fi
|
||||
done
|
||||
|
||||
# In the LSB 5.0 definition, someone had the excellent idea to "standardize"
|
||||
# the runtime loader name, see also https://xkcd.com/927/
|
||||
# Normally, in Gentoo one should never come across executables that require this.
|
||||
# However, binary commercial packages are known to adhere to weird practices.
|
||||
# https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB
|
||||
local lsb_ldso_name native_ldso_name lsb_ldso_abi
|
||||
local lsb_ldso_abi_list=(
|
||||
# x86
|
||||
amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
|
||||
)
|
||||
for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do
|
||||
lsb_ldso_abi=${lsb_ldso_abi_list[i]}
|
||||
native_ldso_name=${lsb_ldso_abi_list[i+1]}
|
||||
lsb_ldso_name=${lsb_ldso_abi_list[i+2]}
|
||||
has ${lsb_ldso_abi} $(get_install_abis) || continue
|
||||
if is_linux ; then
|
||||
# In the LSB 5.0 definition, someone had the excellent idea to "standardize"
|
||||
# the runtime loader name, see also https://xkcd.com/927/
|
||||
# Normally, in Gentoo one should never come across executables that require this.
|
||||
# However, binary commercial packages are known to adhere to weird practices.
|
||||
# https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB
|
||||
local lsb_ldso_name native_ldso_name lsb_ldso_abi
|
||||
local lsb_ldso_abi_list=(
|
||||
# x86
|
||||
amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
|
||||
)
|
||||
for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do
|
||||
lsb_ldso_abi=${lsb_ldso_abi_list[i]}
|
||||
native_ldso_name=${lsb_ldso_abi_list[i+1]}
|
||||
lsb_ldso_name=${lsb_ldso_abi_list[i+2]}
|
||||
has ${lsb_ldso_abi} $(get_install_abis) || continue
|
||||
|
||||
if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then
|
||||
dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}"
|
||||
if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then
|
||||
dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# On Hurd, glibc and (unpatched) gcc tend to disagree about the proper location for
|
||||
# the dynamic loader. Which is maximally stupid since this one information is hardcoded
|
||||
# into every single binary, and even if we were to fix *our* gcc it could still prevent
|
||||
# us from running binaries prepared anywhere else...
|
||||
|
||||
if is_hurd && has amd64 $(get_install_abis) ; then
|
||||
# First, let's check for sanity
|
||||
if [[ -f "$(alt_prefix)/lib/ld-x86-64.so.1" ]] ; then
|
||||
die "Somehow your amd64 hurd glibc installed /lib/ld-x86-64.so.1 ... this should not happen."
|
||||
fi
|
||||
done
|
||||
|
||||
# Then make a compatibility symlink.
|
||||
dosym ../lib64/ld-x86-64.so.1 "$(alt_prefix)/lib/ld-x86-64.so.1"
|
||||
fi
|
||||
|
||||
if is_hurd && has x86 $(get_install_abis) ; then
|
||||
# First, let's check for sanity
|
||||
if [[ -f "$(alt_prefix)/$(get_abi_LIBDIR x86)/ld.so" ]] ; then
|
||||
die "Somehow your x86 hurd glibc installed ld.so ... this should not happen."
|
||||
fi
|
||||
|
||||
# Then make a compatibility symlink.
|
||||
dosym ld.so.1 "$(alt_prefix)/$(get_abi_LIBDIR x86)/ld.so"
|
||||
fi
|
||||
|
||||
# With devpts under Linux mounted properly, we do not need the pt_chown
|
||||
# binary to be setuid. This is because the default owners/perms will be
|
||||
|
||||
1860
sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.42-r6.ebuild
vendored
Normal file
1860
sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.42-r6.ebuild
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1896
sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.43-r1.ebuild
vendored
Normal file
1896
sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.43-r1.ebuild
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -151,7 +151,15 @@ if [[ ${CATEGORY} == cross-* ]] ; then
|
||||
>=${CATEGORY}/binutils-2.27
|
||||
>=${CATEGORY}/gcc-6.2
|
||||
)"
|
||||
[[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
|
||||
|
||||
case ${CATEGORY} in
|
||||
*-linux*)
|
||||
DEPEND+=" ${CATEGORY}/linux-headers"
|
||||
;;
|
||||
*-gnu)
|
||||
DEPEND+=" ${CATEGORY}/gnumach[-headers-only]"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
BDEPEND+="
|
||||
>=sys-devel/binutils-2.27
|
||||
@ -249,6 +257,15 @@ is_crosscompile() {
|
||||
[[ ${CHOST} != ${CTARGET} ]]
|
||||
}
|
||||
|
||||
is_linux() {
|
||||
[[ ${CTARGET} == *-linux-* ]]
|
||||
}
|
||||
|
||||
is_hurd() {
|
||||
# Let's hope this holds for a long time
|
||||
[[ ${CTARGET} != *-linux-* ]]
|
||||
}
|
||||
|
||||
just_headers() {
|
||||
is_crosscompile && use headers-only
|
||||
}
|
||||
@ -376,6 +393,11 @@ setup_target_flags() {
|
||||
# For compatibility with older binaries at slight performance cost.
|
||||
use stack-realign && export CFLAGS_x86+=" -mstackrealign"
|
||||
fi
|
||||
|
||||
if is_hurd ; then
|
||||
# doesnt build with -march=native and probably other values, debugging required
|
||||
filter-flags '-march=*'
|
||||
fi
|
||||
;;
|
||||
mips)
|
||||
# The mips abi cannot support the GNU style hashes. #233233
|
||||
@ -499,6 +521,16 @@ setup_flags() {
|
||||
# #829583
|
||||
filter-lfs-flags
|
||||
|
||||
case ${CTARGET} in
|
||||
*-linux*)
|
||||
;;
|
||||
*-gnu)
|
||||
# -g3 confuses MIG which relies on preprocessed input
|
||||
replace-flags -ggdb[3-9] -ggdb2
|
||||
replace-flags -g3 -g
|
||||
;;
|
||||
esac
|
||||
|
||||
unset CBUILD_OPT CTARGET_OPT
|
||||
if use multilib ; then
|
||||
CTARGET_OPT=$(get_abi_CTARGET)
|
||||
@ -992,6 +1024,13 @@ src_prepare() {
|
||||
einfo "Applying Gentoo Glibc patchset ${patchsetname}"
|
||||
eapply "${WORKDIR}"/patches
|
||||
einfo "Done."
|
||||
|
||||
# Patches we should apply only for Hurd to be conservative
|
||||
if is_hurd ; then
|
||||
eapply "${FILESDIR}"/glibc-2.43-hurd-link-helpers.patch
|
||||
eapply "${FILESDIR}"/glibc-2.43-hurd-CLOCK_MONOTONIC.patch
|
||||
eapply "${FILESDIR}"/glibc-2.43-hurd-ldconfig.patch
|
||||
fi
|
||||
fi
|
||||
|
||||
case ${CTARGET} in
|
||||
@ -1097,7 +1136,6 @@ glibc_do_configure() {
|
||||
--with-bugurl=https://bugs.gentoo.org/
|
||||
--with-pkgversion="$(glibc_banner)"
|
||||
$(use_multiarch || echo --disable-multi-arch)
|
||||
$(use_enable systemtap)
|
||||
$(use_enable nscd)
|
||||
|
||||
# /usr/bin/mtrace has a Perl shebang. Gentoo Prefix QA checks fail if
|
||||
@ -1123,6 +1161,12 @@ glibc_do_configure() {
|
||||
# We rely on sys-libs/timezone-data for timezone tools normally.
|
||||
myconf+=( $(use_enable vanilla timezone-tools) )
|
||||
|
||||
if is_crosscompile ; then
|
||||
myconf+=( --disable-systemtap )
|
||||
else
|
||||
myconf+=( $(use_enable systemtap) )
|
||||
fi
|
||||
|
||||
# These libs don't have configure flags.
|
||||
ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no)
|
||||
ac_cv_lib_cap_cap_init=$(usex caps || echo no)
|
||||
@ -1371,7 +1415,7 @@ run_locale_gen() {
|
||||
# number of processors saved in the environment of a binary package may
|
||||
# differ strongly from the number of processes available during postinst
|
||||
if [[ ${EMERGE_FROM} != binary ]]; then
|
||||
localegen_args+=( --jobs "$(makeopts_jobs)" )
|
||||
localegen_args+=( --jobs "$(get_makeopts_jobs)" )
|
||||
fi
|
||||
|
||||
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
|
||||
@ -1457,47 +1501,56 @@ glibc_do_src_install() {
|
||||
# if the main library set isn't installed into the right place. Maybe
|
||||
# we should query the active gcc for info instead of hardcoding it ?
|
||||
local i ldso_abi ldso_name
|
||||
local ldso_abi_list=(
|
||||
# x86
|
||||
amd64 /lib64/ld-linux-x86-64.so.2
|
||||
x32 /libx32/ld-linux-x32.so.2
|
||||
x86 /lib/ld-linux.so.2
|
||||
# mips
|
||||
o32 /lib/ld.so.1
|
||||
n32 /lib32/ld.so.1
|
||||
n64 /lib64/ld.so.1
|
||||
# powerpc
|
||||
ppc /lib/ld.so.1
|
||||
# riscv
|
||||
ilp32d /lib/ld-linux-riscv32-ilp32d.so.1
|
||||
ilp32 /lib/ld-linux-riscv32-ilp32.so.1
|
||||
lp64d /lib/ld-linux-riscv64-lp64d.so.1
|
||||
lp64 /lib/ld-linux-riscv64-lp64.so.1
|
||||
# s390
|
||||
s390 /lib/ld.so.1
|
||||
s390x /lib/ld64.so.1
|
||||
# sparc
|
||||
sparc32 /lib/ld-linux.so.2
|
||||
sparc64 /lib64/ld-linux.so.2
|
||||
)
|
||||
case $(tc-endian) in
|
||||
little)
|
||||
ldso_abi_list+=(
|
||||
# arm
|
||||
arm64 /lib/ld-linux-aarch64.so.1
|
||||
# ELFv2 (glibc does not support ELFv1 on LE)
|
||||
ppc64 /lib64/ld64.so.2
|
||||
if is_linux ; then
|
||||
local ldso_abi_list=(
|
||||
# x86
|
||||
amd64 /lib64/ld-linux-x86-64.so.2
|
||||
x32 /libx32/ld-linux-x32.so.2
|
||||
x86 /lib/ld-linux.so.2
|
||||
# mips
|
||||
o32 /lib/ld.so.1
|
||||
n32 /lib32/ld.so.1
|
||||
n64 /lib64/ld.so.1
|
||||
# powerpc
|
||||
ppc /lib/ld.so.1
|
||||
# riscv
|
||||
ilp32d /lib/ld-linux-riscv32-ilp32d.so.1
|
||||
ilp32 /lib/ld-linux-riscv32-ilp32.so.1
|
||||
lp64d /lib/ld-linux-riscv64-lp64d.so.1
|
||||
lp64 /lib/ld-linux-riscv64-lp64.so.1
|
||||
# s390
|
||||
s390 /lib/ld.so.1
|
||||
s390x /lib/ld64.so.1
|
||||
# sparc
|
||||
sparc32 /lib/ld-linux.so.2
|
||||
sparc64 /lib64/ld-linux.so.2
|
||||
)
|
||||
;;
|
||||
big)
|
||||
ldso_abi_list+=(
|
||||
# arm
|
||||
arm64 /lib/ld-linux-aarch64_be.so.1
|
||||
# ELFv1 (glibc does not support ELFv2 on BE)
|
||||
ppc64 /lib64/ld64.so.1
|
||||
case $(tc-endian) in
|
||||
little)
|
||||
ldso_abi_list+=(
|
||||
# arm
|
||||
arm64 /lib/ld-linux-aarch64.so.1
|
||||
# ELFv2 (glibc does not support ELFv1 on LE)
|
||||
ppc64 /lib64/ld64.so.2
|
||||
)
|
||||
;;
|
||||
big)
|
||||
ldso_abi_list+=(
|
||||
# arm
|
||||
arm64 /lib/ld-linux-aarch64_be.so.1
|
||||
# ELFv1 (glibc does not support ELFv2 on BE)
|
||||
ppc64 /lib64/ld64.so.1
|
||||
)
|
||||
;;
|
||||
esac
|
||||
else
|
||||
# we must be using hurd then
|
||||
local ldso_abi_list=(
|
||||
# x86
|
||||
amd64 /lib64/ld-x86-64.so.1
|
||||
x86 /lib/ld.so.1
|
||||
)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then
|
||||
dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib
|
||||
fi
|
||||
@ -1511,26 +1564,53 @@ glibc_do_src_install() {
|
||||
fi
|
||||
done
|
||||
|
||||
# In the LSB 5.0 definition, someone had the excellent idea to "standardize"
|
||||
# the runtime loader name, see also https://xkcd.com/927/
|
||||
# Normally, in Gentoo one should never come across executables that require this.
|
||||
# However, binary commercial packages are known to adhere to weird practices.
|
||||
# https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB
|
||||
local lsb_ldso_name native_ldso_name lsb_ldso_abi
|
||||
local lsb_ldso_abi_list=(
|
||||
# x86
|
||||
amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
|
||||
)
|
||||
for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do
|
||||
lsb_ldso_abi=${lsb_ldso_abi_list[i]}
|
||||
native_ldso_name=${lsb_ldso_abi_list[i+1]}
|
||||
lsb_ldso_name=${lsb_ldso_abi_list[i+2]}
|
||||
has ${lsb_ldso_abi} $(get_install_abis) || continue
|
||||
if is_linux ; then
|
||||
# In the LSB 5.0 definition, someone had the excellent idea to "standardize"
|
||||
# the runtime loader name, see also https://xkcd.com/927/
|
||||
# Normally, in Gentoo one should never come across executables that require this.
|
||||
# However, binary commercial packages are known to adhere to weird practices.
|
||||
# https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB
|
||||
local lsb_ldso_name native_ldso_name lsb_ldso_abi
|
||||
local lsb_ldso_abi_list=(
|
||||
# x86
|
||||
amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
|
||||
)
|
||||
for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do
|
||||
lsb_ldso_abi=${lsb_ldso_abi_list[i]}
|
||||
native_ldso_name=${lsb_ldso_abi_list[i+1]}
|
||||
lsb_ldso_name=${lsb_ldso_abi_list[i+2]}
|
||||
has ${lsb_ldso_abi} $(get_install_abis) || continue
|
||||
|
||||
if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then
|
||||
dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}"
|
||||
if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then
|
||||
dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# On Hurd, glibc and (unpatched) gcc tend to disagree about the proper location for
|
||||
# the dynamic loader. Which is maximally stupid since this one information is hardcoded
|
||||
# into every single binary, and even if we were to fix *our* gcc it could still prevent
|
||||
# us from running binaries prepared anywhere else...
|
||||
|
||||
if is_hurd && has amd64 $(get_install_abis) ; then
|
||||
# First, let's check for sanity
|
||||
if [[ -f "$(alt_prefix)/lib/ld-x86-64.so.1" ]] ; then
|
||||
die "Somehow your amd64 hurd glibc installed /lib/ld-x86-64.so.1 ... this should not happen."
|
||||
fi
|
||||
done
|
||||
|
||||
# Then make a compatibility symlink.
|
||||
dosym ../lib64/ld-x86-64.so.1 "$(alt_prefix)/lib/ld-x86-64.so.1"
|
||||
fi
|
||||
|
||||
if is_hurd && has x86 $(get_install_abis) ; then
|
||||
# First, let's check for sanity
|
||||
if [[ -f "$(alt_prefix)/$(get_abi_LIBDIR x86)/ld.so" ]] ; then
|
||||
die "Somehow your x86 hurd glibc installed ld.so ... this should not happen."
|
||||
fi
|
||||
|
||||
# Then make a compatibility symlink.
|
||||
dosym ld.so.1 "$(alt_prefix)/$(get_abi_LIBDIR x86)/ld.so"
|
||||
fi
|
||||
|
||||
# With devpts under Linux mounted properly, we do not need the pt_chown
|
||||
# binary to be setuid. This is because the default owners/perms will be
|
||||
|
||||
@ -6,7 +6,7 @@ EAPI=8
|
||||
# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc
|
||||
# Please read & adapt the page as necessary if obsolete.
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..14} )
|
||||
PYTHON_COMPAT=( python3_{11..14} )
|
||||
TMPFILES_OPTIONAL=1
|
||||
|
||||
EMULTILIB_PKG="true"
|
||||
@ -151,7 +151,15 @@ if [[ ${CATEGORY} == cross-* ]] ; then
|
||||
>=${CATEGORY}/binutils-2.27
|
||||
>=${CATEGORY}/gcc-6.2
|
||||
)"
|
||||
[[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
|
||||
|
||||
case ${CATEGORY} in
|
||||
*-linux*)
|
||||
DEPEND+=" ${CATEGORY}/linux-headers"
|
||||
;;
|
||||
*-gnu)
|
||||
DEPEND+=" ${CATEGORY}/gnumach[-headers-only]"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
BDEPEND+="
|
||||
>=sys-devel/binutils-2.27
|
||||
@ -249,6 +257,15 @@ is_crosscompile() {
|
||||
[[ ${CHOST} != ${CTARGET} ]]
|
||||
}
|
||||
|
||||
is_linux() {
|
||||
[[ ${CTARGET} == *-linux-* ]]
|
||||
}
|
||||
|
||||
is_hurd() {
|
||||
# Let's hope this holds for a long time
|
||||
[[ ${CTARGET} != *-linux-* ]]
|
||||
}
|
||||
|
||||
just_headers() {
|
||||
is_crosscompile && use headers-only
|
||||
}
|
||||
@ -376,6 +393,11 @@ setup_target_flags() {
|
||||
# For compatibility with older binaries at slight performance cost.
|
||||
use stack-realign && export CFLAGS_x86+=" -mstackrealign"
|
||||
fi
|
||||
|
||||
if is_hurd ; then
|
||||
# doesnt build with -march=native and probably other values, debugging required
|
||||
filter-flags '-march=*'
|
||||
fi
|
||||
;;
|
||||
mips)
|
||||
# The mips abi cannot support the GNU style hashes. #233233
|
||||
@ -499,6 +521,16 @@ setup_flags() {
|
||||
# #829583
|
||||
filter-lfs-flags
|
||||
|
||||
case ${CTARGET} in
|
||||
*-linux*)
|
||||
;;
|
||||
*-gnu)
|
||||
# -g3 confuses MIG which relies on preprocessed input
|
||||
replace-flags -ggdb[3-9] -ggdb2
|
||||
replace-flags -g3 -g
|
||||
;;
|
||||
esac
|
||||
|
||||
unset CBUILD_OPT CTARGET_OPT
|
||||
if use multilib ; then
|
||||
CTARGET_OPT=$(get_abi_CTARGET)
|
||||
@ -813,7 +845,7 @@ sanity_prechecks() {
|
||||
[[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system."
|
||||
fi
|
||||
|
||||
if ! do_run_test '#include <unistd.h>\n#include <sys/syscall.h>\nint main(){return syscall(1000)!=-1;}\n' ; then
|
||||
if is_linux && ! do_run_test '#include <unistd.h>\n#include <sys/syscall.h>\nint main(){return syscall(1000)!=-1;}\n' ; then
|
||||
eerror "Your old kernel is broken. You need to update it to a newer"
|
||||
eerror "version as syscall(<bignum>) will break. See bug 279260."
|
||||
[[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Old and broken kernel."
|
||||
@ -870,7 +902,7 @@ sanity_prechecks() {
|
||||
die "Found directory (${ESYSROOT}/usr/lib/include) which will break build (bug #833620)!"
|
||||
fi
|
||||
|
||||
if [[ ${CTARGET} == *-linux* ]] ; then
|
||||
if is_linux ; then
|
||||
local run_kv build_kv want_kv
|
||||
|
||||
run_kv=$(g_get_running_KV)
|
||||
@ -992,6 +1024,11 @@ src_prepare() {
|
||||
einfo "Applying Gentoo Glibc patchset ${patchsetname}"
|
||||
eapply "${WORKDIR}"/patches
|
||||
einfo "Done."
|
||||
|
||||
# Patches we should apply only for Hurd to be conservative
|
||||
if is_hurd ; then
|
||||
eapply "${FILESDIR}"/glibc-2.43-hurd-CLOCK_MONOTONIC.patch
|
||||
fi
|
||||
fi
|
||||
|
||||
case ${CTARGET} in
|
||||
@ -1097,7 +1134,6 @@ glibc_do_configure() {
|
||||
--with-bugurl=https://bugs.gentoo.org/
|
||||
--with-pkgversion="$(glibc_banner)"
|
||||
$(use_multiarch || echo --disable-multi-arch)
|
||||
$(use_enable systemtap)
|
||||
$(use_enable nscd)
|
||||
|
||||
# /usr/bin/mtrace has a Perl shebang. Gentoo Prefix QA checks fail if
|
||||
@ -1123,6 +1159,12 @@ glibc_do_configure() {
|
||||
# We rely on sys-libs/timezone-data for timezone tools normally.
|
||||
myconf+=( $(use_enable vanilla timezone-tools) )
|
||||
|
||||
if is_crosscompile ; then
|
||||
myconf+=( --disable-systemtap )
|
||||
else
|
||||
myconf+=( $(use_enable systemtap) )
|
||||
fi
|
||||
|
||||
# These libs don't have configure flags.
|
||||
ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no)
|
||||
ac_cv_lib_cap_cap_init=$(usex caps || echo no)
|
||||
@ -1371,7 +1413,7 @@ run_locale_gen() {
|
||||
# number of processors saved in the environment of a binary package may
|
||||
# differ strongly from the number of processes available during postinst
|
||||
if [[ ${EMERGE_FROM} != binary ]]; then
|
||||
localegen_args+=( --jobs "$(makeopts_jobs)" )
|
||||
localegen_args+=( --jobs "$(get_makeopts_jobs)" )
|
||||
fi
|
||||
|
||||
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
|
||||
@ -1457,47 +1499,56 @@ glibc_do_src_install() {
|
||||
# if the main library set isn't installed into the right place. Maybe
|
||||
# we should query the active gcc for info instead of hardcoding it ?
|
||||
local i ldso_abi ldso_name
|
||||
local ldso_abi_list=(
|
||||
# x86
|
||||
amd64 /lib64/ld-linux-x86-64.so.2
|
||||
x32 /libx32/ld-linux-x32.so.2
|
||||
x86 /lib/ld-linux.so.2
|
||||
# mips
|
||||
o32 /lib/ld.so.1
|
||||
n32 /lib32/ld.so.1
|
||||
n64 /lib64/ld.so.1
|
||||
# powerpc
|
||||
ppc /lib/ld.so.1
|
||||
# riscv
|
||||
ilp32d /lib/ld-linux-riscv32-ilp32d.so.1
|
||||
ilp32 /lib/ld-linux-riscv32-ilp32.so.1
|
||||
lp64d /lib/ld-linux-riscv64-lp64d.so.1
|
||||
lp64 /lib/ld-linux-riscv64-lp64.so.1
|
||||
# s390
|
||||
s390 /lib/ld.so.1
|
||||
s390x /lib/ld64.so.1
|
||||
# sparc
|
||||
sparc32 /lib/ld-linux.so.2
|
||||
sparc64 /lib64/ld-linux.so.2
|
||||
)
|
||||
case $(tc-endian) in
|
||||
little)
|
||||
ldso_abi_list+=(
|
||||
# arm
|
||||
arm64 /lib/ld-linux-aarch64.so.1
|
||||
# ELFv2 (glibc does not support ELFv1 on LE)
|
||||
ppc64 /lib64/ld64.so.2
|
||||
if is_linux ; then
|
||||
local ldso_abi_list=(
|
||||
# x86
|
||||
amd64 /lib64/ld-linux-x86-64.so.2
|
||||
x32 /libx32/ld-linux-x32.so.2
|
||||
x86 /lib/ld-linux.so.2
|
||||
# mips
|
||||
o32 /lib/ld.so.1
|
||||
n32 /lib32/ld.so.1
|
||||
n64 /lib64/ld.so.1
|
||||
# powerpc
|
||||
ppc /lib/ld.so.1
|
||||
# riscv
|
||||
ilp32d /lib/ld-linux-riscv32-ilp32d.so.1
|
||||
ilp32 /lib/ld-linux-riscv32-ilp32.so.1
|
||||
lp64d /lib/ld-linux-riscv64-lp64d.so.1
|
||||
lp64 /lib/ld-linux-riscv64-lp64.so.1
|
||||
# s390
|
||||
s390 /lib/ld.so.1
|
||||
s390x /lib/ld64.so.1
|
||||
# sparc
|
||||
sparc32 /lib/ld-linux.so.2
|
||||
sparc64 /lib64/ld-linux.so.2
|
||||
)
|
||||
;;
|
||||
big)
|
||||
ldso_abi_list+=(
|
||||
# arm
|
||||
arm64 /lib/ld-linux-aarch64_be.so.1
|
||||
# ELFv1 (glibc does not support ELFv2 on BE)
|
||||
ppc64 /lib64/ld64.so.1
|
||||
case $(tc-endian) in
|
||||
little)
|
||||
ldso_abi_list+=(
|
||||
# arm
|
||||
arm64 /lib/ld-linux-aarch64.so.1
|
||||
# ELFv2 (glibc does not support ELFv1 on LE)
|
||||
ppc64 /lib64/ld64.so.2
|
||||
)
|
||||
;;
|
||||
big)
|
||||
ldso_abi_list+=(
|
||||
# arm
|
||||
arm64 /lib/ld-linux-aarch64_be.so.1
|
||||
# ELFv1 (glibc does not support ELFv2 on BE)
|
||||
ppc64 /lib64/ld64.so.1
|
||||
)
|
||||
;;
|
||||
esac
|
||||
else
|
||||
# we must be using hurd then
|
||||
local ldso_abi_list=(
|
||||
# x86
|
||||
amd64 /lib64/ld-x86-64.so.1
|
||||
x86 /lib/ld.so.1
|
||||
)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then
|
||||
dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib
|
||||
fi
|
||||
@ -1511,26 +1562,53 @@ glibc_do_src_install() {
|
||||
fi
|
||||
done
|
||||
|
||||
# In the LSB 5.0 definition, someone had the excellent idea to "standardize"
|
||||
# the runtime loader name, see also https://xkcd.com/927/
|
||||
# Normally, in Gentoo one should never come across executables that require this.
|
||||
# However, binary commercial packages are known to adhere to weird practices.
|
||||
# https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB
|
||||
local lsb_ldso_name native_ldso_name lsb_ldso_abi
|
||||
local lsb_ldso_abi_list=(
|
||||
# x86
|
||||
amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
|
||||
)
|
||||
for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do
|
||||
lsb_ldso_abi=${lsb_ldso_abi_list[i]}
|
||||
native_ldso_name=${lsb_ldso_abi_list[i+1]}
|
||||
lsb_ldso_name=${lsb_ldso_abi_list[i+2]}
|
||||
has ${lsb_ldso_abi} $(get_install_abis) || continue
|
||||
if is_linux ; then
|
||||
# In the LSB 5.0 definition, someone had the excellent idea to "standardize"
|
||||
# the runtime loader name, see also https://xkcd.com/927/
|
||||
# Normally, in Gentoo one should never come across executables that require this.
|
||||
# However, binary commercial packages are known to adhere to weird practices.
|
||||
# https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB
|
||||
local lsb_ldso_name native_ldso_name lsb_ldso_abi
|
||||
local lsb_ldso_abi_list=(
|
||||
# x86
|
||||
amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
|
||||
)
|
||||
for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do
|
||||
lsb_ldso_abi=${lsb_ldso_abi_list[i]}
|
||||
native_ldso_name=${lsb_ldso_abi_list[i+1]}
|
||||
lsb_ldso_name=${lsb_ldso_abi_list[i+2]}
|
||||
has ${lsb_ldso_abi} $(get_install_abis) || continue
|
||||
|
||||
if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then
|
||||
dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}"
|
||||
if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then
|
||||
dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# On Hurd, glibc and (unpatched) gcc tend to disagree about the proper location for
|
||||
# the dynamic loader. Which is maximally stupid since this one information is hardcoded
|
||||
# into every single binary, and even if we were to fix *our* gcc it could still prevent
|
||||
# us from running binaries prepared anywhere else...
|
||||
|
||||
if is_hurd && has amd64 $(get_install_abis) ; then
|
||||
# First, let's check for sanity
|
||||
if [[ -f "${D}/$(alt_prefix)/lib/ld-x86-64.so.1" ]] ; then
|
||||
die "Somehow your amd64 hurd glibc installed /lib/ld-x86-64.so.1 ... this should not happen."
|
||||
fi
|
||||
done
|
||||
|
||||
# Then make a compatibility symlink.
|
||||
dosym ../lib64/ld-x86-64.so.1 "$(alt_prefix)/lib/ld-x86-64.so.1"
|
||||
fi
|
||||
|
||||
if is_hurd && has x86 $(get_install_abis) ; then
|
||||
# First, let's check for sanity
|
||||
if [[ -f "${D}/$(alt_prefix)/$(get_abi_LIBDIR x86)/ld.so" ]] ; then
|
||||
die "Somehow your x86 hurd glibc installed ld.so ... this should not happen."
|
||||
fi
|
||||
|
||||
# Then make a compatibility symlink.
|
||||
dosym ld.so.1 "$(alt_prefix)/$(get_abi_LIBDIR x86)/ld.so"
|
||||
fi
|
||||
|
||||
# With devpts under Linux mounted properly, we do not need the pt_chown
|
||||
# binary to be setuid. This is because the default owners/perms will be
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user