Merge pull request #129 from kinvolk/t-lo/update-glibc-to-2.32

Ship changes necessary to update glibc to 2.32
This commit is contained in:
Thilo Fromm 2020-11-25 12:50:07 +01:00 committed by GitHub
commit 96f5e49a69
4 changed files with 90 additions and 22 deletions

View File

@ -73,6 +73,10 @@ tc-getCXX() { tc-getPROG CXX g++ "$@"; }
# @USAGE: [toolchain prefix]
# @RETURN: name of the linker
tc-getLD() { tc-getPROG LD ld "$@"; }
# @FUNCTION: tc-getSTRINGS
# @USAGE: [toolchain prefix]
# @RETURN: name of the strings program
tc-getSTRINGS() { tc-getPROG STRINGS strings "$@"; }
# @FUNCTION: tc-getSTRIP
# @USAGE: [toolchain prefix]
# @RETURN: name of the strip program
@ -83,8 +87,12 @@ tc-getSTRIP() { tc-getPROG STRIP strip "$@"; }
tc-getNM() { tc-getPROG NM nm "$@"; }
# @FUNCTION: tc-getRANLIB
# @USAGE: [toolchain prefix]
# @RETURN: name of the archiver indexer
# @RETURN: name of the archive indexer
tc-getRANLIB() { tc-getPROG RANLIB ranlib "$@"; }
# @FUNCTION: tc-getREADELF
# @USAGE: [toolchain prefix]
# @RETURN: name of the ELF reader
tc-getREADELF() { tc-getPROG READELF readelf "$@"; }
# @FUNCTION: tc-getOBJCOPY
# @USAGE: [toolchain prefix]
# @RETURN: name of the object copier
@ -146,6 +154,10 @@ tc-getBUILD_CXX() { tc-getBUILD_PROG CXX g++ "$@"; }
# @USAGE: [toolchain prefix]
# @RETURN: name of the linker for building binaries to run on the build machine
tc-getBUILD_LD() { tc-getBUILD_PROG LD ld "$@"; }
# @FUNCTION: tc-getBUILD_STRINGS
# @USAGE: [toolchain prefix]
# @RETURN: name of the strings program for building binaries to run on the build machine
tc-getBUILD_STRINGS() { tc-getBUILD_PROG STRINGS strings "$@"; }
# @FUNCTION: tc-getBUILD_STRIP
# @USAGE: [toolchain prefix]
# @RETURN: name of the strip program for building binaries to run on the build machine
@ -156,8 +168,12 @@ tc-getBUILD_STRIP() { tc-getBUILD_PROG STRIP strip "$@"; }
tc-getBUILD_NM() { tc-getBUILD_PROG NM nm "$@"; }
# @FUNCTION: tc-getBUILD_RANLIB
# @USAGE: [toolchain prefix]
# @RETURN: name of the archiver indexer for building binaries to run on the build machine
# @RETURN: name of the archive indexer for building binaries to run on the build machine
tc-getBUILD_RANLIB() { tc-getBUILD_PROG RANLIB ranlib "$@"; }
# @FUNCTION: tc-getBUILD_READELF
# @USAGE: [toolchain prefix]
# @RETURN: name of the ELF reader for building binaries to run on the build machine
tc-getBUILD_READELF() { tc-getBUILD_PROG READELF readelf "$@"; }
# @FUNCTION: tc-getBUILD_OBJCOPY
# @USAGE: [toolchain prefix]
# @RETURN: name of the object copier for building binaries to run on the build machine
@ -207,14 +223,13 @@ tc-cpp-is-true() {
local CONDITION=${1}
shift
local RESULT=$($(tc-getTARGET_CPP) "${@}" -P - <<-EOF 2>/dev/null
$(tc-getTARGET_CPP) "${@}" -P - <<-EOF >/dev/null 2>&1
#if ${CONDITION}
true
#else
#error false
#endif
EOF
)
[[ ${RESULT} == true ]]
}
# @FUNCTION: tc-detect-is-softfloat
@ -377,6 +392,7 @@ tc-env_build() {
NM=$(tc-getBUILD_NM) \
PKG_CONFIG=$(tc-getBUILD_PKG_CONFIG) \
RANLIB=$(tc-getBUILD_RANLIB) \
READELF=$(tc-getBUILD_READELF) \
"$@"
}
@ -453,6 +469,36 @@ tc-ld-is-gold() {
return 1
}
# @FUNCTION: tc-ld-is-lld
# @USAGE: [toolchain prefix]
# @DESCRIPTION:
# Return true if the current linker is set to lld.
tc-ld-is-lld() {
local out
# First check the linker directly.
out=$($(tc-getLD "$@") --version 2>&1)
if [[ ${out} == *"LLD"* ]] ; then
return 0
fi
# Then see if they're selecting lld via compiler flags.
# Note: We're assuming they're using LDFLAGS to hold the
# options and not CFLAGS/CXXFLAGS.
local base="${T}/test-tc-lld"
cat <<-EOF > "${base}.c"
int main() { return 0; }
EOF
out=$($(tc-getCC "$@") ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -Wl,--version "${base}.c" -o "${base}" 2>&1)
rm -f "${base}"*
if [[ ${out} == *"LLD"* ]] ; then
return 0
fi
# No lld here!
return 1
}
# @FUNCTION: tc-ld-disable-gold
# @USAGE: [toolchain prefix]
# @DESCRIPTION:
@ -950,18 +996,11 @@ tc-enables-ssp-all() {
# @FUNCTION: gen_usr_ldscript
# @USAGE: [-a] <list of libs to create linker scripts for>
# @DESCRIPTION:
# This function generate linker scripts in /usr/lib for dynamic
# libs in /lib. This is to fix linking problems when you have
# the .so in /lib, and the .a in /usr/lib. What happens is that
# in some cases when linking dynamic, the .a in /usr/lib is used
# instead of the .so in /lib due to gcc/libtool tweaking ld's
# library search path. This causes many builds to fail.
# See bug #4411 for more info.
#
# Note that you should in general use the unversioned name of
# the library (libfoo.so), as ldconfig should usually update it
# correctly to point to the latest version of the library present.
# This function is deprecated. Use the version from
# usr-ldscript.eclass instead.
gen_usr_ldscript() {
ewarn "${FUNCNAME}: Please migrate to usr-ldscript.eclass"
local lib libdir=$(get_libdir) output_format="" auto=false suffix=$(get_libname)
[[ -z ${ED+set} ]] && local ED=${D%/}${EPREFIX}/

View File

@ -1,7 +1,7 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI=6
inherit multilib-minimal
DESCRIPTION="An implementation of the IDNA2008 specifications (RFCs 5890, 5891, 5892, 5893)"

View File

@ -0,0 +1,17 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5
DESCRIPTION="Virtual for awk implementation"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux ~x86-macos"
RDEPEND="
|| (
>=sys-apps/gawk-4.0.1-r1
sys-apps/mawk
sys-apps/nawk
sys-apps/busybox
)
!<sys-apps/gawk-4.0.1-r1" #before 4.0.1-r1 awk symlinks did belong to gawk #455696

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>junghans@gentoo.org</email>
<name>Christoph Junghans</name>
</maintainer>
<maintainer type="project">
<email>base-system@gentoo.org</email>
<name>Gentoo Base System</name>
</maintainer>
</pkgmetadata>