Bug 245774 - graphics/mesa-dri: fix build on powerpc head
Summary: graphics/mesa-dri: fix build on powerpc head
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: powerpc Any
: --- Affects Some People
Assignee: freebsd-x11 (Nobody)
Depends on:
Reported: 2020-04-20 19:56 UTC by Piotr Kubaj
Modified: 2020-09-17 09:43 UTC (History)
5 users (show)

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

patch (1.36 KB, patch)
2020-04-20 19:56 UTC, Piotr Kubaj
pkubaj: maintainer-approval? (x11)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer 2020-04-20 19:56:40 UTC
Created attachment 213615 [details]

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?