In Fedora 34, using gcc 11.2, mingw gcc 10.2 and clang12, all is running fine.
In Fedora 35, using gcc 11.2, mingw gcc 11.2 and clang13, static builds on linux target are creating a segfault in some part of the code.
Running in debug code, no segfault. Windows target, no segfault neither.
Code: Select all
g++ -std=c++11 -m64 -O3 -Ofast -static -static-libstdc++ -flto -funroll-loops -fopenmp \
../src/*.cpp -pthread -s -o ../dist/broken-gcc-target
g++ -std=c++11 -m64 -O3 -Ofast -march=native -flto -funroll-loops -fopenmp \
-ffast-math -fno-math-errno -funsafe-math-optimizations -freciprocal-math -ffinite-math-only -fno-rtti \
../src/*.cpp -pthread -s -o ../dist/running-gcc-target
clang++ -m64 -O3 -Ofast -march=native -flto -stdlib=libstdc++ \
../src/*.cpp -pthread -s -o ../dist/running-clang-target
clang++ -m64 -O3 -Ofast -flto -static -stdlib=libstdc++ -L/usr/lib/x86_64-linux-gnu \
../src/*.cpp -pthread -s -o ../dist/broken-clang-target
x86_64-w64-mingw32-c++ -std=c++11 -m64 -O3 -Ofast -static -static-libgcc -static-libstdc++ \
-flto -funroll-loops -pthread -L/usr/x86_64-w64-mingw32/sys-root/mingw/lib \
../src/*.cpp -pthread -s -o ../dist/running-gcc-target.exe
Any clues?
Ps: code taken from my belofte project.