Ok I see, yeah it seems to work with some caveats.
I think the issue is with my inclusion of uint64_t types and additional libs.
Without including any of the libs I need it seems to be fine. When I add the libraries I need to link with it has undefined references to __atomic_*_8.
Now that I know a little more, I guess I can play around with it and see which library is causing the problem. I'll follow back up.
Test code:
Code: Select all
#include <atomic>
int main()
{
std::atomic<uint64_t> test;
std::atomic<bool> test2;
test.store(3);
test+= 2;
test-=1;
if (test != 1){
}
test2 = false;
test2.store(true);
int value = test.load();
bool value2 = test.load();
// Not defined / deleted
//std::atomic<uint64_t> test3 = test;
return 0;
}
No libraries compiles fine:
Code: Select all
root@4f0d20892574:/build# /opt/devkitpro/devkitPPC/bin/powerpc-eabi-g++ main.cpp -std=c++11 -mrvl -mcpu=750 -meabi -mhard-float -ffunction-sections -fdata-sections -O2 -o main
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.2.0/../../../../powerpc-eabi/bin/ld: warning: cannot find entry symbol _start; defaulting to 80004024
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.2.0/../../../../powerpc-eabi/bin/ld: main: warning: allocated section `.data' not in segment
With needed libraries missing symbols:
Code: Select all
/opt/devkitpro/devkitPPC/bin/powerpc-eabi-g++ main.cpp -o main -L/opt/devkitpro/wut/lib -L/opt/devkitpro/portlibs/gamecube/lib -L/opt/devkitpro/portlibs/ppc/lib -Wl,--as-needed -Wl,--no-undefined -static -static-libgcc -static-libstdc++ -Wl,--start-group /opt/devkitpro/portlibs/ppc/lib/libharfbuzz.a -lm /opt/devkitpro/portlibs/ppc/lib/libfreetype.a /opt/devkitpro/portlibs/ppc/lib/libbz2.a /opt/devkitpro/portlibs/ppc/lib/libpng16.a /opt/devkitpro/portlibs/ppc/lib/libz.a /opt/devkitpro/portlibs/ppc/lib/libjpeg.a /opt/devkitpro/portlibs/gamecube/lib/libSDL2main.a /opt/devkitpro/portlibs/gamecube/lib/libSDL2.a -mogc -mcpu=750 -meabi -mhard-float /opt/devkitpro/libogc/lib/cube/libaesnd.a /opt/devkitpro/libogc/lib/cube/libfat.a /opt/devkitpro/libogc/lib/cube/libogc.a /opt/devkitpro/portlibs/gamecube/lib/libSDL2_ttf.a -mogc -mcpu=750 -meabi -mhard-float /opt/devkitpro/portlibs/gamecube/lib/libSDL2_mixer.a /opt/devkitpro/portlibs/ppc/lib/libvorbisidec.a /opt/devkitpro/portlibs/ppc/lib/libmodplug.a /opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.2.0/../../../../powerpc-eabi/lib/libstdc++.a /opt/devkitpro/portlibs/ppc/lib/libmpg123.a /opt/devkitpro/portlibs/ppc/lib/libopusfile.a /opt/devkitpro/portlibs/ppc/lib/libopus.a /opt/devkitpro/portlibs/ppc/lib/libFLAC.a /opt/devkitpro/portlibs/ppc/lib/libogg.a -mogc -mcpu=750 -meabi -mhard-float /opt/devkitpro/portlibs/gamecube/lib/libSDL2_gfx.a -mogc -mcpu=750 -meabi -mhard-float /opt/devkitpro/portlibs/ppc/lib/libvorbis.a /opt/devkitpro/portlibs/ppc/lib/libvorbisfile.a -Wl,--end-group -mogc -mcpu=750 -meabi -mhard-float -mogc -mcpu=750 -meabi -mhard-float -mogc -mcpu=750 -meabi -mhard-float -mogc -mcpu=750 -meabi -mhard-float -mogc -DGEKKO -mcpu=750 -meabi -mhard-float
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.2.0/../../../../powerpc-eabi/bin/ld: /tmp/ccVXHedv.o: in function `main':
main.cpp:(.text.main+0x94): undefined reference to `__atomic_store_8'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.2.0/../../../../powerpc-eabi/bin/ld: main.cpp:(.text.main+0x150): undefined reference to `__atomic_load_8'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.2.0/../../../../powerpc-eabi/bin/ld: main.cpp:(.text.main+0x1b0): undefined reference to `__atomic_load_8'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.2.0/../../../../powerpc-eabi/bin/ld: /tmp/ccVXHedv.o: in function `_ZNSt13__atomic_baseIyEpLEy':
main.cpp:(.text._ZNSt13__atomic_baseIyEpLEy[_ZNSt13__atomic_baseIyEpLEy]+0x3c): undefined reference to `__atomic_fetch_add_8'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.2.0/../../../../powerpc-eabi/bin/ld: /tmp/ccVXHedv.o: in function `_ZNSt13__atomic_baseIyEmIEy':
main.cpp:(.text._ZNSt13__atomic_baseIyEmIEy[_ZNSt13__atomic_baseIyEmIEy]+0x3c): undefined reference to `__atomic_fetch_sub_8'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.2.0/../../../../powerpc-eabi/bin/ld: /tmp/ccVXHedv.o: in function `_ZNKSt13__atomic_baseIyEcvyEv':
main.cpp:(.text._ZNKSt13__atomic_baseIyEcvyEv[_ZNKSt13__atomic_baseIyEcvyEv]+0x6c): undefined reference to `__atomic_load_8'
collect2: error: ld returned 1 exit status