It is needed when building Octave targeting Windows. Without it, the
implementation of "casin" from the Windows runtime is used instead of
the replacement from MinGW-w64. That means that results for the
"casin" function are wrong without that change.
* lib/autoconf/fortran.m4: Do not remove "-lmingwex" or "-lmoldname"
from the linker flags when targeting MinGW. Removing "-lmingwex" causes
an incorrect linker resolution for functions like "casin" for projects
that consist of Fortran and C++ sources. Removing "-lmoldname" causes
issues for Fortran projects that try to use POSIX-like C functions
without a '_' symbol prefix when targeting MinGW.
-lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \
|-LANG:=* | -LIST:* | -LNO:* | -link)
;;
- -lkernel32 | -lmingw* | -lmoldname)
+ -lkernel32)
# Ignore this library only on Windows-like systems.
case $host_os in
cygwin* | msys* | mingw* | windows*) ;;