official-stockfish / Stockfish

A free and strong UCI chess engine
https://stockfishchess.org/
GNU General Public License v3.0
11.61k stars 2.28k forks source link

Makefile option COMP=mingw with additional LDFLAGS produced -static flag twice #1908

Closed d3vv closed 5 years ago

d3vv commented 5 years ago

for example:

LDFLAGS="" make -j build ARCH=x86-64-modern COMP=mingw

g++ -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 -static -static

d3vv commented 5 years ago

triple for pgo:

LDFLAGS="" make -j profile-build ARCH=x86-64-modern COMP=mingw

g++ -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 -static -static -lgcov -static

snicolet commented 5 years ago

What does the g++ compiler documentation says in case of duplicate options on the command line?

mcostalba commented 5 years ago

Indeed I don't see this as an issue (repeated options are correctly handled by the compiler). Eventually an esthetic one, but IMO it doesn't worth an effort.