Hi Jonathan-
The issue isn’t the variable, really, it’s the functions that are used in the macros. I ran a scratch build on koji so you can see the errors in question:
https://koji.fedoraproject.org/koji/taskinfo?taskID=82338440
The build log shows the issue when trying to build block.cpp which ultimately references the macros which reference the functions in stdatomic:
/builddir/build/BUILD/swift-corelibs-libdispatch-swift-5.5.2-RELEASE/src/shims/lock.h:304:6: error: use of undeclared identifier 'memory_order_release'
if (os_atomic_inc_orig(&dte->dte_value, release) == 0) {
^
/builddir/build/BUILD/swift-corelibs-libdispatch-swift-5.5.2-RELEASE/src/shims/atomic.h:143:3: note: expanded from macro 'os_atomic_inc_orig'
os_atomic_add_orig((p), 1, m)
^
/builddir/build/BUILD/swift-corelibs-libdispatch-swift-5.5.2-RELEASE/src/shims/atomic.h:81:3: note: expanded from macro 'os_atomic_add_orig'
_os_atomic_c11_op_orig((p), (v), m, add, +)
^
/builddir/build/BUILD/swift-corelibs-libdispatch-swift-5.5.2-RELEASE/src/shims/atomic.h:77:3: note: expanded from macro 'os_atomic_c11_op_orig'
memory_order##m)
^
On 1 Feb 2022, at 14:40, Jonathan Wakely wrote:
On Tue, 1 Feb 2022 at 15:00, Ron Olson wrote:
Well, yes and no. The code I linked to in the pastebin is what demonstrates the issue. The code in question is Apple’s libdispatch which I package separately as well as part of Swift. In that situation they’re using a C++ file that uses the underlying primitives in stdatomic in macros for their own higher-level functions, thus why stdatomic is ultimately being invoked.
Does this help?
https://github.com/apple/swift-corelibs-libdispatch/compare/main...jwakely:patch-1
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
_______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure