Skip to content

riscv64: Keep hard-float fenv functions private - #360

Merged
maleadt merged 1 commit into
masterfrom
tb/riscv-fenv-exports
Sep 2, 2026
Merged

riscv64: Keep hard-float fenv functions private#360
maleadt merged 1 commit into
masterfrom
tb/riscv-fenv-exports

Conversation

@maleadt

@maleadt maleadt commented Sep 2, 2026

Copy link
Copy Markdown
Member

Openlibm uses FreeBSD-style shifted rounding-mode constants on RISC-V, while Linux uses raw frm encodings. Exporting openlibm's hard-float fenv functions can therefore interpose an incompatible implementation and break directed rounding.

Keep hard-float definitions private, as on AArch64 and PowerPC, preserve external soft-float definitions, and test through the system fenv interface.

Openlibm uses FreeBSD-style shifted rounding-mode constants on RISC-V,
while Linux uses raw frm encodings. Exporting openlibm's hard-float fenv
functions can therefore interpose an incompatible implementation and
break directed rounding.

Keep hard-float definitions private, as on AArch64 and PowerPC, preserve
external soft-float definitions, and test through the system fenv interface.
@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.11%. Comparing base (82e90ae) to head (531b5cb).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #360   +/-   ##
=======================================
  Coverage   72.11%   72.11%           
=======================================
  Files         233      233           
  Lines        6139     6139           
  Branches     1609     1609           
=======================================
  Hits         4427     4427           
  Misses       1419     1419           
  Partials      293      293           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@maleadt
maleadt merged commit 5fe3997 into master Sep 2, 2026
25 checks passed
@maleadt
maleadt deleted the tb/riscv-fenv-exports branch September 2, 2026 08:18
maleadt added a commit to maleadt/Yggdrasil that referenced this pull request Sep 2, 2026
Picks up JuliaMath/openlibm#360, which stops the riscv64 build from exporting
fenv functions that shadowed glibc's with incompatible rounding-mode constants.
Request LLVMCompilerRT_jll by version string, as Pkg no longer resolves a bare
13.0.1 now that 13.0.1+1 exists.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
maleadt added a commit to JuliaLang/julia that referenced this pull request Sep 3, 2026
Picks up JuliaMath/openlibm#360, which stops the riscv64 port from
exporting its fenv functions. Those symbols shadowed glibc's through the
dynamic linker while carrying FreeBSD's pre-shifted `FE_*` encodings, so
`fesetround` rejected every constant a caller had compiled against the
system header and left the rounding mode untouched. Julia's own rounding
path stopped going through that symbol in `6081d7ceb7`, but anything
else linked against the bundled library still did.

The release also carries three riscv64 fixes that never reached the
0.8.7 build: JuliaMath/openlibm#324 (`feholdexcept` always returned -1),
and JuliaMath/openlibm#330 and JuliaMath/openlibm#349 for the lp64f ABI.

Assisted-by: Claude Code (Opus 5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant