__builtin_clz[l[l]] not detected using clang #19402

issue sipa opened this issue on June 28, 2020
  1. sipa commented at 8:42 PM on June 28, 2020: member

    See this arbitrary macOS Travis job: https://travis-ci.org/github/bitcoin/bitcoin/jobs/702283632#L521

    Somehow AC_CHECK_DECLS doesn't work for builtins for clang (it does work for GCC).

    However, __builtin_prefetch (which is detected using AC_COMPILE_IFELSE) does work.

  2. sipa added the label Bug on Jun 28, 2020
  3. sipa commented at 3:23 AM on June 29, 2020: member

    From config.log:

    
    configure:21492: clang++-10 -std=c++11 -c -g -O2  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS conftest.cpp >&5
    conftest.cpp:100:10: error: builtin functions must be directly called
      (void) __builtin_clz;
             ^
    1 error generated.
    
  4. MarcoFalke added the label Build system on Jun 29, 2020
  5. MarcoFalke added the label macOS on Jun 29, 2020
  6. fanquake removed the label macOS on Jun 29, 2020
  7. fanquake commented at 5:56 AM on June 29, 2020: member

    This is not specific to macOS, the configure checks currently fail with both LLVM and Apple Clang.

  8. sipa commented at 5:58 AM on June 29, 2020: member

    Yes, I detected it on Linux when building with clang.

  9. laanwj closed this on Jun 29, 2020

  10. PastaPastaPasta referenced this in commit bebd4fd58c on Jun 27, 2021
  11. PastaPastaPasta referenced this in commit afa2a6a543 on Jun 28, 2021
  12. PastaPastaPasta referenced this in commit 0415ad7ab0 on Jun 29, 2021
  13. MarcoFalke locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-19 09:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me