mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-15 08:56:58 +02:00
sys-libs/glibc: Sync with Gentoo
It's from Gentoo commit 77cec48da70c6d6424ed6dba4357dd8eacd262c2.
This commit is contained in:
parent
5b7f8b1525
commit
26475e5ebf
@ -1,5 +1,5 @@
|
||||
DIST gcc-multilib-bootstrap-20201208.tar.xz 5528452 BLAKE2B 16699a6e4df5b2f28a21776ae9e3728b26a9ea251f5580aa5349545ad7c9f6145b9cb6a12ca8f5f96b9cb2a3c70b7e66ca702e4c6f083ac00408e0a20a69e613 SHA512 a243f505e17d0a7e144e8713c077582412f61d6cf7f79baa846de4fb77f5e0f27e11c9a785e14624e04ac52287b32164e7995323aa11caef59113ac438254347
|
||||
DIST glibc-2.33-patches-8.tar.xz 91220 BLAKE2B 1c9aeaf2d3a58e83aec8ea6eb19776dd05e16430f25de675b467ab18d4fb438374254d06b2072b4272d089237e5f11da6d94a84c38f588b79e94e26b650f6faf SHA512 58d3f444c50e64bbf867cbcc38f4281156c7da3878674038674e1c6706b90919468af9fbd424c2dd949bc2d7d6cb36ed7be2120bb957636cad6b76e56eb54031
|
||||
DIST glibc-2.33-patches-11.tar.xz 143916 BLAKE2B ac13b3ccf9681bb6d3c35ecc33e268ea3f67c1809f916019e692dc83e3ce809402a45548da5ca6c7c30d2a45a2638f9fa4254c0355bd4c53bdb216f17aa4e28b SHA512 0ee1dfcf9574543d49ab4fbfe53571258422b6e82b9d12a33e411cee7e517821a4c45c24962b5120783a4efc898afdfa170d33486cc74d94c526bdd14cc84300
|
||||
DIST glibc-2.33.tar.xz 17031280 BLAKE2B 703d12121c1e2c5d9e0c6ba5341f5fb5c4d9111611a83f2360029b5de9c6e5a5611249d1833684a58ed4afdf49cae614365d87ec8721ba0e5d218f593b1f229d SHA512 4cb5777b68b22b746cc51669e0e9282b43c83f6944e42656e6db7195ebb68f2f9260f130fdeb4e3cfc64efae4f58d96c43d388f52be1eb024ca448084684abdb
|
||||
DIST glibc-systemd-20210814.tar.gz 1469 BLAKE2B 10fa7bcb46d4fdce9c0ab353cbd30871e9b09a347a13a9c9a3b5777f931aa3c826c158d2e49532c604d4a834f2fab4089b67495fb88d0398945dc50d45ad9ef1 SHA512 5346a9ea459a1e6ccf665389f2a294de1e16f1e3e05cdf07e3dd99ed0e4f6f8b52cc333d4bff3c75ac90ab6ce70cd4ab2b3e126f920ce7979abd6dda56315efc
|
||||
DIST locale-gen-2.22.tar.gz 7971 BLAKE2B 2dc66fa69bf51799d0c34459b654fba6998b80a7e322e9b670036c967e269ad921f50195e6e34c4a83c1f0bad191fd5aa3f37defb82271b73acbca07b7e49d08 SHA512 9798b10dbbc792345a7b7a121dec5f4bba9839a8aec010f01a09f3402fd5bf2376f79e03a6a19bc357010db780037a8811c381136ce19be1f1370374906dff38
|
||||
|
@ -1,9 +0,0 @@
|
||||
# GLibc
|
||||
|
||||
The system's C library, sometimes referred to as "service pack for the C
|
||||
language". The build recipe has a single modification over the one Gentoo
|
||||
upstream uses: in the installation callback `glibc_do_src_install`, we remove
|
||||
all of glibc's `/etc` files right after the stock glibc build diligently
|
||||
installed them, since we ship our own `/etc` stuff via the `baseimage` recipe.
|
||||
The addition sits at the end of the `glibc_do_src_install` function and is duly
|
||||
labelled `## Flatcar Container Linux: ...`.
|
@ -1,2 +0,0 @@
|
||||
L /etc/nscd.conf - - - - ../usr/share/baselayout/nscd.conf
|
||||
d /var/db/nscd - - - - -
|
@ -9,7 +9,7 @@ EAPI=7
|
||||
# We avoid Python 3.10 here _for now_ (it does work!) to avoid circular dependencies
|
||||
# on upgrades as people migrate to libxcrypt.
|
||||
# https://wiki.gentoo.org/wiki/User:Sam/Portage_help/Circular_dependencies#Python_and_libcrypt
|
||||
PYTHON_COMPAT=( python3_{7,8,9} )
|
||||
PYTHON_COMPAT=( python3_{8,9} )
|
||||
TMPFILES_OPTIONAL=1
|
||||
|
||||
inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \
|
||||
@ -23,13 +23,13 @@ SLOT="2.2"
|
||||
EMULTILIB_PKG="true"
|
||||
|
||||
# Gentoo patchset (ignored for live ebuilds)
|
||||
PATCH_VER=8
|
||||
PATCH_VER=11
|
||||
PATCH_DEV=dilfridge
|
||||
|
||||
if [[ ${PV} == 9999* ]]; then
|
||||
inherit git-r3
|
||||
else
|
||||
KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
|
||||
SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
|
||||
SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
|
||||
fi
|
||||
@ -438,33 +438,6 @@ setup_flags() {
|
||||
filter-flags '-fstack-protector*'
|
||||
}
|
||||
|
||||
want_tls() {
|
||||
# Archs that can use TLS (Thread Local Storage)
|
||||
case $(tc-arch) in
|
||||
x86)
|
||||
# requires i486 or better #106556
|
||||
[[ ${CTARGET} == i[4567]86* ]] && return 0
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
return 0
|
||||
}
|
||||
|
||||
want__thread() {
|
||||
want_tls || return 1
|
||||
|
||||
# For some reason --with-tls --with__thread is causing segfaults on sparc32.
|
||||
[[ ${PROFILE_ARCH} == "sparc" ]] && return 1
|
||||
|
||||
[[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD}
|
||||
|
||||
# only test gcc -- can't test linking yet
|
||||
tc-has-tls -c ${CTARGET}
|
||||
WANT__THREAD=$?
|
||||
|
||||
return ${WANT__THREAD}
|
||||
}
|
||||
|
||||
use_multiarch() {
|
||||
# Allow user to disable runtime arch detection in multilib.
|
||||
use multiarch || return 1
|
||||
@ -783,14 +756,6 @@ sanity_prechecks() {
|
||||
|
||||
# When we actually have to compile something...
|
||||
if ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; then
|
||||
ebegin "Checking gcc for __thread support"
|
||||
if ! eend $(want__thread ; echo $?) ; then
|
||||
echo
|
||||
eerror "Could not find a gcc that supports the __thread directive!"
|
||||
eerror "Please update your binutils/gcc and try again."
|
||||
die "No __thread support in gcc!"
|
||||
fi
|
||||
|
||||
if [[ ${CTARGET} == *-linux* ]] ; then
|
||||
local run_kv build_kv want_kv
|
||||
|
||||
@ -838,12 +803,10 @@ upgrade_warning() {
|
||||
|
||||
# pkg_pretend
|
||||
|
||||
# Flatcar: Skip sanity checks at pretend time because we don't ship a compiler
|
||||
# in the OS image. This test fails when installing the glibc binpkg and no
|
||||
# compiler is present.
|
||||
pkg_pretend() {
|
||||
einfo "Flatcar: Skipping sanity_prechecks for binpkg installation. src_unpack will take care of compile-time prechecks."
|
||||
# sanity_prechecks
|
||||
# All the checks...
|
||||
einfo "Checking general environment sanity."
|
||||
sanity_prechecks
|
||||
upgrade_warning
|
||||
}
|
||||
|
||||
@ -1168,6 +1131,7 @@ glibc_headers_configure() {
|
||||
--host=${CTARGET_OPT:-${CTARGET}}
|
||||
--with-headers=$(build_eprefix)$(alt_build_headers)
|
||||
--prefix="$(host_eprefix)/usr"
|
||||
$(use_enable crypt)
|
||||
${EXTRA_ECONF}
|
||||
)
|
||||
|
||||
@ -1295,13 +1259,12 @@ glibc_do_src_install() {
|
||||
# '#define VERSION "2.26.90"' -> '2.26.90'
|
||||
local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h)
|
||||
|
||||
# Flatcar: override this and strip everything to keep image size at bay
|
||||
# Avoid stripping binaries not targeted by ${CHOST}. Or else
|
||||
# ${CHOST}-strip would break binaries build for ${CTARGET}.
|
||||
# is_crosscompile && dostrip -x /
|
||||
is_crosscompile && dostrip -x /
|
||||
# gdb thread introspection relies on local libpthreas symbols. stripping breaks it
|
||||
# See Note [Disable automatic stripping]
|
||||
# dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so
|
||||
dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so
|
||||
|
||||
if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
|
||||
# Move versioned .a file out of libdir to evade portage QA checks
|
||||
@ -1484,23 +1447,6 @@ glibc_do_src_install() {
|
||||
run_locale_gen --inplace-glibc "${ED}/"
|
||||
sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
|
||||
fi
|
||||
|
||||
## Flatcar Container Linux: Add some local changes:
|
||||
# - Config files are installed by baselayout, not glibc.
|
||||
# - Install nscd/systemd stuff in /usr.
|
||||
|
||||
# Use tmpfiles to put nscd.conf in /etc and create directories.
|
||||
insinto /usr/share/baselayout
|
||||
if ! in_iuse nscd || use nscd ; then
|
||||
doins "${S}"/nscd/nscd.conf || die
|
||||
newtmpfiles "${FILESDIR}"/nscd-conf.tmpfiles nscd-conf.conf || die
|
||||
fi
|
||||
|
||||
# Clean out any default configs.
|
||||
rm -rf "${ED}"/etc
|
||||
|
||||
# Restore this one for the SDK.
|
||||
test ! -e "${T}"/00glibc || doenvd "${T}"/00glibc
|
||||
}
|
||||
|
||||
glibc_headers_install() {
|
||||
@ -1628,7 +1574,7 @@ pkg_postinst() {
|
||||
if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then
|
||||
local entry
|
||||
for entry in passwd group shadow; do
|
||||
if egrep -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then
|
||||
if grep -E -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then
|
||||
ewarn ""
|
||||
ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been"
|
||||
ewarn "removed from glibc and is now provided by the package"
|
@ -1,26 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>toolchain@gentoo.org</email>
|
||||
<name>Gentoo Toolchain Project</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="cet">Enable Intel Control-flow Enforcement Technology (needs binutils 2.29 and gcc 8)</flag>
|
||||
<flag name="clone3">Enable the new clone3 syscall within glibc. Can be disabled to allow compatibility with older Electron applications.</flag>
|
||||
<flag name="compile-locales">build *all* locales in src_install; this is generally meant for stage building only as it ignores /etc/locale.gen file and can be pretty slow</flag>
|
||||
<flag name="crypt">build and install libcrypt and crypt.h</flag>
|
||||
<flag name="debug">When USE=hardened, allow fortify/stack violations to dump core (SIGABRT) and not kill self (SIGKILL)</flag>
|
||||
<flag name="gd">build memusage and memusagestat tools</flag>
|
||||
<flag name="multiarch">enable optimizations for multiple CPU architectures (detected at runtime)</flag>
|
||||
<flag name="multilib-bootstrap">Provide prebuilt libgcc.a and crt files if missing. Only needed for ABI switch.</flag>
|
||||
<flag name="nscd">Build, and enable support for, the Name Service Cache Daemon</flag>
|
||||
<flag name="ssp">protect stack of glibc internals</flag>
|
||||
<flag name="static-pie">Enable static PIE support (runtime files for -static-pie gcc option).</flag>
|
||||
<flag name="suid">Make internal pt_chown helper setuid -- not needed if using Linux and have /dev/pts mounted with gid=5</flag>
|
||||
<flag name="systemtap">enable systemtap static probe points</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<remote-id type="cpe">cpe:/a:gnu:glibc</remote-id>
|
||||
</upstream>
|
||||
<maintainer type="project">
|
||||
<email>toolchain@gentoo.org</email>
|
||||
<name>Gentoo Toolchain Project</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="cet">Enable Intel Control-flow Enforcement Technology (needs binutils 2.29 and gcc 8)</flag>
|
||||
<flag name="clone3">Enable the new clone3 syscall within glibc. Can be disabled to allow compatibility with older Electron applications.</flag>
|
||||
<flag name="compile-locales">build *all* locales in src_install; this is generally meant for stage building only as it ignores /etc/locale.gen file and can be pretty slow</flag>
|
||||
<flag name="crypt">build and install libcrypt and crypt.h</flag>
|
||||
<flag name="debug">When USE=hardened, allow fortify/stack violations to dump core (SIGABRT) and not kill self (SIGKILL)</flag>
|
||||
<flag name="experimental-loong">Add experimental LoongArch patchset</flag>
|
||||
<flag name="gd">build memusage and memusagestat tools</flag>
|
||||
<flag name="multiarch">enable optimizations for multiple CPU architectures (detected at runtime)</flag>
|
||||
<flag name="multilib-bootstrap">Provide prebuilt libgcc.a and crt files if missing. Only needed for ABI switch.</flag>
|
||||
<flag name="nscd">Build, and enable support for, the Name Service Cache Daemon</flag>
|
||||
<flag name="ssp">protect stack of glibc internals</flag>
|
||||
<flag name="stack-realign">Realign the stack in the 32-bit build for compatibility with older binaries at some performance cost</flag>
|
||||
<flag name="static-pie">Enable static PIE support (runtime files for -static-pie gcc option).</flag>
|
||||
<flag name="suid">Make internal pt_chown helper setuid -- not needed if using Linux and have /dev/pts mounted with gid=5</flag>
|
||||
<flag name="systemtap">enable systemtap static probe points</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<remote-id type="cpe">cpe:/a:gnu:glibc</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
Loading…
Reference in New Issue
Block a user