commit:     a53efb101e9aff8ed79bdbc42bd235d078d4b78a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 17 09:50:48 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 17 09:52:35 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a53efb10

toolchain.eclass: re-enable default build IDs

Build IDs have several uses, mainly for debugging:
* gdb's index-cache needs it
* debuginfod requires it which is important for both self-hosted binhosts & the
  official binhost if we want to provide binpkgs there (bug 728818)
* kde-plasma/drkonqi requires it
* Speeding up splitdebug use because verification that the binary matches
  the debug info is quicker
* Works around bug 917287 (because lookup is first done via
  /usr/lib/debug/.build-id/XXX where XXX is content-addressed, not path)
* Allows debugging binaries after they got upgraded

Portage has been updated to salt build IDs to avoid file collisions.

Bug: https://bugs.gentoo.org/917287
Bug: https://bugs.gentoo.org/967111
Closes: https://bugs.gentoo.org/953869
Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/toolchain.eclass | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index b2756524286d..8efe5417747b 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1417,17 +1417,15 @@ toolchain_src_configure() {
                confgcc+=( --disable-libstdcxx-pch )
        fi
 
-       # build-id was disabled for file collisions: bug #526144
-       #
-       # # Turn on the -Wl,--build-id flag by default for ELF targets. bug 
#525942
-       # # This helps with locating debug files.
-       # case ${CTARGET} in
-       # *-linux-*|*-elf|*-eabi)
-       #       tc_version_is_at_least 4.5 && confgcc+=(
-       #               --enable-linker-build-id
-       #       )
-       #       ;;
-       # esac
+       # Turn on the -Wl,--build-id flag by default for ELF targets. bug 
#953869
+       # This helps with locating debug files.
+       case ${CTARGET} in
+               *-linux-*|*-elf|*-eabi)
+                       tc_version_is_at_least 4.5 && confgcc+=(
+                               --enable-linker-build-id
+                       )
+               ;;
+       esac
 
        ### Cross-compiler option
        #

Reply via email to