From 9f9be4551bd0c32a5681e0b56abac89ce9681c03 Mon Sep 17 00:00:00 2001 From: Thilo Fromm Date: Thu, 19 Nov 2020 10:32:03 +0100 Subject: [PATCH 1/2] virtual/awk,eclass: add awk-1.ebuild, update toolchain-funcs for glibc-2.32 Signed-off-by: Thilo Fromm --- .../eclass/toolchain-funcs.eclass | 81 ++++++++++++++----- .../portage-stable/virtual/awk/awk-1.ebuild | 17 ++++ .../portage-stable/virtual/awk/metadata.xml | 12 +++ 3 files changed, 89 insertions(+), 21 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/virtual/awk/awk-1.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/virtual/awk/metadata.xml diff --git a/sdk_container/src/third_party/portage-stable/eclass/toolchain-funcs.eclass b/sdk_container/src/third_party/portage-stable/eclass/toolchain-funcs.eclass index 2e027015c6..ec7b920bcf 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/toolchain-funcs.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/toolchain-funcs.eclass @@ -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 - #if ${CONDITION} - true - #endif - EOF - ) - - [[ ${RESULT} == true ]] + $(tc-getTARGET_CPP) "${@}" -P - <<-EOF >/dev/null 2>&1 + #if ${CONDITION} + true + #else + #error false + #endif + EOF } # @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] # @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}/ diff --git a/sdk_container/src/third_party/portage-stable/virtual/awk/awk-1.ebuild b/sdk_container/src/third_party/portage-stable/virtual/awk/awk-1.ebuild new file mode 100644 index 0000000000..c405925c8a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/virtual/awk/awk-1.ebuild @@ -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 + ) + ! + + + + junghans@gentoo.org + Christoph Junghans + + + base-system@gentoo.org + Gentoo Base System + + From 0fe4212a73f8be2fc528e5ed15f1651f0549ec89 Mon Sep 17 00:00:00 2001 From: Thilo Fromm Date: Thu, 19 Nov 2020 15:45:56 +0100 Subject: [PATCH 2/2] net-dns/libidn2-2.3.0: EAPI7 -> EAPI6 to break glibc-2.32 toolchain dep loop Signed-off-by: Thilo Fromm --- .../portage-stable/net-dns/libidn2/libidn2-2.3.0.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/portage-stable/net-dns/libidn2/libidn2-2.3.0.ebuild b/sdk_container/src/third_party/portage-stable/net-dns/libidn2/libidn2-2.3.0.ebuild index 3fb6a93758..74394fab9b 100644 --- a/sdk_container/src/third_party/portage-stable/net-dns/libidn2/libidn2-2.3.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/net-dns/libidn2/libidn2-2.3.0.ebuild @@ -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)"