Bug 245774

Summary: graphics/mesa-dri: fix build on powerpc head
Product: Ports & Packages Reporter: Piotr Kubaj <pkubaj>
Component: Individual Port(s)Assignee: freebsd-x11 (Nobody) <x11>
Status: In Progress ---    
Severity: Affects Some People CC: bdragon, danfe, powerpc, x11, zeising
Priority: --- Flags: bugzilla: maintainer-feedback? (x11)
Version: Latest   
Hardware: powerpc   
OS: Any   
Attachments:
Description Flags
patch pkubaj: maintainer-approval? (x11)

Description Piotr Kubaj freebsd_committer 2020-04-20 19:56:40 UTC
Created attachment 213615 [details]
patch

powerpc head doesn't have 64 bit atomic functions. Use this patch to fix build there.
Comment 1 Alexey Dokuchaev freebsd_committer 2020-04-21 07:49:19 UTC
(In reply to Piotr Kubaj from comment #0)
> powerpc head doesn't have 64 bit atomic functions
Actually we have native 64-bit kernel atomics on ppc32 since src r356308, but at that time it was decided to keep the "status quo of userland doing its own locking". :-/
Comment 2 Niclas Zeising freebsd_committer 2020-04-21 10:29:21 UTC
Should the patch be applied only in the powerpc32 case, or is it a noop on other architectures (given that they are compiled with clang)?
Comment 3 Piotr Kubaj freebsd_committer 2020-05-30 23:10:30 UTC
(In reply to Niclas Zeising from comment #2)
Sorry for the late answer. Yes, this is noop. There is a check for defined(MISSING_64BIT_ATOMICS). AFAIK other architectures have 64 bit atomics.
Comment 4 Brandon Bergren freebsd_committer 2020-05-31 02:16:55 UTC
If mesa has a use case for crossprocess 64 bit atomics, I am still carrying the userland parts of the atomic emulation around in my superglue tree and can resurrect it at any time.
Comment 5 Niclas Zeising freebsd_committer 2020-09-17 09:43:19 UTC
Is this still relevant?