Bug 15584 - Audit use of -fPIE in -native libraries
Summary: Audit use of -fPIE in -native libraries
Status: RESOLVED OBSOLETE
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 5.99
Hardware: x86 Multiple
: Medium normal
Target Milestone: 5.99
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2024-08-29 13:46 UTC by Randy MacLeod
Modified: 2026-02-10 19:23 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Randy MacLeod 2024-08-29 13:46:26 UTC
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
Comment 1 Randy MacLeod 2024-08-29 14:40:17 UTC
Apparently you can'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?
Comment 2 Randy MacLeod 2026-02-10 19:23:18 UTC
This is a very general concern and it seems that we can'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.