Bug 262871 - share/mk/bsd.cpu.mk: missing -mabi= in LDFLAGS
Summary: share/mk/bsd.cpu.mk: missing -mabi= in LDFLAGS
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: CURRENT
Hardware: riscv Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: needs-patch
Depends on:
Blocks:
 
Reported: 2022-03-27 21:04 UTC by Jan Beich
Modified: 2022-03-28 19:08 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2022-03-27 21:04:11 UTC
All ports that enable LTO by default either downstream (port option) or upstream are broken on riscv64. During build object files are built with -mabi=lp64d (hard float) but linking happens with implicit -mabi=lp64 (soft float). LTO postpones optimization until linking, so ABI must match.

https://lists.freebsd.org/archives/dev-commits-ports-main/2021-October/002774.html