<?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>15584</bug_id>
          
          <creation_ts>2024-08-29 13:46:26 +0000</creation_ts>
          <short_desc>Audit use of -fPIE in -native libraries</short_desc>
          <delta_ts>2026-02-10 19:23:18 +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.99</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>OBSOLETE</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>5.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Randy MacLeod">randy.macleod</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>raj.khem</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>99582</commentid>
    <comment_count>0</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-08-29 13:46:26 +0000</bug_when>
    <thetext>When updating Rust to 1.78, a problem was found on an alma9 build (1) that appears to be due to libz.a being compiled without -fPIE. A patch has been sent to fix that issue (2).

Are there other static or shared libraries that are not using -fPIE and if so, should we require and test that all -native objects are using -fPIE?




1) https://lists.openembedded.org/g/openembedded-core/message/203837?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3ACreated%2C%2Crust%3A+Upgrade+1.78.0-%3E1.79.0%2C20%2C1%2C0%2C108090372

2) https://lists.openembedded.org/g/openembedded-core/message/203882?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3Acreated%2C%2Crust%3A+Upgrade+1.78.0-%3E1.79.0%2C20%2C2%2C0%2C108090372</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99584</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-08-29 14:40:17 +0000</bug_when>
    <thetext>Apparently you can&apos;t just add -fPIE everywhere as on override since things will break in weird and wonderful ways.

Khem, Do you have any words of wisdom to share?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104223</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-02-10 19:23:18 +0000</bug_when>
    <thetext>This is a very general concern and it seems that we can&apos;t 
apply a generic rule for -native code so closing the bug.

If there is a specific problem related to lack of: -fPIE for -native code,
please open a new bug.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>