From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1736437-garchives=archives.gentoo.org@lists.gentoo.org> Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2C5ED1584AD for <garchives@archives.gentoo.org>; Sat, 12 Apr 2025 16:34:47 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 0F76834372D for <garchives@archives.gentoo.org>; Sat, 12 Apr 2025 16:34:47 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 14FAE1104B0; Sat, 12 Apr 2025 16:34:46 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 0A05C1102BD for <gentoo-commits@lists.gentoo.org>; Sat, 12 Apr 2025 16:34:46 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A7B9834372D for <gentoo-commits@lists.gentoo.org>; Sat, 12 Apr 2025 16:34:45 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 38972C3A for <gentoo-commits@lists.gentoo.org>; Sat, 12 Apr 2025 16:34:44 +0000 (UTC) From: "Sam James" <sam@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org> Message-ID: <1744475649.064d419ded17cb95eb12aa9478cad52e906dc6d4.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/toolchain-funcs.eclass X-VCS-Directories: eclass/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 064d419ded17cb95eb12aa9478cad52e906dc6d4 X-VCS-Branch: master Date: Sat, 12 Apr 2025 16:34:44 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0d31dbe4-2623-4b2f-b283-311ce464255f X-Archives-Hash: 1055a35f0fd50a98a1ef75179774a009 commit: 064d419ded17cb95eb12aa9478cad52e906dc6d4 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sat Apr 12 15:39:41 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat Apr 12 16:34:09 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=064d419d toolchain-funcs.eclass: drop deprecated gen_usr_ldscript and multilib inherit Drop toolchain-funcs.eclass's gen_usr_ldscript and along with it, inheriting multilib. gen_usr_ldscript is itself deprecaated but the version in toolchain-funcs doubly so, as it was replaced by the one in usr-ldscript.eclass. Signed-off-by: Sam James <sam <AT> gentoo.org> eclass/toolchain-funcs.eclass | 135 ------------------------------------------ 1 file changed, 135 deletions(-) diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index 754d23f91c06..ae21a18a14c2 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -21,8 +21,6 @@ case ${EAPI} in *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac -inherit multilib - # tc-getPROG <VAR [search vars]> <default> [tuple] _tc-getPROG() { local tuple=$1 @@ -1147,139 +1145,6 @@ tc-enables-ssp-all() { tc-cpp-is-true "defined(__SSP_ALL__)" ${CPPFLAGS} ${CFLAGS} ${CXXFLAGS} } - -# @FUNCTION: gen_usr_ldscript -# @USAGE: [-a] <list of libs to create linker scripts for> -# @DESCRIPTION: -# 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) - - tc-is-static-only && return - use prefix && return - - # We only care about stuffing / for the native ABI, bug #479448 - if [[ $(type -t multilib_is_native_abi) == "function" ]] ; then - multilib_is_native_abi || return 0 - fi - - # Eventually we'd like to get rid of this func completely, bug #417451 - case ${CTARGET:-${CHOST}} in - *-darwin*) ;; - *-android*) return 0 ;; - *linux*) use prefix && return 0 ;; - *) return 0 ;; - esac - - # Just make sure it exists - dodir /usr/${libdir} - - if [[ $1 == "-a" ]] ; then - auto=true - shift - dodir /${libdir} - fi - - # OUTPUT_FORMAT gives hints to the linker as to what binary format - # is referenced ... makes multilib saner - local flags=( ${CFLAGS} ${LDFLAGS} -Wl,--verbose ) - if $(tc-getLD) --version | grep -q 'GNU gold' ; then - # If they're using gold, manually invoke the old bfd, bug #487696 - local d="${T}/bfd-linker" - mkdir -p "${d}" - ln -sf $(type -P ${CHOST}-ld.bfd) "${d}"/ld - flags+=( -B"${d}" ) - fi - output_format=$($(tc-getCC) "${flags[@]}" 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p') - [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )" - - for lib in "$@" ; do - local tlib - if ${auto} ; then - lib="lib${lib}${suffix}" - else - # Ensure /lib/${lib} exists to avoid dangling scripts/symlinks. - # This especially is for AIX where $(get_libname) can return ".a", - # so /lib/${lib} might be moved to /usr/lib/${lib} (by accident). - [[ -r ${ED}/${libdir}/${lib} ]] || continue - #TODO: better die here? - fi - - case ${CTARGET:-${CHOST}} in - *-darwin*) - if ${auto} ; then - tlib=$(scanmacho -qF'%S#F' "${ED}"/usr/${libdir}/${lib}) - else - tlib=$(scanmacho -qF'%S#F' "${ED}"/${libdir}/${lib}) - fi - [[ -z ${tlib} ]] && die "unable to read install_name from ${lib}" - tlib=${tlib##*/} - - if ${auto} ; then - mv "${ED}"/usr/${libdir}/${lib%${suffix}}.*${suffix#.} "${ED}"/${libdir}/ || die - # some install_names are funky: they encode a version - if [[ ${tlib} != ${lib%${suffix}}.*${suffix#.} ]] ; then - mv "${ED}"/usr/${libdir}/${tlib%${suffix}}.*${suffix#.} "${ED}"/${libdir}/ || die - fi - rm -f "${ED}"/${libdir}/${lib} - fi - - # Mach-O files have an id, which is like a soname, it tells how - # another object linking against this lib should reference it. - # Since we moved the lib from usr/lib into lib this reference is - # wrong. Hence, we update it here. We don't configure with - # libdir=/lib because that messes up libtool files. - # Make sure we don't lose the specific version, so just modify the - # existing install_name - if [[ ! -w "${ED}/${libdir}/${tlib}" ]] ; then - chmod u+w "${ED}${libdir}/${tlib}" # needed to write to it - local nowrite=yes - fi - install_name_tool \ - -id "${EPREFIX}"/${libdir}/${tlib} \ - "${ED}"/${libdir}/${tlib} || die "install_name_tool failed" - [[ -n ${nowrite} ]] && chmod u-w "${ED}${libdir}/${tlib}" - # Now as we don't use GNU binutils and our linker doesn't - # understand linker scripts, just create a symlink. - pushd "${ED}/usr/${libdir}" > /dev/null - ln -snf "../../${libdir}/${tlib}" "${lib}" - popd > /dev/null - ;; - *) - if ${auto} ; then - tlib=$(scanelf -qF'%S#F' "${ED}"/usr/${libdir}/${lib}) - [[ -z ${tlib} ]] && die "unable to read SONAME from ${lib}" - mv "${ED}"/usr/${libdir}/${lib}* "${ED}"/${libdir}/ || die - # some SONAMEs are funky: they encode a version before the .so - if [[ ${tlib} != ${lib}* ]] ; then - mv "${ED}"/usr/${libdir}/${tlib}* "${ED}"/${libdir}/ || die - fi - rm -f "${ED}"/${libdir}/${lib} - else - tlib=${lib} - fi - cat > "${ED}/usr/${libdir}/${lib}" <<-END_LDSCRIPT - /* GNU ld script - Since Gentoo has critical dynamic libraries in /lib, and the static versions - in /usr/lib, we need to have a "fake" dynamic lib in /usr/lib, otherwise we - run into linking problems. This "fake" dynamic lib is a linker script that - redirects the linker to the real lib. And yes, this works in the cross- - compiling scenario as the sysroot-ed linker will prepend the real path. - - See bug https://bugs.gentoo.org/4411 for more info. - */ - ${output_format} - GROUP ( ${EPREFIX}/${libdir}/${tlib} ) - END_LDSCRIPT - ;; - esac - fperms a+x "/usr/${libdir}/${lib}" || die "could not change perms on ${lib}" - done -} - # @FUNCTION: tc-get-cxx-stdlib # @DESCRIPTION: # Attempt to identify the C++ standard library used by the compiler.