Skip to content
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

CMakeLists.txt: check for atomic library #765

Closed
wants to merge 1 commit into from
Closed

CMakeLists.txt: check for atomic library #765

wants to merge 1 commit into from

Commits on Dec 27, 2019

  1. CMakeLists.txt: check for atomic library

    On some architectures, atomic binutils are provided by the libatomic
    library from gcc. Linking with libatomic is therefore necessary,
    otherwise the build fails with:
    
    [100%] Linking CXX executable leveldbutil
    /home/fabrice/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/7.4.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: libleveldb.a(env_posix.cc.o): in function `leveldb::(anonymous namespace)::Limiter::Acquire()':
    env_posix.cc:(.text+0x124): undefined reference to `__atomic_fetch_sub_4'
    
    This is often for example the case on sparcv8 32 bit.
    
    Fixes:
     - http://autobuild.buildroot.org/results/01d5a50581ac9e9b46f40e6f9665f74897db5e6f
    
    Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
    ffontaine committed Dec 27, 2019
    Configuration menu
    Copy the full SHA
    9e82eb5 View commit details
    Browse the repository at this point in the history