<?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>10954</bug_id>
          
          <creation_ts>2017-01-23 15:55:27 +0000</creation_ts>
          <short_desc>dynamically detect dependency on libgcc</short_desc>
          <delta_ts>2026-02-26 16:01:14 +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>unspecified</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="Patrick Ohly">patrick.ohly</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>david.reyna</cc>
    
    <cc>javier.tia</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>70021</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-01-23 15:55:27 +0000</bug_when>
    <thetext>Some pthread functions in glibc, for example pthread_cancel, depend on glibc and open it dynamically at runtime. If not installed, applications calling those pthread functions fail with:

libgcc_s.so.1 must be installed for pthread_cancel to work

Adding RDEPENDS += &quot;libgcc&quot; to application recipes is the wrong solution, because they shouldn&apos;t have to know about this glibc-internal implementation detail, nor should they have to check whether they are linked against glibc in the first place.

Adding RDEPENDS += &quot;libgcc&quot; to glibc itself would be better, but some people are concerned about the wasted disk space when it is not actually needed by anything in the image.

The right solution therefore seems to be an enhancement of the automatic shlib analysis code. It needs to know which pthread functions need libgcc and if glibc is used and these functions are called, add the RDEPENDS for the calling application automatically.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95428</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-04-21 18:45:44 +0000</bug_when>
    <thetext>Moved en masse from 4.2 to 4.3 by Randy.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99833</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-10-10 16:35:32 +0000</bug_when>
    <thetext>libgcc_s.so is 130K.

I think we should just add RDEPENDS:${PN} += &quot;libgcc&quot; to glibc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100206</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2024-11-19 13:28:21 +0000</bug_when>
    <thetext>We&apos;ve come this far without doing that and we do have embedded users so I&apos;d prefer to avoid doing that if we can...</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>