• Fabrice Fontaine's avatar
    fix static build with libatomic · 6de5f18b
    Fabrice Fontaine authored
    Commit 2ec5a33f added support to link
    with -latomic if needed however using LDFLAGS doesn't work when
    statically linking because LDFLAGS is added before LIBS
    
    Detection of atomic fails with:
    
    configure:23230: /accts/mlweber1/instance-2/output/host/bin/sparc-linux-g++ -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os   -static -static -pedantic -Werror -Wall -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE -Wno-long-long -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -static -latomic conftest.cpp -lrt -lpthread -lstdc++ >&5
    /tmp/ccgrvVTg.o: In function `main':
    conftest.cpp:(.text.startup+0x10): undefined reference to `__atomic_fetch_add_4'
    collect2: error: ld returned 1 exit status
    
    So use LIBS instead of LDFLAGS
    
    Fixes:
     - http://autobuild.buildroot.net/results/c471d6b1061a8516f7772735e471db68a32965aaSigned-off-by: 's avatarFabrice Fontaine <fontaine.fabrice@gmail.com>
    6de5f18b
Name
Last commit
Last update
.github Loading commit data...
RELICENSE Loading commit data...
builds Loading commit data...
doc Loading commit data...
external Loading commit data...
include Loading commit data...
m4 Loading commit data...
packaging Loading commit data...
perf Loading commit data...
src Loading commit data...
tests Loading commit data...
tools Loading commit data...
unittests Loading commit data...
.clang-format Loading commit data...
.clang-tidy Loading commit data...
.gitignore Loading commit data...
.hgeol Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
AUTHORS Loading commit data...
CMakeLists.txt Loading commit data...
COPYING Loading commit data...
COPYING.LESSER Loading commit data...
Dockerfile Loading commit data...
Doxygen.cfg Loading commit data...
INSTALL Loading commit data...
Jenkinsfile Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README.cygwin.md Loading commit data...
README.doxygen.md Loading commit data...
README.md Loading commit data...
acinclude.m4 Loading commit data...
appveyor.yml Loading commit data...
autogen.sh Loading commit data...
branding.bmp Loading commit data...
ci_build.sh Loading commit data...
ci_deploy.sh Loading commit data...
configure.ac Loading commit data...
installer.ico Loading commit data...
version.sh Loading commit data...