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

std::atomic fails with this compiler version #743

Open
vortex314 opened this issue Mar 23, 2020 · 0 comments
Open

std::atomic fails with this compiler version #743

vortex314 opened this issue Mar 23, 2020 · 0 comments

Comments

@vortex314
Copy link

vortex314 commented Mar 23, 2020

I use the compiler version as indicated by the build of esp-open-rtos : 4.8.5
$ xtensa-lx106-elf-gcc --version
xtensa-lx106-elf-gcc (crosstool-NG crosstool-ng-1.22.0-60-g37b07f6f) 4.8.5
However the c++ std::atomic compiles, but doesn't link. See below.
Missing library for : __atomic_compare_exchange_4
Any suggestions ?

LD build/nanoEsp8266.out
./build/program.a(main.o):(.text.ZNSt13__atomic_baseIjE21compare_exchange_weakERjjSt12memory_orderS2[std::__atomic_base::compare_exchange_weak(unsigned int&, unsigned int, std::memory_order, std::memory_order)]+0x0): undefined reference to __atomic_compare_exchange_4' ./build/program.a(main.o): In function std::__atomic_base::compare_exchange_weak(unsigned int&, unsigned int, std::memory_order, std::memory_order)':
main.cpp:(.text.ZNSt13__atomic_baseIjE21compare_exchange_weakERjjSt12memory_orderS2[std::__atomic_base::compare_exchange_weak(unsigned int&, unsigned int, std::memory_order, std::memory_order)]+0x36): undefined reference to `__atomic_compare_exchange_4'
collect2: error: ld returned 1 exit status
../esp-open-rtos/common.mk:232: recipe for target 'build/nanoEsp8266.out' failed
make: *** [build/nanoEsp8266.out] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant