Bug 235676

Summary: sysutils/xen-tools411: add SPICE protocol options and support
Product: Ports & Packages Reporter: olevole
Component: Individual Port(s)Assignee: Roger Pau Monné <royger>
Status: Closed FIXED    
Severity: Affects Only Me Flags: bugzilla: maintainer-feedback? (royger)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Description Flags
sysutils/xen-tools411: enable SPICE protocol none

Description olevole 2019-02-11 20:37:28 UTC
Created attachment 201940 [details]
sysutils/xen-tools411: enable SPICE protocol

Tested successful with:

uname -a && clang -v
FreeBSD xen1.my.domain 13.0-CURRENT FreeBSD 13.0-CURRENT r343942 GENERIC  amd64
FreeBSD clang version 7.0.1 (tags/RELEASE_701/final 349250) (based on LLVM 7.0.1)

there are some issues with older CLANG versions in the form of:

/usr/bin/ld: error: undefined symbol: __atomic_fetch_or_4
>>> referenced by qxl.c:1883 (/usr/ports/sysutils/xen-tools411/work/xen-4.11.0/tools/qemu-xen/hw/display/qxl.c:1883)
>>>               ../hw/display/qxl.o:(qxl_send_events)
c++: error: linker command failed with exit code 1 (use -v to see invocation)

where qxl.c:1883 is

>>    old_pending = atomic_fetch_or(&d->ram->int_pending, le_events); <<


Unfortunately I have no idea how to arrange this in the port Makefile.
I don’t know how to check CLANG version from port file. Another way is enable this feature for FreeBSD 13+ only, e.g:

.if ${OSVERSION} < 1200074

but I have no luck with this