msys2 / MINGW-packages

Package scripts for MinGW-w64 targets to build under MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
2.29k stars 1.22k forks source link

clang 7.0.1 does not work with -fuse-ld=gold LDFLAG #4807

Closed d3vv closed 5 years ago

d3vv commented 5 years ago
..

clang++ -Wall -Wcast-qual -fno-exceptions -std=c++11  -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT   -c -o syzygy/tbprobe.o syzygy/tbprobe.cpp
clang++ -o stockfish.exe benchmark.o bitbase.o bitboard.o endgame.o evaluate.o main.o material.o misc.o movegen.o movepick.o pawns.o position.o psqt.o search.o thread.o timeman.o tt.o uci.o ucioption.o syzygy/tbprobe.o -fuse-ld=gold  -static  -static
C:\msys64\mingw64\bin\ld.gold: error: C:\msys64\mingw64\x86_64-w64-mingw32\lib\crt2.o:1:2: invalid character
C:\msys64\mingw64\bin\ld.gold: error: C:\msys64\mingw64\x86_64-w64-mingw32\lib\crt2.o:1:2: syntax error, unexpected $end
C:\msys64\mingw64\bin\ld.gold: error: C:\msys64\mingw64\x86_64-w64-mingw32\lib\crt2.o: not an object or archive
C:\msys64\mingw64\bin\ld.gold: error: C:\msys64\mingw64\lib\gcc\x86_64-w64-mingw32\8.2.1\crtbegin.o:1:2: invalid character
C:\msys64\mingw64\bin\ld.gold: error: C:\msys64\mingw64\lib\gcc\x86_64-w64-mingw32\8.2.1\crtbegin.o:1:2: syntax error, unexpected $end
C:\msys64\mingw64\bin\ld.gold: error: C:\msys64\mingw64\lib\gcc\x86_64-w64-mingw32\8.2.1\crtbegin.o: not an object or archive
C:\msys64\mingw64\bin\ld.gold: error: benchmark.o:1:2: invalid character
C:\msys64\mingw64\bin\ld.gold: error: benchmark.o:1:2: syntax error, unexpected $end

..

C:\msys64\mingw64\bin\ld.gold: error: syzygy/tbprobe.o:1:2: invalid character
C:\msys64\mingw64\bin\ld.gold: error: syzygy/tbprobe.o:1:2: syntax error, unexpected $end
C:\msys64\mingw64\bin\ld.gold: error: syzygy/tbprobe.o: not an object or archive
C:\msys64\mingw64\bin\ld.gold: error: C:\msys64\mingw64\lib\gcc\x86_64-w64-mingw32\8.2.1\crtend.o:1:2: invalid character
C:\msys64\mingw64\bin\ld.gold: error: C:\msys64\mingw64\lib\gcc\x86_64-w64-mingw32\8.2.1\crtend.o:1:2: syntax error, unexpected $end
C:\msys64\mingw64\bin\ld.gold: error: C:\msys64\mingw64\lib\gcc\x86_64-w64-mingw32\8.2.1\crtend.o: not an object or archive
C:\msys64\mingw64\bin\ld.gold: error: unrecognized emulation i386pep
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Makefile:496: stockfish.exe] Error 1
make[1]: Leaving directory '/home/dew/REPOS/Stockfish/src'
make: *** [Makefile:413: build] Error 2
Alexpux commented 5 years ago

@d3vv open bugreports on LLVM bugtracker. There are nothing to do from my side

Alexpux commented 5 years ago

@d3vv stop opening clang/llvm issues

d3vv commented 5 years ago

But it is not only clang and for gcc too!

Alexpux commented 5 years ago

@d3vv then also post to GCC bugtracker. Im not GCC/clang developer and will not try to fix it myself

mati865 commented 5 years ago

Gold doesn't support COFF and this probably won't change.