GNOME Bugzilla – Bug 706958
configure.ac: fix atomic opts detection
Last modified: 2013-08-28 10:04:10 UTC
Created attachment 253347 [details] [review] configure.ac: fix atomic opts detection Hi. The detection of atomic ops is not full-proof because it will compile everywhere, either producing ``atomic'' code, or an external reference to __sync_bool_compare_and_swap. It should be changed to AC_TRY_LINK. I run into this while compiling GLib on OpenBSD/sparc: .libs/libglib-2.0.so.3600.1: undefined reference to `__sync_fetch_and_or_4' .libs/libglib-2.0.so.3600.1: undefined reference to `__sync_bool_compare_and_swap_4' .libs/libglib-2.0.so.3600.1: undefined reference to `__sync_fetch_and_sub_4' .libs/libglib-2.0.so.3600.1: undefined reference to `__sync_fetch_and_add_4' .libs/libglib-2.0.so.3600.1: undefined reference to `__sync_fetch_and_and_4' .libs/libglib-2.0.so.3600.1: undefined reference to `__sync_fetch_and_xor_4' With this configure.ac patch, I can now build GLib without issue on the same platform. Would that be OK to push? Thanks.
Review of attachment 253347 [details] [review]: I assume this existing test was working in at least other configurations, but this looks fine to me. Can you include a link to this bugzilla in the commit per https://live.gnome.org/GnomeLove/SubmittingPatches ?
(In reply to comment #1) > Review of attachment 253347 [details] [review]: > > I assume this existing test was working in at least other configurations, but > this looks fine to me. Can you include a link to this bugzilla in the commit > per https://live.gnome.org/GnomeLove/SubmittingPatches ? Hi Colin. Yup sure thing; it's just that I usually create patches before opening a BZ report :-) 996edb0c46356d8a326f886b91a77a6af9a2de3e