[Bug 292566] math/openblas: Fails to build: "Program received signal SIGILL: Illegal instruction." on Proxmox VM on AMD Ryzen 7 5700G

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 19 Jan 2026 20:05:33 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292566

--- Comment #5 from Benjamin Takacs <nimaje+fbz@bureaucracy.de> ---
Created attachment 267309
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=267309&action=edit
math/openblas: Do not use femms on amd64

with that filename and line number I found the offending instruction. There is
the EMMS macro used which expands to femms, emms or nothing depending on which
other macros are defined. femms as part of the deprecated 3DNow! extention is
prefered there for some reason, but while that instruction can be successfully
compiled by cc the resulting binary causes that SIGILL, while emms runs
successfully on qemu x86-64-v2-AES (I have not confirmed if it does what it
should, but I have no reason to believe it doesn't).

As emms as part of MMX was always part of amd64 as far as I know, I think
openblas is just buggy there in ever prefering femms and the port is buggy in
allowing openblas to use a non-portable instruction without CPUTYPE set.

I propose to just remove femms as option for EMMS on amd64. I have not tested
the attached patch.

-- 
You are receiving this mail because:
You are the assignee for the bug.