After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 706958 - configure.ac: fix atomic opts detection
configure.ac: fix atomic opts detection
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: build
2.36.x
Other OpenBSD
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2013-08-28 07:37 UTC by Antoine Jacoutot
Modified: 2013-08-28 10:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
configure.ac: fix atomic opts detection (1.87 KB, patch)
2013-08-28 07:37 UTC, Antoine Jacoutot
accepted-commit_now Details | Review

Description Antoine Jacoutot 2013-08-28 07:37:26 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.
Comment 1 Colin Walters 2013-08-28 09:58:40 UTC
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 ?
Comment 2 Antoine Jacoutot 2013-08-28 10:04:10 UTC
(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