<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>15776</bug_id>
          
          <creation_ts>2025-02-27 17:09:25 +0000</creation_ts>
          <short_desc>enable debug compression for compiler flags as default</short_desc>
          <delta_ts>2026-02-10 19:25:55 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>5.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>6.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Randy MacLeod">randy.macleod</reporter>
          <assigned_to name="Sundeep Kokkonda">sundeep.kokkonda</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>sundeep.kokkonda</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>101251</commentid>
    <comment_count>0</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-02-27 17:09:25 +0000</bug_when>
    <thetext>We should look at the compiler flags we&apos;re using that are in:
   meta/conf/bitbake.conf 

Richard suggested that we may be able to add compression of debug sections.

The idea being that if we compress the objects when in memory, there would be
less IO to do. It is not clear if, on modern systems with fast CPUs and fast SSDs,
this would result in faster bitbake builds. We&apos;ll have to try it and see.

Also, are there similar Rust/Go optimizations that we&apos;re not using?


This is a 5.3 enhancement, for after gcc-15, IMO.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101252</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-02-27 17:09:56 +0000</bug_when>
    <thetext>A quick look at the gcc manual for comparession related flags, reveals:

       -gz[=type]
           Produce compressed debug sections in DWARF format, if that is
           supported.  If type is not given, the default type depends on the
           capabilities of the assembler and linker used.  type may be one of
           none (don&apos;t compress debug sections), zlib (use zlib compression in
           ELF gABI format), or zlib-gnu (use zlib compression in traditional
           GNU format).  If the linker doesn&apos;t support writing compressed
           debug sections, the option is rejected.  Otherwise, if the
           assembler does not support them, -gz is silently ignored when
           producing object files.

...

      -flto-compression-level=n
           This option specifies the level of compression used for
           intermediate language written to LTO object files, and is only
           meaningful in conjunction with LTO mode (-flto).  GCC currently
           supports two LTO compression algorithms. For zstd, valid values are
           0 (no compression) to 19 (maximum compression), while zlib supports
           values from 0 to 9.  Values outside this range are clamped to
           either minimum or maximum of the supported values.  If the option
           is not given, a default balanced compression setting is used.

...

       -mcompress
           Compress all code using the Ft32B code compression scheme.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101299</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-03-06 15:34:57 +0000</bug_when>
    <thetext>Ross says we do this for some recipe already. Maybe webkit? Ask Ross if you can&apos;t find it. Start with -gz.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104224</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-02-10 19:25:55 +0000</bug_when>
    <thetext>If we&apos;re going to change the default, it should be at the start of a development cycle so moving to 6.1 for now, and 6.0-M1 once those milestones are created.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>