Bug 257520

Summary: audio/fossmixer: Fix illegal instruction error on some hosts
Product: Ports & Packages Reporter: Jani Salonen <salojan>
Component: Individual Port(s)Assignee: Alexey Dokuchaev <danfe>
Status: Closed FIXED    
Severity: Affects Some People CC: danfe, lwhsu
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 253235    
Attachments:
Description Flags
Fix crash caused by illegal instruction error. none

Description Jani Salonen 2021-07-31 16:01:52 UTC
Created attachment 226821 [details]
Fix crash caused by illegal instruction error.

configure script includes some non-wanted flags for compiler by accident, which causes program to crash on some hosts. Attached patch will fix this.
Comment 1 Li-Wen Hsu freebsd_committer freebsd_triage 2021-07-31 16:17:22 UTC
Shar is not very easy to be applied and it's removed from the recommended ways of submitting ports patches. Is is possible for you to send a patch generated by `git format-patch` or `git diff`? Thanks!
Comment 2 Alexey Dokuchaev freebsd_committer freebsd_triage 2021-08-01 02:47:45 UTC
It's okay, Jani, no need to resend anything, the diff is pretty clear, I'll handle it.
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-08-01 14:24:58 UTC
A commit in branch main references this bug:

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

commit b8e8a959d729468d50b9399483bc6b6ba47cfac4
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2021-08-01 14:20:22 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2021-08-01 14:23:13 +0000

    audio/fossmixer: fix illegal instruction error on some hosts

    Previously, configure script was passing certain optimization options
    by default; now it is protected by --enable-native switch which users
    have to specify explicitly:

      -C_FLAGS=$C_FLAGS" -O3 -ffast-math `/bin/sh ./build/opt.sh \"$CC\" -march=native`"
      +C_FLAGS=$C_FLAGS" -O2"

    Take one step further and replace -O2 with our default CFLAGS which are
    essentially the same, but safer (https://blog.regehr.org/archives/1307).

    We must, however, force -msse2 on i386 for the build to succeed there;
    other architectures might or might not need similar treatment as well.

    PR:             257520
    Submitted by:   maintainer (who is also upstream author)

 audio/fossmixer/Makefile | 6 ++++--
 audio/fossmixer/distinfo | 6 +++---
 2 files changed, 7 insertions(+), 5 deletions(-)