Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 892115 Details for
Bug 787623
sys-apps/portage: splitdebug is broken with Clang (was: www-client/firefox[clang]: .gnu_debuglink is busted when using LLD)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
estrip: Don't use splitdebug for .o files
file_787623.txt (text/plain), 2.59 KB, created by
Alex Xu (Hello71)
on 2024-05-02 02:37:27 UTC
(
hide
)
Description:
estrip: Don't use splitdebug for .o files
Filename:
MIME Type:
Creator:
Alex Xu (Hello71)
Created:
2024-05-02 02:37:27 UTC
Size:
2.59 KB
patch
obsolete
>From ddb53f9ec5ef4ff4ae937ad6ee26b3af2a55844b Mon Sep 17 00:00:00 2001 >From: "Alex Xu (Hello71)" <alex_y_xu@yahoo.ca> >Date: Sat, 11 Mar 2023 12:27:23 -0500 >Subject: [PATCH] estrip: Don't use splitdebug for .o files > >As the process_ar comment explained, object files cannot be splitdebug. > >Bug: https://bugs.gentoo.org/787623 ("www-client/firefox[clang]: .gnu_debuglink is busted when using LLD") >Fixes: 51579fb34c19 ("prepstrip: add support for elfutils strip") >--- > bin/estrip | 18 ++++++++++++------ > 1 file changed, 12 insertions(+), 6 deletions(-) > >diff --git a/bin/estrip b/bin/estrip >index 2d9d50922..640645be6 100755 >--- a/bin/estrip >+++ b/bin/estrip >@@ -280,9 +280,6 @@ dedup_elf_debug() { > > # Usage: save_elf_debug <src> <inode_debug> [splitdebug] > save_elf_debug() { >- ${FEATURES_splitdebug} || return 0 >- ${PORTAGE_RESTRICT_splitdebug} && return 0 >- > debug-print-function "${FUNCNAME}" "$@" > > # NOTE: Debug files must be installed in >@@ -390,7 +387,7 @@ process_elf() { > > if ${strip_this} ; then > # See if we can split & strip at the same time >- if [[ -n ${SPLIT_STRIP_FLAGS} ]] ; then >+ if ${splitdebug} && [[ -n ${SPLIT_STRIP_FLAGS} ]] ; then > local shortname="${x##*/}.debug" > local splitdebug="${tmpdir}/splitdebug/${shortname}.${BASHPID:-$(__bashpid)}" > >@@ -401,7 +398,9 @@ process_elf() { > "${x}" > save_elf_debug "${x}" "${inode_link}_debug" "${splitdebug}" > else >- save_elf_debug "${x}" "${inode_link}_debug" >+ if ${splitdebug} ; then >+ save_elf_debug "${x}" "${inode_link}_debug" >+ fi > ${already_stripped} || ${STRIP} ${strip_flags} "${x}" > fi > fi >@@ -431,7 +430,7 @@ process_ar() { > # There is no concept of splitdebug for objects not yet > # linked in (only for finally linked ELFs), so we have to > # retain the debug info in the archive itself. >- if ! ${FEATURES_splitdebug} || ${PORTAGE_RESTRICT_splitdebug} ; then >+ if ! ${splitdebug} ; then > ${STRIP} -g "${x}" && ${RANLIB} "${x}" > fi > fi >@@ -542,6 +541,12 @@ do > set +o noglob > fi > >+ if ${FEATURES_splitdebug} && ! ${PORTAGE_RESTRICT_splitdebug} ; then >+ splitdebug=true >+ else >+ splitdebug=false >+ fi >+ > # In Prefix we are usually an unprivileged user, so we can't strip > # unwritable objects. Make them temporarily writable for the > # stripping. >@@ -564,6 +569,7 @@ do > ${f} == *"SB shared object"* ]] ; then > process_elf "${x}" "${inode_link}" ${PORTAGE_STRIP_FLAGS} > elif [[ ${f} == *"SB relocatable"* ]] ; then >+ [[ ${x} == *.ko ]] || splitdebug=false > process_elf "${x}" "${inode_link}" ${SAFE_STRIP_FLAGS} > fi > >-- >2.44.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 787623
:
705234
|
705237
|
705240
|
705261
|
892115
|
892237