Bug 256583 - audio/lame: patch and unbreak on riscv64
Summary: audio/lame: patch and unbreak on riscv64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Alexander Leidinger
Depends on:
Reported: 2021-06-13 20:37 UTC by Robert Clausecker
Modified: 2021-06-19 12:47 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (netchild)

audio/lame: patch and unbreak on riscv64 (1.87 KB, patch)
2021-06-13 20:37 UTC, Robert Clausecker
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Clausecker 2021-06-13 20:37:54 UTC
Created attachment 225775 [details]
audio/lame: patch and unbreak on riscv64

Lame is currently BROKEN on riscv64 due to an unsupported fpsetenv() call.
RISC-v does not have floating point exceptions and nobody bothered to stub
out the function in the libc.

This is a patch by the LLVM project to unbreak the build on
platforms such as riscv64 with incomplete fpsetmask support.
On riscv64 specifically, there are no traps for invalid
floating point operations, so whatever this masking code
tries to achieve is meaningless anyway.
Comment 1 Daniel Engberg freebsd_committer 2021-06-15 07:16:55 UTC
Hi Robert,

Alexander has stated previously that this port will only follow upstream so I'd suggest that you submit the patch over at https://sourceforge.net/p/lame/patches/

Best regards,
Comment 2 Robert Clausecker 2021-06-15 07:42:24 UTC
An upstream issue has been submitted.  Keeping this one open until the fix has made its way into this port.

Comment 3 commit-hook freebsd_committer 2021-06-19 12:45:15 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fd14cb96eb4d160d6d173447546ea025f55b2882

commit fd14cb96eb4d160d6d173447546ea025f55b2882
Author:     Alexander Richardson <arichardson@llvm.org>
AuthorDate: 2021-06-19 12:39:17 +0000
Commit:     Alexander Leidinger <netchild@FreeBSD.org>
CommitDate: 2021-06-19 12:43:54 +0000

    audio/lame: fix build on riscv

    The previous commit only removed the BROKEN for riscv, but didn't add a patch.

    PR:             256583
    Reported by:    Robert Clausecker <fuz@fuz.su>
    Obtained from:  LLVM project https://reviews.llvm.org/D89557

 audio/lame/Makefile                            |  2 +-
 audio/lame/files/patch-libmp3lame_util.c (new) | 14 ++++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)
Comment 4 Alexander Leidinger freebsd_committer 2021-06-19 12:47:43 UTC
Committed. Thanks!