Skip to content

#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_ #11546

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
llvmbot opened this issue Oct 18, 2011 · 7 comments
Closed

#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_ #11546

llvmbot opened this issue Oct 18, 2011 · 7 comments
Labels
bugzilla Issues migrated from bugzilla clang Clang issues not falling into any other category

Comments

@llvmbot
Copy link
Member

llvmbot commented Oct 18, 2011

Bugzilla Link 11174
Resolution FIXED
Resolved on Nov 05, 2015 13:43
Version unspecified
OS All
Blocks llvm/llvm-bugzilla-archive#24345
Reporter LLVM Bugzilla Contributor
CC @Bigcheese,@weiguozhi,@echristo,@efriedma-quic,@rprichard
@llvmbot
Copy link
Member Author

llvmbot commented Oct 18, 2011

GCC rather helpfully defines these macros when it is capable of supporting atomic intrinsics for a particular word size. For example:

  • on -march=i386 atomics are not supported
  • on -march=i486 atomics are supported only for word sizes up to 4
  • on -march=i586 and higher it's supported for 8 as well

clang doesn't define these macros and doesn't seem to define anything equivalent either. That prevents having an #ifdef around code that might either use these operations or elect to implement them with a mutex.

@llvmbot
Copy link
Member Author

llvmbot commented Jan 6, 2013

This is actually an ABI issue, and should be raised in priority. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42734

@rprichard
Copy link
Contributor

@weiguozhi
Copy link
Contributor

I met the same problem when building glib. Since lack of __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4, it caused the glib configuration failed.

@Bigcheese
Copy link
Contributor

@Bigcheese
Copy link
Contributor

Fixed in r178816 for x86.

@llvmbot
Copy link
Member Author

llvmbot commented Nov 26, 2021

mentioned in issue llvm/llvm-bugzilla-archive#24345

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang Clang issues not falling into any other category
Projects
None yet
Development

No branches or pull requests

4 participants