Example: AVX2 --->>>g++ -o DON.exe benchmark.o bitboard.o engine.o evaluate.o main.o memory.o misc.o movegen.o movepick.o option.o perft.o polybook.o position.o search.o thread.o timeman.o tt.o uci.o tune.o full_threats.o half_ka_v2_hm.o accumulator.o network.o nmisc.o tablebase.o -fprofile-generate -m64 -Wl,--no-as-needed -static -lpthread -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-generate -pedantic -Wextra -Wshadow -Wmissing-declarations -m64 -DUSE_PTHREADS -DNDEBUG -O3 -funroll-loops -DIS_64BIT -DUSE_PREFETCH -msse -DUSE_POPCNT -msse3 -mpopcnt -DUSE_AVX2 -mavx2 -mbmi -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2 -DARCH=x86-64-avx2 -flto=full
lld: error: unknown argument: --no-as-needed
g++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [Makefile
make[2]: Leaving directory '/home/Privat/don/don/src'
make[1]: *** [Makefile
make[1]: Leaving directory '/home/Privat/don/don/src'
make: *** [Makefile:994: profile-build] Error 2