Skip to content

32-bit platforms need linking to libatomic to support 8-byte atomic builtins #104

Open
@barracuda156

Description

@barracuda156

google-benchmark needs linking to libatomic on 32-bit platforms:

/opt/local/bin/g++-mp-13 -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 -fno-operator-names -arch ppc -mmacosx-version-min=10.6 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/local/lib -Wl,-headerpad_max_install_names CMakeFiles/aero_benchmarks.dir/benchmark_aero.cc.o -o aero_benchmarks   -L/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_iv/iv/work/iv-64c3a9c7c517063f29d90d449180ea8f6f4d946f/third_party/google-test  -L/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_iv/iv/work/iv-64c3a9c7c517063f29d90d449180ea8f6f4d946f/third_party/google-benchmark  -Wl,-rpath,/opt/local/lib ../../../third_party/google-benchmark/libgoogle-benchmark.a //usr/lib/libm.dylib 
Undefined symbols:
  "___atomic_load_8", referenced from:
      __ZN9benchmark5State11KeepRunningEv in libgoogle-benchmark.a(benchmark.cc.o)
  "___atomic_store_8", referenced from:
      __ZN9benchmark5State12StartRunningEv in libgoogle-benchmark.a(benchmark.cc.o)
      __ZN9benchmark5State9FastClock8BGThreadEv in libgoogle-benchmark.a(benchmark.cc.o)
ld: symbol(s) not found

P. S. I understand it is a third-party library, but since it is bundled, it makes sense to fix it locally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions