mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-23 18:49:08 +08:00
Fix linker flags for MSYS2 clang64 builds
MSYS2 clang64 uses the lld linker which does not support --as-needed. The normal GNU ld uses that linker option with ELF targets but ignores it for PE targets (.exe, .dll), so it can be removed. Remove also the -Wl, which is only needed when linker options are passed to the compiler but not when they are directly passed to the linker. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
82a7a87b3b
commit
8216257015
@ -92,7 +92,7 @@ case "${host_os}" in
|
||||
mingw*)
|
||||
AM_CONDITIONAL([T_WIN], true)
|
||||
AM_CONDITIONAL([ADD_RT], false)
|
||||
AC_SUBST([AM_LDFLAGS], ['-Wl,-no-undefined -Wl,--as-needed'])
|
||||
AC_SUBST([AM_LDFLAGS], ['-no-undefined'])
|
||||
;;
|
||||
cygwin*)
|
||||
AM_CONDITIONAL([ADD_RT], false)
|
||||
|
@ -103,7 +103,7 @@ tesseract_LDADD += $(libcurl_LIBS)
|
||||
if T_WIN
|
||||
tesseract_LDADD += -ltiff
|
||||
tesseract_LDADD += -lws2_32
|
||||
libtesseract_la_LDFLAGS += -no-undefined -Wl,--as-needed -lws2_32
|
||||
libtesseract_la_LDFLAGS += -no-undefined -lws2_32
|
||||
endif
|
||||
if ADD_RT
|
||||
tesseract_LDADD += -lrt
|
||||
|
Loading…
Reference in New Issue
Block a user