Bug 230478 - devel/avro-c: unbreak on aarch64, arm, probably mips too
Summary: devel/avro-c: unbreak on aarch64, arm, probably mips too
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: Sunpoet Po-Chuan Hsieh
Depends on:
Blocks: 201763
  Show dependency treegraph
Reported: 2018-08-09 12:45 UTC by Greg V
Modified: 2018-08-09 14:52 UTC (History)
1 user (show)

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

avro-c.patch (1.30 KB, patch)
2018-08-09 12:45 UTC, Greg V
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Greg V 2018-08-09 12:45:05 UTC
Created attachment 196025 [details]

avro-c uses GCC atomic intrinsics (__sync_add_and_fetch, __sync_sub_and_fetch).

These are well supported by clang, but the ifdef was testing for GNUC newer than 40500 and these weren't used.

avro-c had a raw x86 assembly fallback, which is why it worked fine on there.

With this tiny patch, it builds fine on aarch64 and armv7. clang should support these on mips too I think.
Comment 1 commit-hook freebsd_committer 2018-08-09 14:46:48 UTC
A commit references this bug:

Author: sunpoet
Date: Thu Aug  9 14:45:58 UTC 2018
New revision: 476784
URL: https://svnweb.freebsd.org/changeset/ports/476784

  Fix build on aarch64, arm and mips

  PR:		230478
  Submitted by:	Greg V <greg@unrelenting.technology>

Comment 2 Sunpoet Po-Chuan Hsieh freebsd_committer 2018-08-09 14:52:11 UTC
Committed. Thanks!